From aeb0c1be0bfe489461dac5f4903514a6e2d07ba4 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 14 Sep 2006 08:08:09 +0000 Subject: [PATCH] unwrap --- stepmania/src/Screen.cpp | 52 +++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/stepmania/src/Screen.cpp b/stepmania/src/Screen.cpp index 275600fcf3..b21784d8bc 100644 --- a/stepmania/src/Screen.cpp +++ b/stepmania/src/Screen.cpp @@ -241,41 +241,39 @@ bool Screen::JoinInput( const InputEventPlus &input ) if( !GAMESTATE->PlayersCanJoin() ) return false; - if( input.MenuI == MENU_BUTTON_START ) - { - /* If this side is already in, don't re-join (and re-pay!). */ - if(GAMESTATE->m_bSideIsJoined[input.pn]) - return false; + if( input.MenuI != MENU_BUTTON_START ) + return false; - /* subtract coins */ - int iCoinsNeededToJoin = GAMESTATE->GetCoinsNeededToJoin(); + /* If this side is already in, don't re-join (and re-pay!). */ + if(GAMESTATE->m_bSideIsJoined[input.pn]) + return false; - if( GAMESTATE->m_iCoins < iCoinsNeededToJoin ) - return false; // not enough coins + /* subtract coins */ + int iCoinsNeededToJoin = GAMESTATE->GetCoinsNeededToJoin(); - GAMESTATE->m_iCoins -= iCoinsNeededToJoin; + if( GAMESTATE->m_iCoins < iCoinsNeededToJoin ) + return false; // not enough coins - // HACK: Only play start sound for the 2nd player who joins. The - // start sound for the 1st player will be played by ScreenTitleMenu - // when the player makes a selection on the screen. - if( GAMESTATE->GetNumSidesJoined() > 0 ) - SCREENMAN->PlayStartSound(); + GAMESTATE->m_iCoins -= iCoinsNeededToJoin; - GAMESTATE->JoinPlayer( input.pn ); + // HACK: Only play start sound for the 2nd player who joins. The + // start sound for the 1st player will be played by ScreenTitleMenu + // when the player makes a selection on the screen. + if( GAMESTATE->GetNumSidesJoined() > 0 ) + SCREENMAN->PlayStartSound(); - // don't load memory card profiles here. It's slow and can cause a big skip. - /* Don't load the local profile, either. It causes a 150+ms skip on my A64 3000+, - * so it probably causes a skip for everyone. We probably shouldn't load this here, - * anyway: leave it unloaded and display "INSERT CARD" until the normal time, and - * load the local profile at the time we would have loaded the memory card if none - * was inserted (via LoadFirstAvailableProfile). */ -// PROFILEMAN->LoadLocalProfileFromMachine( pn ); - SCREENMAN->RefreshCreditsMessages(); + GAMESTATE->JoinPlayer( input.pn ); - return true; - } + // don't load memory card profiles here. It's slow and can cause a big skip. + /* Don't load the local profile, either. It causes a 150+ms skip on my A64 3000+, + * so it probably causes a skip for everyone. We probably shouldn't load this here, + * anyway: leave it unloaded and display "INSERT CARD" until the normal time, and + * load the local profile at the time we would have loaded the memory card if none + * was inserted (via LoadFirstAvailableProfile). */ +// PROFILEMAN->LoadLocalProfileFromMachine( pn ); + SCREENMAN->RefreshCreditsMessages(); - return false; + return true; }