From 25796bd1872500c45592b17cafcb78afeb02da27 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 23 Apr 2007 23:42:27 +0000 Subject: [PATCH] remove IsStagePossible --- stepmania/src/GameState.cpp | 28 ---------------------------- stepmania/src/GameState.h | 1 - 2 files changed, 29 deletions(-) diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index eee1422f7d..00a2b06802 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -946,32 +946,6 @@ Stage GameState::GetCurrentStage() const else return (Stage)(STAGE_1+GetLargestCurrentStageIndexForAnyHumanPlayer()); } -// Return true if it's possible for GetCurrentStage() to return the given stage. -bool GameState::IsStagePossible( Stage s ) const -{ - /* HACK: Find out what the stage would be without long or marathon. - * This should never change during a screen. */ - Song *pSong = m_pCurSong; - // XXX: Using GAMESTATE to get around const is potentially dangerous. - GAMESTATE->m_pCurSong.SetWithoutBroadcast( NULL ); - Stage actual = GAMESTATE->GetCurrentStage(); - GAMESTATE->m_pCurSong.SetWithoutBroadcast( pSong ); - - /* Check long/marathon, which can change the stage to FINAL. */ - if( s == STAGE_FINAL && actual >= STAGE_1 && actual <= STAGE_FINAL ) - { - Stage max_actual = actual; - - // For long/marathon songs: - enum_add( max_actual, +2 ); - - if( max_actual >= STAGE_FINAL ) - return true; - } - - return s == actual; -} - int GameState::GetCourseSongIndex() const { int iSongIndex = 0; @@ -2190,7 +2164,6 @@ public: DEFINE_METHOD( IsExtraStage, IsExtraStage() ) DEFINE_METHOD( IsExtraStage2, IsExtraStage2() ) DEFINE_METHOD( GetCurrentStage, GetCurrentStage() ) - DEFINE_METHOD( IsStagePossible, IsStagePossible( Enum::Check(L, 1)) ) DEFINE_METHOD( HasEarnedExtraStage, HasEarnedExtraStage() ) DEFINE_METHOD( GetEasiestStepsDifficulty, GetEasiestStepsDifficulty() ) DEFINE_METHOD( IsEventMode, IsEventMode() ) @@ -2359,7 +2332,6 @@ public: ADD_METHOD( IsExtraStage ); ADD_METHOD( IsExtraStage2 ); ADD_METHOD( GetCurrentStage ); - ADD_METHOD( IsStagePossible ); ADD_METHOD( HasEarnedExtraStage ); ADD_METHOD( GetEasiestStepsDifficulty ); ADD_METHOD( IsEventMode ); diff --git a/stepmania/src/GameState.h b/stepmania/src/GameState.h index 2db922d303..b27c7ea82b 100644 --- a/stepmania/src/GameState.h +++ b/stepmania/src/GameState.h @@ -143,7 +143,6 @@ public: bool IsExtraStage() const; bool IsExtraStage2() const; Stage GetCurrentStage() const; - bool IsStagePossible( Stage s ) const; int GetCourseSongIndex() const; RString GetPlayerDisplayName( PlayerNumber pn ) const;