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_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<PlayerNumber>(L, 1)] = c;
return 0;
}
static int Dopefish( T* p, lua_State *L )
{
lua_pushboolean(L, p->m_bDopefish);
return 1;
}
LunaGameState()
{
+1 -1
View File
@@ -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();
+3 -3
View File
@@ -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. */