mirror of
https://github.com/Ragora/T2-CPP.git
synced 2026-03-28 16:49:16 +00:00
Bound T2Bullet to T2's update tick; got rid of the old timing code
This commit is contained in:
parent
ea2542532f
commit
96f77ba232
8 changed files with 120 additions and 288 deletions
|
|
@ -1,42 +0,0 @@
|
|||
/*
|
||||
* CGameTime.h
|
||||
* Small singleton class that is used for some time-sensitive operations.
|
||||
* Copyright (c) 2013 Robert MacGregor
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE_CGAMETIME_H_
|
||||
#define _INCLUDE_CGAMETIME_H_
|
||||
|
||||
#include <time.h>
|
||||
|
||||
//! Root Game Namespace
|
||||
namespace Game
|
||||
{
|
||||
//! Singleton class for timing functions in FBLA
|
||||
class CGameTime
|
||||
{
|
||||
public:
|
||||
//! Get the instance
|
||||
static CGameTime *getPointer(void);
|
||||
//! Destroys the instance
|
||||
static void destroy(void);
|
||||
|
||||
//! Update Timer
|
||||
void update(void);
|
||||
//! Returns the simtime in seconds
|
||||
float getSimTime(void);
|
||||
//! Returns the delta time in seconds
|
||||
float getDelta(void);
|
||||
|
||||
private:
|
||||
//! Default Constructor
|
||||
CGameTime(void);
|
||||
//! Default Destructor
|
||||
~CGameTime(void);
|
||||
|
||||
float time_current_seconds, time_last_seconds, time_delta_seconds;
|
||||
float time_current_clocks, time_last_clocks, time_delta_clocks;
|
||||
}; // End Class CGameTime
|
||||
} // End Namespace Game
|
||||
|
||||
#endif // _INCLUDE_CGAMETIME_H_
|
||||
|
|
@ -30,5 +30,4 @@
|
|||
// TODO: reference additional headers your program requires here
|
||||
#include <LinkerAPI.h>
|
||||
#include <btBulletDynamicsCommon.h>
|
||||
#include "CGameTime.h"
|
||||
#include "config.h"
|
||||
|
|
@ -14,7 +14,6 @@ const char* conGetVariable(Linker::SimObject *obj,S32 argc, const char* argv[]);
|
|||
// --- BulletDLL functions ------------------------------------------------
|
||||
bool conBulletInitialize(Linker::SimObject *obj, S32 argc, const char *argv[]);
|
||||
bool conBulletDeinitialize(Linker::SimObject *obj, S32 argc, const char *argv[]);
|
||||
bool conBulletUpdate(Linker::SimObject *obj, S32 argc, const char *argv[]);
|
||||
|
||||
// --- Get Commands -------------------------------------------------------
|
||||
const char *conBulletGetPosition(Linker::SimObject *obj, S32 argc, const char *argv[]);
|
||||
|
|
@ -29,3 +28,5 @@ bool conBulletSetRotation(Linker::SimObject *obj, S32 argc, const char *argv[]);
|
|||
|
||||
// --- Scene Addition Commands --------------------------------------------
|
||||
const char *conBulletCreateCube(Linker::SimObject *obj, S32 argc, const char *argv[]);
|
||||
|
||||
void updateBullet(const unsigned int& timeDifference);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue