From e890bd446c578735732f31e8716d56482bf431d1 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Wed, 9 Mar 2011 19:12:15 -0600 Subject: [PATCH] fix bugs, for real this time --- src/GameState.cpp | 9 +++++++-- src/ScreenInstallOverlay.h | 2 +- src/StepMania.cpp | 6 +++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/GameState.cpp b/src/GameState.cpp index 7d94636671..989e31c234 100644 --- a/src/GameState.cpp +++ b/src/GameState.cpp @@ -159,6 +159,8 @@ GameState::GameState() : m_Environment = new LuaTable; + m_bDopefish = false; + // Don't reset yet; let the first screen do it, so we can use PREFSMAN and THEME. //Reset(); @@ -321,7 +323,6 @@ void GameState::Reset() m_bBackedOutOfFinalStage = false; m_bEarnedExtraStage = false; - m_bDopefish = false; ApplyCmdline(); } @@ -2307,7 +2308,6 @@ public: DEFINE_METHOD( GetNumSidesJoined, GetNumSidesJoined() ) DEFINE_METHOD( GetCoinMode, GetCoinMode() ) DEFINE_METHOD( GetPremium, GetPremium() ) - DEFINE_METHOD( Dopefish, m_bDopefish ) DEFINE_METHOD( GetSongOptionsString, m_SongOptions.GetCurrent().GetString() ) static int GetSongOptions( T* p, lua_State *L ) { @@ -2447,6 +2447,11 @@ public: p->m_pCurCharacters[Enum::Check(L, 1)] = c; return 0; } + static int Dopefish( T* p, lua_State *L ) + { + lua_pushboolean(L, p->m_bDopefish); + return 1; + } LunaGameState() { diff --git a/src/ScreenInstallOverlay.h b/src/ScreenInstallOverlay.h index c939b11eea..6fd73eeb8b 100644 --- a/src/ScreenInstallOverlay.h +++ b/src/ScreenInstallOverlay.h @@ -13,7 +13,7 @@ public: virtual void Init(); void Update( float fDeltaTime ); - bool ScreenInstallOverlay::OverlayInput( const InputEventPlus &input ); + bool OverlayInput( const InputEventPlus &input ); private: void UpdateText(); diff --git a/src/StepMania.cpp b/src/StepMania.cpp index 8d5b893bc2..8c92f28ec2 100644 --- a/src/StepMania.cpp +++ b/src/StepMania.cpp @@ -1041,9 +1041,6 @@ int main(int argc, char* argv[]) GAMESTATE = new GameState; - if( GetCommandlineArgument("dopefish") ) - GAMESTATE->m_bDopefish = true; - // This requires PREFSMAN, for PREFSMAN->m_bShowLoadingWindow. LoadingWindow *pLoadingWindow = LoadingWindow::Create(); if(pLoadingWindow == NULL) @@ -1073,6 +1070,9 @@ int main(int argc, char* argv[]) CommandLineActions::Handle(pLoadingWindow); + if( GetCommandlineArgument("dopefish") ) + GAMESTATE->m_bDopefish = true; + { /* Now that THEME is loaded, load the icon for the current theme into * the loading window. */