From 9c9440c8a0f1608a6653d538aec2ac896062ec42 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 26 Sep 2006 20:32:41 +0000 Subject: [PATCH] PlayMode_Invalid --- stepmania/src/Course.cpp | 2 +- stepmania/src/GameCommand.cpp | 16 ++++++++-------- stepmania/src/GameConstantsAndTypes.h | 2 +- stepmania/src/GameState.cpp | 4 ++-- stepmania/src/MusicWheelItem.cpp | 2 +- stepmania/src/ScreenGameplaySyncMachine.cpp | 2 +- stepmania/src/ScreenSelectMusic.cpp | 2 +- stepmania/src/StageStats.cpp | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index da1666ef7d..abc82d8660 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -176,7 +176,7 @@ PlayMode Course::GetPlayMode() const case COURSE_TYPE_ONI: return PLAY_MODE_ONI; case COURSE_TYPE_SURVIVAL: return PLAY_MODE_ONI; case COURSE_TYPE_NONSTOP: return PLAY_MODE_NONSTOP; - default: ASSERT(0); return PLAY_MODE_INVALID; + default: ASSERT(0); return PlayMode_Invalid; } } diff --git a/stepmania/src/GameCommand.cpp b/stepmania/src/GameCommand.cpp index 58a4b104b7..5c9f1b75e2 100644 --- a/stepmania/src/GameCommand.cpp +++ b/stepmania/src/GameCommand.cpp @@ -36,7 +36,7 @@ void GameCommand::Init() m_MultiPlayer = MultiPlayer_INVALID; m_pGame = NULL; m_pStyle = NULL; - m_pm = PLAY_MODE_INVALID; + m_pm = PlayMode_Invalid; m_dc = DIFFICULTY_INVALID; m_CourseDifficulty = DIFFICULTY_INVALID; m_sPreferredModifiers = ""; @@ -80,7 +80,7 @@ bool GameCommand::DescribesCurrentMode( PlayerNumber pn ) const { if( m_pGame != NULL && m_pGame != GAMESTATE->m_pCurGame.Get() ) return false; - if( m_pm != PLAY_MODE_INVALID && GAMESTATE->m_PlayMode != m_pm ) + if( m_pm != PlayMode_Invalid && GAMESTATE->m_PlayMode != m_pm ) return false; if( m_pStyle && GAMESTATE->m_pCurStyle.Get() != m_pStyle ) return false; @@ -194,7 +194,7 @@ void GameCommand::LoadOne( const Command& cmd ) else if( sName == "playmode" ) { PlayMode pm = StringToPlayMode( sValue ); - if( pm != PLAY_MODE_INVALID ) + if( pm != PlayMode_Invalid ) m_pm = pm; else m_bInvalid |= true; @@ -433,7 +433,7 @@ int GetCreditsRequiredToPlayStyle( const Style *style ) static bool AreStyleAndPlayModeCompatible( const Style *style, PlayMode pm ) { - if( style == NULL || pm == PLAY_MODE_INVALID ) + if( style == NULL || pm == PlayMode_Invalid ) return true; switch( pm ) @@ -520,9 +520,9 @@ bool GameCommand::IsPlayable( RString *why ) const /* Don't allow a PlayMode that's incompatible with our current Style (if set), * and vice versa. */ - if( m_pm != PLAY_MODE_INVALID || m_pStyle != NULL ) + if( m_pm != PlayMode_Invalid || m_pStyle != NULL ) { - const PlayMode pm = (m_pm != PLAY_MODE_INVALID) ? m_pm : GAMESTATE->m_PlayMode; + const PlayMode pm = (m_pm != PlayMode_Invalid) ? m_pm : GAMESTATE->m_PlayMode; const Style *style = (m_pStyle != NULL)? m_pStyle: GAMESTATE->m_pCurStyle; if( !AreStyleAndPlayModeCompatible( style, pm ) ) { @@ -627,7 +627,7 @@ void GameCommand::ApplySelf( const vector &vpns ) const if( m_pGame != NULL ) GAMESTATE->SetCurGame( m_pGame ); - if( m_pm != PLAY_MODE_INVALID ) + if( m_pm != PlayMode_Invalid ) GAMESTATE->m_PlayMode.Set( m_pm ); if( m_pStyle != NULL ) @@ -792,7 +792,7 @@ void GameCommand::ApplySelf( const vector &vpns ) const bool GameCommand::IsZero() const { if( m_pGame != NULL || - m_pm != PLAY_MODE_INVALID || + m_pm != PlayMode_Invalid || m_pStyle != NULL || m_dc != DIFFICULTY_INVALID || m_sAnnouncer != "" || diff --git a/stepmania/src/GameConstantsAndTypes.h b/stepmania/src/GameConstantsAndTypes.h index 3126955f6b..a82e451a1b 100644 --- a/stepmania/src/GameConstantsAndTypes.h +++ b/stepmania/src/GameConstantsAndTypes.h @@ -86,7 +86,7 @@ enum PlayMode PLAY_MODE_BATTLE, // manually launched attacks PLAY_MODE_RAVE, // automatically launched attacks NUM_PlayMode, - PLAY_MODE_INVALID + PlayMode_Invalid }; #define FOREACH_PlayMode( pm ) FOREACH_ENUM( PlayMode, NUM_PlayMode, pm ) const RString& PlayModeToString( PlayMode pm ); diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 9fdd25383b..2a049845bd 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -97,7 +97,7 @@ GameState::GameState() : m_iNumTimesThroughAttract = -1; // initial screen will bump this up to 0 m_iStageSeed = m_iGameSeed = 0; - m_PlayMode.Set( PLAY_MODE_INVALID ); // used by IsPlayerEnabled before the first screen + m_PlayMode.Set( PlayMode_Invalid ); // used by IsPlayerEnabled before the first screen FOREACH_PlayerNumber( p ) m_bSideIsJoined[p] = false; // used by GetNumSidesJoined before the first screen @@ -204,7 +204,7 @@ void GameState::Reset() } m_SortOrder.Set( SortOrder_INVALID ); m_PreferredSortOrder = GetDefaultSort(); - m_PlayMode.Set( PLAY_MODE_INVALID ); + m_PlayMode.Set( PlayMode_Invalid ); m_EditMode = EditMode_INVALID; m_bDemonstrationOrJukebox = false; m_bJukeboxUsesModifiers = false; diff --git a/stepmania/src/MusicWheelItem.cpp b/stepmania/src/MusicWheelItem.cpp index c77d536aac..c5c96a8782 100644 --- a/stepmania/src/MusicWheelItem.cpp +++ b/stepmania/src/MusicWheelItem.cpp @@ -254,7 +254,7 @@ void MusicWheelItem::LoadFromWheelItemData( const WheelItemBaseData *pWIBD ) m_sprSectionBar.SetHidden( false ); break; case TYPE_SORT: - if( pWID->m_Action.m_pm != PLAY_MODE_INVALID ) + if( pWID->m_Action.m_pm != PlayMode_Invalid ) m_sprModeBar.SetHidden( false ); else m_sprSortBar.SetHidden( false ); diff --git a/stepmania/src/ScreenGameplaySyncMachine.cpp b/stepmania/src/ScreenGameplaySyncMachine.cpp index 55b2fc2c19..91afabaac7 100644 --- a/stepmania/src/ScreenGameplaySyncMachine.cpp +++ b/stepmania/src/ScreenGameplaySyncMachine.cpp @@ -81,7 +81,7 @@ void ScreenGameplaySyncMachine::HandleScreenMessage( const ScreenMessage SM ) if( SM == SM_GoToPrevScreen || SM == SM_GoToNextScreen ) { - GAMESTATE->m_PlayMode.Set( PLAY_MODE_INVALID ); + GAMESTATE->m_PlayMode.Set( PlayMode_Invalid ); GAMESTATE->m_pCurStyle.Set( NULL ); GAMESTATE->m_pCurSong.Set( NULL ); } diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index 8d329649af..27eac0c432 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -102,7 +102,7 @@ void ScreenSelectMusic::Init() if( GAMESTATE->m_pCurStyle == NULL ) RageException::Throw( "The Style has not been set. A theme must set the Style before loading ScreenSelectMusic." ); - if( GAMESTATE->m_PlayMode == PLAY_MODE_INVALID ) + if( GAMESTATE->m_PlayMode == PlayMode_Invalid ) RageException::Throw( "The PlayMode has not been set. A theme must set the PlayMode before loading ScreenSelectMusic." ); /* Load low-res banners, if needed. */ diff --git a/stepmania/src/StageStats.cpp b/stepmania/src/StageStats.cpp index 4ceea74531..6c055ac450 100644 --- a/stepmania/src/StageStats.cpp +++ b/stepmania/src/StageStats.cpp @@ -18,7 +18,7 @@ StageStats::StageStats() { - playMode = PLAY_MODE_INVALID; + playMode = PlayMode_Invalid; pStyle = NULL; vpPlayedSongs.clear(); vpPossibleSongs.clear();