From 984b43385831a756554e7a1e519c8a6a64706c00 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 16 Nov 2002 20:21:00 +0000 Subject: [PATCH] signs, headers, for scoping --- stepmania/src/SDL_dither.cpp | 8 ++++---- stepmania/src/ScreenGameplay.cpp | 9 ++++++--- stepmania/src/ScreenGraphicOptions.h | 2 +- stepmania/src/ScreenMachineOptions.h | 2 +- stepmania/src/ScreenManager.cpp | 2 +- stepmania/src/ScreenOptions.cpp | 11 +++++++---- stepmania/src/ScreenPlayerOptions.h | 2 +- stepmania/src/ScreenSandbox.cpp | 2 +- stepmania/src/ScreenSelectDifficulty.cpp | 19 ++++++++++--------- stepmania/src/ScreenSelectGame.cpp | 5 +++-- stepmania/src/ScreenSelectStyle5th.cpp | 10 ++++++---- stepmania/src/ScreenSongOptions.h | 2 +- stepmania/src/ScreenStage.cpp | 3 ++- 13 files changed, 44 insertions(+), 33 deletions(-) diff --git a/stepmania/src/SDL_dither.cpp b/stepmania/src/SDL_dither.cpp index bfbe4e17bf..a1bb41ebc4 100644 --- a/stepmania/src/SDL_dither.cpp +++ b/stepmania/src/SDL_dither.cpp @@ -9,10 +9,10 @@ /* Fractions, 0/16 to 15/16: */ static const int DitherMat[DitherMatDim][DitherMatDim] = { - 0, 8, 2, 10, - 12, 4, 14, 6, - 3, 11, 1, 9, - 15, 7, 13, 5 + { 0, 8, 2, 10 }, + { 12, 4, 14, 6 }, + { 3, 11, 1, 9 }, + { 15, 7, 13, 5 } }; static int DitherMatCalc[DitherMatDim][DitherMatDim]; diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 24b8289036..6878f1e8d9 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -101,7 +101,8 @@ ScreenGameplay::ScreenGameplay() { LOG->Trace( "ScreenGameplay::ScreenGameplay()" ); - for( int p=0; pm_iSongsBeforeFail[p]+1) ); // If it's the first song, record the options the player selected for later. @@ -1143,7 +1145,8 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) } // save any statistics - for( int p=0; pIsPlayerEnabled(p) ) { diff --git a/stepmania/src/ScreenGraphicOptions.h b/stepmania/src/ScreenGraphicOptions.h index cd54a523fb..4eb647695b 100644 --- a/stepmania/src/ScreenGraphicOptions.h +++ b/stepmania/src/ScreenGraphicOptions.h @@ -29,4 +29,4 @@ private: void GoToPrevState(); }; -#endif \ No newline at end of file +#endif diff --git a/stepmania/src/ScreenMachineOptions.h b/stepmania/src/ScreenMachineOptions.h index b6c9e734af..0e1978f740 100644 --- a/stepmania/src/ScreenMachineOptions.h +++ b/stepmania/src/ScreenMachineOptions.h @@ -26,4 +26,4 @@ private: void GoToPrevState(); }; -#endif \ No newline at end of file +#endif diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index 2de74929ea..4a304ca1ad 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -337,4 +337,4 @@ void ScreenManager::RefreshCreditsMessages() else if( GAMESTATE->m_bPlayersCanJoin ) m_textCreditInfo[p].SetText( "PRESS START" ); else m_textCreditInfo[p].SetText( "CREDIT(S) 0 / 0" ); } -} \ No newline at end of file +} diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index eb21f9c5a9..bf3fb3e7ee 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -74,7 +74,7 @@ ScreenOptions::ScreenOptions( CString sBackgroundPath, CString sPagePath, CStrin { m_iCurrentRow[p] = 0; - for( int l=0; lImportOptions(); if( m_InputMode == INPUTMODE_BOTH ) { - for( int l=0; lm_PlayMode = PLAY_MODE_INVALID; - int p; + unsigned p; m_Menu.Load( THEME->GetPathTo("BGAnimations","select difficulty"), @@ -96,7 +96,7 @@ ScreenSelectDifficulty::ScreenSelectDifficulty() this->AddChild( &m_Menu ); - for( int d=0; d= 0 && iItemIndex < NUM_DIFFICULTY_ITEMS ); + ASSERT( iItemIndex >= 0 && iItemIndex < unsigned(NUM_DIFFICULTY_ITEMS) ); - return iItemIndex >= NUM_ITEMS_ON_PAGE_1; + return iItemIndex >= unsigned(NUM_ITEMS_ON_PAGE_1); } bool ScreenSelectDifficulty::SelectedSomethingOnPage2() @@ -327,7 +327,8 @@ void ScreenSelectDifficulty::ChangeTo( PlayerNumber pn, int iSelectionWas, int i bool bSelectedSomethingOnPage2 = iSelectionIs >= 3; bool bSomeoneMadeAChoice = false; - for( int p=0; pIsPlayerEnabled(p) && m_bChosen[p] ) bSomeoneMadeAChoice = true; @@ -392,7 +393,7 @@ void ScreenSelectDifficulty::MenuStart( PlayerNumber pn ) return; m_bChosen[pn] = true; - for( int page=0; page aGames; GAMEMAN->GetEnabledGames( aGames ); - for( unsigned i=0; iGetGameDefForGame(game)->m_szName; diff --git a/stepmania/src/ScreenSelectStyle5th.cpp b/stepmania/src/ScreenSelectStyle5th.cpp index 03be5cd186..f0ee256ced 100644 --- a/stepmania/src/ScreenSelectStyle5th.cpp +++ b/stepmania/src/ScreenSelectStyle5th.cpp @@ -120,8 +120,8 @@ ScreenSelectStyle5th::ScreenSelectStyle5th() m_iSelection = 0; // single - - for( int i=0; iGetPathTo("Graphics",ssprintf("select style pad game %d style %d",GAMESTATE->m_CurGame,i)) ); // m_sprPad[i].SetXY( PAD_X[i], PAD_Y[i] ); @@ -398,7 +398,8 @@ void ScreenSelectStyle5th::AfterChange() void ScreenSelectStyle5th::TweenOffScreen() { - for( int i=0; iAddChild( &m_sprSongBackground ); // add background first so it draws bottom-most //this->AddChild( &m_quadMask ); // add quad mask before stage so that it will block out the stage sprites - for( int i=0; i<4; i++ ) + int i; + for( i=0; i<4; i++ ) { m_sprNumbers[i].Load( THEME->GetPathTo("Graphics","stage parts 5x3") );