get rid of TIMER
This commit is contained in:
@@ -17,8 +17,6 @@
|
|||||||
#include "SDL-1.2.5/include/SDL.h"
|
#include "SDL-1.2.5/include/SDL.h"
|
||||||
#include "SDL-1.2.5/include/SDL_timer.h"
|
#include "SDL-1.2.5/include/SDL_timer.h"
|
||||||
|
|
||||||
RageTimer* TIMER = NULL;
|
|
||||||
|
|
||||||
const float SECS_IN_DAY = 60*60*24;
|
const float SECS_IN_DAY = 60*60*24;
|
||||||
|
|
||||||
/* XXX: SDL_GetTicks() wraps every month or so. Handle it. */
|
/* XXX: SDL_GetTicks() wraps every month or so. Handle it. */
|
||||||
|
|||||||
@@ -26,8 +26,4 @@ private:
|
|||||||
int m_iLastDeltaTime;
|
int m_iLastDeltaTime;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
extern RageTimer* TIMER; // global and accessable from anywhere in our program
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -211,7 +211,6 @@ int main(int argc, char* argv[])
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
LOG->ShowConsole();
|
LOG->ShowConsole();
|
||||||
#endif
|
#endif
|
||||||
TIMER = new RageTimer;
|
|
||||||
GAMESTATE = new GameState;
|
GAMESTATE = new GameState;
|
||||||
PREFSMAN = new PrefsManager;
|
PREFSMAN = new PrefsManager;
|
||||||
GAMEMAN = new GameManager;
|
GAMEMAN = new GameManager;
|
||||||
@@ -316,7 +315,6 @@ int main(int argc, char* argv[])
|
|||||||
SAFE_DELETE( MUSIC );
|
SAFE_DELETE( MUSIC );
|
||||||
SAFE_DELETE( SOUND );
|
SAFE_DELETE( SOUND );
|
||||||
SAFE_DELETE( SOUNDMAN );
|
SAFE_DELETE( SOUNDMAN );
|
||||||
SAFE_DELETE( TIMER );
|
|
||||||
SAFE_DELETE( FONT );
|
SAFE_DELETE( FONT );
|
||||||
SAFE_DELETE( TEXTUREMAN );
|
SAFE_DELETE( TEXTUREMAN );
|
||||||
SAFE_DELETE( DISPLAY );
|
SAFE_DELETE( DISPLAY );
|
||||||
@@ -417,6 +415,7 @@ static void HandleInputEvents(float fDeltaTime)
|
|||||||
|
|
||||||
void GameLoop()
|
void GameLoop()
|
||||||
{
|
{
|
||||||
|
RageTimer timer;
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
// process all queued events
|
// process all queued events
|
||||||
@@ -438,7 +437,7 @@ void GameLoop()
|
|||||||
/*
|
/*
|
||||||
* Update
|
* Update
|
||||||
*/
|
*/
|
||||||
float fDeltaTime = TIMER->GetDeltaTime();
|
float fDeltaTime = timer.GetDeltaTime();
|
||||||
|
|
||||||
// This was a hack to fix timing issues with the old ScreenSelectSong
|
// This was a hack to fix timing issues with the old ScreenSelectSong
|
||||||
// See ScreenManager::Update comments for why we shouldn't do this. -glenn
|
// See ScreenManager::Update comments for why we shouldn't do this. -glenn
|
||||||
|
|||||||
Reference in New Issue
Block a user