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