PlayMode_Invalid

This commit is contained in:
Glenn Maynard
2006-09-26 20:32:41 +00:00
parent c540417e23
commit 9c9440c8a0
8 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -176,7 +176,7 @@ PlayMode Course::GetPlayMode() const
case COURSE_TYPE_ONI: return PLAY_MODE_ONI; case COURSE_TYPE_ONI: return PLAY_MODE_ONI;
case COURSE_TYPE_SURVIVAL: return PLAY_MODE_ONI; case COURSE_TYPE_SURVIVAL: return PLAY_MODE_ONI;
case COURSE_TYPE_NONSTOP: return PLAY_MODE_NONSTOP; case COURSE_TYPE_NONSTOP: return PLAY_MODE_NONSTOP;
default: ASSERT(0); return PLAY_MODE_INVALID; default: ASSERT(0); return PlayMode_Invalid;
} }
} }
+8 -8
View File
@@ -36,7 +36,7 @@ void GameCommand::Init()
m_MultiPlayer = MultiPlayer_INVALID; m_MultiPlayer = MultiPlayer_INVALID;
m_pGame = NULL; m_pGame = NULL;
m_pStyle = NULL; m_pStyle = NULL;
m_pm = PLAY_MODE_INVALID; m_pm = PlayMode_Invalid;
m_dc = DIFFICULTY_INVALID; m_dc = DIFFICULTY_INVALID;
m_CourseDifficulty = DIFFICULTY_INVALID; m_CourseDifficulty = DIFFICULTY_INVALID;
m_sPreferredModifiers = ""; m_sPreferredModifiers = "";
@@ -80,7 +80,7 @@ bool GameCommand::DescribesCurrentMode( PlayerNumber pn ) const
{ {
if( m_pGame != NULL && m_pGame != GAMESTATE->m_pCurGame.Get() ) if( m_pGame != NULL && m_pGame != GAMESTATE->m_pCurGame.Get() )
return false; 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; return false;
if( m_pStyle && GAMESTATE->m_pCurStyle.Get() != m_pStyle ) if( m_pStyle && GAMESTATE->m_pCurStyle.Get() != m_pStyle )
return false; return false;
@@ -194,7 +194,7 @@ void GameCommand::LoadOne( const Command& cmd )
else if( sName == "playmode" ) else if( sName == "playmode" )
{ {
PlayMode pm = StringToPlayMode( sValue ); PlayMode pm = StringToPlayMode( sValue );
if( pm != PLAY_MODE_INVALID ) if( pm != PlayMode_Invalid )
m_pm = pm; m_pm = pm;
else else
m_bInvalid |= true; m_bInvalid |= true;
@@ -433,7 +433,7 @@ int GetCreditsRequiredToPlayStyle( const Style *style )
static bool AreStyleAndPlayModeCompatible( const Style *style, PlayMode pm ) static bool AreStyleAndPlayModeCompatible( const Style *style, PlayMode pm )
{ {
if( style == NULL || pm == PLAY_MODE_INVALID ) if( style == NULL || pm == PlayMode_Invalid )
return true; return true;
switch( pm ) 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), /* Don't allow a PlayMode that's incompatible with our current Style (if set),
* and vice versa. */ * 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; const Style *style = (m_pStyle != NULL)? m_pStyle: GAMESTATE->m_pCurStyle;
if( !AreStyleAndPlayModeCompatible( style, pm ) ) if( !AreStyleAndPlayModeCompatible( style, pm ) )
{ {
@@ -627,7 +627,7 @@ void GameCommand::ApplySelf( const vector<PlayerNumber> &vpns ) const
if( m_pGame != NULL ) if( m_pGame != NULL )
GAMESTATE->SetCurGame( m_pGame ); GAMESTATE->SetCurGame( m_pGame );
if( m_pm != PLAY_MODE_INVALID ) if( m_pm != PlayMode_Invalid )
GAMESTATE->m_PlayMode.Set( m_pm ); GAMESTATE->m_PlayMode.Set( m_pm );
if( m_pStyle != NULL ) if( m_pStyle != NULL )
@@ -792,7 +792,7 @@ void GameCommand::ApplySelf( const vector<PlayerNumber> &vpns ) const
bool GameCommand::IsZero() const bool GameCommand::IsZero() const
{ {
if( m_pGame != NULL || if( m_pGame != NULL ||
m_pm != PLAY_MODE_INVALID || m_pm != PlayMode_Invalid ||
m_pStyle != NULL || m_pStyle != NULL ||
m_dc != DIFFICULTY_INVALID || m_dc != DIFFICULTY_INVALID ||
m_sAnnouncer != "" || m_sAnnouncer != "" ||
+1 -1
View File
@@ -86,7 +86,7 @@ enum PlayMode
PLAY_MODE_BATTLE, // manually launched attacks PLAY_MODE_BATTLE, // manually launched attacks
PLAY_MODE_RAVE, // automatically launched attacks PLAY_MODE_RAVE, // automatically launched attacks
NUM_PlayMode, NUM_PlayMode,
PLAY_MODE_INVALID PlayMode_Invalid
}; };
#define FOREACH_PlayMode( pm ) FOREACH_ENUM( PlayMode, NUM_PlayMode, pm ) #define FOREACH_PlayMode( pm ) FOREACH_ENUM( PlayMode, NUM_PlayMode, pm )
const RString& PlayModeToString( PlayMode pm ); const RString& PlayModeToString( PlayMode pm );
+2 -2
View File
@@ -97,7 +97,7 @@ GameState::GameState() :
m_iNumTimesThroughAttract = -1; // initial screen will bump this up to 0 m_iNumTimesThroughAttract = -1; // initial screen will bump this up to 0
m_iStageSeed = m_iGameSeed = 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 ) FOREACH_PlayerNumber( p )
m_bSideIsJoined[p] = false; // used by GetNumSidesJoined before the first screen m_bSideIsJoined[p] = false; // used by GetNumSidesJoined before the first screen
@@ -204,7 +204,7 @@ void GameState::Reset()
} }
m_SortOrder.Set( SortOrder_INVALID ); m_SortOrder.Set( SortOrder_INVALID );
m_PreferredSortOrder = GetDefaultSort(); m_PreferredSortOrder = GetDefaultSort();
m_PlayMode.Set( PLAY_MODE_INVALID ); m_PlayMode.Set( PlayMode_Invalid );
m_EditMode = EditMode_INVALID; m_EditMode = EditMode_INVALID;
m_bDemonstrationOrJukebox = false; m_bDemonstrationOrJukebox = false;
m_bJukeboxUsesModifiers = false; m_bJukeboxUsesModifiers = false;
+1 -1
View File
@@ -254,7 +254,7 @@ void MusicWheelItem::LoadFromWheelItemData( const WheelItemBaseData *pWIBD )
m_sprSectionBar.SetHidden( false ); m_sprSectionBar.SetHidden( false );
break; break;
case TYPE_SORT: case TYPE_SORT:
if( pWID->m_Action.m_pm != PLAY_MODE_INVALID ) if( pWID->m_Action.m_pm != PlayMode_Invalid )
m_sprModeBar.SetHidden( false ); m_sprModeBar.SetHidden( false );
else else
m_sprSortBar.SetHidden( false ); m_sprSortBar.SetHidden( false );
+1 -1
View File
@@ -81,7 +81,7 @@ void ScreenGameplaySyncMachine::HandleScreenMessage( const ScreenMessage SM )
if( SM == SM_GoToPrevScreen || SM == SM_GoToNextScreen ) 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_pCurStyle.Set( NULL );
GAMESTATE->m_pCurSong.Set( NULL ); GAMESTATE->m_pCurSong.Set( NULL );
} }
+1 -1
View File
@@ -102,7 +102,7 @@ void ScreenSelectMusic::Init()
if( GAMESTATE->m_pCurStyle == NULL ) if( GAMESTATE->m_pCurStyle == NULL )
RageException::Throw( "The Style has not been set. A theme must set the Style before loading ScreenSelectMusic." ); 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." ); RageException::Throw( "The PlayMode has not been set. A theme must set the PlayMode before loading ScreenSelectMusic." );
/* Load low-res banners, if needed. */ /* Load low-res banners, if needed. */
+1 -1
View File
@@ -18,7 +18,7 @@
StageStats::StageStats() StageStats::StageStats()
{ {
playMode = PLAY_MODE_INVALID; playMode = PlayMode_Invalid;
pStyle = NULL; pStyle = NULL;
vpPlayedSongs.clear(); vpPlayedSongs.clear();
vpPossibleSongs.clear(); vpPossibleSongs.clear();