From 8dfbd14434fdef91169478d067ed79cbf96ea640 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 26 Aug 2004 04:25:16 +0000 Subject: [PATCH] simplify ScreenInstructions, ScreenCaution, ScreenStyleSplash, and ScreenGameOver are almost identical and could be merged with a little Lua work ... --- stepmania/src/ScreenInstructions.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/stepmania/src/ScreenInstructions.cpp b/stepmania/src/ScreenInstructions.cpp index 29e58506c1..813bb4d6a3 100644 --- a/stepmania/src/ScreenInstructions.cpp +++ b/stepmania/src/ScreenInstructions.cpp @@ -35,13 +35,10 @@ ScreenInstructions::ScreenInstructions( CString sName ) : ScreenWithMenuElements } } - CString sHowToPlayPath; - if( GAMESTATE->m_PlayMode != PLAY_MODE_INVALID ) - sHowToPlayPath = THEME->GetPathG(m_sName,PlayModeToString(GAMESTATE->m_PlayMode)) ; - else + if( GAMESTATE->m_PlayMode == PLAY_MODE_INVALID ) RageException::Throw( "The PlayMode has not been set. A theme must set the PlayMode before showing ScreenInstructions." ); - m_sprHowToPlay.Load( sHowToPlayPath ); + m_sprHowToPlay.Load( THEME->GetPathG(m_sName,PlayModeToString(GAMESTATE->m_PlayMode)) ); m_sprHowToPlay.SetXY( CENTER_X, CENTER_Y ); this->AddChild( &m_sprHowToPlay );