remove GameState::IsPlayable
This commit is contained in:
@@ -305,34 +305,6 @@ const StyleDef* GameState::GetCurrentStyleDef()
|
|||||||
return GAMEMAN->GetStyleDefForStyle( m_CurStyle );
|
return GAMEMAN->GetStyleDefForStyle( m_CurStyle );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GameState::IsPlayable( const ModeChoice& mc )
|
|
||||||
{
|
|
||||||
if( mc.m_bInvalid )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if ( mc.m_style != STYLE_INVALID )
|
|
||||||
{
|
|
||||||
const int SidesJoinedToPlay = GAMEMAN->GetStyleDefForStyle(mc.m_style)->NumSidesJoinedToPlay();
|
|
||||||
if( SidesJoinedToPlay != GAMESTATE->GetNumSidesJoined() )
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Don't allow a PlayMode that's incompatible with our current Style (if set),
|
|
||||||
* and vice versa. */
|
|
||||||
const PlayMode &rPlayMode = (mc.m_pm != PLAY_MODE_INVALID) ? mc.m_pm : m_PlayMode;
|
|
||||||
if( rPlayMode == PLAY_MODE_RAVE || rPlayMode == PLAY_MODE_BATTLE )
|
|
||||||
{
|
|
||||||
// Can't play rave if there isn't enough room for two players.
|
|
||||||
// This is correct for dance (ie, no rave for solo and doubles),
|
|
||||||
// and should be okay for pump .. not sure about other game types.
|
|
||||||
const Style &rStyle = mc.m_style != STYLE_INVALID? mc.m_style: m_CurStyle;
|
|
||||||
if( rStyle != STYLE_INVALID &&
|
|
||||||
GAMEMAN->GetStyleDefForStyle(rStyle)->m_iColsPerPlayer >= 6 )
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true; // no grounds to deny the request
|
|
||||||
}
|
|
||||||
|
|
||||||
bool GameState::IsPlayerEnabled( PlayerNumber pn )
|
bool GameState::IsPlayerEnabled( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ class Steps;
|
|||||||
class Course;
|
class Course;
|
||||||
class GameDef;
|
class GameDef;
|
||||||
class StyleDef;
|
class StyleDef;
|
||||||
struct ModeChoice;
|
|
||||||
class NoteFieldPositioning;
|
class NoteFieldPositioning;
|
||||||
class Character;
|
class Character;
|
||||||
class UnlockSystem;
|
class UnlockSystem;
|
||||||
@@ -71,8 +70,6 @@ public:
|
|||||||
GameDef* GetCurrentGameDef();
|
GameDef* GetCurrentGameDef();
|
||||||
const StyleDef* GetCurrentStyleDef();
|
const StyleDef* GetCurrentStyleDef();
|
||||||
|
|
||||||
bool IsPlayable( const ModeChoice& mc );
|
|
||||||
|
|
||||||
void GetPlayerInfo( PlayerNumber pn, bool& bIsEnabledOut, bool& bIsHumanOut );
|
void GetPlayerInfo( PlayerNumber pn, bool& bIsEnabledOut, bool& bIsHumanOut );
|
||||||
bool IsPlayerEnabled( PlayerNumber pn );
|
bool IsPlayerEnabled( PlayerNumber pn );
|
||||||
bool IsPlayerEnabled( int p ) { return IsPlayerEnabled( (PlayerNumber)p ); };
|
bool IsPlayerEnabled( int p ) { return IsPlayerEnabled( (PlayerNumber)p ); };
|
||||||
|
|||||||
Reference in New Issue
Block a user