get rid of TIMER

This commit is contained in:
Glenn Maynard
2002-12-19 23:13:52 +00:00
parent d8c4057660
commit 73eac8f809
3 changed files with 2 additions and 9 deletions
-2
View File
@@ -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. */
-4
View File
@@ -26,8 +26,4 @@ private:
int m_iLastDeltaTime;
};
extern RageTimer* TIMER; // global and accessable from anywhere in our program
#endif
+2 -3
View File
@@ -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