namespace
This commit is contained in:
@@ -118,7 +118,7 @@ static void CheckFocus()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameLoop()
|
void GameLoop::GameLoop()
|
||||||
{
|
{
|
||||||
/* People may want to do something else while songs are loading, so do
|
/* People may want to do something else while songs are loading, so do
|
||||||
* this after loading songs. */
|
* this after loading songs. */
|
||||||
@@ -257,13 +257,13 @@ int ConcurrentRenderer::StartRenderThread( void *p )
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartConcurrentRendering()
|
void GameLoop::StartConcurrentRendering()
|
||||||
{
|
{
|
||||||
ASSERT( g_pConcurrentRenderer == NULL );
|
ASSERT( g_pConcurrentRenderer == NULL );
|
||||||
g_pConcurrentRenderer = new ConcurrentRenderer;
|
g_pConcurrentRenderer = new ConcurrentRenderer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FinishConcurrentRendering()
|
void GameLoop::FinishConcurrentRendering()
|
||||||
{
|
{
|
||||||
SAFE_DELETE( g_pConcurrentRenderer );
|
SAFE_DELETE( g_pConcurrentRenderer );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,12 @@
|
|||||||
#ifndef GAME_LOOP_H
|
#ifndef GAME_LOOP_H
|
||||||
#define GAME_LOOP_H
|
#define GAME_LOOP_H
|
||||||
|
|
||||||
void GameLoop();
|
namespace GameLoop
|
||||||
void StartConcurrentRendering();
|
{
|
||||||
void FinishConcurrentRendering();
|
void GameLoop();
|
||||||
|
void StartConcurrentRendering();
|
||||||
|
void FinishConcurrentRendering();
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -584,14 +584,14 @@ void ScreenManager::RunConcurrentlyPrepareScreen()
|
|||||||
if( !ScreenIsPrepped(sScreenName) )
|
if( !ScreenIsPrepped(sScreenName) )
|
||||||
{
|
{
|
||||||
g_bIsConcurrentlyLoading = true;
|
g_bIsConcurrentlyLoading = true;
|
||||||
StartConcurrentRendering();
|
GameLoop::StartConcurrentRendering();
|
||||||
|
|
||||||
if( g_setGroupedScreens.find(sScreenName) == g_setGroupedScreens.end() )
|
if( g_setGroupedScreens.find(sScreenName) == g_setGroupedScreens.end() )
|
||||||
DeletePreparedScreens();
|
DeletePreparedScreens();
|
||||||
|
|
||||||
PrepareScreen( sScreenName );
|
PrepareScreen( sScreenName );
|
||||||
|
|
||||||
FinishConcurrentRendering();
|
GameLoop::FinishConcurrentRendering();
|
||||||
g_bIsConcurrentlyLoading = false;
|
g_bIsConcurrentlyLoading = false;
|
||||||
|
|
||||||
LOG->Trace( "Concurrent prepare of %s finished", sScreenName.c_str() );
|
LOG->Trace( "Concurrent prepare of %s finished", sScreenName.c_str() );
|
||||||
|
|||||||
@@ -1084,7 +1084,7 @@ int main(int argc, char* argv[])
|
|||||||
NSMAN->DisplayStartupStatus(); // If we're using networking show what happened
|
NSMAN->DisplayStartupStatus(); // If we're using networking show what happened
|
||||||
|
|
||||||
/* Run the main loop. */
|
/* Run the main loop. */
|
||||||
GameLoop();
|
GameLoop::GameLoop();
|
||||||
|
|
||||||
/* If we ended mid-game, finish up. */
|
/* If we ended mid-game, finish up. */
|
||||||
GAMESTATE->EndGame();
|
GAMESTATE->EndGame();
|
||||||
|
|||||||
Reference in New Issue
Block a user