From d879e4802a71c1e1d11035bbf81bc713a1ac28ef Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 14 Oct 2006 02:37:15 +0000 Subject: [PATCH] Move LoadingScreen to a global. LoadingScreen is a variable that should be available to all loading definitions. Param does this currently, but I'm redesigning that, and this particular case doesn't fit. Conceptually, it really is a global (though perhaps should be tucked away with an environment or something). --- stepmania/src/Screen.cpp | 3 ++- stepmania/src/ScreenManager.cpp | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stepmania/src/Screen.cpp b/stepmania/src/Screen.cpp index 94b3df0a49..08cbd58b11 100644 --- a/stepmania/src/Screen.cpp +++ b/stepmania/src/Screen.cpp @@ -18,9 +18,10 @@ void Screen::InitScreen( Screen *pScreen ) { /* Set the name of the loading screen. */ - ActorUtil::ActorParam LoadingScreen( "LoadingScreen", pScreen->GetName() ); + LUA->SetGlobal( "LoadingScreen", pScreen->GetName() ); pScreen->Init(); + LUA->UnsetGlobal( "LoadingScreen" ); } Screen::~Screen() diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index 990ac67cb9..7d4ec21fa3 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -124,10 +124,9 @@ namespace ScreenManagerUtil g_ScreenStack.push_back( ls ); /* Set the name of the loading screen. */ - ActorUtil::ActorParam LoadingScreen( "LoadingScreen", ls.m_pScreen->GetName() ); + LUA->SetGlobal( "LoadingScreen", ls.m_pScreen->GetName() ); ls.m_pScreen->BeginScreen(); - - LoadingScreen.Release(); + LUA->UnsetGlobal( "LoadingScreen" ); SCREENMAN->RefreshCreditsMessages();