diff --git a/stepmania/src/Background.cpp b/stepmania/src/Background.cpp index c2521f59fd..b08ea12571 100644 --- a/stepmania/src/Background.cpp +++ b/stepmania/src/Background.cpp @@ -422,7 +422,7 @@ void Background::LoadFromSong( const Song* pSong ) m_DangerAll.SetZoomX( fXZoom ); m_DangerAll.SetZoomY( fYZoom ); - for( int p=0; pDraw(); - for( int p=0; pIsHumanPlayer(pn) ) m_mDancer[pn].Draw(); diff --git a/stepmania/src/CombinedLifeMeterEnemy.cpp b/stepmania/src/CombinedLifeMeterEnemy.cpp index a7c7e3910d..fd73146f27 100644 --- a/stepmania/src/CombinedLifeMeterEnemy.cpp +++ b/stepmania/src/CombinedLifeMeterEnemy.cpp @@ -145,7 +145,7 @@ void CombinedLifeMeterEnemy::Update( float fDelta ) a.fSecsRemaining = 10; a.level = ATTACK_LEVEL_1; a.sModifier = sPossibleModifiers[a.level][rand()%3]; - for( int p=0; pIsHumanPlayer(p) ) GAMESTATE->LaunchAttack( (PlayerNumber)p, a ); SCREENMAN->SendMessageToTopScreen( SM_BattleTrickLevel1 ); @@ -157,7 +157,7 @@ void CombinedLifeMeterEnemy::Update( float fDelta ) a.fSecsRemaining = 10; a.level = ATTACK_LEVEL_2; a.sModifier = sPossibleModifiers[a.level][rand()%3]; - for( int p=0; pIsHumanPlayer(p) ) GAMESTATE->LaunchAttack( (PlayerNumber)p, a ); SCREENMAN->SendMessageToTopScreen( SM_BattleTrickLevel2 ); @@ -169,7 +169,7 @@ void CombinedLifeMeterEnemy::Update( float fDelta ) a.fSecsRemaining = 10; a.level = ATTACK_LEVEL_3; a.sModifier = sPossibleModifiers[a.level][rand()%3]; - for( int p=0; pIsHumanPlayer(p) ) GAMESTATE->LaunchAttack( (PlayerNumber)p, a ); SCREENMAN->SendMessageToTopScreen( SM_BattleTrickLevel3 ); diff --git a/stepmania/src/DancingCharacters.cpp b/stepmania/src/DancingCharacters.cpp index 688499e873..f4390e1375 100644 --- a/stepmania/src/DancingCharacters.cpp +++ b/stepmania/src/DancingCharacters.cpp @@ -56,7 +56,7 @@ DancingCharacters::DancingCharacters() memset( m_bHasWinAnim, 0, sizeof(m_bHasWinAnim) ); memset( m_bHasFailAnim, 0, sizeof(m_bHasFailAnim) ); - for( int p=0; pm_pCurSong ); m_fThisCameraEndBeat = GAMESTATE->m_pCurSong->m_fFirstBeat; - for( int p=0; pIsPlayerEnabled(p) ) m_Character[p].PlayAnimation( "rest" ); } @@ -201,7 +201,7 @@ void DancingCharacters::Update( float fDelta ) * at a very low music rate. */ fUpdateScale *= GAMESTATE->m_SongOptions.m_fMusicRate; - for( int p=0; pIsPlayerEnabled(p) ) m_Character[p].Update( fDelta*fUpdateScale ); @@ -212,7 +212,7 @@ void DancingCharacters::Update( float fDelta ) bool bIsHereWeGo = GAMESTATE->m_bPastHereWeGo; if( !bWasHereWeGo && bIsHereWeGo ) { - for( int p=0; pIsPlayerEnabled(p) ) m_Character[p].PlayAnimation( "warmup" ); } @@ -224,7 +224,7 @@ void DancingCharacters::Update( float fDelta ) if( fLastBeat < GAMESTATE->m_pCurSong->m_fFirstBeat && fThisBeat >= GAMESTATE->m_pCurSong->m_fFirstBeat ) { - for( int p=0; pGetProfile((PlayerNumber)p); if( pProfile ) @@ -532,7 +532,7 @@ void GameState::ResetStageStatistics() RemoveAllInventory(); m_fOpponentHealthPercent = 1; m_fTugLifePercentP1 = 0.5f; - for( int p=0; pIsFinalStage() || this->IsExtraStage()) ) { - for( int p=0; pIsPlayerEnabled(p) ) continue; // skip @@ -1033,7 +1033,7 @@ void GameState::StoreSelectedOptions() * at the end of gameplay to restore options. */ void GameState::RestoreSelectedOptions() { - for( int p=0; pm_PlayerOptions[p] = this->m_StoredPlayerOptions[p]; m_SongOptions = m_StoredSongOptions; } @@ -1178,7 +1178,7 @@ void GameState::RemoveActiveAttacksForPlayer( PlayerNumber pn, AttackLevel al ) void GameState::RemoveAllInventory() { - for( int p=0; pIsPlayerEnabled(p) ) if( m_HealthState[p] < DANGER ) return false; @@ -1600,7 +1600,7 @@ bool GameState::AllAreInDangerOrWorse() const bool GameState::AllAreDead() const { - for( int p=0; pIsPlayerEnabled(p) ) if( m_HealthState[p] < DEAD ) return false; @@ -1609,7 +1609,7 @@ bool GameState::AllAreDead() const bool GameState::OneIsHot() const { - for( int p=0; pIsPlayerEnabled(PlayerNumber(p)) ) if( m_HealthState[p] == HOT ) return true; diff --git a/stepmania/src/GrooveRadar.cpp b/stepmania/src/GrooveRadar.cpp index 41d453f8ce..34cca51aa0 100644 --- a/stepmania/src/GrooveRadar.cpp +++ b/stepmania/src/GrooveRadar.cpp @@ -78,7 +78,7 @@ GrooveRadar::GrooveRadarValueMap::GrooveRadarValueMap() m_sprRadarBase.Load( THEME->GetPathToG("GrooveRadar base") ); this->AddChild( &m_sprRadarBase ); - for( int p=0; pSetTextureModeModulate(); RageSpriteVertex v[12]; // needed to draw 5 fan primitives and 10 strip primitives - for( int p=0; pTrace( "Looking for a card for Player %d", p+1 ); diff --git a/stepmania/src/ModeChoice.cpp b/stepmania/src/ModeChoice.cpp index 8ef3c1beb6..52a8d39b2e 100644 --- a/stepmania/src/ModeChoice.cpp +++ b/stepmania/src/ModeChoice.cpp @@ -38,7 +38,7 @@ bool CompareSongOptions( const SongOptions &so1, const SongOptions &so2 ); bool ModeChoice::DescribesCurrentModeForAllPlayers() const { - for( int pn=0; pnIsHumanPlayer(pn) && GAMESTATE->m_PreferredDifficulty[pn] != m_dc ) return false; } @@ -360,7 +360,7 @@ bool ModeChoice::IsPlayable( CString *why ) const void ModeChoice::ApplyToAllPlayers() const { - for( int pn=0; pnIsHumanPlayer(pn) ) Apply((PlayerNumber) pn); diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index 42b5c92a41..9308028884 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -161,7 +161,7 @@ void MusicWheel::Load() po, so ); GAMESTATE->m_pCurSong = pSong; - for( int p=0; pIsHumanPlayer(p) ) { @@ -947,7 +947,7 @@ void MusicWheel::Update( float fDeltaTime ) } if( dc != DIFFICULTY_INVALID ) { - for( int p=0; pIsPlayerEnabled(p) ) GAMESTATE->m_PreferredDifficulty[p] = dc; } diff --git a/stepmania/src/MusicWheelItem.cpp b/stepmania/src/MusicWheelItem.cpp index e282c8c15f..2a5beb85f3 100644 --- a/stepmania/src/MusicWheelItem.cpp +++ b/stepmania/src/MusicWheelItem.cpp @@ -90,7 +90,7 @@ MusicWheelItem::MusicWheelItem() m_textRoulette.SetXY( ROULETTE_X, 0 ); m_All.AddChild( &m_textRoulette ); - for( int p=0; pGetPathToG("MusicWheelItem grades") ); m_GradeDisplay[p].SetZoom( 1.0f ); @@ -193,7 +193,7 @@ void MusicWheelItem::LoadFromWheelItemData( WheelItemData* pWID ) void MusicWheelItem::RefreshGrades() { // Refresh Grades - for( int p=0; pm_pSong || // this isn't a song display !GAMESTATE->IsHumanPlayer(p) ) @@ -240,7 +240,7 @@ void MusicWheelItem::Update( float fDeltaTime ) m_sprSongBar.Update( fDeltaTime ); m_WheelNotifyIcon.Update( fDeltaTime ); m_TextBanner.Update( fDeltaTime ); - for( int p=0; pIsHumanPlayer(p) ) continue; @@ -145,7 +145,7 @@ void ScreenAward::HandleScreenMessage( const ScreenMessage SM ) case SM_GoToNextScreen: // TRICKY: Keep looping on this screen until all awards are shown bool bMoreAwardsLeft = false; - for( int p=0; pIsHumanPlayer(p) ) continue; @@ -166,7 +166,7 @@ void ScreenAward::HandleScreenMessage( const ScreenMessage SM ) void ScreenAward::MenuStart( PlayerNumber pn ) { - for( int p=0; pIsHumanPlayer(p) ) continue; diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 8f760037a3..712a3b563b 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -274,7 +274,7 @@ ScreenEdit::ScreenEdit( CString sName ) : Screen( sName ) TICK_EARLY_SECONDS.Refresh(); // set both players to joined so the credit message doesn't show - for( int p=0; pm_bSideIsJoined[p] = true; SCREENMAN->RefreshCreditsMessages(); @@ -1251,7 +1251,7 @@ void ScreenEdit::InputPlay( const DeviceInput& DeviceI, const InputEventType typ case SDLK_F8: { PREFSMAN->m_bAutoPlay = !PREFSMAN->m_bAutoPlay; - for( int p=0; pIsHumanPlayer(p) ) GAMESTATE->m_PlayerController[p] = PREFSMAN->m_bAutoPlay?PC_AUTOPLAY:PC_HUMAN; } diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index 16db180bbf..fb4e4d88aa 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -204,7 +204,7 @@ void ScreenEvaluation::Init() // Debugging // { - for( int p=0; pm_iRoundSeed = rand(); diff --git a/stepmania/src/ScreenEz2SelectPlayer.cpp b/stepmania/src/ScreenEz2SelectPlayer.cpp index 2c84c47f4a..2d7b44b227 100644 --- a/stepmania/src/ScreenEz2SelectPlayer.cpp +++ b/stepmania/src/ScreenEz2SelectPlayer.cpp @@ -219,7 +219,7 @@ void ScreenEz2SelectPlayer::MenuStart( PlayerNumber pn ) } bool bBothSidesJoined = true; - for( int p=0; pm_bSideIsJoined[p] ) bBothSidesJoined = false; @@ -239,7 +239,7 @@ void ScreenEz2SelectPlayer::MenuStart( PlayerNumber pn ) void ScreenEz2SelectPlayer::TweenOnScreen() { - for( int p=0; pm_pCurSong = pSong; - for( int p=0; pm_pCurNotes[p] = pSteps; return true; // done looking @@ -122,7 +122,7 @@ bool ScreenJukebox::PrepareForJukebox( bool bDemonstration ) // always return t { /* Note that you also need to make sure you benchmark with the * same notes. I use a copy of MaxU with only heavy notes included. */ - for( int p=0; pIsPlayerEnabled(p) ) continue; @@ -138,7 +138,7 @@ bool ScreenJukebox::PrepareForJukebox( bool bDemonstration ) // always return t GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF; } - for( int p=0; pIsPlayerEnabled(p) ) continue; diff --git a/stepmania/src/ScreenJukeboxMenu.cpp b/stepmania/src/ScreenJukeboxMenu.cpp index f509c49cef..5768c4ff07 100644 --- a/stepmania/src/ScreenJukeboxMenu.cpp +++ b/stepmania/src/ScreenJukeboxMenu.cpp @@ -39,7 +39,7 @@ ScreenJukeboxMenu::ScreenJukeboxMenu( CString sClassName ) : ScreenWithMenuEleme GAMESTATE->m_CurStyle = STYLE_INVALID; - for( int pn=0; pnm_bSideIsJoined[pn] = true; m_Selector.SetXY( 0, 0 ); @@ -122,7 +122,7 @@ void ScreenJukeboxMenu::MenuStart( PlayerNumber pn ) GAMESTATE->m_CurStyle = style; GAMESTATE->m_sPreferredGroup = (sGroup=="ALL MUSIC") ? GROUP_ALL_MUSIC : sGroup; - for( int p=0; pm_PreferredDifficulty[p] = dc; GAMESTATE->m_bJukeboxUsesModifiers = bModifiers; diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index c85615b386..ce79f2a3f9 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -97,7 +97,7 @@ ScreenSystemLayer::ScreenSystemLayer() : Screen("ScreenSystemLayer") this->AddChild(&m_textMessage); this->AddChild(&m_textStats); this->AddChild(&m_textTime); - for( int p=0; pAddChild(&m_textCredits[p]); @@ -150,7 +150,7 @@ void ScreenSystemLayer::ReloadCreditsText() m_textTime.SetName( "Time" ); SET_XY_AND_ON_COMMAND( m_textTime ); - for( int p=0; pGetPathToF("ScreenManager credits") ); m_textCredits[p].SetName( ssprintf("CreditsP%d",p+1) ); @@ -185,7 +185,7 @@ void ScreenSystemLayer::SystemMessageNoAnimate( CString sMessage ) void ScreenSystemLayer::RefreshCreditsMessages() { // update joined - for( int p=0; pm_PlayerOptions[p] = PlayerOptions(); GAMESTATE->m_SongOptions = SongOptions(); } @@ -274,7 +274,7 @@ ScreenNameEntry::ScreenNameEntry( CString sClassName ) : Screen( sClassName ) bool ScreenNameEntry::AnyStillEntering() const { - for( int p=0; pGetCurrentStyleDef(); - for( int p=0; pMenuStart( (PlayerNumber)p ); } break; diff --git a/stepmania/src/ScreenNameEntryTraditional.cpp b/stepmania/src/ScreenNameEntryTraditional.cpp index 707e383a6c..88d9909653 100644 --- a/stepmania/src/ScreenNameEntryTraditional.cpp +++ b/stepmania/src/ScreenNameEntryTraditional.cpp @@ -463,7 +463,7 @@ void ScreenNameEntryTraditional::PositionCharsAndCursor( int pn ) bool ScreenNameEntryTraditional::AnyStillEntering() const { - for( int p=0; pAddChild( &m_framePage ); m_bMoreShown = false; - for( int p=0; p &vbSelected = Row.m_vbSelected[p]; vbSelected.resize( Row.m_RowDef.choices.size() ); @@ -168,7 +168,7 @@ void ScreenOptions::Init( InputMode im, OptionRowData OptionRows[], int iNumOpti Row.m_vbSelected[p] = m_Rows[r]->m_vbSelected[0]; CHECKPOINT_M( ssprintf("row %i: %s", r, Row.m_RowDef.name.c_str()) ); - for( int p=0; pIsHumanPlayer(p) ) continue; // skip @@ -212,7 +212,7 @@ void ScreenOptions::Init( InputMode im, OptionRowData OptionRows[], int iNumOpti // init highlights { - for( int p=0; pIsHumanPlayer(p) ) continue; // skip @@ -224,7 +224,7 @@ void ScreenOptions::Init( InputMode im, OptionRowData OptionRows[], int iNumOpti // init row icons { - for( int p=0; pIsHumanPlayer(p) ) continue; // skip @@ -271,7 +271,7 @@ void ScreenOptions::Init( InputMode im, OptionRowData OptionRows[], int iNumOpti bt->SetX( fX ); // init underlines - for( int p=0; pIsHumanPlayer(p) ) continue; @@ -292,7 +292,7 @@ void ScreenOptions::Init( InputMode im, OptionRowData OptionRows[], int iNumOpti for( unsigned j=0; jGetPathToF("ScreenOptions explanation") ); m_textExplanation[p].SetZoom( EXPLANATION_ZOOM ); @@ -396,7 +396,7 @@ void ScreenOptions::Init( InputMode im, OptionRowData OptionRows[], int iNumOpti * the player name is meaningful. Otherwise, we're probably in the system menu. */ if( GAMESTATE->m_CurStyle != STYLE_INVALID ) { - for( int p=0; pGetPathToF( "ScreenOptions player") ); m_textPlayerName[p].SetName( ssprintf("PlayerNameP%i",p+1) ); @@ -411,7 +411,7 @@ void ScreenOptions::Init( InputMode im, OptionRowData OptionRows[], int iNumOpti m_ScrollBar.SetName( "DualScrollBar", "ScrollBar" ); m_ScrollBar.SetBarHeight( SCROLL_BAR_HEIGHT ); m_ScrollBar.SetBarTime( SCROLL_BAR_TIME ); - for( int p=0; pIsHumanPlayer(p) ); m_ScrollBar.Load(); UtilSetXY( m_ScrollBar, "ScreenOptions" ); @@ -428,7 +428,7 @@ void ScreenOptions::Init( InputMode im, OptionRowData OptionRows[], int iNumOpti { case INPUTMODE_INDIVIDUAL: { - for( int p=0; pGetPathToG( "ScreenOptions disqualify") ); m_sprDisqualify[p]->SetName( "ScreenOptions", ssprintf("DisqualifyP%i",p+1) ); @@ -470,7 +470,7 @@ void ScreenOptions::Init( InputMode im, OptionRowData OptionRows[], int iNumOpti PositionCursors(); UpdateEnabledDisabled(); { - for( int p=0; pFinishTweening(); - for( int p=0; pFinishTweening(); @@ -642,7 +642,7 @@ void ScreenOptions::PositionUnderlines() if( row.Type == Row::ROW_EXIT ) continue; - for( int p=0; pIsHumanPlayer(p) ) continue; // skip @@ -686,7 +686,7 @@ void ScreenOptions::PositionUnderlines() void ScreenOptions::PositionIcons() { - for( int p=0; pIsHumanPlayer(p) ) continue; @@ -728,7 +728,7 @@ void ScreenOptions::PositionCursors() { // Set the position of the highlight showing the current option the user is changing. // Set the position of the underscores showing the current choice for each option line. - for( int pn=0; pnIsHumanPlayer(pn) ) continue; @@ -811,7 +811,7 @@ void ScreenOptions::UpdateEnabledDisabled() Row &row = *m_Rows[i]; bool bThisRowIsSelected = false; - for( int p=0; pIsHumanPlayer(p) && m_iCurrentRow[p] == (int) i ) bThisRowIsSelected = true; @@ -843,7 +843,7 @@ void ScreenOptions::UpdateEnabledDisabled() if( row.Type == Row::ROW_EXIT ) { bool bExitRowIsSelectedByBoth = true; - for( int p=0; pIsHumanPlayer(p) && m_iCurrentRow[p] != (int) i ) bExitRowIsSelectedByBoth = false; @@ -1078,7 +1078,7 @@ void ScreenOptions::OnChange( PlayerNumber pn ) } /* Update all players, since changing one player can move both cursors. */ - for( int p=0; pIsHumanPlayer(p) ) TweenCursor( (PlayerNumber) p ); @@ -1180,7 +1180,7 @@ void ScreenOptions::MenuStart( PlayerNumber pn, const InputEventType type ) if( row.Type == Row::ROW_EXIT ) { bool bAllOnExit = true; - for( int p=0; pIsHumanPlayer(p) && m_Rows[m_iCurrentRow[p]]->Type != Row::ROW_EXIT ) bAllOnExit = false; @@ -1308,7 +1308,7 @@ void ScreenOptions::ChangeValueInRow( PlayerNumber pn, int iDelta, bool Repeat ) row.m_iChoiceWithFocus[p] = iNewChoiceWithFocus; } - for( int p=0; pTrace("move pn %i, dir %i, rep %i", pn, dir, Repeat); bool changed = false; - for( int p=0; pm_bSideIsJoined[pn] = true; GAMESTATE->m_MasterPlayerNumber = PlayerNumber(0); } @@ -410,7 +410,7 @@ void ScreenOptionsMaster::ImportOptions() } else { - for( int p=0; pIsHumanPlayer(p) ) continue; // skip @@ -506,7 +506,7 @@ void ScreenOptionsMaster::ExportOptions() const OptionRowData &data = m_OptionRowAlloc[i]; Row &row = *m_Rows[i]; - for( int p=0; pIsHumanPlayer(p) ) continue; @@ -587,7 +587,7 @@ void ScreenOptionsMaster::GoToPrevState() void ScreenOptionsMaster::RefreshIcons() { - for( int p=0; pIsHumanPlayer(p) ) continue; diff --git a/stepmania/src/ScreenPlayerOptions.cpp b/stepmania/src/ScreenPlayerOptions.cpp index 518c084838..77c718e1e2 100644 --- a/stepmania/src/ScreenPlayerOptions.cpp +++ b/stepmania/src/ScreenPlayerOptions.cpp @@ -176,7 +176,7 @@ void ScreenPlayerOptions::UpdateDisqualified() // save current player options PlayerOptions po[2]; { - for( int p=0; pm_PlayerOptions[p]; } @@ -186,7 +186,7 @@ void ScreenPlayerOptions::UpdateDisqualified() ScreenOptionsMaster::ExportOptions(); { - for( int p=0; pIsDisqualified((PlayerNumber)p); diff --git a/stepmania/src/ScreenSelect.cpp b/stepmania/src/ScreenSelect.cpp index 518d0ed66b..9c7ed1dbb6 100644 --- a/stepmania/src/ScreenSelect.cpp +++ b/stepmania/src/ScreenSelect.cpp @@ -186,7 +186,7 @@ void ScreenSelect::FinalizeChoices() * invalidate the choice we've already made. Hack: apply the style. * (Applying the style may have other side-effects, so it'll be re-applied * in SM_GoToNextScreen.) */ - for( int p=0; pIsHumanPlayer(p) ) { const int sel = GetSelectionIndex( (PlayerNumber)p ); @@ -217,7 +217,7 @@ void ScreenSelect::HandleScreenMessage( const ScreenMessage SM ) /* Apply here, not in SM_AllDoneChoosing, because applying can take a very * long time (200+ms), and at SM_AllDoneChoosing, we're still tweening stuff * off-screen. */ - for( int p=0; pIsHumanPlayer(p) ) m_aModeChoices[this->GetSelectionIndex((PlayerNumber)p)].Apply( (PlayerNumber)p ); diff --git a/stepmania/src/ScreenSelectCharacter.cpp b/stepmania/src/ScreenSelectCharacter.cpp index 9995fbff41..eecb6f55df 100644 --- a/stepmania/src/ScreenSelectCharacter.cpp +++ b/stepmania/src/ScreenSelectCharacter.cpp @@ -364,7 +364,7 @@ void ScreenSelectCharacter::MenuStart( PlayerNumber pn ) if( AllAreFinishedChoosing() ) { - for( int p=0; p apCharacters; GAMESTATE->GetCharacters( apCharacters ); @@ -385,7 +385,7 @@ void ScreenSelectCharacter::MenuBack( PlayerNumber pn ) void ScreenSelectCharacter::TweenOffScreen() { - for( int p=0; pAddChild( &m_MusicWheel ); - for( int p=0; pIsHumanPlayer((PlayerNumber)p) ) continue; // skip @@ -173,7 +173,7 @@ void ScreenSelectCourse::TweenOnScreen() m_textNumSongs.Command( "AddX,-640;BounceEnd,0.5;AddX,640" ); m_textTime.Command( "AddX,-640;BounceEnd,0.5;AddX,640" ); m_CourseContentsFrame.Command( "ZoomY,0;BounceEnd,0.5;ZoomY,1" ); - for( int p=0; pm_PreferredCourseDifficulty[p]; @@ -461,7 +461,7 @@ void ScreenSelectCourse::AfterCourseChange() void ScreenSelectCourse::UpdateOptionsDisplays() { - for( int p=0; pIsHumanPlayer(p) ) { diff --git a/stepmania/src/ScreenSelectDifficulty.cpp b/stepmania/src/ScreenSelectDifficulty.cpp index fb141673ef..889c4cfe1a 100644 --- a/stepmania/src/ScreenSelectDifficulty.cpp +++ b/stepmania/src/ScreenSelectDifficulty.cpp @@ -182,7 +182,7 @@ void ScreenSelectDifficulty::UpdateSelectableChoices() // I'm not sure why this was here -- but there seem no ill effects // of it's removal. // - //for( int p=0; pIsHumanPlayer(p) ) // { // MenuRight( (PlayerNumber)p ); @@ -212,7 +212,7 @@ void ScreenSelectDifficulty::MenuLeft( PlayerNumber pn ) return; bool AnotherPlayerSelected = false; - for( int p=0; pIsHumanPlayer(p) ) continue; // skip @@ -536,7 +536,7 @@ void ScreenSelectDifficulty::TweenOffScreen() OFF_COMMAND( m_sprExplanation[page] ); OFF_COMMAND( m_sprMore[page] ); - for( int p=0; pIsHumanPlayer(p) ) continue; diff --git a/stepmania/src/ScreenSelectDifficultyEX.cpp b/stepmania/src/ScreenSelectDifficultyEX.cpp index c79a0f141a..85e70e4a3e 100644 --- a/stepmania/src/ScreenSelectDifficultyEX.cpp +++ b/stepmania/src/ScreenSelectDifficultyEX.cpp @@ -189,7 +189,7 @@ int ScreenSelectDifficultyEX::GetSelectionIndex( PlayerNumber pn ) void ScreenSelectDifficultyEX::UpdateSelectableChoices() { - for( int p=0; pIsPlayerEnabled(p) ) { continue; } if( p!=pn && m_CurrentPage==PAGE_1 ) { continue; } @@ -454,7 +454,7 @@ void ScreenSelectDifficultyEX::TweenOnScreen() void ScreenSelectDifficultyEX::TweenOffScreen() { - for( int p=0; pIsPlayerEnabled((PlayerNumber)p) ) { continue; } diff --git a/stepmania/src/ScreenSelectMaster.cpp b/stepmania/src/ScreenSelectMaster.cpp index 829cf35f53..b702f21d0c 100644 --- a/stepmania/src/ScreenSelectMaster.cpp +++ b/stepmania/src/ScreenSelectMaster.cpp @@ -290,7 +290,7 @@ void ScreenSelectMaster::HandleScreenMessage( const ScreenMessage SM ) else { for( int i=0; iIsPlayerEnabled(p) ) { m_sprCursor[i][p].SetXY( GetCursorX((PlayerNumber)p,i), GetCursorY((PlayerNumber)p,i) ); @@ -306,7 +306,7 @@ void ScreenSelectMaster::HandleScreenMessage( const ScreenMessage SM ) else { for( int i=0; iIsPlayerEnabled(p) ) COMMAND( m_sprPreview[i][m_iChoice[p]][p], "PostSwitchPage" ); } @@ -340,7 +340,7 @@ void ScreenSelectMaster::UpdateSelectableChoices() for( int i=0; iIsHumanPlayer(p) ) continue; @@ -419,7 +419,7 @@ bool ScreenSelectMaster::ChangePage( int iNewChoice ) else { for( int i=0; iIsHumanPlayer(p) ) COMMAND( m_sprCursor[i][p], "PreSwitchPage" ); } @@ -438,7 +438,7 @@ bool ScreenSelectMaster::ChangePage( int iNewChoice ) else { for( int i=0; iIsPlayerEnabled(p) ) COMMAND( m_sprPreview[i][m_iChoice[p]][p], "PreSwitchPage" ); } @@ -480,7 +480,7 @@ bool ScreenSelectMaster::ChangeSelection( PlayerNumber pn, int iNewChoice ) bool bMoveAll = SHARED_PREVIEW_AND_CURSOR || GetCurrentPage()!=PAGE_1; - for( int p=0; pIsHumanPlayer(p) ) { ASSERT( !m_bChosen[p] ); @@ -620,7 +620,7 @@ void ScreenSelectMaster::MenuStart( PlayerNumber pn ) { fSecs = max( fSecs, DoMenuStart(pn) ); // check to see if everyone has chosen - for( int p=0; pIsHumanPlayer((PlayerNumber)p) ) bAllDone &= m_bChosen[p]; } @@ -664,7 +664,7 @@ void ScreenSelectMaster::TweenOnScreen() } else { - for( int p=0; pIsPlayerEnabled(p) ) for( int i=0; iIsPlayerEnabled(p) ) { m_sprCursor[i][p].SetXY( GetCursorX((PlayerNumber)p,i), GetCursorY((PlayerNumber)p,i) ); @@ -705,7 +705,7 @@ void ScreenSelectMaster::TweenOnScreen() COMMAND( *m_sprScroll[c][0], int(c) == m_iChoice[0]? "GainFocus":"LoseFocus" ); } else - for( int p=0; pIsPlayerEnabled(p) ) { m_Scroller[p].SetCurrentAndDestinationItem( m_iChoice[p] ); @@ -731,7 +731,7 @@ void ScreenSelectMaster::TweenOffScreen() else { for( int i=0; iIsPlayerEnabled(p) ) OFF_COMMAND( m_sprCursor[i][p] ); } @@ -748,7 +748,7 @@ void ScreenSelectMaster::TweenOffScreen() SelectedByEitherPlayer = true; } else - for( int p=0; pIsPlayerEnabled(p) && m_iChoice[p] == (int)c ) SelectedByEitherPlayer = true; @@ -770,7 +770,7 @@ void ScreenSelectMaster::TweenOffScreen() else { for( int i=0; iIsPlayerEnabled(p) ) { OFF_COMMAND( m_sprPreview[i][c][p] ); @@ -784,7 +784,7 @@ void ScreenSelectMaster::TweenOffScreen() if( SHARED_PREVIEW_AND_CURSOR ) OFF_COMMAND( m_Scroller[0] ); else - for( int p=0; pIsHumanPlayer(p) ) continue; // skip @@ -537,7 +537,7 @@ void ScreenSelectMusic::TweenOnScreen() ON_COMMAND( m_MachineRank ); ON_COMMAND( m_Overlay ); - for( int p=0; pIsHumanPlayer(p) ) continue; // skip @@ -594,7 +594,7 @@ void ScreenSelectMusic::TweenOffScreen() OFF_COMMAND( m_MachineRank ); OFF_COMMAND( m_Overlay ); - for( int p=0; pIsHumanPlayer(p) ) continue; // skip @@ -647,7 +647,7 @@ void ScreenSelectMusic::SwitchDisplayMode( DisplayMode dm ) void ScreenSelectMusic::TweenScoreOnAndOffAfterChangeSort() { - for( int p=0; pIsHumanPlayer(p) ) continue; // skip @@ -1068,7 +1068,7 @@ void ScreenSelectMusic::MenuStart( PlayerNumber pn ) case TYPE_SONG: { const bool bIsNew = PROFILEMAN->IsSongNew( m_MusicWheel.GetSelectedSong() ); bool bIsHard = false; - for( int p=0; pIsHumanPlayer( (PlayerNumber)p ) ) continue; // skip @@ -1231,7 +1231,7 @@ void ScreenSelectMusic::AfterNotesChange( PlayerNumber pn ) void ScreenSelectMusic::SwitchToPreferredDifficulty() { - for( int p=0; pIsHumanPlayer( PlayerNumber(p) ) ) continue; @@ -1318,7 +1318,7 @@ void ScreenSelectMusic::AfterMusicChange() case TYPE_SORT: { CString sGroup = m_MusicWheel.GetSelectedSection(); - for( int p=0; pIsHumanPlayer(p) ) { diff --git a/stepmania/src/ScreenTitleMenu.cpp b/stepmania/src/ScreenTitleMenu.cpp index 77b4899255..b2395eb838 100644 --- a/stepmania/src/ScreenTitleMenu.cpp +++ b/stepmania/src/ScreenTitleMenu.cpp @@ -349,7 +349,7 @@ void ScreenTitleMenu::HandleScreenMessage( const ScreenMessage SM ) if( m_Choice == 0 ) { // apply default options - for( int p=0; pm_PlayerOptions[p].FromString( PREFSMAN->m_sDefaultModifiers ); GAMESTATE->m_SongOptions.FromString( PREFSMAN->m_sDefaultModifiers ); } diff --git a/stepmania/src/ScreenWithMenuElements.cpp b/stepmania/src/ScreenWithMenuElements.cpp index 798b80ce04..10536e707f 100644 --- a/stepmania/src/ScreenWithMenuElements.cpp +++ b/stepmania/src/ScreenWithMenuElements.cpp @@ -60,7 +60,7 @@ ScreenWithMenuElements::ScreenWithMenuElements( CString sClassName ) : Screen( s if( MEMORY_CARD_ICONS ) { - for( int p=0; p vpStepsToShow; - for( int p=0; pIsHumanPlayer(p) ) continue; // skip diff --git a/stepmania/src/StageStats.cpp b/stepmania/src/StageStats.cpp index b69b1d5081..8981b52fa1 100644 --- a/stepmania/src/StageStats.cpp +++ b/stepmania/src/StageStats.cpp @@ -29,7 +29,7 @@ StageStats::StageStats() StageType = STAGE_INVALID; fGameplaySeconds = 0; - for( int p=0; pIsHumanPlayer(p) && !bFailed[p] ) return true; return false; @@ -232,7 +232,7 @@ bool StageStats::OnePassed() const bool StageStats::AllFailed() const { - for( int pn=0; pnIsPlayerEnabled(PlayerNumber(pn)) ) if( !bFailed[pn] ) return false; @@ -241,7 +241,7 @@ bool StageStats::AllFailed() const bool StageStats::AllFailedEarlier() const { - for( int p=0; pIsPlayerEnabled(p) && !bFailedEarlier[p] ) return false; return true; @@ -525,7 +525,7 @@ Grade GetBestFinalGrade() vector vSongs; StageStats stats; GAMESTATE->GetFinalEvalStatsAndSongs( stats, vSongs ); - for( int p=0; pIsHumanPlayer(p) ) top_grade = min( top_grade, stats.GetGrade((PlayerNumber)p) ); return top_grade; diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index c9f2cf489f..9521174e54 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -201,7 +201,7 @@ void ResetGame( bool ReturnToFirstScreen ) /* GameState::Reset() will switch the NoteSkin - for( int p=0; pDoesNoteSkinExist( NOTESKIN->GetCurNoteSkinName(pn) ) ) @@ -1300,7 +1300,7 @@ bool HandleGlobalInputs( DeviceInput DeviceI, InputEventType type, GameInput Gam // so we don't have to play through a whole song to get new output. BOOKKEEPER->WriteToDisk(); PROFILEMAN->SaveMachineProfile(); - for( int p=0; pIsUsingProfile((PlayerNumber)p) ) PROFILEMAN->SaveProfile( (PlayerNumber)p ); SCREENMAN->SystemMessage( "Stats saved" ); diff --git a/stepmania/src/StyleDef.cpp b/stepmania/src/StyleDef.cpp index a6cf82649b..fdde357b2c 100644 --- a/stepmania/src/StyleDef.cpp +++ b/stepmania/src/StyleDef.cpp @@ -47,7 +47,7 @@ StyleInput StyleDef::GameInputToStyleInput( const GameInput &GameI ) const { StyleInput SI; - for( int p=0; p