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_timer.h"
|
||||
|
||||
RageTimer* TIMER = NULL;
|
||||
|
||||
const float SECS_IN_DAY = 60*60*24;
|
||||
|
||||
/* XXX: SDL_GetTicks() wraps every month or so. Handle it. */
|
||||
|
||||
@@ -26,8 +26,4 @@ private:
|
||||
int m_iLastDeltaTime;
|
||||
};
|
||||
|
||||
|
||||
|
||||
extern RageTimer* TIMER; // global and accessable from anywhere in our program
|
||||
|
||||
#endif
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user