remove VC6 scoping hacks
This commit is contained in:
@@ -119,19 +119,17 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
|
||||
ssprintf("%f, %f", fPercentBetweenColors, fPercentThroughEffect) );
|
||||
float fOriginalAlpha = m_tempState.diffuse[0].a;
|
||||
|
||||
int i;
|
||||
|
||||
switch( m_Effect )
|
||||
{
|
||||
case diffuse_blink:
|
||||
/* XXX: Should diffuse_blink and diffuse_shift multiply the tempState color?
|
||||
* (That would have the same effect with 1,1,1,1, and allow tweening the diffuse
|
||||
* while blinking and shifting.) */
|
||||
for(i=0; i<4; i++)
|
||||
for(int i=0; i<4; i++)
|
||||
m_tempState.diffuse[i] = bBlinkOn ? m_effectColor1 : m_effectColor2;
|
||||
break;
|
||||
case diffuse_shift:
|
||||
for(i=0; i<4; i++)
|
||||
for(int i=0; i<4; i++)
|
||||
m_tempState.diffuse[i] = m_effectColor1*fPercentBetweenColors + m_effectColor2*(1.0f-fPercentBetweenColors);
|
||||
break;
|
||||
case glow_blink:
|
||||
@@ -148,7 +146,7 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
|
||||
cosf( fPercentBetweenColors*2*PI + PI * 2.0f / 3.0f ) * 0.5f + 0.5f,
|
||||
cosf( fPercentBetweenColors*2*PI + PI * 4.0f / 3.0f) * 0.5f + 0.5f,
|
||||
fOriginalAlpha );
|
||||
for( i=1; i<4; i++ )
|
||||
for( int i=1; i<4; i++ )
|
||||
m_tempState.diffuse[i] = m_tempState.diffuse[0];
|
||||
break;
|
||||
case wag:
|
||||
|
||||
@@ -20,12 +20,11 @@ void AnnouncerManager::GetAnnouncerNames( CStringArray& AddTo )
|
||||
GetDirListing( ANNOUNCERS_DIR+"*", AddTo, true );
|
||||
|
||||
// strip out the folder called "CVS" and EMPTY_ANNOUNCER_NAME
|
||||
int i;
|
||||
for( i=AddTo.size()-1; i>=0; i-- )
|
||||
for( int i=AddTo.size()-1; i>=0; i-- )
|
||||
if( !stricmp( AddTo[i], "cvs" ) )
|
||||
AddTo.erase(AddTo.begin()+i, AddTo.begin()+i+1 );
|
||||
|
||||
for( i=AddTo.size()-1; i>=0; i-- )
|
||||
for( int i=AddTo.size()-1; i>=0; i-- )
|
||||
if( !stricmp( AddTo[i], EMPTY_ANNOUNCER_NAME ) )
|
||||
AddTo.erase(AddTo.begin()+i, AddTo.begin()+i+1 );
|
||||
}
|
||||
|
||||
@@ -64,8 +64,7 @@ void AddLayersFromAniDir( CString sAniDir, vector<Actor*> &layersAddTo, bool Gen
|
||||
}
|
||||
}
|
||||
|
||||
int i;
|
||||
for( i=0; i<MAX_LAYERS; i++ )
|
||||
for( int i=0; i<MAX_LAYERS; i++ )
|
||||
{
|
||||
CString sLayer = ssprintf("Layer%d",i+1);
|
||||
const IniFile::key* pKey = ini.GetKey( sLayer );
|
||||
|
||||
@@ -662,15 +662,14 @@ void BGAnimationLayer::Update( float fDeltaTime )
|
||||
|
||||
const float fSongBeat = GAMESTATE->m_fSongBeat;
|
||||
|
||||
unsigned i;
|
||||
for( i=0; i<m_SubActors.size(); i++ )
|
||||
for( unsigned i=0; i<m_SubActors.size(); i++ )
|
||||
m_SubActors[i]->Update( fDeltaTime );
|
||||
|
||||
|
||||
switch( m_Type )
|
||||
{
|
||||
case TYPE_SPRITE:
|
||||
for( i=0; i<m_SubActors.size(); i++ )
|
||||
for( unsigned i=0; i<m_SubActors.size(); i++ )
|
||||
{
|
||||
if( m_fTexCoordVelocityX || m_fTexCoordVelocityY )
|
||||
{
|
||||
@@ -714,7 +713,7 @@ void BGAnimationLayer::Update( float fDeltaTime )
|
||||
break;
|
||||
*/
|
||||
case TYPE_PARTICLES:
|
||||
for( i=0; i<m_SubActors.size(); i++ )
|
||||
for( unsigned i=0; i<m_SubActors.size(); i++ )
|
||||
{
|
||||
Actor* pActor = m_SubActors[i];
|
||||
RageVector3 &vel = m_vParticleVelocity[i];
|
||||
@@ -809,7 +808,7 @@ void BGAnimationLayer::Update( float fDeltaTime )
|
||||
}
|
||||
break;
|
||||
case EFFECT_TILE_PULSE:
|
||||
for( i=0; i<m_SubActors.size(); i++ )
|
||||
for( unsigned i=0; i<m_SubActors.size(); i++ )
|
||||
m_SubActors[i]->SetZoom( sinf( fSongBeat*PI/2 ) );
|
||||
|
||||
break;
|
||||
@@ -1023,9 +1022,7 @@ void BGAnimationLayer::LoseFocus()
|
||||
|
||||
void BGAnimationLayer::PlayCommand( const CString &sCommandName )
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for( i=0; i<m_SubActors.size(); i++ )
|
||||
for( unsigned i=0; i<m_SubActors.size(); i++ )
|
||||
m_SubActors[i]->Command( ssprintf("playcommand,%s", sCommandName.c_str()) );
|
||||
|
||||
CString sKey = sCommandName;
|
||||
@@ -1035,7 +1032,7 @@ void BGAnimationLayer::PlayCommand( const CString &sCommandName )
|
||||
if( it == m_asCommands.end() )
|
||||
return;
|
||||
|
||||
for( i=0; i<m_SubActors.size(); i++ )
|
||||
for( unsigned i=0; i<m_SubActors.size(); i++ )
|
||||
m_SubActors[i]->Command( it->second );
|
||||
}
|
||||
|
||||
|
||||
@@ -87,9 +87,8 @@ void BPMDisplay::SetBPMRange( const DisplayBpms &bpms )
|
||||
|
||||
const vector<float> &BPMS = bpms.vfBpms;
|
||||
|
||||
unsigned i;
|
||||
bool AllIdentical = true;
|
||||
for( i = 0; i < BPMS.size(); ++i )
|
||||
for( unsigned i = 0; i < BPMS.size(); ++i )
|
||||
{
|
||||
if( i > 0 && BPMS[i] != BPMS[i-1] )
|
||||
AllIdentical = false;
|
||||
@@ -99,7 +98,7 @@ void BPMDisplay::SetBPMRange( const DisplayBpms &bpms )
|
||||
{
|
||||
int MinBPM=99999999;
|
||||
int MaxBPM=-99999999;
|
||||
for( i = 0; i < BPMS.size(); ++i )
|
||||
for( unsigned i = 0; i < BPMS.size(); ++i )
|
||||
{
|
||||
MinBPM = min( MinBPM, (int) roundf(BPMS[i]) );
|
||||
MaxBPM = max( MaxBPM, (int) roundf(BPMS[i]) );
|
||||
@@ -115,7 +114,7 @@ void BPMDisplay::SetBPMRange( const DisplayBpms &bpms )
|
||||
m_textBPM.SetText( ssprintf("%i%s%i", MinBPM, SEPARATOR.c_str(), MaxBPM) );
|
||||
} else {
|
||||
m_BPMS.clear();
|
||||
for( i = 0; i < BPMS.size(); ++i )
|
||||
for( unsigned i = 0; i < BPMS.size(); ++i )
|
||||
{
|
||||
m_BPMS.push_back(BPMS[i]);
|
||||
if( BPMS[i] != -1 )
|
||||
|
||||
@@ -435,8 +435,8 @@ int Background::FindBGSegmentForBeat( float fBeat ) const
|
||||
return -1;
|
||||
|
||||
// assumption: m_aBGChanges are sorted by m_fStartBeat
|
||||
int i;
|
||||
for( i=m_aBGChanges.size()-1; i>=0; i-- )
|
||||
int i;
|
||||
for( i=m_aBGChanges.size()-1; i>=0; i-- )
|
||||
{
|
||||
if( fBeat >= m_aBGChanges[i].m_fStartBeat )
|
||||
return i;
|
||||
|
||||
@@ -127,7 +127,6 @@ void BitmapText::BuildChars()
|
||||
if(m_wTextLines.empty()) return;
|
||||
|
||||
m_size.y = float(m_pFont->GetHeight() * m_wTextLines.size());
|
||||
unsigned i;
|
||||
int MinSpacing = 0;
|
||||
|
||||
/* The height (from the origin to the baseline): */
|
||||
@@ -145,7 +144,7 @@ void BitmapText::BuildChars()
|
||||
default: ASSERT( false ); return;
|
||||
}
|
||||
|
||||
for( i=0; i<m_wTextLines.size(); i++ ) // foreach line
|
||||
for( unsigned i=0; i<m_wTextLines.size(); i++ ) // foreach line
|
||||
{
|
||||
iY += m_pFont->GetHeight();
|
||||
const wstring &szLine = m_wTextLines[i];
|
||||
|
||||
@@ -14,12 +14,11 @@ void ComboGraph::Load( CString Path, const StageStats &s, PlayerNumber pn )
|
||||
|
||||
/* Find the largest combo. */
|
||||
int MaxComboSize = 0;
|
||||
unsigned i;
|
||||
for( i = 0; i < s.ComboList[pn].size(); ++i )
|
||||
for( unsigned i = 0; i < s.ComboList[pn].size(); ++i )
|
||||
MaxComboSize = max( MaxComboSize, s.ComboList[pn][i].GetStageCnt() );
|
||||
|
||||
float width = -1;
|
||||
for( i = 0; i < s.ComboList[pn].size(); ++i )
|
||||
for( unsigned i = 0; i < s.ComboList[pn].size(); ++i )
|
||||
{
|
||||
const StageStats::Combo_t &combo = s.ComboList[pn][i];
|
||||
if( combo.GetStageCnt() < MinComboSizeToShow )
|
||||
@@ -49,7 +48,7 @@ void ComboGraph::Load( CString Path, const StageStats &s, PlayerNumber pn )
|
||||
this->AddChild( sprite );
|
||||
}
|
||||
|
||||
for( i = 0; i < s.ComboList[pn].size(); ++i )
|
||||
for( unsigned i = 0; i < s.ComboList[pn].size(); ++i )
|
||||
{
|
||||
const StageStats::Combo_t &combo = s.ComboList[pn][i];
|
||||
if( combo.GetStageCnt() < MinComboSizeToShow )
|
||||
|
||||
@@ -1072,10 +1072,8 @@ void Course::UpdateCourseStats( StepsType st )
|
||||
{
|
||||
m_SortOrder_TotalDifficulty = 0;
|
||||
|
||||
unsigned i;
|
||||
|
||||
// courses with random/players best-worst songs should go at the end
|
||||
for(i = 0; i < m_entries.size(); i++)
|
||||
for(unsigned i = 0; i < m_entries.size(); i++)
|
||||
{
|
||||
if ( m_entries[i].type == COURSE_ENTRY_FIXED )
|
||||
continue;
|
||||
|
||||
@@ -82,9 +82,7 @@ EditCoursesMenu::EditCoursesMenu()
|
||||
|
||||
m_bInSongMenu = false;
|
||||
|
||||
int i;
|
||||
|
||||
for( i=0; i<2; i++ )
|
||||
for( int i=0; i<2; i++ )
|
||||
{
|
||||
m_sprArrows[i].Load( THEME->GetPathToG(ssprintf("EditCoursesMenu %s",(i==0?"left":"right"))) );
|
||||
m_sprArrows[i].SetX( ARROWS_X(i) );
|
||||
@@ -96,7 +94,7 @@ EditCoursesMenu::EditCoursesMenu()
|
||||
ZERO( m_iSelection );
|
||||
|
||||
|
||||
for( i=0; i<NUM_ROWS; i++ )
|
||||
for( int i=0; i<NUM_ROWS; i++ )
|
||||
{
|
||||
m_textLabel[i].LoadFromFont( THEME->GetPathToF("Common title") );
|
||||
m_textLabel[i].SetXY( ROW_LABELS_X, ROW_Y(i) );
|
||||
|
||||
@@ -35,9 +35,7 @@ EditMenu::EditMenu()
|
||||
{
|
||||
LOG->Trace( "ScreenEditMenu::ScreenEditMenu()" );
|
||||
|
||||
int i;
|
||||
|
||||
for( i=0; i<2; i++ )
|
||||
for( int i=0; i<2; i++ )
|
||||
{
|
||||
m_sprArrows[i].Load( THEME->GetPathToG(ssprintf("EditMenu %s",(i==0?"left":"right"))) );
|
||||
m_sprArrows[i].SetX( ARROWS_X(i) );
|
||||
@@ -55,7 +53,7 @@ EditMenu::EditMenu()
|
||||
|
||||
|
||||
|
||||
for( i=0; i<NUM_ROWS; i++ )
|
||||
for( int i=0; i<NUM_ROWS; i++ )
|
||||
{
|
||||
m_textLabel[i].LoadFromFont( THEME->GetPathToF("Common title") );
|
||||
m_textLabel[i].SetXY( ROW_LABELS_X, ROW_Y(i) );
|
||||
@@ -106,14 +104,12 @@ EditMenu::EditMenu()
|
||||
// Select the current song if any
|
||||
if( GAMESTATE->m_pCurSong )
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for( i=0; i<m_sGroups.size(); i++ )
|
||||
for( unsigned i=0; i<m_sGroups.size(); i++ )
|
||||
if( GAMESTATE->m_pCurSong->m_sGroupName == m_sGroups[i] )
|
||||
m_iSelection[ROW_GROUP] = i;
|
||||
OnRowValueChanged( ROW_GROUP );
|
||||
|
||||
for( i=0; i<m_pSongs.size(); i++ )
|
||||
for( unsigned i=0; i<m_pSongs.size(); i++ )
|
||||
if( GAMESTATE->m_pCurSong == m_pSongs[i] )
|
||||
m_iSelection[ROW_SONG] = i;
|
||||
OnRowValueChanged( ROW_SONG );
|
||||
@@ -121,7 +117,7 @@ EditMenu::EditMenu()
|
||||
// Select the current StepsType and difficulty if any
|
||||
if( GAMESTATE->m_pCurSteps[PLAYER_1] )
|
||||
{
|
||||
for( i=0; i<m_StepsTypes.size(); i++ )
|
||||
for( unsigned i=0; i<m_StepsTypes.size(); i++ )
|
||||
{
|
||||
if( m_StepsTypes[i] == GAMESTATE->m_pCurSteps[PLAYER_1]->m_StepsType )
|
||||
{
|
||||
|
||||
@@ -37,14 +37,13 @@ void FontPage::Load( FontPageSettings cfg )
|
||||
|
||||
// load character widths
|
||||
vector<int> FrameWidths;
|
||||
int i;
|
||||
|
||||
int default_width = m_pTexture->GetSourceFrameWidth();
|
||||
if(cfg.DefaultWidth != -1)
|
||||
default_width = cfg.DefaultWidth;
|
||||
|
||||
// Assume each character is the width of the frame by default.
|
||||
for( i=0; i<m_pTexture->GetNumFrames(); i++ )
|
||||
for( int i=0; i<m_pTexture->GetNumFrames(); i++ )
|
||||
{
|
||||
map<int,int>::const_iterator it = cfg.GlyphWidths.find(i);
|
||||
if(it != cfg.GlyphWidths.end())
|
||||
@@ -219,9 +218,7 @@ Font::~Font()
|
||||
|
||||
void Font::Unload()
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for(i = 0; i < pages.size(); ++i)
|
||||
for(unsigned i = 0; i < pages.size(); ++i)
|
||||
delete pages[i];
|
||||
pages.clear();
|
||||
|
||||
|
||||
@@ -45,14 +45,13 @@ MenuInput Game::GameInputToMenuInput( GameInput GameI ) const
|
||||
ASSERT(0); return MenuInput(); // invalid m_StyleType
|
||||
};
|
||||
|
||||
int i;
|
||||
for( i=0; i<NUM_MENU_BUTTONS; i++ )
|
||||
for( int i=0; i<NUM_MENU_BUTTONS; i++ )
|
||||
if( m_DedicatedMenuButton[i] == GameI.button )
|
||||
return MenuInput( pn, (MenuButton)i );
|
||||
|
||||
if( !PREFSMAN->m_bOnlyDedicatedMenuButtons )
|
||||
{
|
||||
for( i=0; i<NUM_MENU_BUTTONS; i++ )
|
||||
for( int i=0; i<NUM_MENU_BUTTONS; i++ )
|
||||
if( m_SecondaryMenuButton[i] == GameI.button )
|
||||
return MenuInput( pn, (MenuButton)i );
|
||||
}
|
||||
|
||||
@@ -70,11 +70,9 @@ GameState::~GameState()
|
||||
|
||||
void GameState::ApplyCmdline()
|
||||
{
|
||||
int i;
|
||||
|
||||
/* We need to join players before we can set the style. */
|
||||
CString sPlayer;
|
||||
for( i = 0; GetCommandlineArgument( "player", &sPlayer, i ); ++i )
|
||||
for( int i = 0; GetCommandlineArgument( "player", &sPlayer, i ); ++i )
|
||||
{
|
||||
int pn = atoi( sPlayer )-1;
|
||||
if( !IsAnInt( sPlayer ) || pn < 0 || pn >= NUM_PLAYERS )
|
||||
@@ -84,7 +82,7 @@ void GameState::ApplyCmdline()
|
||||
}
|
||||
|
||||
CString sMode;
|
||||
for( i = 0; GetCommandlineArgument( "mode", &sMode, i ); ++i )
|
||||
for( int i = 0; GetCommandlineArgument( "mode", &sMode, i ); ++i )
|
||||
{
|
||||
ModeChoice m;
|
||||
m.Load( 0, sMode );
|
||||
@@ -441,10 +439,8 @@ void GameState::Update( float fDelta )
|
||||
|
||||
void GameState::ReloadCharacters()
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for( i=0; i<m_pCharacters.size(); i++ )
|
||||
delete m_pCharacters[i];
|
||||
for( unsigned i=0; i<m_pCharacters.size(); i++ )
|
||||
SAFE_DELETE( m_pCharacters[i] );
|
||||
m_pCharacters.clear();
|
||||
|
||||
FOREACH_PlayerNumber( p )
|
||||
@@ -453,7 +449,7 @@ void GameState::ReloadCharacters()
|
||||
CStringArray as;
|
||||
GetDirListing( CHARACTERS_DIR "*", as, true, true );
|
||||
bool FoundDefault = false;
|
||||
for( i=0; i<as.size(); i++ )
|
||||
for( unsigned i=0; i<as.size(); i++ )
|
||||
{
|
||||
CString sCharName, sDummy;
|
||||
splitpath(as[i], sDummy, sCharName, sDummy);
|
||||
|
||||
@@ -71,11 +71,10 @@ void GraphDisplay::UpdateVerts()
|
||||
|
||||
int NumSlices = VALUE_RESOLUTION-1;
|
||||
|
||||
int i;
|
||||
for( i = 0; i < 4*NumSlices; ++i )
|
||||
for( int i = 0; i < 4*NumSlices; ++i )
|
||||
Slices[i].c = RageColor(1,1,1,1);
|
||||
|
||||
for( i = 0; i < NumSlices; ++i )
|
||||
for( int i = 0; i < NumSlices; ++i )
|
||||
{
|
||||
const float Left = SCALE( float(i), 0.0f, float(NumSlices), quadVertices.left, quadVertices.right );
|
||||
const float Right = SCALE( float(i+1), 0.0f, float(NumSlices), quadVertices.left, quadVertices.right );
|
||||
@@ -94,7 +93,7 @@ void GraphDisplay::UpdateVerts()
|
||||
}
|
||||
|
||||
const RectF *tex = m_pTexture->GetTextureCoordRect( 0 );
|
||||
for( i = 0; i < NumSlices; ++i )
|
||||
for( int i = 0; i < NumSlices; ++i )
|
||||
{
|
||||
const float Left = SCALE( float(i), 0.0f, float(NumSlices), tex->left, tex->right );
|
||||
const float Right = SCALE( float(i+1), 0.0f, float(NumSlices), tex->left, tex->right );
|
||||
|
||||
@@ -144,9 +144,7 @@ void GrooveRadar::GrooveRadarValueMap::DrawPrimitives()
|
||||
v[0].p = RageVector3( 0, 0, 0 );
|
||||
v[0].c = color;
|
||||
|
||||
int i;
|
||||
|
||||
for( i=0; i<NUM_SHOWN_RADAR_CATEGORIES+1; i++ ) // do one extra to close the fan
|
||||
for( int i=0; i<NUM_SHOWN_RADAR_CATEGORIES+1; i++ ) // do one extra to close the fan
|
||||
{
|
||||
const int c = i%NUM_SHOWN_RADAR_CATEGORIES;
|
||||
const float fDistFromCenter =
|
||||
@@ -164,7 +162,7 @@ void GrooveRadar::GrooveRadarValueMap::DrawPrimitives()
|
||||
//
|
||||
// use a line loop to draw the thick line
|
||||
//
|
||||
for( i=0; i<=NUM_SHOWN_RADAR_CATEGORIES; i++ )
|
||||
for( int i=0; i<=NUM_SHOWN_RADAR_CATEGORIES; i++ )
|
||||
{
|
||||
const int c = i%NUM_SHOWN_RADAR_CATEGORIES;
|
||||
const float fDistFromCenter =
|
||||
|
||||
@@ -20,9 +20,7 @@ JukeboxMenu::JukeboxMenu()
|
||||
{
|
||||
LOG->Trace( "ScreenJukeboxMenu::ScreenJukeboxMenu()" );
|
||||
|
||||
int i;
|
||||
|
||||
for( i=0; i<2; i++ )
|
||||
for( int i=0; i<2; i++ )
|
||||
{
|
||||
m_sprArrows[i].Load( THEME->GetPathToG(ssprintf("JukeboxMenu %s",(i==0?"left":"right"))) );
|
||||
m_sprArrows[i].SetX( ARROWS_X(i) );
|
||||
@@ -33,7 +31,7 @@ JukeboxMenu::JukeboxMenu()
|
||||
|
||||
ZERO( m_iSelection );
|
||||
|
||||
for( i=0; i<NUM_ROWS; i++ )
|
||||
for( int i=0; i<NUM_ROWS; i++ )
|
||||
{
|
||||
m_textLabel[i].LoadFromFont( THEME->GetPathToF("Common title") );
|
||||
m_textLabel[i].SetXY( ROW_LABELS_X, ROW_Y(i) );
|
||||
|
||||
@@ -154,10 +154,9 @@ void Model::LoadMaterialsFromMilkshapeAscii( CString sPath )
|
||||
{
|
||||
m_Materials.resize( nNumMaterials );
|
||||
|
||||
int i;
|
||||
char szName[256];
|
||||
|
||||
for (i = 0; i < nNumMaterials; i++)
|
||||
for (int i = 0; i < nNumMaterials; i++)
|
||||
{
|
||||
msMaterial& Material = m_Materials[i];
|
||||
|
||||
|
||||
@@ -416,8 +416,6 @@ void MusicWheel::GetSongList(vector<Song*> &arraySongs, SortOrder so, CString sP
|
||||
|
||||
void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas, SortOrder so )
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
switch( so )
|
||||
{
|
||||
case SORT_SORT_MENU:
|
||||
@@ -432,7 +430,7 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
|
||||
if( Names.size() != Actions.size() )
|
||||
RageException::Throw("MusicWheel::MenuNames and MusicWheel::MenuActions must have the same number of components");
|
||||
|
||||
for( i=0; i<Names.size(); ++i )
|
||||
for( unsigned i=0; i<Names.size(); ++i )
|
||||
{
|
||||
/* Look for sort names. */
|
||||
vector<CString> parts;
|
||||
@@ -702,7 +700,7 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
|
||||
}
|
||||
|
||||
// init music status icons
|
||||
for( i=0; i<arrayWheelItemDatas.size(); i++ )
|
||||
for( unsigned i=0; i<arrayWheelItemDatas.size(); i++ )
|
||||
{
|
||||
Song* pSong = arrayWheelItemDatas[i].m_pSong;
|
||||
if( pSong == NULL )
|
||||
@@ -718,7 +716,7 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
|
||||
if( so == SORT_MOST_PLAYED )
|
||||
{
|
||||
// init crown icons
|
||||
for( i=0; i< min(3u,arrayWheelItemDatas.size()); i++ )
|
||||
for( unsigned i=0; i< min(3u,arrayWheelItemDatas.size()); i++ )
|
||||
{
|
||||
WheelItemData& WID = arrayWheelItemDatas[i];
|
||||
WID.m_Flags.iPlayersBestNumber = i+1;
|
||||
@@ -833,10 +831,9 @@ void MusicWheel::DrawPrimitives()
|
||||
}
|
||||
|
||||
// draw outside->inside
|
||||
int i;
|
||||
for( i=0; i<NUM_WHEEL_ITEMS/2; i++ )
|
||||
for( int i=0; i<NUM_WHEEL_ITEMS/2; i++ )
|
||||
DrawItem( i );
|
||||
for( i=NUM_WHEEL_ITEMS-1; i>=NUM_WHEEL_ITEMS/2; i-- )
|
||||
for( int i=NUM_WHEEL_ITEMS-1; i>=NUM_WHEEL_ITEMS/2; i-- )
|
||||
DrawItem( i );
|
||||
|
||||
|
||||
@@ -910,8 +907,7 @@ void MusicWheel::Update( float fDeltaTime )
|
||||
{
|
||||
ActorFrame::Update( fDeltaTime );
|
||||
|
||||
unsigned i;
|
||||
for( i=0; i<unsigned(NUM_WHEEL_ITEMS); i++ )
|
||||
for( unsigned i=0; i<unsigned(NUM_WHEEL_ITEMS); i++ )
|
||||
{
|
||||
MusicWheelItem& display = m_MusicWheelItems[i];
|
||||
|
||||
|
||||
@@ -555,22 +555,22 @@ void NetworkSyncManager::ProcessInput()
|
||||
int ColumnNumber=m_packet.Read1();
|
||||
int NumberPlayers=m_packet.Read1();
|
||||
CString ColumnData;
|
||||
int i;
|
||||
|
||||
switch (ColumnNumber)
|
||||
{
|
||||
case NSSB_NAMES:
|
||||
ColumnData = "Names\n";
|
||||
for (i=0; i<NumberPlayers; ++i)
|
||||
for (int i=0; i<NumberPlayers; ++i)
|
||||
ColumnData += m_PlayerNames[m_packet.Read1()] + "\n";
|
||||
break;
|
||||
case NSSB_COMBO:
|
||||
ColumnData = "Combo\n";
|
||||
for (i=0; i<NumberPlayers; ++i)
|
||||
for (int i=0; i<NumberPlayers; ++i)
|
||||
ColumnData += ssprintf("%d\n",m_packet.Read2());
|
||||
break;
|
||||
case NSSB_GRADE:
|
||||
ColumnData = "Grade\n";
|
||||
for (i=0;i<NumberPlayers;i++)
|
||||
for (int i=0;i<NumberPlayers;i++)
|
||||
switch (m_packet.Read1())
|
||||
{
|
||||
case 0:
|
||||
|
||||
@@ -243,12 +243,10 @@ void NoteData::AddHoldNote( HoldNote add )
|
||||
{
|
||||
ASSERT( add.iStartRow>=0 && add.iEndRow>=0 );
|
||||
|
||||
int i;
|
||||
|
||||
// look for other hold notes that overlap and merge them
|
||||
// XXX: this is done implicitly with 4s, but 4s uses this function.
|
||||
// Rework this later.
|
||||
for( i=0; i<GetNumHoldNotes(); i++ ) // for each HoldNote
|
||||
for( int i=0; i<GetNumHoldNotes(); i++ ) // for each HoldNote
|
||||
{
|
||||
HoldNote &other = GetHoldNote(i);
|
||||
if( add.iTrack == other.iTrack && // the tracks correspond
|
||||
@@ -267,7 +265,7 @@ void NoteData::AddHoldNote( HoldNote add )
|
||||
int iAddEndIndex = add.iEndRow;
|
||||
|
||||
// delete TapNotes under this HoldNote
|
||||
for( i=iAddStartIndex+1; i<=iAddEndIndex; i++ )
|
||||
for( int i=iAddStartIndex+1; i<=iAddEndIndex; i++ )
|
||||
SetTapNote( add.iTrack, i, TAP_EMPTY );
|
||||
|
||||
// add a tap note at the start of this hold
|
||||
@@ -369,9 +367,7 @@ int NoteData::GetFirstRow() const
|
||||
{
|
||||
int iEarliestRowFoundSoFar = -1;
|
||||
|
||||
int i;
|
||||
|
||||
for( i=0; i < int(m_TapNotes[0].size()); i++ )
|
||||
for( int i=0; i < int(m_TapNotes[0].size()); i++ )
|
||||
{
|
||||
if( !IsRowEmpty(i) )
|
||||
{
|
||||
@@ -380,7 +376,7 @@ int NoteData::GetFirstRow() const
|
||||
}
|
||||
}
|
||||
|
||||
for( i=0; i<GetNumHoldNotes(); i++ )
|
||||
for( int i=0; i<GetNumHoldNotes(); i++ )
|
||||
{
|
||||
if( iEarliestRowFoundSoFar == -1 ||
|
||||
GetHoldNote(i).iStartRow < iEarliestRowFoundSoFar )
|
||||
@@ -402,9 +398,7 @@ int NoteData::GetLastRow() const
|
||||
{
|
||||
int iOldestRowFoundSoFar = 0;
|
||||
|
||||
int i;
|
||||
|
||||
for( i = int(m_TapNotes[0].size()); i>=0; i-- ) // iterate back to front
|
||||
for( int i = int(m_TapNotes[0].size()); i>=0; i-- ) // iterate back to front
|
||||
{
|
||||
if( !IsRowEmpty(i) )
|
||||
{
|
||||
@@ -413,7 +407,7 @@ int NoteData::GetLastRow() const
|
||||
}
|
||||
}
|
||||
|
||||
for( i=0; i<GetNumHoldNotes(); i++ )
|
||||
for( int i=0; i<GetNumHoldNotes(); i++ )
|
||||
{
|
||||
if( GetHoldNote(i).iEndRow > iOldestRowFoundSoFar )
|
||||
iOldestRowFoundSoFar = GetHoldNote(i).iEndRow;
|
||||
|
||||
@@ -845,16 +845,14 @@ void NoteDataUtil::SwapSides( NoteData &in )
|
||||
|
||||
void NoteDataUtil::Little(NoteData &in, float fStartBeat, float fEndBeat)
|
||||
{
|
||||
int i;
|
||||
|
||||
// filter out all non-quarter notes
|
||||
int max_row = in.GetLastRow();
|
||||
for( i=0; i<=max_row; i+=1 )
|
||||
for( int i=0; i<=max_row; i+=1 )
|
||||
if( i % ROWS_PER_BEAT != 0 )
|
||||
for( int c=0; c<in.GetNumTracks(); c++ )
|
||||
in.SetTapNote( c, i, TAP_EMPTY );
|
||||
|
||||
for( i=in.GetNumHoldNotes()-1; i>=0; i-- )
|
||||
for( int i=in.GetNumHoldNotes()-1; i>=0; i-- )
|
||||
if( fmodf(in.GetHoldNote(i).GetStartBeat(),1) != 0 ) // doesn't start on a beat
|
||||
in.RemoveHoldNote( i );
|
||||
}
|
||||
|
||||
@@ -443,8 +443,6 @@ void NoteField::DrawPrimitives()
|
||||
{
|
||||
ASSERT(GAMESTATE->m_pCurSong);
|
||||
|
||||
unsigned i;
|
||||
|
||||
//
|
||||
// Draw beat bars
|
||||
//
|
||||
@@ -458,7 +456,7 @@ void NoteField::DrawPrimitives()
|
||||
// BPM text
|
||||
//
|
||||
vector<BPMSegment> &aBPMSegments = GAMESTATE->m_pCurSong->m_Timing.m_BPMSegments;
|
||||
for( i=0; i<aBPMSegments.size(); i++ )
|
||||
for( unsigned i=0; i<aBPMSegments.size(); i++ )
|
||||
{
|
||||
if(aBPMSegments[i].m_fStartBeat >= fFirstBeatToDraw &&
|
||||
aBPMSegments[i].m_fStartBeat <= fLastBeatToDraw)
|
||||
@@ -468,7 +466,7 @@ void NoteField::DrawPrimitives()
|
||||
// Freeze text
|
||||
//
|
||||
vector<StopSegment> &aStopSegments = GAMESTATE->m_pCurSong->m_Timing.m_StopSegments;
|
||||
for( i=0; i<aStopSegments.size(); i++ )
|
||||
for( unsigned i=0; i<aStopSegments.size(); i++ )
|
||||
{
|
||||
if(aStopSegments[i].m_fStartBeat >= fFirstBeatToDraw &&
|
||||
aStopSegments[i].m_fStartBeat <= fLastBeatToDraw)
|
||||
@@ -479,7 +477,7 @@ void NoteField::DrawPrimitives()
|
||||
// BGChange text
|
||||
//
|
||||
vector<BackgroundChange> &aBackgroundChanges = GAMESTATE->m_pCurSong->m_BackgroundChanges;
|
||||
for( i=0; i<aBackgroundChanges.size(); i++ )
|
||||
for( unsigned i=0; i<aBackgroundChanges.size(); i++ )
|
||||
{
|
||||
if(aBackgroundChanges[i].m_fStartBeat >= fFirstBeatToDraw &&
|
||||
aBackgroundChanges[i].m_fStartBeat <= fLastBeatToDraw)
|
||||
@@ -524,13 +522,11 @@ void NoteField::DrawPrimitives()
|
||||
|
||||
//
|
||||
// Draw all HoldNotes in this column (so that they appear under the tap notes)
|
||||
//
|
||||
int i;
|
||||
|
||||
//
|
||||
NDMap::iterator CurDisplay = m_BeatToNoteDisplays.begin();
|
||||
ASSERT( CurDisplay != m_BeatToNoteDisplays.end() );
|
||||
NDMap::iterator NextDisplay = CurDisplay; ++NextDisplay;
|
||||
for( i=0; i < GetNumHoldNotes(); i++ )
|
||||
for( int i=0; i < GetNumHoldNotes(); i++ )
|
||||
{
|
||||
const HoldNote &hn = GetHoldNote(i);
|
||||
if( hn.iTrack != c ) // this HoldNote doesn't belong to this column
|
||||
@@ -580,7 +576,7 @@ void NoteField::DrawPrimitives()
|
||||
NextDisplay = CurDisplay; ++NextDisplay;
|
||||
|
||||
// draw notes from furthest to closest
|
||||
for( i=iLastIndexToDraw; i>=iFirstIndexToDraw; --i ) // for each row
|
||||
for( int i=iLastIndexToDraw; i>=iFirstIndexToDraw; --i ) // for each row
|
||||
{
|
||||
TapNote tn = GetTapNote(c, i);
|
||||
if( tn.type == TapNote::empty ) // no note here
|
||||
|
||||
@@ -321,8 +321,7 @@ bool BMSLoader::LoadFromBMSFile( const CString &sPath, Steps &out )
|
||||
int iNumNewTracks = GameManager::StepsTypeToNumTracks( out.m_StepsType );
|
||||
int iTransformNewToOld[MAX_NOTE_TRACKS];
|
||||
|
||||
int i;
|
||||
for( i = 0; i < MAX_NOTE_TRACKS; ++i)
|
||||
for( int i = 0; i < MAX_NOTE_TRACKS; ++i)
|
||||
iTransformNewToOld[i] = -1;
|
||||
|
||||
switch( out.m_StepsType )
|
||||
@@ -452,8 +451,7 @@ bool BMSLoader::LoadFromDir( CString sDir, Song &out )
|
||||
ASSERT( arrayBMSFileNames.size() );
|
||||
|
||||
// load the Steps from the rest of the BMS files
|
||||
unsigned i;
|
||||
for( i=0; i<arrayBMSFileNames.size(); i++ )
|
||||
for( unsigned i=0; i<arrayBMSFileNames.size(); i++ )
|
||||
{
|
||||
Steps* pNewNotes = new Steps;
|
||||
|
||||
@@ -739,7 +737,7 @@ bool BMSLoader::LoadFromDir( CString sDir, Song &out )
|
||||
}
|
||||
}
|
||||
|
||||
for( i=0; i<out.m_Timing.m_BPMSegments.size(); i++ )
|
||||
for( unsigned i=0; i<out.m_Timing.m_BPMSegments.size(); i++ )
|
||||
LOG->Trace( "There is a BPM change at beat %f, BPM %f, index %d",
|
||||
out.m_Timing.m_BPMSegments[i].m_fStartBeat, out.m_Timing.m_BPMSegments[i].m_fBPM, i );
|
||||
|
||||
|
||||
@@ -58,8 +58,7 @@ void NotesWriterSM::WriteGlobalTags( RageFile &f, const Song &out )
|
||||
|
||||
|
||||
f.Write( "#BPMS:" );
|
||||
unsigned i;
|
||||
for( i=0; i<out.m_Timing.m_BPMSegments.size(); i++ )
|
||||
for( unsigned i=0; i<out.m_Timing.m_BPMSegments.size(); i++ )
|
||||
{
|
||||
const BPMSegment &bs = out.m_Timing.m_BPMSegments[i];
|
||||
|
||||
@@ -70,7 +69,7 @@ void NotesWriterSM::WriteGlobalTags( RageFile &f, const Song &out )
|
||||
f.PutLine( ";" );
|
||||
|
||||
f.Write( "#STOPS:" );
|
||||
for( i=0; i<out.m_Timing.m_StopSegments.size(); i++ )
|
||||
for( unsigned i=0; i<out.m_Timing.m_StopSegments.size(); i++ )
|
||||
{
|
||||
const StopSegment &fs = out.m_Timing.m_StopSegments[i];
|
||||
|
||||
@@ -81,7 +80,7 @@ void NotesWriterSM::WriteGlobalTags( RageFile &f, const Song &out )
|
||||
f.PutLine( ";" );
|
||||
|
||||
f.Write( "#BGCHANGES:" );
|
||||
for( i=0; i<out.m_BackgroundChanges.size(); i++ )
|
||||
for( unsigned i=0; i<out.m_BackgroundChanges.size(); i++ )
|
||||
{
|
||||
const BackgroundChange &seg = out.m_BackgroundChanges[i];
|
||||
|
||||
@@ -98,7 +97,7 @@ void NotesWriterSM::WriteGlobalTags( RageFile &f, const Song &out )
|
||||
if( out.m_ForegroundChanges.size() )
|
||||
{
|
||||
f.Write( "#FGCHANGES:" );
|
||||
for( i=0; i<out.m_ForegroundChanges.size(); i++ )
|
||||
for( unsigned i=0; i<out.m_ForegroundChanges.size(); i++ )
|
||||
{
|
||||
const BackgroundChange &seg = out.m_ForegroundChanges[i];
|
||||
|
||||
@@ -176,8 +175,6 @@ bool NotesWriterSM::Write(CString sPath, const Song &out, bool bSavingCache)
|
||||
/* Flush dir cache when writing steps, so the old size isn't cached. */
|
||||
FILEMAN->FlushDirCache( Dirname(sPath) );
|
||||
|
||||
unsigned i;
|
||||
|
||||
int flags = RageFile::WRITE;
|
||||
|
||||
/* If we're not saving cache, we're saving real data, so enable SLOW_FLUSH
|
||||
@@ -210,7 +207,7 @@ bool NotesWriterSM::Write(CString sPath, const Song &out, bool bSavingCache)
|
||||
// Save all Steps for this file
|
||||
//
|
||||
const vector<Steps*>& vpSteps = out.GetAllSteps();
|
||||
for( i=0; i<vpSteps.size(); i++ )
|
||||
for( unsigned i=0; i<vpSteps.size(); i++ )
|
||||
{
|
||||
const Steps* pSteps = vpSteps[i];
|
||||
if( pSteps->IsAutogen() )
|
||||
|
||||
@@ -92,8 +92,7 @@ void OptionIconRow::Refresh()
|
||||
ASSERT( m_PlayerNumber != NUM_PLAYERS );
|
||||
|
||||
// init
|
||||
unsigned i;
|
||||
for( i=0; i<NUM_OPTION_COLS; i++ )
|
||||
for( unsigned i=0; i<NUM_OPTION_COLS; i++ )
|
||||
m_OptionIcon[i].Load( m_PlayerNumber, "", i==0 );
|
||||
|
||||
CString sOptions = GAMESTATE->m_PlayerOptions[m_PlayerNumber].GetString();
|
||||
@@ -104,7 +103,7 @@ void OptionIconRow::Refresh()
|
||||
CString asTabs[NUM_OPTION_COLS-1]; // fill these with what will be displayed on the tabs
|
||||
|
||||
// for each option, look for the best column to place it in
|
||||
for( i=0; i<asOptions.size(); i++ )
|
||||
for( unsigned i=0; i<asOptions.size(); i++ )
|
||||
{
|
||||
CString sOption = asOptions[i];
|
||||
int iPerferredCol = OptionToPreferredColumn( sOption );
|
||||
@@ -125,7 +124,7 @@ void OptionIconRow::Refresh()
|
||||
}
|
||||
}
|
||||
|
||||
for( i=0; i<NUM_OPTION_COLS-1; i++ )
|
||||
for( unsigned i=0; i<NUM_OPTION_COLS-1; i++ )
|
||||
m_OptionIcon[i+1].Load( m_PlayerNumber, asTabs[i], false );
|
||||
}
|
||||
|
||||
|
||||
@@ -52,10 +52,9 @@ void PlayerAI::InitFromDisk()
|
||||
ini.GetValue ( sKey, "MarvelousWeight", dist.fPercent[TNS_MARVELOUS] );
|
||||
|
||||
float fSum = 0;
|
||||
int j;
|
||||
for( j=0; j<NUM_TAP_NOTE_SCORES; j++ )
|
||||
for( int j=0; j<NUM_TAP_NOTE_SCORES; j++ )
|
||||
fSum += dist.fPercent[j];
|
||||
for( j=0; j<NUM_TAP_NOTE_SCORES; j++ )
|
||||
for( int j=0; j<NUM_TAP_NOTE_SCORES; j++ )
|
||||
dist.fPercent[j] /= fSum;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,14 +41,13 @@ void PlayerOptions::Approach( const PlayerOptions& other, float fDeltaSeconds )
|
||||
#define APP( opt ) \
|
||||
fapproach( m_ ## opt, other.m_ ## opt, fDeltaSeconds * other.m_Speed ## opt );
|
||||
|
||||
int i;
|
||||
for( i=0; i<NUM_ACCELS; i++ )
|
||||
for( int i=0; i<NUM_ACCELS; i++ )
|
||||
APP( fAccels[i] );
|
||||
for( i=0; i<NUM_EFFECTS; i++ )
|
||||
for( int i=0; i<NUM_EFFECTS; i++ )
|
||||
APP( fEffects[i] );
|
||||
for( i=0; i<NUM_APPEARANCES; i++ )
|
||||
for( int i=0; i<NUM_APPEARANCES; i++ )
|
||||
APP( fAppearances[i] );
|
||||
for( i=0; i<NUM_SCROLLS; i++ )
|
||||
for( int i=0; i<NUM_SCROLLS; i++ )
|
||||
APP( fScrolls[i] );
|
||||
APP( fTimeSpacing );
|
||||
APP( fScrollSpeed );
|
||||
@@ -316,8 +315,7 @@ void PlayerOptions::FromString( CString sOptions )
|
||||
void NextFloat( float fValues[], int size )
|
||||
{
|
||||
int index = -1;
|
||||
int i;
|
||||
for( i=0; i<size; i++ )
|
||||
for( int i=0; i<size; i++ )
|
||||
{
|
||||
if( fValues[i] == 1 )
|
||||
{
|
||||
@@ -326,7 +324,7 @@ void NextFloat( float fValues[], int size )
|
||||
}
|
||||
}
|
||||
|
||||
for( i=0; i<size; i++ )
|
||||
for( int i=0; i<size; i++ )
|
||||
fValues[i] = 0;
|
||||
|
||||
if( index == size-1 ) // if true, then the last float in the list was selected
|
||||
@@ -338,8 +336,7 @@ void NextFloat( float fValues[], int size )
|
||||
void NextBool( bool bValues[], int size )
|
||||
{
|
||||
int index = -1;
|
||||
int i;
|
||||
for( i=0; i<size; i++ )
|
||||
for( int i=0; i<size; i++ )
|
||||
{
|
||||
if( bValues[i] )
|
||||
{
|
||||
@@ -348,7 +345,7 @@ void NextBool( bool bValues[], int size )
|
||||
}
|
||||
}
|
||||
|
||||
for( i=0; i<size; i++ )
|
||||
for( int i=0; i<size; i++ )
|
||||
bValues[i] = false;
|
||||
|
||||
if( index == size-1 ) // if true, then the last float in the list was selected
|
||||
@@ -520,18 +517,17 @@ bool PlayerOptions::operator==( const PlayerOptions &other ) const
|
||||
COMPARE(m_fSkew);
|
||||
COMPARE(m_sPositioning);
|
||||
COMPARE(m_sNoteSkin);
|
||||
int i;
|
||||
for( i = 0; i < PlayerOptions::NUM_ACCELS; ++i )
|
||||
for( int i = 0; i < PlayerOptions::NUM_ACCELS; ++i )
|
||||
COMPARE(m_fAccels[i]);
|
||||
for( i = 0; i < PlayerOptions::NUM_EFFECTS; ++i )
|
||||
for( int i = 0; i < PlayerOptions::NUM_EFFECTS; ++i )
|
||||
COMPARE(m_fEffects[i]);
|
||||
for( i = 0; i < PlayerOptions::NUM_APPEARANCES; ++i )
|
||||
for( int i = 0; i < PlayerOptions::NUM_APPEARANCES; ++i )
|
||||
COMPARE(m_fAppearances[i]);
|
||||
for( i = 0; i < PlayerOptions::NUM_SCROLLS; ++i )
|
||||
for( int i = 0; i < PlayerOptions::NUM_SCROLLS; ++i )
|
||||
COMPARE(m_fScrolls[i]);
|
||||
for( i = 0; i < PlayerOptions::NUM_TURNS; ++i )
|
||||
for( int i = 0; i < PlayerOptions::NUM_TURNS; ++i )
|
||||
COMPARE(m_bTurns[i]);
|
||||
for( i = 0; i < PlayerOptions::NUM_TRANSFORMS; ++i )
|
||||
for( int i = 0; i < PlayerOptions::NUM_TRANSFORMS; ++i )
|
||||
COMPARE(m_bTransforms[i]);
|
||||
#undef COMPARE
|
||||
return true;
|
||||
|
||||
@@ -97,13 +97,12 @@ void Profile::InitGeneralData()
|
||||
m_iTotalMines = 0;
|
||||
m_iTotalHands = 0;
|
||||
|
||||
int i;
|
||||
for( i=0; i<NUM_PLAY_MODES; i++ )
|
||||
for( int i=0; i<NUM_PLAY_MODES; i++ )
|
||||
m_iNumSongsPlayedByPlayMode[i] = 0;
|
||||
m_iNumSongsPlayedByStyle.clear();
|
||||
for( i=0; i<NUM_DIFFICULTIES; i++ )
|
||||
for( int i=0; i<NUM_DIFFICULTIES; i++ )
|
||||
m_iNumSongsPlayedByDifficulty[i] = 0;
|
||||
for( i=0; i<MAX_METER+1; i++ )
|
||||
for( int i=0; i<MAX_METER+1; i++ )
|
||||
m_iNumSongsPlayedByMeter[i] = 0;
|
||||
ZERO( m_iNumStagesPassedByPlayMode );
|
||||
ZERO( m_iNumStagesPassedByGrade );
|
||||
|
||||
@@ -141,12 +141,11 @@ void RageDisplay::DrawLineStripInternal( const RageSpriteVertex v[], int iNumVer
|
||||
/* Draw a line strip with rounded corners using polys. This is used on
|
||||
* cards that have strange allergic reactions to antialiased points and
|
||||
* lines. */
|
||||
int i;
|
||||
for(i = 0; i < iNumVerts-1; ++i)
|
||||
for( int i = 0; i < iNumVerts-1; ++i )
|
||||
DrawPolyLine(v[i], v[i+1], LineWidth);
|
||||
|
||||
/* Join the lines with circles so we get rounded corners. */
|
||||
for(i = 0; i < iNumVerts; ++i)
|
||||
for( int i = 0; i < iNumVerts; ++i )
|
||||
DrawCircle( v[i], LineWidth/2 );
|
||||
}
|
||||
|
||||
|
||||
@@ -627,8 +627,7 @@ RageFileObj *RageFileManager::OpenForWriting( CString sPath, int mode, RageFile
|
||||
NormalizePath( sPath );
|
||||
|
||||
vector< pair<int,int> > Values;
|
||||
unsigned i;
|
||||
for( i = 0; i < g_Drivers.size(); ++i )
|
||||
for( unsigned i = 0; i < g_Drivers.size(); ++i )
|
||||
{
|
||||
LoadedDriver &ld = g_Drivers[i];
|
||||
const CString path = ld.GetPath( sPath );
|
||||
@@ -645,7 +644,7 @@ RageFileObj *RageFileManager::OpenForWriting( CString sPath, int mode, RageFile
|
||||
stable_sort( Values.begin(), Values.end(), SortBySecond );
|
||||
|
||||
err = 0;
|
||||
for( i = 0; i < Values.size(); ++i )
|
||||
for( unsigned i = 0; i < Values.size(); ++i )
|
||||
{
|
||||
const int driver = Values[i].first;
|
||||
LoadedDriver &ld = g_Drivers[driver];
|
||||
|
||||
@@ -1112,12 +1112,10 @@ int xing_parse(struct xing *xing, struct mad_bitptr ptr, unsigned int bitlen)
|
||||
|
||||
if (xing->flags & XING_TOC)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (bitlen < 800)
|
||||
goto fail;
|
||||
|
||||
for (i = 0; i < 100; ++i)
|
||||
for (int i = 0; i < 100; ++i)
|
||||
xing->toc[i] = (unsigned char) mad_bit_read(&ptr, 8);
|
||||
|
||||
bitlen -= 800;
|
||||
|
||||
@@ -208,17 +208,16 @@ bool RageSoundReader_WAV::read_adpcm_block_headers( adpcm_t &out ) const
|
||||
{
|
||||
ADPCMBLOCKHEADER *headers = out.blockheaders;
|
||||
|
||||
int i;
|
||||
for (i = 0; i < fmt.wChannels; i++)
|
||||
for (int i = 0; i < fmt.wChannels; i++)
|
||||
RETURN_IF_MACRO(!read_uint8(rw, &headers[i].bPredictor), false);
|
||||
|
||||
for (i = 0; i < fmt.wChannels; i++)
|
||||
for (int i = 0; i < fmt.wChannels; i++)
|
||||
RETURN_IF_MACRO(!read_le16(rw, &headers[i].iDelta), false);
|
||||
|
||||
for (i = 0; i < fmt.wChannels; i++)
|
||||
for (int i = 0; i < fmt.wChannels; i++)
|
||||
RETURN_IF_MACRO(!read_le16(rw, &headers[i].iSamp[0]), false);
|
||||
|
||||
for (i = 0; i < fmt.wChannels; i++)
|
||||
for (int i = 0; i < fmt.wChannels; i++)
|
||||
RETURN_IF_MACRO(!read_le16(rw, &headers[i].iSamp[1]), false);
|
||||
|
||||
out.samples_left_in_block = out.wSamplesPerBlock;
|
||||
|
||||
@@ -445,8 +445,7 @@ void RageMutex::MarkLockedMutex()
|
||||
vector<const RageMutex *> before;
|
||||
|
||||
/* Iterate over all locked mutexes that are locked by this thread. */
|
||||
unsigned i;
|
||||
for( i = 0; i < g_MutexList->size(); ++i )
|
||||
for( unsigned i = 0; i < g_MutexList->size(); ++i )
|
||||
{
|
||||
const RageMutex *mutex = (*g_MutexList)[i];
|
||||
|
||||
|
||||
@@ -49,8 +49,7 @@ void Screen::Update( float fDeltaTime )
|
||||
* This might clear previous messages on the queue. So, first apply time to
|
||||
* everything. */
|
||||
|
||||
unsigned i;
|
||||
for( i=0; i<m_QueuedMessages.size(); i++ )
|
||||
for( unsigned i=0; i<m_QueuedMessages.size(); i++ )
|
||||
{
|
||||
/* Hack:
|
||||
*
|
||||
@@ -78,7 +77,7 @@ void Screen::Update( float fDeltaTime )
|
||||
* within HandleScreenMessage, someone cleared messages on the queue. This
|
||||
* means we have no idea where 'i' is, so start over. Since we applied time
|
||||
* already, this won't cause messages to be mistimed. */
|
||||
for( i=0; i<m_QueuedMessages.size(); i++ )
|
||||
for( unsigned i=0; i<m_QueuedMessages.size(); i++ )
|
||||
{
|
||||
if( m_QueuedMessages[i].fDelayRemaining > 0.0f )
|
||||
continue; /* not yet */
|
||||
|
||||
@@ -192,17 +192,15 @@ void ScreenBookkeeping::ChangeView( View newView )
|
||||
int coins[HOURS_IN_DAY];
|
||||
BOOKKEEPER->GetCoinsByHour( coins );
|
||||
|
||||
int i;
|
||||
|
||||
CString sTitle1, sData1;
|
||||
for( i=0; i<HOURS_IN_DAY/2; i++ )
|
||||
for( int i=0; i<HOURS_IN_DAY/2; i++ )
|
||||
{
|
||||
sTitle1 += HourInDayToString(i) + "\n";
|
||||
sData1 += ssprintf("%d",coins[i]) + "\n";
|
||||
}
|
||||
|
||||
CString sTitle2, sData2;
|
||||
for( i=(HOURS_IN_DAY/2); i<HOURS_IN_DAY; i++ )
|
||||
for( int i=(HOURS_IN_DAY/2); i<HOURS_IN_DAY; i++ )
|
||||
{
|
||||
sTitle2 += HourInDayToString(i) + "\n";
|
||||
sData2 += ssprintf("%d",coins[i]) + "\n";
|
||||
|
||||
@@ -713,10 +713,8 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
||||
if( iCol >= m_NoteFieldEdit.GetNumTracks() ) // this button is not in the range of columns for this Style
|
||||
break;
|
||||
|
||||
int i;
|
||||
|
||||
// check for to see if the user intended to remove a HoldNote
|
||||
for( i=0; i<m_NoteFieldEdit.GetNumHoldNotes(); i++ ) // for each HoldNote
|
||||
for( int i=0; i<m_NoteFieldEdit.GetNumHoldNotes(); i++ ) // for each HoldNote
|
||||
{
|
||||
const HoldNote &hn = m_NoteFieldEdit.GetHoldNote(i);
|
||||
if( iCol == hn.iTrack && // the notes correspond
|
||||
|
||||
@@ -241,12 +241,11 @@ void ScreenMiniMenu::AfterAnswerChanged()
|
||||
|
||||
int ScreenMiniMenu::GetGoUpSpot()
|
||||
{
|
||||
int i;
|
||||
for( i=m_iCurLine-1; i>=0; i-- )
|
||||
for( int i=m_iCurLine-1; i>=0; i-- )
|
||||
if( m_Def.rows[i].enabled )
|
||||
return i;
|
||||
// wrap
|
||||
for( i=m_Def.rows.size()-1; i>=0; i-- )
|
||||
for( int i=m_Def.rows.size()-1; i>=0; i-- )
|
||||
if( m_Def.rows[i].enabled )
|
||||
return i;
|
||||
return -1;
|
||||
@@ -254,12 +253,11 @@ int ScreenMiniMenu::GetGoUpSpot()
|
||||
|
||||
int ScreenMiniMenu::GetGoDownSpot()
|
||||
{
|
||||
unsigned i;
|
||||
for( i=m_iCurLine+1; i<m_Def.rows.size(); i++ )
|
||||
for( unsigned i=m_iCurLine+1; i<m_Def.rows.size(); i++ )
|
||||
if( m_Def.rows[i].enabled )
|
||||
return i;
|
||||
// wrap
|
||||
for( i=0; i<m_Def.rows.size(); i++ )
|
||||
for( unsigned i=0; i<m_Def.rows.size(); i++ )
|
||||
if( m_Def.rows[i].enabled )
|
||||
return i;
|
||||
return -1;
|
||||
|
||||
@@ -27,8 +27,7 @@ ScreenMusicScroll::ScreenMusicScroll( CString sClassName ) : ScreenAttract( sCla
|
||||
SONGMAN->GetSongs( arraySongs );
|
||||
SongUtil::SortSongPointerArrayByTitle( arraySongs );
|
||||
|
||||
unsigned i;
|
||||
for( i=0; i < arraySongs.size(); i++ )
|
||||
for( unsigned i=0; i < arraySongs.size(); i++ )
|
||||
{
|
||||
BitmapText *bt = new BitmapText;
|
||||
m_textLines.push_back(bt);
|
||||
@@ -51,7 +50,7 @@ ScreenMusicScroll::ScreenMusicScroll( CString sClassName ) : ScreenAttract( sCla
|
||||
// m_iNumLines++;
|
||||
// }
|
||||
|
||||
for( i=0; i<m_textLines.size(); i++ )
|
||||
for( unsigned i=0; i<m_textLines.size(); i++ )
|
||||
{
|
||||
m_textLines[i]->SetXY( CENTER_X, SCREEN_BOTTOM + 40 );
|
||||
m_textLines[i]->BeginTweening( SCROLL_DELAY * i );
|
||||
@@ -63,7 +62,7 @@ ScreenMusicScroll::ScreenMusicScroll( CString sClassName ) : ScreenAttract( sCla
|
||||
this->MoveToTail( &m_Out ); // put it in the back so it covers up the stuff we just added
|
||||
|
||||
this->ClearMessageQueue( SM_BeginFadingOut ); // ignore ScreenAttract's SecsToShow
|
||||
this->PostScreenMessage( SM_BeginFadingOut, 0.2f * i + 3.0f );
|
||||
this->PostScreenMessage( SM_BeginFadingOut, 0.2f * m_textLines.size() + 3.0f );
|
||||
|
||||
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("music scroll") );
|
||||
}
|
||||
|
||||
@@ -281,8 +281,7 @@ ScreenNameEntryTraditional::ScreenNameEntryTraditional( CString sClassName ) : S
|
||||
UpdateSelectionText( p );
|
||||
|
||||
/* Don't tween to the initial position. */
|
||||
unsigned i;
|
||||
for( i = 0; i < m_textAlphabet[p].size(); ++i )
|
||||
for( unsigned i = 0; i < m_textAlphabet[p].size(); ++i )
|
||||
m_textAlphabet[p][i]->FinishTweening();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -369,7 +369,6 @@ void ScreenNetSelectMusic::HandleScreenMessage( const ScreenMessage SM )
|
||||
UpdateSongsList();
|
||||
|
||||
unsigned i;
|
||||
|
||||
for ( i = 0; i < m_vSongs.size(); ++i)
|
||||
if ( ( !m_vSongs[i]->GetTranslitArtist().CompareNoCase( NSMAN->m_sArtist ) ) &&
|
||||
( !m_vSongs[i]->GetTranslitMainTitle().CompareNoCase( NSMAN->m_sMainTitle ) ) &&
|
||||
@@ -419,7 +418,6 @@ void ScreenNetSelectMusic::HandleScreenMessage( const ScreenMessage SM )
|
||||
|
||||
void ScreenNetSelectMusic::MenuLeft( PlayerNumber pn, const InputEventType type )
|
||||
{
|
||||
int i;
|
||||
m_soundChangeOpt.Play();
|
||||
switch (m_SelectMode)
|
||||
{
|
||||
@@ -442,6 +440,7 @@ void ScreenNetSelectMusic::MenuLeft( PlayerNumber pn, const InputEventType type
|
||||
m_DC[pn] = NUM_DIFFICULTIES;
|
||||
else
|
||||
{
|
||||
int i;
|
||||
for ( i=0; i<(int)MultiSteps.size(); ++i )
|
||||
if ( MultiSteps[i]->GetDifficulty() >= m_DC[pn] )
|
||||
break;
|
||||
@@ -467,7 +466,6 @@ void ScreenNetSelectMusic::MenuLeft( PlayerNumber pn, const InputEventType type
|
||||
|
||||
void ScreenNetSelectMusic::MenuRight( PlayerNumber pn, const InputEventType type )
|
||||
{
|
||||
int i;
|
||||
m_soundChangeOpt.Play();
|
||||
switch (m_SelectMode)
|
||||
{
|
||||
@@ -490,6 +488,7 @@ void ScreenNetSelectMusic::MenuRight( PlayerNumber pn, const InputEventType type
|
||||
m_DC[pn] = NUM_DIFFICULTIES;
|
||||
else
|
||||
{
|
||||
int i;
|
||||
for ( i=0; i<(int)MultiSteps.size(); ++i )
|
||||
if ( MultiSteps[i]->GetDifficulty() >= m_DC[pn] )
|
||||
break;
|
||||
|
||||
@@ -217,8 +217,7 @@ ScreenOptionsMaster::ScreenOptionsMaster( CString sClassName ):
|
||||
InputMode im = INPUTMODE_INDIVIDUAL;
|
||||
bool Explanations = false;
|
||||
|
||||
unsigned i;
|
||||
for( i = 0; i < Flags.size(); ++i )
|
||||
for( unsigned i = 0; i < Flags.size(); ++i )
|
||||
{
|
||||
Flags[i].MakeLower();
|
||||
|
||||
@@ -239,7 +238,7 @@ ScreenOptionsMaster::ScreenOptionsMaster( CString sClassName ):
|
||||
}
|
||||
|
||||
m_OptionRowAlloc = new OptionRowData[asLineNames.size()];
|
||||
for( i = 0; i < asLineNames.size(); ++i )
|
||||
for( unsigned i = 0; i < asLineNames.size(); ++i )
|
||||
{
|
||||
CString sLineName = asLineNames[i];
|
||||
|
||||
@@ -494,8 +493,7 @@ void ScreenOptionsMaster::ExportOptions()
|
||||
int ChangeMask = 0;
|
||||
|
||||
CHECKPOINT;
|
||||
unsigned i;
|
||||
for( i = 0; i < OptionRowHandlers.size(); ++i )
|
||||
for( unsigned i = 0; i < OptionRowHandlers.size(); ++i )
|
||||
{
|
||||
CHECKPOINT_M( ssprintf("%i/%i", i, int(OptionRowHandlers.size())) );
|
||||
|
||||
|
||||
@@ -406,8 +406,7 @@ void ScreenSelectDifficulty::MenuStart( PlayerNumber pn )
|
||||
/* This player is currently on a choice that is no longer available due to
|
||||
* the selection just made. */
|
||||
int iSwitchToIndex = -1;
|
||||
int i;
|
||||
for( i=m_iChoiceOnPage[p]+1; iSwitchToIndex == -1 && i < (int) m_ModeChoices[m_CurrentPage].size(); ++i )
|
||||
for( int i=m_iChoiceOnPage[p]+1; iSwitchToIndex == -1 && i < (int) m_ModeChoices[m_CurrentPage].size(); ++i )
|
||||
{
|
||||
const ModeChoice &mc = m_ModeChoices[m_CurrentPage][i];
|
||||
if( mc.IsPlayable() && !BothPlayersModeChoice(mc) )
|
||||
@@ -415,7 +414,7 @@ void ScreenSelectDifficulty::MenuStart( PlayerNumber pn )
|
||||
}
|
||||
if( iSwitchToIndex == -1 ) /* couldn't find a spot looking up; look down */
|
||||
{
|
||||
for( i=m_iChoiceOnPage[p]-1; iSwitchToIndex == -1 && i >= 0; --i )
|
||||
for( int i=m_iChoiceOnPage[p]-1; iSwitchToIndex == -1 && i >= 0; --i )
|
||||
{
|
||||
const ModeChoice &mc = m_ModeChoices[m_CurrentPage][i];
|
||||
if( mc.IsPlayable() && !BothPlayersModeChoice(mc) )
|
||||
|
||||
@@ -34,14 +34,11 @@ ScreenSelectGroup::ScreenSelectGroup( CString sClassName ) : ScreenWithMenuEleme
|
||||
}
|
||||
|
||||
|
||||
unsigned i;
|
||||
int j;
|
||||
|
||||
vector<Song*> aAllSongs;
|
||||
SONGMAN->GetSongs( aAllSongs );
|
||||
|
||||
// Filter out Songs that can't be played by the current Style
|
||||
for( j=aAllSongs.size()-1; j>=0; j-- ) // foreach Song, back to front
|
||||
for( int j=aAllSongs.size()-1; j>=0; j-- ) // foreach Song, back to front
|
||||
{
|
||||
bool DisplaySong = aAllSongs[j]->NormallyDisplayed();
|
||||
|
||||
@@ -57,7 +54,7 @@ ScreenSelectGroup::ScreenSelectGroup( CString sClassName ) : ScreenWithMenuEleme
|
||||
|
||||
// Add all group names to a map.
|
||||
map<CString, CString> mapGroupNames;
|
||||
for( i=0; i<aAllSongs.size(); i++ )
|
||||
for( unsigned i=0; i<aAllSongs.size(); i++ )
|
||||
{
|
||||
const CString& sGroupName = aAllSongs[i]->m_sGroupName;
|
||||
mapGroupNames[ sGroupName ] = ""; // group name maps to nothing
|
||||
@@ -75,7 +72,7 @@ ScreenSelectGroup::ScreenSelectGroup( CString sClassName ) : ScreenWithMenuEleme
|
||||
{
|
||||
vector<Song*> aSongsInGroup;
|
||||
/* find all songs */
|
||||
for( i=0; i<aAllSongs.size(); i++ ) // foreach Song
|
||||
for( unsigned i=0; i<aAllSongs.size(); i++ ) // foreach Song
|
||||
{
|
||||
/* group 0 gets all songs */
|
||||
if( g != 0 && aAllSongs[i]->m_sGroupName != asGroupNames[g] )
|
||||
|
||||
@@ -51,8 +51,8 @@ ScreenSelectMode::ScreenSelectMode( CString sClassName ) : ScreenSelect( sClassN
|
||||
m_soundModeChange.Load( THEME->GetPathToS("ScreenSelectMode modechange"));
|
||||
m_soundConfirm.Load( THEME->GetPathToS("ScreenSelectMode modeconfirm"));
|
||||
m_soundStart.Load( THEME->GetPathToS("ScreenSelectMode menustart"));
|
||||
unsigned i;
|
||||
for( i=0; i<m_aModeChoices.size(); i++ )
|
||||
|
||||
for( unsigned i=0; i<m_aModeChoices.size(); i++ )
|
||||
{
|
||||
const ModeChoice& mc = m_aModeChoices[i];
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@ ScreenSelectStyle::ScreenSelectStyle( CString sClassName ) : ScreenSelect( sClas
|
||||
|
||||
LIGHTSMAN->SetLightsMode( LIGHTSMODE_MENU );
|
||||
|
||||
unsigned i;
|
||||
for( i=0; i<m_aModeChoices.size(); i++ )
|
||||
for( unsigned i=0; i<m_aModeChoices.size(); i++ )
|
||||
{
|
||||
const ModeChoice& mc = m_aModeChoices[i];
|
||||
|
||||
@@ -92,9 +91,9 @@ ScreenSelectStyle::ScreenSelectStyle( CString sClassName ) : ScreenSelect( sClas
|
||||
|
||||
|
||||
// fix Z ordering of Picture and Info so that they draw on top
|
||||
for( i=0; i<this->m_aModeChoices.size(); i++ )
|
||||
for( unsigned i=0; i<this->m_aModeChoices.size(); i++ )
|
||||
this->MoveToTail( &m_sprPicture[i] );
|
||||
for( i=0; i<this->m_aModeChoices.size(); i++ )
|
||||
for( unsigned i=0; i<this->m_aModeChoices.size(); i++ )
|
||||
this->MoveToTail( &m_sprInfo[i] );
|
||||
|
||||
|
||||
@@ -121,7 +120,7 @@ ScreenSelectStyle::ScreenSelectStyle( CString sClassName ) : ScreenSelect( sClas
|
||||
//
|
||||
// TweenOnScreen
|
||||
//
|
||||
for( i=0; i<m_aModeChoices.size(); i++ )
|
||||
for( unsigned i=0; i<m_aModeChoices.size(); i++ )
|
||||
{
|
||||
SET_XY_AND_ON_COMMAND( m_textIcon[i] );
|
||||
SET_XY_AND_ON_COMMAND( m_sprIcon[i] );
|
||||
|
||||
@@ -44,9 +44,8 @@ ScreenUnlock::ScreenUnlock( CString sClassName ) : ScreenAttract( sClassName )
|
||||
PointsUntilNextUnlock.LoadFromFont( THEME->GetPathToF("Common normal") );
|
||||
PointsUntilNextUnlock.SetHorizAlign( Actor::align_left );
|
||||
|
||||
unsigned i;
|
||||
CString IconCommand = ICON_COMMAND;
|
||||
for(i=1; i <= NumUnlocks; i++)
|
||||
for( unsigned i=1; i <= NumUnlocks; i++ )
|
||||
{
|
||||
// get pertaining UnlockEntry
|
||||
CString SongTitle = DISPLAYED_SONG(i);
|
||||
@@ -100,7 +99,7 @@ ScreenUnlock::ScreenUnlock( CString sClassName ) : ScreenAttract( sClassName )
|
||||
else
|
||||
SECS_PER_CYCLE = (float)SecondsToScroll/(ScrollingTextRows * 3 + NumUnlocks + 4);
|
||||
|
||||
for(i = 1; i <= NumUnlocks; i++)
|
||||
for(unsigned i = 1; i <= NumUnlocks; i++)
|
||||
{
|
||||
CString DisplayedSong = DISPLAYED_SONG(i);
|
||||
if (USE_UNLOCKS_DAT == 1)
|
||||
@@ -221,7 +220,7 @@ ScreenUnlock::ScreenUnlock( CString sClassName ) : ScreenAttract( sClassName )
|
||||
float SecondsToScroll = TIME_TO_DISPLAY - 1;
|
||||
float SECS_PER_CYCLE = (float)SecondsToScroll/(ScrollingTextRows * 3 + NumUnlocks + 4);
|
||||
|
||||
for(i=1; i <= UNLOCK_TEXT_SCROLL_ROWS; i++)
|
||||
for(unsigned i=1; i <= UNLOCK_TEXT_SCROLL_ROWS; i++)
|
||||
{
|
||||
if (i > LastUnlocks.size())
|
||||
continue;
|
||||
@@ -284,10 +283,10 @@ ScreenUnlock::ScreenUnlock( CString sClassName ) : ScreenAttract( sClassName )
|
||||
// which is still greater than 0. By typecasting it as
|
||||
// an integer, you can achieve -1, which exits the loop.
|
||||
|
||||
for(i = item.size() - 1; (int)i >= 0; i--)
|
||||
for(int i = item.size() - 1; (int)i >= 0; i--)
|
||||
this->AddChild(item[i]);
|
||||
|
||||
for(i = ItemIcons.size() - 1; (int)i >= 0; i--)
|
||||
for(int i = ItemIcons.size() - 1; (int)i >= 0; i--)
|
||||
this->AddChild(ItemIcons[i]);
|
||||
|
||||
PointsUntilNextUnlock.SetName( "PointsDisplay" );
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
|
||||
SnapDisplay::SnapDisplay()
|
||||
{
|
||||
int i;
|
||||
for( i=0; i<2; i++ )
|
||||
for( int i=0; i<2; i++ )
|
||||
{
|
||||
m_sprIndicators[i].Load( THEME->GetPathToG("SnapDisplay icon 8x1") );
|
||||
// MD 11/12/03 - this assert doesn't allow us to set the editor's maximum
|
||||
|
||||
@@ -620,8 +620,7 @@ void Song::TidyUpData()
|
||||
CStringArray arrayImages;
|
||||
GetImageDirListing( m_sSongDir + "*", arrayImages );
|
||||
|
||||
unsigned i;
|
||||
for( i=0; i<arrayImages.size(); i++ ) // foreach image
|
||||
for( unsigned i=0; i<arrayImages.size(); i++ ) // foreach image
|
||||
{
|
||||
if( HasBanner() && HasCDTitle() && HasBackground() )
|
||||
break; /* done */
|
||||
|
||||
@@ -296,8 +296,7 @@ void SongManager::PreloadSongImages()
|
||||
return;
|
||||
|
||||
const vector<Song*> &songs = SONGMAN->GetAllSongs();
|
||||
unsigned i;
|
||||
for( i = 0; i < songs.size(); ++i )
|
||||
for( unsigned i = 0; i < songs.size(); ++i )
|
||||
{
|
||||
if( !songs[i]->HasBanner() )
|
||||
continue;
|
||||
@@ -308,7 +307,7 @@ void SongManager::PreloadSongImages()
|
||||
|
||||
vector<Course*> courses;
|
||||
SONGMAN->GetAllCourses( courses, false );
|
||||
for( i = 0; i < courses.size(); ++i )
|
||||
for( unsigned i = 0; i < courses.size(); ++i )
|
||||
{
|
||||
if( !courses[i]->HasBanner() )
|
||||
continue;
|
||||
@@ -506,8 +505,6 @@ int SongManager::GetNumStagesForSong( const Song* pSong )
|
||||
|
||||
void SongManager::InitCoursesFromDisk( LoadingWindow *ld )
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
LOG->Trace( "Loading courses." );
|
||||
|
||||
//
|
||||
@@ -515,7 +512,7 @@ void SongManager::InitCoursesFromDisk( LoadingWindow *ld )
|
||||
//
|
||||
CStringArray saCourseFiles;
|
||||
GetDirListing( COURSES_DIR "*.crs", saCourseFiles, false, true );
|
||||
for( i=0; i<saCourseFiles.size(); i++ )
|
||||
for( unsigned i=0; i<saCourseFiles.size(); i++ )
|
||||
{
|
||||
Course* pCourse = new Course;
|
||||
pCourse->LoadFromCRSFile( saCourseFiles[i] );
|
||||
@@ -537,7 +534,7 @@ void SongManager::InitCoursesFromDisk( LoadingWindow *ld )
|
||||
GetDirListing( COURSES_DIR "*", arrayGroupDirs, true );
|
||||
SortCStringArray( arrayGroupDirs );
|
||||
|
||||
for( i=0; i< arrayGroupDirs.size(); i++ ) // for each dir in /Courses/
|
||||
for( unsigned i=0; i< arrayGroupDirs.size(); i++ ) // for each dir in /Courses/
|
||||
{
|
||||
CString sGroupDirName = arrayGroupDirs[i];
|
||||
|
||||
|
||||
@@ -145,8 +145,7 @@ void SongUtil::SortSongPointerArrayByGrade( vector<Song*> &arraySongPointers )
|
||||
vector<val> vals;
|
||||
vals.reserve( arraySongPointers.size() );
|
||||
|
||||
unsigned i;
|
||||
for( i = 0; i < arraySongPointers.size(); ++i )
|
||||
for( unsigned i = 0; i < arraySongPointers.size(); ++i )
|
||||
{
|
||||
Song *pSong = arraySongPointers[i];
|
||||
|
||||
@@ -162,7 +161,7 @@ void SongUtil::SortSongPointerArrayByGrade( vector<Song*> &arraySongPointers )
|
||||
|
||||
sort( vals.begin(), vals.end(), CompDescending );
|
||||
|
||||
for( i = 0; i < arraySongPointers.size(); ++i )
|
||||
for( unsigned i = 0; i < arraySongPointers.size(); ++i )
|
||||
arraySongPointers[i] = vals[i].first;
|
||||
}
|
||||
|
||||
|
||||
@@ -121,8 +121,7 @@ void StageStats::AddStats( const StageStats& other )
|
||||
fLifeRecord[p][fOtherFirstSecond+pos] = life;
|
||||
}
|
||||
|
||||
unsigned i;
|
||||
for( i=0; i<other.ComboList[p].size(); ++i )
|
||||
for( unsigned i=0; i<other.ComboList[p].size(); ++i )
|
||||
{
|
||||
const Combo_t &combo = other.ComboList[p][i];
|
||||
|
||||
@@ -133,7 +132,7 @@ void StageStats::AddStats( const StageStats& other )
|
||||
|
||||
/* Merge identical combos. This normally only happens in course mode, when a combo
|
||||
* continues between songs. */
|
||||
for( i=1; i<ComboList[p].size(); ++i )
|
||||
for( unsigned i=1; i<ComboList[p].size(); ++i )
|
||||
{
|
||||
Combo_t &prevcombo = ComboList[p][i-1];
|
||||
Combo_t &combo = ComboList[p][i];
|
||||
|
||||
@@ -216,8 +216,7 @@ void ThemeManager::SwitchThemeAndLanguage( CString sThemeName, CString sLanguage
|
||||
m_sCurLanguage = sLanguage;
|
||||
|
||||
// clear theme path cache
|
||||
int i;
|
||||
for( i = 0; i < NUM_ELEMENT_CATEGORIES; ++i )
|
||||
for( int i = 0; i < NUM_ELEMENT_CATEGORIES; ++i )
|
||||
g_ThemePathCache[i].clear();
|
||||
|
||||
g_vThemes.clear();
|
||||
@@ -226,7 +225,7 @@ void ThemeManager::SwitchThemeAndLanguage( CString sThemeName, CString sLanguage
|
||||
LoadThemeRecursive( g_vThemes, m_sCurThemeName );
|
||||
|
||||
CString sMetric;
|
||||
for( i = 0; GetCommandlineArgument( "metric", &sMetric, i ); ++i )
|
||||
for( int i = 0; GetCommandlineArgument( "metric", &sMetric, i ); ++i )
|
||||
{
|
||||
/* sMetric must be "foo::bar=baz". "foo" and "bar" never contain "=", so in
|
||||
* "foo::bar=1+1=2", "baz" is always "1+1=2". Neither foo nor bar may be
|
||||
|
||||
@@ -250,9 +250,7 @@ bool UnlockSystem::Load()
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned i;
|
||||
|
||||
for( i=0; i<msd.GetNumValues(); i++ )
|
||||
for( unsigned i=0; i<msd.GetNumValues(); i++ )
|
||||
{
|
||||
int iNumParams = msd.GetNumParams(i);
|
||||
const MsdFile::value_t &sParams = msd.GetValue(i);
|
||||
@@ -313,7 +311,7 @@ bool UnlockSystem::Load()
|
||||
|
||||
UpdateSongs();
|
||||
|
||||
for(i=0; i < m_SongEntries.size(); i++)
|
||||
for(unsigned i=0; i < m_SongEntries.size(); i++)
|
||||
{
|
||||
CString str = ssprintf( "Unlock: %s; ", m_SongEntries[i].m_sSongName.c_str() );
|
||||
for( int j = 0; j < NUM_UNLOCK_TYPES; ++j )
|
||||
|
||||
@@ -154,25 +154,15 @@ XNode::~XNode()
|
||||
|
||||
void XNode::Close()
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for( i = 0 ; i < childs.size(); i ++)
|
||||
for( unsigned i = 0 ; i < childs.size(); i ++)
|
||||
{
|
||||
XNode *p = childs[i];
|
||||
if( p )
|
||||
{
|
||||
delete p; childs[i] = NULL;
|
||||
}
|
||||
SAFE_DELETE( childs[i] );
|
||||
}
|
||||
childs.clear();
|
||||
|
||||
for( i = 0 ; i < attrs.size(); i ++)
|
||||
for( unsigned i = 0 ; i < attrs.size(); i ++)
|
||||
{
|
||||
XAttr *p = attrs[i];
|
||||
if( p )
|
||||
{
|
||||
delete p; attrs[i] = NULL;
|
||||
}
|
||||
SAFE_DELETE( attrs[i] );
|
||||
}
|
||||
attrs.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user