add ActorUtil::SetParamFromStack, ActorUtil::GetParam. Save params to

a table, not as global variables.  Saving and loading from globals is still
around temporarily.
This commit is contained in:
Glenn Maynard
2005-10-29 01:28:29 +00:00
parent fde59d8464
commit 938bfeb7b0
4 changed files with 80 additions and 17 deletions
+3 -7
View File
@@ -19,16 +19,12 @@
void Screen::InitScreen( Screen *pScreen )
{
/* Set the name of the loading screen, so Actor::LoadFromNode can
* access it. */
/* Set the name of the loading screen. */
LuaReference Old;
{
Lua *L = LUA->Get();
lua_getglobal( L, "LoadingScreen" );
Old.SetFromStack( L );
LuaHelpers::Push( pScreen->GetName(), L );
lua_setglobal( L, "LoadingScreen" );
ActorUtil::SetParamFromStack( L, "LoadingScreen", &Old );
LUA->Release( L );
}
@@ -38,7 +34,7 @@ void Screen::InitScreen( Screen *pScreen )
{
Lua *L = LUA->Get();
Old.PushSelf( L );
lua_setglobal( L, "LoadingScreen" );
ActorUtil::SetParamFromStack( L, "LoadingScreen" );
LUA->Release( L );
}
}