fix bugs, for real this time

This commit is contained in:
AJ Kelly
2011-03-09 19:12:15 -06:00
parent 7e99570ddb
commit e890bd446c
3 changed files with 11 additions and 6 deletions
+7 -2
View File
@@ -159,6 +159,8 @@ GameState::GameState() :
m_Environment = new LuaTable; m_Environment = new LuaTable;
m_bDopefish = false;
// Don't reset yet; let the first screen do it, so we can use PREFSMAN and THEME. // Don't reset yet; let the first screen do it, so we can use PREFSMAN and THEME.
//Reset(); //Reset();
@@ -321,7 +323,6 @@ void GameState::Reset()
m_bBackedOutOfFinalStage = false; m_bBackedOutOfFinalStage = false;
m_bEarnedExtraStage = false; m_bEarnedExtraStage = false;
m_bDopefish = false;
ApplyCmdline(); ApplyCmdline();
} }
@@ -2307,7 +2308,6 @@ public:
DEFINE_METHOD( GetNumSidesJoined, GetNumSidesJoined() ) DEFINE_METHOD( GetNumSidesJoined, GetNumSidesJoined() )
DEFINE_METHOD( GetCoinMode, GetCoinMode() ) DEFINE_METHOD( GetCoinMode, GetCoinMode() )
DEFINE_METHOD( GetPremium, GetPremium() ) DEFINE_METHOD( GetPremium, GetPremium() )
DEFINE_METHOD( Dopefish, m_bDopefish )
DEFINE_METHOD( GetSongOptionsString, m_SongOptions.GetCurrent().GetString() ) DEFINE_METHOD( GetSongOptionsString, m_SongOptions.GetCurrent().GetString() )
static int GetSongOptions( T* p, lua_State *L ) static int GetSongOptions( T* p, lua_State *L )
{ {
@@ -2447,6 +2447,11 @@ public:
p->m_pCurCharacters[Enum::Check<PlayerNumber>(L, 1)] = c; p->m_pCurCharacters[Enum::Check<PlayerNumber>(L, 1)] = c;
return 0; return 0;
} }
static int Dopefish( T* p, lua_State *L )
{
lua_pushboolean(L, p->m_bDopefish);
return 1;
}
LunaGameState() LunaGameState()
{ {
+1 -1
View File
@@ -13,7 +13,7 @@ public:
virtual void Init(); virtual void Init();
void Update( float fDeltaTime ); void Update( float fDeltaTime );
bool ScreenInstallOverlay::OverlayInput( const InputEventPlus &input ); bool OverlayInput( const InputEventPlus &input );
private: private:
void UpdateText(); void UpdateText();
+3 -3
View File
@@ -1041,9 +1041,6 @@ int main(int argc, char* argv[])
GAMESTATE = new GameState; GAMESTATE = new GameState;
if( GetCommandlineArgument("dopefish") )
GAMESTATE->m_bDopefish = true;
// This requires PREFSMAN, for PREFSMAN->m_bShowLoadingWindow. // This requires PREFSMAN, for PREFSMAN->m_bShowLoadingWindow.
LoadingWindow *pLoadingWindow = LoadingWindow::Create(); LoadingWindow *pLoadingWindow = LoadingWindow::Create();
if(pLoadingWindow == NULL) if(pLoadingWindow == NULL)
@@ -1073,6 +1070,9 @@ int main(int argc, char* argv[])
CommandLineActions::Handle(pLoadingWindow); CommandLineActions::Handle(pLoadingWindow);
if( GetCommandlineArgument("dopefish") )
GAMESTATE->m_bDopefish = true;
{ {
/* Now that THEME is loaded, load the icon for the current theme into /* Now that THEME is loaded, load the icon for the current theme into
* the loading window. */ * the loading window. */