Explicitly make sure FinishStage is called. We need to do this before

ResetGame, since it should be called before prompting to remove memory
cards.
This commit is contained in:
Glenn Maynard
2004-05-24 01:00:06 +00:00
parent 8540b1eb1f
commit 1b5e2aafef
4 changed files with 17 additions and 0 deletions
+8
View File
@@ -594,6 +594,14 @@ static int GetNumStagesForCurrentSong()
/* Called by ScreenGameplay. Set the length of the current song. */
void GameState::BeginStage()
{
/* This should only be called once per stage. */
if( m_iNumStagesOfThisSong != 0 )
LOG->Warn( "XXX: m_iNumStagesOfThisSong == %i?", m_iNumStagesOfThisSong );
/* Finish the last stage (if any), if we havn't already. (For example, we might
* have, for some reason, gone from gameplay to evaluation straight back to gameplay.) */
FinishStage();
m_iNumStagesOfThisSong = GetNumStagesForCurrentSong();
ASSERT( m_iNumStagesOfThisSong != -1 );
}
+3
View File
@@ -169,6 +169,9 @@ static const CreditLine CREDIT_LINES[] =
ScreenCredits::ScreenCredits( CString sName ) : ScreenAttract( sName )
{
/* Make sure the last stage was finished. */
GAMESTATE->FinishStage();
vector<Song*> arraySongs;
SONGMAN->GetSongs( arraySongs );
SongUtil::SortSongPointerArrayByTitle( arraySongs );
+3
View File
@@ -66,6 +66,9 @@ CString GetStatsLineValue( PlayerNumber pn, int iLine )
ScreenEnding::ScreenEnding( CString sClassName ) : ScreenAttract( sClassName, false/*dont reset GAMESTATE*/ )
{
/* Make sure the last stage was finished. */
GAMESTATE->FinishStage();
vector<Song*> arraySongs;
SONGMAN->GetSongs( arraySongs );
SongUtil::SortSongPointerArrayByTitle( arraySongs );
+3
View File
@@ -35,6 +35,9 @@ const unsigned NUM_CREDIT_LINES = sizeof(CREDIT_LINES) / sizeof(CString);
ScreenMusicScroll::ScreenMusicScroll( CString sClassName ) : ScreenAttract( sClassName )
{
/* Make sure the last stage was finished. */
GAMESTATE->FinishStage();
vector<Song*> arraySongs;
SONGMAN->GetSongs( arraySongs );
SongUtil::SortSongPointerArrayByTitle( arraySongs );