PlayMode_Invalid
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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<PlayerNumber> &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<PlayerNumber> &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 != "" ||
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
StageStats::StageStats()
|
||||
{
|
||||
playMode = PLAY_MODE_INVALID;
|
||||
playMode = PlayMode_Invalid;
|
||||
pStyle = NULL;
|
||||
vpPlayedSongs.clear();
|
||||
vpPossibleSongs.clear();
|
||||
|
||||
Reference in New Issue
Block a user