GetNumStagesForSongAndStyle -> GetNumStagesForSongAndStyleType

This commit is contained in:
Glenn Maynard
2007-03-17 23:05:34 +00:00
parent 45353a77e1
commit 14fbedd1b2
3 changed files with 7 additions and 7 deletions
+5 -5
View File
@@ -529,14 +529,14 @@ int GameState::GetNumStagesMultiplierForSong( const Song* pSong )
return iNumStages;
}
int GameState::GetNumStagesForSongAndStyle( const Song* pSong, const Style *pStyle )
int GameState::GetNumStagesForSongAndStyleType( const Song* pSong, StyleType st )
{
int iNumStages = GetNumStagesMultiplierForSong( pSong );
// One player, two-sides styles cost extra
switch( pStyle->m_StyleType )
switch( st )
{
DEFAULT_FAIL( pStyle->m_StyleType );
DEFAULT_FAIL( st );
case StyleType_OnePlayerTwoSides:
if( g_Premium == Premium_Off )
iNumStages *= 2;
@@ -555,7 +555,7 @@ int GameState::GetNumStagesForCurrentSongAndStepsOrCourse()
int iNumStagesOfThisSong = 1;
if( GAMESTATE->m_pCurSong )
{
Steps *pSteps = GAMESTATE->m_pCurSteps[GAMESTATE->m_MasterPlayerNumber];
const Steps *pSteps = GAMESTATE->m_pCurSteps[GAMESTATE->m_MasterPlayerNumber];
StepsType st;
if( pSteps )
{
@@ -570,7 +570,7 @@ int GameState::GetNumStagesForCurrentSongAndStepsOrCourse()
st = pStyle->m_StepsType;
}
const Style *pStyle = GAMEMAN->GetFirstCompatibleStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined(), st );
iNumStagesOfThisSong = GameState::GetNumStagesForSongAndStyle( GAMESTATE->m_pCurSong, pStyle );
iNumStagesOfThisSong = GameState::GetNumStagesForSongAndStyleType( GAMESTATE->m_pCurSong, pStyle->m_StyleType );
}
else if( GAMESTATE->m_pCurCourse )
iNumStagesOfThisSong = 1;
+1 -1
View File
@@ -119,7 +119,7 @@ public:
int m_iCurrentStageIndex;
static int GetNumStagesMultiplierForSong( const Song* pSong );
static int GetNumStagesForSongAndStyle( const Song* pSong, const Style *pStyle );
static int GetNumStagesForSongAndStyleType( const Song* pSong, StyleType st );
static int GetNumStagesForCurrentSongAndStepsOrCourse();
int GetStageIndex() const;
+1 -1
View File
@@ -832,7 +832,7 @@ static void GetPlayableStepsTypes( const Song *pSong, set<StepsType> &vOut )
bool bShowThisStepsType = find( vstToShow.begin(), vstToShow.end(), *st ) != vstToShow.end();
const Style *pStyle = GAMEMAN->GetFirstCompatibleStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumPlayersEnabled(), *st );
bool bEnoughStages = GAMESTATE->GetNumStagesLeft() >= GAMESTATE->GetNumStagesForSongAndStyle(pSong,pStyle);
bool bEnoughStages = GAMESTATE->GetNumStagesLeft() >= GAMESTATE->GetNumStagesForSongAndStyleType(pSong, pStyle->m_StyleType);
if( bShowThisStepsType && bEnoughStages )
vOut.insert( *st );