Cleanup. Use StyleDef::NumSidesJoinedToPlay.
This commit is contained in:
@@ -309,12 +309,13 @@ bool GameState::IsPlayable( const ModeChoice& mc )
|
|||||||
// value from the current game state
|
// value from the current game state
|
||||||
//
|
//
|
||||||
const PlayMode &rPlayMode = mc.pm != PLAY_MODE_INVALID? mc.pm:m_PlayMode;
|
const PlayMode &rPlayMode = mc.pm != PLAY_MODE_INVALID? mc.pm:m_PlayMode;
|
||||||
const Style &rStyle = mc.style != STYLE_INVALID? mc.style: m_CurStyle;
|
|
||||||
// ModeChoice code sets numSidesJoinedToPlay properly iff style is set
|
|
||||||
const int numSidesJoined = mc.style != STYLE_INVALID? mc.numSidesJoinedToPlay:GAMESTATE->GetNumSidesJoined();
|
|
||||||
|
|
||||||
if ( numSidesJoined != GAMESTATE->GetNumSidesJoined() )
|
if ( mc.style != STYLE_INVALID )
|
||||||
|
{
|
||||||
|
const int SidesJoinedToPlay = GAMEMAN->GetStyleDefForStyle(mc.style)->NumSidesJoinedToPlay();
|
||||||
|
if( SidesJoinedToPlay != GAMESTATE->GetNumSidesJoined() )
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if( rPlayMode == PLAY_MODE_RAVE || rPlayMode == PLAY_MODE_BATTLE )
|
if( rPlayMode == PLAY_MODE_RAVE || rPlayMode == PLAY_MODE_BATTLE )
|
||||||
{
|
{
|
||||||
@@ -324,6 +325,7 @@ bool GameState::IsPlayable( const ModeChoice& mc )
|
|||||||
|
|
||||||
// If there is no current style ... well, we have no reasonable
|
// If there is no current style ... well, we have no reasonable
|
||||||
// grounds to disallow
|
// grounds to disallow
|
||||||
|
const Style &rStyle = mc.style != STYLE_INVALID? mc.style: m_CurStyle;
|
||||||
if (rStyle == STYLE_INVALID)
|
if (rStyle == STYLE_INVALID)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|||||||
@@ -174,15 +174,17 @@ void ScreenSelectMode::UpdateSelectableChoices()
|
|||||||
(!PREFSMAN->m_bJointPremium)
|
(!PREFSMAN->m_bJointPremium)
|
||||||
)*/
|
)*/
|
||||||
|
|
||||||
|
const int SidesJoinedToPlay = mc.style == STYLE_INVALID? 1:
|
||||||
|
GAMEMAN->GetStyleDefForStyle(mc.style)->NumSidesJoinedToPlay();
|
||||||
if( (!PREFSMAN->m_bJointPremium ) ||
|
if( (!PREFSMAN->m_bJointPremium ) ||
|
||||||
(
|
(
|
||||||
PREFSMAN->m_bJointPremium &&
|
PREFSMAN->m_bJointPremium &&
|
||||||
(
|
(
|
||||||
(INCLUDE_DOUBLE_IN_JP == 1 && (GAMESTATE->GetNumSidesJoined() == mc.numSidesJoinedToPlay)) ||
|
(INCLUDE_DOUBLE_IN_JP == 1 && (GAMESTATE->GetNumSidesJoined() == SidesJoinedToPlay)) ||
|
||||||
(
|
(
|
||||||
INCLUDE_DOUBLE_IN_JP == 0 &&
|
INCLUDE_DOUBLE_IN_JP == 0 &&
|
||||||
(
|
(
|
||||||
GAMESTATE->GetNumSidesJoined() == mc.numSidesJoinedToPlay ||
|
GAMESTATE->GetNumSidesJoined() == SidesJoinedToPlay ||
|
||||||
(modename.substr(0, 6) == "DOUBLE" || modename.substr(0, 13) == "ARCADE-DOUBLE" ||
|
(modename.substr(0, 6) == "DOUBLE" || modename.substr(0, 13) == "ARCADE-DOUBLE" ||
|
||||||
modename.substr(0, 10) == "HALFDOUBLE" || modename.substr(0, 17) == "ARCADE-HALFDOUBLE") &&
|
modename.substr(0, 10) == "HALFDOUBLE" || modename.substr(0, 17) == "ARCADE-HALFDOUBLE") &&
|
||||||
GAMESTATE->GetNumSidesJoined() != 2
|
GAMESTATE->GetNumSidesJoined() != 2
|
||||||
|
|||||||
Reference in New Issue
Block a user