From df56b72b339a62a5e66fe70a7377078e595d23a4 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 24 May 2004 01:28:28 +0000 Subject: [PATCH] simplify --- stepmania/src/GameState.cpp | 3 +++ stepmania/src/ScreenCredits.cpp | 4 ---- stepmania/src/ScreenEnding.cpp | 3 --- stepmania/src/ScreenMusicScroll.cpp | 4 ---- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 9995bf9de8..f5ca29368c 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -317,6 +317,9 @@ void GameState::EndGame() { LOG->Trace( "GameState::EndGame" ); + /* Finish the final stage. */ + FinishStage(); + // Update profile stats int iPlaySeconds = max( 0, (int) m_timeGameStarted.PeekDeltaTime() ); diff --git a/stepmania/src/ScreenCredits.cpp b/stepmania/src/ScreenCredits.cpp index 04fb79095a..d63afbae21 100644 --- a/stepmania/src/ScreenCredits.cpp +++ b/stepmania/src/ScreenCredits.cpp @@ -23,7 +23,6 @@ #include "BitmapText.h" #include "ActorUtil.h" #include "SongUtil.h" -#include "GameState.h" #define BACKGROUNDS_SPACING_X THEME->GetMetricF("ScreenCredits","BackgroundsSpacingX") @@ -170,9 +169,6 @@ static const CreditLine CREDIT_LINES[] = ScreenCredits::ScreenCredits( CString sName ) : ScreenAttract( sName ) { - /* Make sure the last stage was finished. */ - GAMESTATE->FinishStage(); - vector arraySongs; SONGMAN->GetSongs( arraySongs ); SongUtil::SortSongPointerArrayByTitle( arraySongs ); diff --git a/stepmania/src/ScreenEnding.cpp b/stepmania/src/ScreenEnding.cpp index 909b16ffb9..f25ad24191 100644 --- a/stepmania/src/ScreenEnding.cpp +++ b/stepmania/src/ScreenEnding.cpp @@ -66,9 +66,6 @@ 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 arraySongs; SONGMAN->GetSongs( arraySongs ); SongUtil::SortSongPointerArrayByTitle( arraySongs ); diff --git a/stepmania/src/ScreenMusicScroll.cpp b/stepmania/src/ScreenMusicScroll.cpp index 624f9f797d..baf5a08f9d 100644 --- a/stepmania/src/ScreenMusicScroll.cpp +++ b/stepmania/src/ScreenMusicScroll.cpp @@ -19,7 +19,6 @@ #include "AnnouncerManager.h" #include "song.h" #include "SongUtil.h" -#include "GameState.h" #define SCROLL_DELAY THEME->GetMetricF("ScreenMusicScroll","ScrollDelay") @@ -36,9 +35,6 @@ 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 arraySongs; SONGMAN->GetSongs( arraySongs ); SongUtil::SortSongPointerArrayByTitle( arraySongs );