s/Add/push_back/

This commit is contained in:
Glenn Maynard
2002-10-31 04:23:39 +00:00
parent a041b7cd3e
commit bccaf3560b
36 changed files with 146 additions and 146 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ void ActorFrame::AddChild( Actor* pActor)
{ {
ASSERT( pActor ); ASSERT( pActor );
ASSERT( (void*)pActor != (void*)0xC0000005 ); ASSERT( (void*)pActor != (void*)0xC0000005 );
m_SubActors.Add( pActor ); m_SubActors.push_back( pActor );
} }
void ActorFrame::DrawPrimitives() void ActorFrame::DrawPrimitives()
+5 -5
View File
@@ -41,7 +41,7 @@ void BGAnimation::LoadFromStaticGraphic( CString sPath )
BGAnimationLayer* pLayer = new BGAnimationLayer; BGAnimationLayer* pLayer = new BGAnimationLayer;
pLayer->LoadFromStaticGraphic( sPath ); pLayer->LoadFromStaticGraphic( sPath );
m_Layers.Add( pLayer ); m_Layers.push_back( pLayer );
m_fFadeSeconds = 0.5f; m_fFadeSeconds = 0.5f;
} }
@@ -73,7 +73,7 @@ void BGAnimation::LoadFromAniDir( CString sAniDir, CString sSongBGPath )
continue; // don't directly load files starting with an underscore continue; // don't directly load files starting with an underscore
BGAnimationLayer* pLayer = new BGAnimationLayer; BGAnimationLayer* pLayer = new BGAnimationLayer;
pLayer->LoadFromAniLayerFile( asImagePaths[i], sSongBGPath ); pLayer->LoadFromAniLayerFile( asImagePaths[i], sSongBGPath );
m_Layers.Add( pLayer ); m_Layers.push_back( pLayer );
} }
m_fFadeSeconds = 0; m_fFadeSeconds = 0;
@@ -85,7 +85,7 @@ void BGAnimation::LoadFromMovie( CString sMoviePath, bool bLoop, bool bRewind )
BGAnimationLayer* pLayer = new BGAnimationLayer; BGAnimationLayer* pLayer = new BGAnimationLayer;
pLayer->LoadFromMovie( sMoviePath, bLoop, bRewind ); pLayer->LoadFromMovie( sMoviePath, bLoop, bRewind );
m_Layers.Add( pLayer ); m_Layers.push_back( pLayer );
m_fFadeSeconds = 0.5f; m_fFadeSeconds = 0.5f;
} }
@@ -97,11 +97,11 @@ void BGAnimation::LoadFromVisualization( CString sVisPath, CString sSongBGPath )
pLayer = new BGAnimationLayer; pLayer = new BGAnimationLayer;
pLayer->LoadFromStaticGraphic( sSongBGPath ); pLayer->LoadFromStaticGraphic( sSongBGPath );
m_Layers.Add( pLayer ); m_Layers.push_back( pLayer );
pLayer = new BGAnimationLayer; pLayer = new BGAnimationLayer;
pLayer->LoadFromVisualization( sVisPath ); pLayer->LoadFromVisualization( sVisPath );
m_Layers.Add( pLayer ); m_Layers.push_back( pLayer );
m_fFadeSeconds = 0.5f; m_fFadeSeconds = 0.5f;
} }
+15 -15
View File
@@ -90,7 +90,7 @@ void Background::LoadFromAniDir( CString sAniDir )
BGAnimation* pTempBGA; BGAnimation* pTempBGA;
pTempBGA = new BGAnimation; pTempBGA = new BGAnimation;
pTempBGA->LoadFromAniDir( sAniDir ); pTempBGA->LoadFromAniDir( sAniDir );
m_BGAnimations.Add( pTempBGA ); m_BGAnimations.push_back( pTempBGA );
} }
BGAnimation *Background::GetBGA(const Song *pSong, const BackgroundChange &aniseg, const CString &bgpath) const BGAnimation *Background::GetBGA(const Song *pSong, const BackgroundChange &aniseg, const CString &bgpath) const
@@ -179,13 +179,13 @@ void Background::LoadFromSong( Song* pSong )
{ {
BGAnimation *pTempBGA = new BGAnimation; BGAnimation *pTempBGA = new BGAnimation;
pTempBGA->LoadFromStaticGraphic( sSongBackgroundPath ); pTempBGA->LoadFromStaticGraphic( sSongBackgroundPath );
m_BGAnimations.Add( pTempBGA ); m_BGAnimations.push_back( pTempBGA );
} }
if( pSong->HasBGChanges() ) if( pSong->HasBGChanges() )
{ {
// start off showing the static song background // start off showing the static song background
m_aBGSegments.Add( BGSegment(-10000,0,false) ); m_aBGSegments.push_back( BGSegment(-10000,0,false) );
// Load the animations used by the song's pre-defined animation plan. // Load the animations used by the song's pre-defined animation plan.
// the song has a plan. Use it. // the song has a plan. Use it.
@@ -198,14 +198,14 @@ void Background::LoadFromSong( Song* pSong )
if(pTempBGA != NULL) if(pTempBGA != NULL)
{ {
m_BGAnimations.Add( pTempBGA ); m_BGAnimations.push_back( pTempBGA );
// add to the plan // add to the plan
m_aBGSegments.Add( BGSegment(aniseg.m_fStartBeat, m_BGAnimations.size()-1, bFade) ); m_aBGSegments.push_back( BGSegment(aniseg.m_fStartBeat, m_BGAnimations.size()-1, bFade) );
} }
} }
// end showing the static song background // end showing the static song background
m_aBGSegments.Add( BGSegment(pSong->m_fLastBeat,0,false) ); m_aBGSegments.push_back( BGSegment(pSong->m_fLastBeat,0,false) );
SortBGSegmentArray( m_aBGSegments ); // Need to sort in case there is a background change after the last beat (not likely) SortBGSegmentArray( m_aBGSegments ); // Need to sort in case there is a background change after the last beat (not likely)
} }
@@ -254,7 +254,7 @@ void Background::LoadFromSong( Song* pSong )
pTempBGA = new BGAnimation; pTempBGA = new BGAnimation;
pTempBGA->LoadFromStaticGraphic( sSongBackgroundPath ); pTempBGA->LoadFromStaticGraphic( sSongBackgroundPath );
} }
m_BGAnimations.Add( pTempBGA ); m_BGAnimations.push_back( pTempBGA );
} }
break; break;
case MODE_ANIMATIONS: case MODE_ANIMATIONS:
@@ -271,7 +271,7 @@ void Background::LoadFromSong( Song* pSong )
unsigned index = rand() % arrayPossibleAnims.size(); unsigned index = rand() % arrayPossibleAnims.size();
BGAnimation *pTempBGA = new BGAnimation; BGAnimation *pTempBGA = new BGAnimation;
pTempBGA->LoadFromAniDir( arrayPossibleAnims[index], sSongBackgroundPath ); pTempBGA->LoadFromAniDir( arrayPossibleAnims[index], sSongBackgroundPath );
m_BGAnimations.Add( pTempBGA ); m_BGAnimations.push_back( pTempBGA );
arrayPossibleAnims.erase( arrayPossibleAnims.begin()+index, arrayPossibleAnims.erase( arrayPossibleAnims.begin()+index,
arrayPossibleAnims.begin()+index+1 ); arrayPossibleAnims.begin()+index+1 );
} }
@@ -288,7 +288,7 @@ void Background::LoadFromSong( Song* pSong )
unsigned index = rand() % arrayPossibleMovies.size(); unsigned index = rand() % arrayPossibleMovies.size();
BGAnimation *pTempBGA = new BGAnimation; BGAnimation *pTempBGA = new BGAnimation;
pTempBGA->LoadFromMovie( arrayPossibleMovies[index], true, false ); pTempBGA->LoadFromMovie( arrayPossibleMovies[index], true, false );
m_BGAnimations.Add( pTempBGA ); m_BGAnimations.push_back( pTempBGA );
arrayPossibleMovies.erase( arrayPossibleMovies.begin()+index, arrayPossibleMovies.erase( arrayPossibleMovies.begin()+index,
arrayPossibleMovies.begin()+index+1 ); arrayPossibleMovies.begin()+index+1 );
} }
@@ -306,13 +306,13 @@ void Background::LoadFromSong( Song* pSong )
// //
if( backgroundMode == MODE_MOVIE_VIS ) if( backgroundMode == MODE_MOVIE_VIS )
{ {
m_aBGSegments.Add( BGSegment(-10000,1,false) ); m_aBGSegments.push_back( BGSegment(-10000,1,false) );
return; return;
} }
else else
{ {
// start off showing the static song background // start off showing the static song background
m_aBGSegments.Add( BGSegment(-10000,0,false) ); m_aBGSegments.push_back( BGSegment(-10000,0,false) );
} }
const float fFirstBeat = pSong->m_fFirstBeat; const float fFirstBeat = pSong->m_fFirstBeat;
@@ -322,7 +322,7 @@ void Background::LoadFromSong( Song* pSong )
* whole song. Otherwise, if it's a movie, it'll loop every four measures; we * whole song. Otherwise, if it's a movie, it'll loop every four measures; we
* want it to play continuously. */ * want it to play continuously. */
if( m_BGAnimations.size() == 2) { if( m_BGAnimations.size() == 2) {
m_aBGSegments.Add( BGSegment(fFirstBeat,1,bFade) ); m_aBGSegments.push_back( BGSegment(fFirstBeat,1,bFade) );
} else { } else {
// change BG every 4 bars // change BG every 4 bars
for( float f=fFirstBeat; f<fLastBeat; f+=16 ) for( float f=fFirstBeat; f<fLastBeat; f+=16 )
@@ -334,7 +334,7 @@ void Background::LoadFromSong( Song* pSong )
index = 1; // force the first random background to play first index = 1; // force the first random background to play first
else else
index = 1 + rand()%(m_BGAnimations.size()-1); index = 1 + rand()%(m_BGAnimations.size()-1);
m_aBGSegments.Add( BGSegment(f,index,bFade) ); m_aBGSegments.push_back( BGSegment(f,index,bFade) );
} }
// change BG every BPM change // change BG every BPM change
@@ -350,12 +350,12 @@ void Background::LoadFromSong( Song* pSong )
index = 0; index = 0;
else else
index = 1 + int(bpmseg.m_fBPM)%(m_BGAnimations.size()-1); index = 1 + int(bpmseg.m_fBPM)%(m_BGAnimations.size()-1);
m_aBGSegments.Add( BGSegment(bpmseg.m_fStartBeat,index,bFade) ); m_aBGSegments.push_back( BGSegment(bpmseg.m_fStartBeat,index,bFade) );
} }
} }
// end showing the static song background // end showing the static song background
m_aBGSegments.Add( BGSegment(pSong->m_fLastBeat,0,bFade) ); m_aBGSegments.push_back( BGSegment(pSong->m_fLastBeat,0,bFade) );
// sort segments // sort segments
SortBGSegmentArray( m_aBGSegments ); SortBGSegmentArray( m_aBGSegments );
+3 -3
View File
@@ -226,9 +226,9 @@ void Course::GetSongAndNotesForCurrentStyle(
if( pNotes == NULL ) if( pNotes == NULL )
continue; // skip continue; // skip
apSongsOut.Add( pSong ); apSongsOut.push_back( pSong );
apNotesOut.Add( pNotes ); apNotesOut.push_back( pNotes );
asModifiersOut.Add( sModifiers ); asModifiersOut.push_back( sModifiers );
} }
} }
+4 -4
View File
@@ -1189,7 +1189,7 @@ void GameManager::GetGameplayStylesForGame( Game game, CArray<Style,Style>& aSty
if( editor && !g_StyleDefs[s].m_bUsedForEdit ) if( editor && !g_StyleDefs[s].m_bUsedForEdit )
continue; continue;
aStylesAddTo.Add( (Style)s ); aStylesAddTo.push_back( (Style)s );
} }
} }
@@ -1197,7 +1197,7 @@ void GameManager::GetModesChoicesForGame( Game game, CArray<ModeChoice,ModeChoic
{ {
for( int s=0; s<NUM_MODE_CHOICES; s++ ) for( int s=0; s<NUM_MODE_CHOICES; s++ )
if( g_ModeChoices[s].game == game) if( g_ModeChoices[s].game == game)
aChoicesAddTo.Add( g_ModeChoices[s] ); aChoicesAddTo.push_back( g_ModeChoices[s] );
} }
void GameManager::GetNotesTypesForGame( Game game, CArray<NotesType,NotesType>& aNotesTypeAddTo ) void GameManager::GetNotesTypesForGame( Game game, CArray<NotesType,NotesType>& aNotesTypeAddTo )
@@ -1218,7 +1218,7 @@ void GameManager::GetNotesTypesForGame( Game game, CArray<NotesType,NotesType>&
} }
} }
if(found) if(found)
aNotesTypeAddTo.Add( (NotesType)nt ); aNotesTypeAddTo.push_back( (NotesType)nt );
} }
} }
@@ -1332,7 +1332,7 @@ void GameManager::GetEnabledGames( CArray<Game,Game>& aGamesOut )
CStringArray asNoteSkins; CStringArray asNoteSkins;
GetNoteSkinNames( game, asNoteSkins ); GetNoteSkinNames( game, asNoteSkins );
if( !asNoteSkins.empty() ) if( !asNoteSkins.empty() )
aGamesOut.Add( game ); aGamesOut.push_back( game );
} }
} }
+1 -1
View File
@@ -109,7 +109,7 @@ void GroupList::Down()
void GroupList::AddGroup(CString name) void GroupList::AddGroup(CString name)
{ {
m_textLabels.Add(name); m_textLabels.push_back(name);
} }
void GroupList::SetSelection( unsigned sel ) void GroupList::SetSelection( unsigned sel )
+3 -3
View File
@@ -91,18 +91,18 @@ void InputFilter::GetInputEvents( InputEventArray &array, float fDeltaTime )
iet = IET_SLOW_REPEAT; iet = IET_SLOW_REPEAT;
} }
if( int(fOldHoldTime/fTimeBetweenRepeats) != int(fNewHoldTime/fTimeBetweenRepeats) ) if( int(fOldHoldTime/fTimeBetweenRepeats) != int(fNewHoldTime/fTimeBetweenRepeats) )
array.Add( InputEvent(di,iet) ); array.push_back( InputEvent(di,iet) );
} }
} }
else { // !IsBeingPressed(di) else { // !IsBeingPressed(di)
m_fSecsHeld[d][b] = 0; m_fSecsHeld[d][b] = 0;
array.Add( InputEvent(di,IET_RELEASE) ); array.push_back( InputEvent(di,IET_RELEASE) );
} }
} }
else // !WasBeingPressed(di) else // !WasBeingPressed(di)
{ {
if( IsBeingPressed(di) ) if( IsBeingPressed(di) )
array.Add( InputEvent(di,IET_FIRST_PRESS) ); array.push_back( InputEvent(di,IET_FIRST_PRESS) );
else // !IsBeingPressed(di) else // !IsBeingPressed(di)
; // don't care ; // don't care
} }
+2 -2
View File
@@ -33,8 +33,8 @@ void InputQueue::RememberInput( const GameInput GameI )
/* XXX: this should be a deque, and just pop_back */ /* XXX: this should be a deque, and just pop_back */
if( m_aQueue[c].size() >= MAX_INPUT_QUEUE_LENGTH ) // full if( m_aQueue[c].size() >= MAX_INPUT_QUEUE_LENGTH ) // full
m_aQueue[c].erase( m_aQueue[c].begin(), m_aQueue[c].begin() + (m_aQueue[c].size()-MAX_INPUT_QUEUE_LENGTH+1) ); m_aQueue[c].erase( m_aQueue[c].begin(), m_aQueue[c].begin() + (m_aQueue[c].size()-MAX_INPUT_QUEUE_LENGTH+1) );
m_aQueue[c].Add( GameButtonAndTime(GameI.button,TIMER->GetTimeSinceStart()) ); m_aQueue[c].push_back( GameButtonAndTime(GameI.button,TIMER->GetTimeSinceStart()) );
}; }
bool InputQueue::MatchesPattern( const GameController c, const MenuButton* button_sequence, const int iNumButtons, float fMaxSecondsBack ) bool InputQueue::MatchesPattern( const GameController c, const MenuButton* button_sequence, const int iNumButtons, float fMaxSecondsBack )
{ {
+6 -6
View File
@@ -121,9 +121,9 @@ void MenuElements::Load( CString sBackgroundPath, CString sTopEdgePath, CString
void MenuElements::TweenTopLayerOnScreen() void MenuElements::TweenTopLayerOnScreen()
{ {
CArray<Actor*,Actor*> apActorsInTopFrame; CArray<Actor*,Actor*> apActorsInTopFrame;
apActorsInTopFrame.Add( &m_sprTopEdge ); apActorsInTopFrame.push_back( &m_sprTopEdge );
apActorsInTopFrame.Add( &m_sprStyleIcon ); apActorsInTopFrame.push_back( &m_sprStyleIcon );
apActorsInTopFrame.Add( &m_MenuTimer ); apActorsInTopFrame.push_back( &m_MenuTimer );
for( unsigned i=0; i<apActorsInTopFrame.size(); i++ ) for( unsigned i=0; i<apActorsInTopFrame.size(); i++ )
{ {
float fOriginalX = apActorsInTopFrame[i]->GetX(); float fOriginalX = apActorsInTopFrame[i]->GetX();
@@ -159,9 +159,9 @@ void MenuElements::TweenTopLayerOffScreen()
will make each component tween off at a different rate ... will make each component tween off at a different rate ...
-glenn -glenn
CArray<Actor*,Actor*> apActorsInTopFrame; CArray<Actor*,Actor*> apActorsInTopFrame;
apActorsInTopFrame.Add( &m_sprTopEdge ); apActorsInTopFrame.push_back( &m_sprTopEdge );
apActorsInTopFrame.Add( &m_sprStyleIcon ); apActorsInTopFrame.push_back( &m_sprStyleIcon );
apActorsInTopFrame.Add( &m_MenuTimer ); apActorsInTopFrame.push_back( &m_MenuTimer );
for( unsigned i=0; i<apActorsInTopFrame.size(); i++ ) for( unsigned i=0; i<apActorsInTopFrame.size(); i++ )
{ {
float fOriginalX = apActorsInTopFrame[i]->GetX(); float fOriginalX = apActorsInTopFrame[i]->GetX();
+1 -1
View File
@@ -31,7 +31,7 @@ MusicList::MusicList()
void MusicList::AddGroup() void MusicList::AddGroup()
{ {
m_ContentsText.Add(group()); m_ContentsText.push_back(group());
} }
void MusicList::AddSongsToGroup(const CArray<Song*,Song*> &Songs) void MusicList::AddSongsToGroup(const CArray<Song*,Song*> &Songs)
+10 -10
View File
@@ -449,7 +449,7 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
pSong->GetNotesThatMatch( GAMESTATE->GetCurrentStyleDef()->m_NotesType, arraySteps ); pSong->GetNotesThatMatch( GAMESTATE->GetCurrentStyleDef()->m_NotesType, arraySteps );
if( !arraySteps.empty() ) if( !arraySteps.empty() )
arraySongs.Add( pSong ); arraySongs.push_back( pSong );
} }
@@ -514,11 +514,11 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
{ {
colorSection = (so==SORT_GROUP) ? SONGMAN->GetGroupColor(pSong->m_sGroupName) : SECTION_COLORS(iSectionColorIndex); colorSection = (so==SORT_GROUP) ? SONGMAN->GetGroupColor(pSong->m_sGroupName) : SECTION_COLORS(iSectionColorIndex);
iSectionColorIndex = (iSectionColorIndex+1) % NUM_SECTION_COLORS; iSectionColorIndex = (iSectionColorIndex+1) % NUM_SECTION_COLORS;
arrayWheelItemDatas.Add( WheelItemData(TYPE_SECTION, NULL, sThisSection, NULL, colorSection) ); arrayWheelItemDatas.push_back( WheelItemData(TYPE_SECTION, NULL, sThisSection, NULL, colorSection) );
sLastSection = sThisSection; sLastSection = sThisSection;
} }
arrayWheelItemDatas.Add( WheelItemData( TYPE_SONG, pSong, sThisSection, NULL, SONGMAN->GetSongColor(pSong)) ); arrayWheelItemDatas.push_back( WheelItemData( TYPE_SONG, pSong, sThisSection, NULL, SONGMAN->GetSongColor(pSong)) );
} }
} }
else else
@@ -528,7 +528,7 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
Song* pSong = arraySongs[i]; Song* pSong = arraySongs[i];
if( GAMESTATE->m_sPreferredGroup != "ALL MUSIC" && pSong->m_sGroupName != GAMESTATE->m_sPreferredGroup ) if( GAMESTATE->m_sPreferredGroup != "ALL MUSIC" && pSong->m_sGroupName != GAMESTATE->m_sPreferredGroup )
continue; // skip continue; // skip
arrayWheelItemDatas.Add( WheelItemData(TYPE_SONG, pSong, "", NULL, SONGMAN->GetSongColor(pSong)) ); arrayWheelItemDatas.push_back( WheelItemData(TYPE_SONG, pSong, "", NULL, SONGMAN->GetSongColor(pSong)) );
} }
} }
} }
@@ -536,7 +536,7 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
if( !bRoulette ) if( !bRoulette )
{ {
arrayWheelItemDatas.Add( WheelItemData(TYPE_ROULETTE, NULL, "", NULL, RageColor(1,0,0,1)) ); arrayWheelItemDatas.push_back( WheelItemData(TYPE_ROULETTE, NULL, "", NULL, RageColor(1,0,0,1)) );
} }
// HACK: Add extra stage item if it isn't already present on the music wheel // HACK: Add extra stage item if it isn't already present on the music wheel
@@ -560,7 +560,7 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
} }
if( !bFoundExtraSong ) if( !bFoundExtraSong )
arrayWheelItemDatas.Add( WheelItemData(TYPE_SONG, pSong, "", NULL, GAMESTATE->GetStageColor()) ); arrayWheelItemDatas.push_back( WheelItemData(TYPE_SONG, pSong, "", NULL, GAMESTATE->GetStageColor()) );
} }
break; break;
@@ -574,12 +574,12 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
{ {
case PLAY_MODE_ONI: case PLAY_MODE_ONI:
for( i=0; i<SONGMAN->m_aOniCourses.size(); i++ ) for( i=0; i<SONGMAN->m_aOniCourses.size(); i++ )
apCourses.Add( &SONGMAN->m_aOniCourses[i] ); apCourses.push_back( &SONGMAN->m_aOniCourses[i] );
SortCoursePointerArrayByDifficulty( apCourses ); SortCoursePointerArrayByDifficulty( apCourses );
break; break;
case PLAY_MODE_ENDLESS: case PLAY_MODE_ENDLESS:
for( i=0; i<SONGMAN->m_aEndlessCourses.size(); i++ ) for( i=0; i<SONGMAN->m_aEndlessCourses.size(); i++ )
apCourses.Add( &SONGMAN->m_aEndlessCourses[i] ); apCourses.push_back( &SONGMAN->m_aEndlessCourses[i] );
break; break;
} }
@@ -594,7 +594,7 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
pCourse->GetSongAndNotesForCurrentStyle( apSongs, apNotes, asModifiers, false ); pCourse->GetSongAndNotesForCurrentStyle( apSongs, apNotes, asModifiers, false );
if( !apNotes.empty() ) if( !apNotes.empty() )
arrayWheelItemDatas.Add( WheelItemData(TYPE_COURSE, NULL, "", pCourse, pCourse->GetColor()) ); arrayWheelItemDatas.push_back( WheelItemData(TYPE_COURSE, NULL, "", pCourse, pCourse->GetColor()) );
} }
} }
break; break;
@@ -626,7 +626,7 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
if( arrayWheelItemDatas.empty() ) if( arrayWheelItemDatas.empty() )
{ {
arrayWheelItemDatas.Add( WheelItemData(TYPE_SECTION, NULL, "- EMPTY -", NULL, RageColor(1,0,0,1)) ); arrayWheelItemDatas.push_back( WheelItemData(TYPE_SECTION, NULL, "- EMPTY -", NULL, RageColor(1,0,0,1)) );
} }
} }
+5 -5
View File
@@ -130,7 +130,7 @@ CString NoteData::GetSMNoteDataString()
iRowSpacing = int(roundf( NoteTypeToBeat(nt) * ROWS_PER_BEAT )); iRowSpacing = int(roundf( NoteTypeToBeat(nt) * ROWS_PER_BEAT ));
CStringArray asMeasureLines; CStringArray asMeasureLines;
asMeasureLines.Add( ssprintf(" // measure %d", m+1) ); asMeasureLines.push_back( ssprintf(" // measure %d", m+1) );
const int iMeasureStartRow = m * ROWS_PER_MEASURE; const int iMeasureStartRow = m * ROWS_PER_MEASURE;
const int iMeasureLastRow = (m+1) * ROWS_PER_MEASURE - 1; const int iMeasureLastRow = (m+1) * ROWS_PER_MEASURE - 1;
@@ -143,12 +143,12 @@ CString NoteData::GetSMNoteDataString()
for( int t=0; t<m_iNumTracks; t++ ) for( int t=0; t<m_iNumTracks; t++ )
szLineString[t] = GetTapNote(t, r); szLineString[t] = GetTapNote(t, r);
szLineString[t] = '\0'; szLineString[t] = '\0';
asMeasureLines.Add( szLineString ); asMeasureLines.push_back( szLineString );
} }
CString sMeasureString = join( "\n", asMeasureLines ); CString sMeasureString = join( "\n", asMeasureLines );
asMeasureStrings.Add( sMeasureString ); asMeasureStrings.push_back( sMeasureString );
} }
this->Convert2sAnd3sToHoldNotes(); this->Convert2sAnd3sToHoldNotes();
@@ -567,7 +567,7 @@ void NoteData::Turn( PlayerOptions::TurnType tt )
{ {
CArray<int,int> aiTracksLeftToMap; CArray<int,int> aiTracksLeftToMap;
for( t=0; t<m_iNumTracks; t++ ) for( t=0; t<m_iNumTracks; t++ )
aiTracksLeftToMap.Add( t ); aiTracksLeftToMap.push_back( t );
for( t=0; t<m_iNumTracks; t++ ) for( t=0; t<m_iNumTracks; t++ )
{ {
@@ -627,7 +627,7 @@ void NoteData::Turn( PlayerOptions::TurnType tt )
CArray<int,int> aiTracksThatCouldHaveTapNotes; CArray<int,int> aiTracksThatCouldHaveTapNotes;
for( t=0; t<m_iNumTracks; t++ ) for( t=0; t<m_iNumTracks; t++ )
if( GetTapNote(t, r) != TAP_HOLD ) // any point that isn't part of a hold if( GetTapNote(t, r) != TAP_HOLD ) // any point that isn't part of a hold
aiTracksThatCouldHaveTapNotes.Add( t ); aiTracksThatCouldHaveTapNotes.push_back( t );
for( t=0; t<m_iNumTracks; t++ ) for( t=0; t<m_iNumTracks; t++ )
{ {
+2 -2
View File
@@ -69,11 +69,11 @@ void NoteDisplay::Load( int iColNum, PlayerNumber pn )
int retval = fscanf( fp, "%f,%f,%f,%f\n", &color.r, &color.g, &color.b, &color.a ); int retval = fscanf( fp, "%f,%f,%f,%f\n", &color.r, &color.g, &color.b, &color.a );
bSuccess = (retval == 4); bSuccess = (retval == 4);
if( bSuccess ) if( bSuccess )
m_colorTapTweens.Add( color ); m_colorTapTweens.push_back( color );
} while( bSuccess ); } while( bSuccess );
if( m_colorTapTweens.empty() ) if( m_colorTapTweens.empty() )
m_colorTapTweens.Add( RageColor(1,1,1,1) ); m_colorTapTweens.push_back( RageColor(1,1,1,1) );
fclose( fp ); fclose( fp );
return; return;
+1 -1
View File
@@ -66,7 +66,7 @@ void Notes::WriteSMNotesTag( FILE* fp )
CStringArray asRadarValues; CStringArray asRadarValues;
for( int r=0; r<NUM_RADAR_VALUES; r++ ) for( int r=0; r<NUM_RADAR_VALUES; r++ )
asRadarValues.Add( ssprintf("%.3f", m_fRadarValues[r]) ); asRadarValues.push_back( ssprintf("%.3f", m_fRadarValues[r]) );
fprintf( fp, " %s:\n", join(",",asRadarValues).GetString() ); fprintf( fp, " %s:\n", join(",",asRadarValues).GetString() );
fprintf( fp, "%s;\n", m_sSMNoteData.GetString() ); fprintf( fp, "%s;\n", m_sSMNoteData.GetString() );
+3 -3
View File
@@ -159,7 +159,7 @@ bool BMSLoader::LoadFromBMSFile( const CString &sPath, Notes &out )
for( int i=0; i<sNoteData.GetLength(); i+=2 ) for( int i=0; i<sNoteData.GetLength(); i+=2 )
{ {
bool bThisIsANote = sNoteData.Mid(i,2) != "00"; bool bThisIsANote = sNoteData.Mid(i,2) != "00";
arrayNotes.Add( bThisIsANote ); arrayNotes.push_back( bThisIsANote );
} }
const unsigned iNumNotesInThisMeasure = arrayNotes.size(); const unsigned iNumNotesInThisMeasure = arrayNotes.size();
@@ -270,7 +270,7 @@ bool BMSLoader::LoadFromDir( CString sDir, Song &out )
LoadFromBMSFile( out.m_sSongDir + arrayBMSFileNames[i], LoadFromBMSFile( out.m_sSongDir + arrayBMSFileNames[i],
*pNewNotes ); *pNewNotes );
if(pNewNotes->m_NotesType != NOTES_TYPE_INVALID) if(pNewNotes->m_NotesType != NOTES_TYPE_INVALID)
out.m_apNotes.Add( pNewNotes ); out.m_apNotes.push_back( pNewNotes );
else else
delete pNewNotes; delete pNewNotes;
} }
@@ -362,7 +362,7 @@ bool BMSLoader::LoadFromDir( CString sDir, Song &out )
CString sNote = sNoteData.Mid(i,2); CString sNote = sNoteData.Mid(i,2);
int iNote; int iNote;
sscanf( sNote, "%x", &iNote ); // data is in hexadecimal sscanf( sNote, "%x", &iNote ); // data is in hexadecimal
arrayNotes.Add( iNote ); arrayNotes.push_back( iNote );
} }
const unsigned iNumNotesInThisMeasure = arrayNotes.size(); const unsigned iNumNotesInThisMeasure = arrayNotes.size();
+1 -1
View File
@@ -355,7 +355,7 @@ bool DWILoader::LoadFromDWIFile( CString sPath, Song &out )
*pNewNotes *pNewNotes
); );
if(pNewNotes->m_NotesType != NOTES_TYPE_INVALID) if(pNewNotes->m_NotesType != NOTES_TYPE_INVALID)
out.m_apNotes.Add( pNewNotes ); out.m_apNotes.push_back( pNewNotes );
else else
delete pNewNotes; delete pNewNotes;
} }
+1 -1
View File
@@ -159,7 +159,7 @@ bool KSFLoader::LoadFromDir( CString sDir, Song &out )
{ {
Notes* pNewNotes = new Notes; Notes* pNewNotes = new Notes;
LoadFromKSFFile( out.m_sSongDir + arrayKSFFileNames[i], *pNewNotes ); LoadFromKSFFile( out.m_sSongDir + arrayKSFFileNames[i], *pNewNotes );
out.m_apNotes.Add( pNewNotes ); out.m_apNotes.push_back( pNewNotes );
} }
CString sPath = out.m_sSongDir + arrayKSFFileNames[0]; CString sPath = out.m_sSongDir + arrayKSFFileNames[0];
+1 -1
View File
@@ -195,7 +195,7 @@ bool SMLoader::LoadFromSMFile( CString sPath, Song &out )
{ {
Notes* pNewNotes = new Notes; Notes* pNewNotes = new Notes;
ASSERT( pNewNotes ); ASSERT( pNewNotes );
out.m_apNotes.Add( pNewNotes ); out.m_apNotes.push_back( pNewNotes );
if( iNumParams != 7 ) if( iNumParams != 7 )
{ {
+8 -8
View File
@@ -137,7 +137,7 @@ void RageDisplay::GetHzAtResolution(unsigned width, unsigned height, unsigned bp
if(mode.Height != height) continue; if(mode.Height != height) continue;
if(GetBPP(mode.Format) != bpp) continue; if(GetBPP(mode.Format) != bpp) continue;
add.Add(mode.RefreshRate); add.push_back(mode.RefreshRate);
} }
} }
@@ -192,15 +192,15 @@ D3DFORMAT RageDisplay::FindBackBufferType(bool bWindowed, int iBPP)
/* When windowed, add all formats; otherwise add only formats that match dwBPP. */ /* When windowed, add all formats; otherwise add only formats that match dwBPP. */
if( iBPP == 16 || bWindowed ) if( iBPP == 16 || bWindowed )
{ {
arrayBackBufferFormats.Add( D3DFMT_R5G6B5 ); arrayBackBufferFormats.push_back( D3DFMT_R5G6B5 );
arrayBackBufferFormats.Add( D3DFMT_X1R5G5B5 ); arrayBackBufferFormats.push_back( D3DFMT_X1R5G5B5 );
arrayBackBufferFormats.Add( D3DFMT_A1R5G5B5 ); arrayBackBufferFormats.push_back( D3DFMT_A1R5G5B5 );
} }
if( iBPP == 32 || bWindowed ) if( iBPP == 32 || bWindowed )
{ {
arrayBackBufferFormats.Add( D3DFMT_R8G8B8 ); arrayBackBufferFormats.push_back( D3DFMT_R8G8B8 );
arrayBackBufferFormats.Add( D3DFMT_X8R8G8B8 ); arrayBackBufferFormats.push_back( D3DFMT_X8R8G8B8 );
arrayBackBufferFormats.Add( D3DFMT_A8R8G8B8 ); arrayBackBufferFormats.push_back( D3DFMT_A8R8G8B8 );
} }
if( !bWindowed && iBPP != 16 && iBPP != 32 ) if( !bWindowed && iBPP != 16 && iBPP != 32 )
throw RageException( ssprintf("Invalid BPP '%u' specified", iBPP) ); throw RageException( ssprintf("Invalid BPP '%u' specified", iBPP) );
@@ -618,7 +618,7 @@ void RageDisplay::ResetMatrixStack()
void RageDisplay::PushMatrix() void RageDisplay::PushMatrix()
{ {
m_MatrixStack.Add( GetTopMatrix() ); m_MatrixStack.push_back( GetTopMatrix() );
ASSERT(m_MatrixStack.size()<20); // check for infinite loop ASSERT(m_MatrixStack.size()<20); // check for infinite loop
} }
+1 -1
View File
@@ -71,7 +71,7 @@ void RageTexture::CreateFrameRects()
(j+0)/(float)m_iFramesHigh*m_iImageHeight/(float)m_iTextureHeight, (j+0)/(float)m_iFramesHigh*m_iImageHeight/(float)m_iTextureHeight,
(i+1)/(float)m_iFramesWide*m_iImageWidth /(float)m_iTextureWidth, (i+1)/(float)m_iFramesWide*m_iImageWidth /(float)m_iTextureWidth,
(j+1)/(float)m_iFramesHigh*m_iImageHeight/(float)m_iTextureHeight ); (j+1)/(float)m_iFramesHigh*m_iImageHeight/(float)m_iTextureHeight );
m_TextureCoordRects.Add( frect ); // the index of this array element will be (i + j*m_iFramesWide) m_TextureCoordRects.push_back( frect ); // the index of this array element will be (i + j*m_iFramesWide)
//LOG->Trace( "Adding frect%d %f %f %f %f", (i + j*m_iFramesWide), frect.left, frect.top, frect.right, frect.bottom ); //LOG->Trace( "Adding frect%d %f %f %f %f", (i + j*m_iFramesWide), frect.left, frect.top, frect.right, frect.bottom );
} }
+9 -9
View File
@@ -127,7 +127,7 @@ void split( const CString &Source, const CString &Deliminator, CStringArray& Add
if( AddCString.IsEmpty() && bIgnoreEmpty ) if( AddCString.IsEmpty() && bIgnoreEmpty )
; // do nothing ; // do nothing
else else
AddIt.Add(AddCString); AddIt.push_back(AddCString);
startpos=pos+Deliminator.GetLength(); startpos=pos+Deliminator.GetLength();
} while ( startpos <= Source.GetLength() ); } while ( startpos <= Source.GetLength() );
@@ -291,9 +291,9 @@ void GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs, bool bRe
continue; continue;
if( bReturnPathToo ) if( bReturnPathToo )
AddTo.Add( sDir + sDirName ); AddTo.push_back( sDir + sDirName );
else else
AddTo.Add( sDirName ); AddTo.push_back( sDirName );
} while( ::FindNextFile( hFind, &fd ) ); } while( ::FindNextFile( hFind, &fd ) );
@@ -376,11 +376,11 @@ DirCache::CacheEntry *DirCache::LoadDirCache( const CString &sPath )
CString sExt, sThrowAway; CString sExt, sThrowAway;
splitrelpath( fd.cFileName, sThrowAway, sThrowAway, sExt ); splitrelpath( fd.cFileName, sThrowAway, sThrowAway, sExt );
dir->files.Add(fd.cFileName); dir->files.push_back(fd.cFileName);
dir->exts.Add(sExt); dir->exts.push_back(sExt);
dir->Attributes.Add(fd.dwFileAttributes); dir->Attributes.push_back(fd.dwFileAttributes);
} while( ::FindNextFile( hFind, &fd ) ); } while( ::FindNextFile( hFind, &fd ) );
directory_cache.Add(dir); directory_cache.push_back(dir);
chdir(oldpath); chdir(oldpath);
return dir; return dir;
@@ -455,9 +455,9 @@ bool GetExtDirListingV( const CString &sPath, CStringArray &AddTo, bool bOnlyDir
if(!matched) continue; if(!matched) continue;
if( bReturnPathToo ) if( bReturnPathToo )
AddTo.Add( sDir + cache->files[i] ); AddTo.push_back( sDir + cache->files[i] );
else else
AddTo.Add( cache->files[i] ); AddTo.push_back( cache->files[i] );
} }
return true; return true;
+1 -1
View File
@@ -57,7 +57,7 @@ bool RandomSample::LoadSound( CString sSoundFilePath )
pSS->Load( sSoundFilePath ); pSS->Load( sSoundFilePath );
m_pSamples.Add( pSS ); m_pSamples.push_back( pSS );
return true; return true;
} }
+1 -1
View File
@@ -103,7 +103,7 @@ void Screen::SendScreenMessage( ScreenMessage SM, float fDelay )
QueuedScreenMessage QSM; QueuedScreenMessage QSM;
QSM.SM = SM; QSM.SM = SM;
QSM.fDelayRemaining = fDelay; QSM.fDelayRemaining = fDelay;
m_QueuedMessages.Add( QSM ); m_QueuedMessages.push_back( QSM );
} }
bool Screen::FirstUpdate() bool Screen::FirstUpdate()
+1 -1
View File
@@ -199,7 +199,7 @@ ScreenEdit::ScreenEdit()
// of the current edit. Naturally, this is where we'll // of the current edit. Naturally, this is where we'll
// want to extract the NotesType for a (NEW) sequence. // want to extract the NotesType for a (NEW) sequence.
m_pSong->m_apNotes.Add( m_pNotes ); m_pSong->m_apNotes.push_back( m_pNotes );
GAMESTATE->m_pCurNotes[PLAYER_1] = m_pNotes; GAMESTATE->m_pCurNotes[PLAYER_1] = m_pNotes;
} }
+13 -13
View File
@@ -688,15 +688,15 @@ void ScreenEvaluation::TweenOnScreen()
unsigned i; unsigned i;
CArray<Actor*,Actor*> apActorsInBonusOrStageInfo; CArray<Actor*,Actor*> apActorsInBonusOrStageInfo;
apActorsInBonusOrStageInfo.Add( &m_sprBonusFrame[p] ); apActorsInBonusOrStageInfo.push_back( &m_sprBonusFrame[p] );
for( i=0; i<NUM_RADAR_VALUES; i++ ) for( i=0; i<NUM_RADAR_VALUES; i++ )
{ {
apActorsInBonusOrStageInfo.Add( &m_sprPossibleBar[p][i] ); apActorsInBonusOrStageInfo.push_back( &m_sprPossibleBar[p][i] );
apActorsInBonusOrStageInfo.Add( &m_sprActualBar[p][i] ); apActorsInBonusOrStageInfo.push_back( &m_sprActualBar[p][i] );
} }
apActorsInBonusOrStageInfo.Add( &m_sprCourseFrame[p] ); apActorsInBonusOrStageInfo.push_back( &m_sprCourseFrame[p] );
apActorsInBonusOrStageInfo.Add( &m_textTime[p] ); apActorsInBonusOrStageInfo.push_back( &m_textTime[p] );
apActorsInBonusOrStageInfo.Add( &m_textSongsSurvived[p] ); apActorsInBonusOrStageInfo.push_back( &m_textSongsSurvived[p] );
for( i=0; i<apActorsInBonusOrStageInfo.size(); i++ ) for( i=0; i<apActorsInBonusOrStageInfo.size(); i++ )
{ {
fOriginalX = apActorsInBonusOrStageInfo[i]->GetX(); fOriginalX = apActorsInBonusOrStageInfo[i]->GetX();
@@ -707,13 +707,13 @@ void ScreenEvaluation::TweenOnScreen()
} }
CArray<Actor*,Actor*> apActorsInGradeOrPercentFrame; CArray<Actor*,Actor*> apActorsInGradeOrPercentFrame;
apActorsInGradeOrPercentFrame.Add( &m_sprBonusFrame[p] ); apActorsInGradeOrPercentFrame.push_back( &m_sprBonusFrame[p] );
apActorsInGradeOrPercentFrame.Add( &m_sprGradeFrame[p] ); apActorsInGradeOrPercentFrame.push_back( &m_sprGradeFrame[p] );
apActorsInGradeOrPercentFrame.Add( &m_Grades[p] ); apActorsInGradeOrPercentFrame.push_back( &m_Grades[p] );
apActorsInGradeOrPercentFrame.Add( &m_sprPercentFrame[p] ); apActorsInGradeOrPercentFrame.push_back( &m_sprPercentFrame[p] );
apActorsInGradeOrPercentFrame.Add( &m_textOniPercentLarge[p] ); apActorsInGradeOrPercentFrame.push_back( &m_textOniPercentLarge[p] );
apActorsInGradeOrPercentFrame.Add( &m_textOniPercentSmall[p] ); apActorsInGradeOrPercentFrame.push_back( &m_textOniPercentSmall[p] );
apActorsInGradeOrPercentFrame.Add( &m_sprNewRecord[p] ); apActorsInGradeOrPercentFrame.push_back( &m_sprNewRecord[p] );
for( i=0; i<apActorsInGradeOrPercentFrame.size(); i++ ) for( i=0; i<apActorsInGradeOrPercentFrame.size(); i++ )
{ {
float fOriginalZoomY = apActorsInGradeOrPercentFrame[i]->GetZoomY(); float fOriginalZoomY = apActorsInGradeOrPercentFrame[i]->GetZoomY();
+4 -4
View File
@@ -261,8 +261,8 @@ void ScreenEz2SelectMusic::TweenOffScreen()
CArray<Actor*,Actor*> apActorsInScore; CArray<Actor*,Actor*> apActorsInScore;
for( p=0; p<NUM_PLAYERS; p++ ) for( p=0; p<NUM_PLAYERS; p++ )
{ {
apActorsInScore.Add( &m_sprHighScoreFrame[p] ); apActorsInScore.push_back( &m_sprHighScoreFrame[p] );
apActorsInScore.Add( &m_HighScore[p] ); apActorsInScore.push_back( &m_HighScore[p] );
} }
for( i=0; i<apActorsInScore.size(); i++ ) for( i=0; i<apActorsInScore.size(); i++ )
{ {
@@ -281,8 +281,8 @@ void ScreenEz2SelectMusic::TweenScoreOnAndOffAfterChangeSort()
CArray<Actor*,Actor*> apActorsInScore; CArray<Actor*,Actor*> apActorsInScore;
for( int p=0; p<NUM_PLAYERS; p++ ) for( int p=0; p<NUM_PLAYERS; p++ )
{ {
apActorsInScore.Add( &m_sprHighScoreFrame[p] ); apActorsInScore.push_back( &m_sprHighScoreFrame[p] );
apActorsInScore.Add( &m_HighScore[p] ); apActorsInScore.push_back( &m_HighScore[p] );
} }
for( unsigned i=0; i<apActorsInScore.size(); i++ ) for( unsigned i=0; i<apActorsInScore.size(); i++ )
{ {
+9 -9
View File
@@ -1114,7 +1114,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
} }
} }
GAMESTATE->m_apSongsPlayed.Add( GAMESTATE->m_pCurSong ); GAMESTATE->m_apSongsPlayed.push_back( GAMESTATE->m_pCurSong );
GAMESTATE->m_iSongsIntoCourse++; GAMESTATE->m_iSongsIntoCourse++;
for( p=0; p<NUM_PLAYERS; p++ ) for( p=0; p<NUM_PLAYERS; p++ )
if( GAMESTATE->IsPlayerEnabled(p) ) if( GAMESTATE->IsPlayerEnabled(p) )
@@ -1448,12 +1448,12 @@ void ScreenGameplay::TweenOnScreen()
unsigned i, p; unsigned i, p;
CArray<Actor*,Actor*> apActorsInLifeFrame; CArray<Actor*,Actor*> apActorsInLifeFrame;
apActorsInLifeFrame.Add( &m_sprLifeFrame ); apActorsInLifeFrame.push_back( &m_sprLifeFrame );
for( p=0; p<NUM_PLAYERS; p++ ) for( p=0; p<NUM_PLAYERS; p++ )
apActorsInLifeFrame.Add( m_pLifeMeter[p] ); apActorsInLifeFrame.push_back( m_pLifeMeter[p] );
apActorsInLifeFrame.Add( &m_textStageNumber ); apActorsInLifeFrame.push_back( &m_textStageNumber );
for( p=0; p<NUM_PLAYERS; p++ ) for( p=0; p<NUM_PLAYERS; p++ )
apActorsInLifeFrame.Add( &m_textCourseSongNumber[p] ); apActorsInLifeFrame.push_back( &m_textCourseSongNumber[p] );
for( i=0; i<apActorsInLifeFrame.size(); i++ ) for( i=0; i<apActorsInLifeFrame.size(); i++ )
{ {
float fOriginalY = apActorsInLifeFrame[i]->GetY(); float fOriginalY = apActorsInLifeFrame[i]->GetY();
@@ -1466,15 +1466,15 @@ void ScreenGameplay::TweenOnScreen()
CArray<Actor*,Actor*> apActorsInScoreFrame; CArray<Actor*,Actor*> apActorsInScoreFrame;
apActorsInScoreFrame.Add( &m_sprScoreFrame ); apActorsInScoreFrame.push_back( &m_sprScoreFrame );
for( p=0; p<NUM_PLAYERS; p++ ) for( p=0; p<NUM_PLAYERS; p++ )
{ {
if( !GAMESTATE->IsPlayerEnabled(p) ) if( !GAMESTATE->IsPlayerEnabled(p) )
continue; continue;
apActorsInScoreFrame.Add( m_pScoreDisplay[p] ); apActorsInScoreFrame.push_back( m_pScoreDisplay[p] );
apActorsInScoreFrame.Add( &m_textPlayerOptions[p] ); apActorsInScoreFrame.push_back( &m_textPlayerOptions[p] );
} }
apActorsInScoreFrame.Add( &m_textSongOptions ); apActorsInScoreFrame.push_back( &m_textSongOptions );
for( i=0; i<apActorsInScoreFrame.size(); i++ ) for( i=0; i<apActorsInScoreFrame.size(); i++ )
{ {
float fOriginalY = apActorsInScoreFrame[i]->GetY(); float fOriginalY = apActorsInScoreFrame[i]->GetY();
+4 -4
View File
@@ -247,7 +247,7 @@ void ScreenManager::SetNewScreen( Screen *pNewScreen )
m_ScreensToDelete.insert(m_ScreensToDelete.end(), m_ScreenStack.begin(), m_ScreenStack.end()); m_ScreensToDelete.insert(m_ScreensToDelete.end(), m_ScreenStack.begin(), m_ScreenStack.end());
m_ScreenStack.clear(); m_ScreenStack.clear();
m_ScreenStack.Add( pNewScreen ); m_ScreenStack.push_back( pNewScreen );
} }
void ScreenManager::SetNewScreen( CString sClassName ) void ScreenManager::SetNewScreen( CString sClassName )
@@ -274,7 +274,7 @@ void ScreenManager::Prompt( ScreenMessage SM_SendWhenDone, CString sText, bool b
FlushDirCache(); FlushDirCache();
// add the new state onto the back of the array // add the new state onto the back of the array
m_ScreenStack.Add( new ScreenPrompt(SM_SendWhenDone, sText, bYesNo, bDefaultAnswer, OnYes, OnNo) ); m_ScreenStack.push_back( new ScreenPrompt(SM_SendWhenDone, sText, bYesNo, bDefaultAnswer, OnYes, OnNo) );
} }
void ScreenManager::TextEntry( ScreenMessage SM_SendWhenDone, CString sQuestion, CString sInitialAnswer, void(*OnOK)(CString sAnswer), void(*OnCanel)() ) void ScreenManager::TextEntry( ScreenMessage SM_SendWhenDone, CString sQuestion, CString sInitialAnswer, void(*OnOK)(CString sAnswer), void(*OnCanel)() )
@@ -282,7 +282,7 @@ void ScreenManager::TextEntry( ScreenMessage SM_SendWhenDone, CString sQuestion,
FlushDirCache(); FlushDirCache();
// add the new state onto the back of the array // add the new state onto the back of the array
m_ScreenStack.Add( new ScreenTextEntry(SM_SendWhenDone, sQuestion, sInitialAnswer, OnOK, OnCanel) ); m_ScreenStack.push_back( new ScreenTextEntry(SM_SendWhenDone, sQuestion, sInitialAnswer, OnOK, OnCanel) );
} }
void ScreenManager::PopTopScreen( ScreenMessage SM ) void ScreenManager::PopTopScreen( ScreenMessage SM )
@@ -290,7 +290,7 @@ void ScreenManager::PopTopScreen( ScreenMessage SM )
Screen* pScreenToPop = m_ScreenStack.back(); // top menu Screen* pScreenToPop = m_ScreenStack.back(); // top menu
//pScreenToPop->HandleScreenMessage( SM_LosingInputFocus ); //pScreenToPop->HandleScreenMessage( SM_LosingInputFocus );
m_ScreenStack.erase(m_ScreenStack.end()-1, m_ScreenStack.end()); m_ScreenStack.erase(m_ScreenStack.end()-1, m_ScreenStack.end());
m_ScreensToDelete.Add( pScreenToPop ); m_ScreensToDelete.push_back( pScreenToPop );
Screen* pNewTopScreen = m_ScreenStack[m_ScreenStack.size()-1]; Screen* pNewTopScreen = m_ScreenStack[m_ScreenStack.size()-1];
pNewTopScreen->HandleScreenMessage( SM ); pNewTopScreen->HandleScreenMessage( SM );
+2 -2
View File
@@ -80,7 +80,7 @@ ScreenSelectGroup::ScreenSelectGroup()
CStringArray asGroupNames; CStringArray asGroupNames;
for( i=0; i<aAllSongs.size(); i++ ) { for( i=0; i<aAllSongs.size(); i++ ) {
asGroupNames.Add( aAllSongs[i]->m_sGroupName ); asGroupNames.push_back( aAllSongs[i]->m_sGroupName );
} }
/* Remove duplicate groups. */ /* Remove duplicate groups. */
@@ -104,7 +104,7 @@ ScreenSelectGroup::ScreenSelectGroup()
if( j != 0 && aAllSongs[i]->m_sGroupName != asGroupNames[j] ) if( j != 0 && aAllSongs[i]->m_sGroupName != asGroupNames[j] )
continue; continue;
aSongsInGroup.Add( aAllSongs[i] ); aSongsInGroup.push_back( aAllSongs[i] );
} }
SortSongPointerArrayByTitle( aSongsInGroup ); SortSongPointerArrayByTitle( aSongsInGroup );
+1 -1
View File
@@ -241,7 +241,7 @@ void ScreenSelectMode::RefreshModeChoices()
for( unsigned j=0; j<m_aPossibleModeChoices.size(); j++ ) for( unsigned j=0; j<m_aPossibleModeChoices.size(); j++ )
{ {
const ModeChoice& choice = m_aPossibleModeChoices[j]; const ModeChoice& choice = m_aPossibleModeChoices[j];
asGraphicPaths.Add( THEME->GetPathTo("Graphics", ssprintf("select mode choice %s %s", sGameName.GetString(), choice.name) ) ); asGraphicPaths.push_back( THEME->GetPathTo("Graphics", ssprintf("select mode choice %s %s", sGameName.GetString(), choice.name) ) );
} }
m_ScrollingList.Load( asGraphicPaths ); m_ScrollingList.Load( asGraphicPaths );
+4 -4
View File
@@ -335,8 +335,8 @@ void ScreenSelectMusic::TweenOffScreen()
CArray<Actor*,Actor*> apActorsInScore; CArray<Actor*,Actor*> apActorsInScore;
for( p=0; p<NUM_PLAYERS; p++ ) for( p=0; p<NUM_PLAYERS; p++ )
{ {
apActorsInScore.Add( &m_sprHighScoreFrame[p] ); apActorsInScore.push_back( &m_sprHighScoreFrame[p] );
apActorsInScore.Add( &m_HighScore[p] ); apActorsInScore.push_back( &m_HighScore[p] );
} }
for( unsigned i=0; i<apActorsInScore.size(); i++ ) for( unsigned i=0; i<apActorsInScore.size(); i++ )
{ {
@@ -355,8 +355,8 @@ void ScreenSelectMusic::TweenScoreOnAndOffAfterChangeSort()
CArray<Actor*,Actor*> apActorsInScore; CArray<Actor*,Actor*> apActorsInScore;
for( int p=0; p<NUM_PLAYERS; p++ ) for( int p=0; p<NUM_PLAYERS; p++ )
{ {
apActorsInScore.Add( &m_sprHighScoreFrame[p] ); apActorsInScore.push_back( &m_sprHighScoreFrame[p] );
apActorsInScore.Add( &m_HighScore[p] ); apActorsInScore.push_back( &m_HighScore[p] );
} }
for( unsigned i=0; i<apActorsInScore.size(); i++ ) for( unsigned i=0; i<apActorsInScore.size(); i++ )
{ {
+1 -1
View File
@@ -61,7 +61,7 @@ void ScrollingList::Load( const CStringArray& asGraphicPaths )
{ {
Sprite* pNewSprite = new Sprite; Sprite* pNewSprite = new Sprite;
pNewSprite->Load( asGraphicPaths[i] ); pNewSprite->Load( asGraphicPaths[i] );
m_apSprites.Add( pNewSprite ); m_apSprites.push_back( pNewSprite );
} }
} }
+11 -11
View File
@@ -98,21 +98,21 @@ Song::~Song()
void Song::AddBPMSegment( BPMSegment seg ) void Song::AddBPMSegment( BPMSegment seg )
{ {
m_BPMSegments.Add( seg ); m_BPMSegments.push_back( seg );
SortBPMSegmentsArray( m_BPMSegments ); SortBPMSegmentsArray( m_BPMSegments );
} }
void Song::AddStopSegment( StopSegment seg ) void Song::AddStopSegment( StopSegment seg )
{ {
m_StopSegments.Add( seg ); m_StopSegments.push_back( seg );
SortStopSegmentsArray( m_StopSegments ); SortStopSegmentsArray( m_StopSegments );
} }
void Song::AddBackgroundChange( BackgroundChange seg ) void Song::AddBackgroundChange( BackgroundChange seg )
{ {
m_BackgroundChanges.Add( seg ); m_BackgroundChanges.push_back( seg );
SortBackgroundChangesArray( m_BackgroundChanges ); SortBackgroundChangesArray( m_BackgroundChanges );
} }
@@ -572,7 +572,7 @@ void Song::GetNotesThatMatch( NotesType nt, CArray<Notes*, Notes*>& arrayAddTo )
for( unsigned i=0; i<m_apNotes.size(); i++ ) // for each of the Song's Notes for( unsigned i=0; i<m_apNotes.size(); i++ ) // for each of the Song's Notes
{ {
if( m_apNotes[i]->m_NotesType == nt ) if( m_apNotes[i]->m_NotesType == nt )
arrayAddTo.Add( m_apNotes[i] ); arrayAddTo.push_back( m_apNotes[i] );
} }
} }
@@ -746,11 +746,11 @@ void Song::AddAutoGenNotes()
// // This is way too slow. Only autogen dance->pump and pump->dance // // This is way too slow. Only autogen dance->pump and pump->dance
// CArray<NotesType,NotesType> aMissingNotesTypes; // CArray<NotesType,NotesType> aMissingNotesTypes;
// if( !SongHasNotesType(NOTES_TYPE_DANCE_SINGLE) ) aMissingNotesTypes.Add( NOTES_TYPE_DANCE_SINGLE ); // if( !SongHasNotesType(NOTES_TYPE_DANCE_SINGLE) ) aMissingNotesTypes.push_back( NOTES_TYPE_DANCE_SINGLE );
// if( !SongHasNotesType(NOTES_TYPE_DANCE_DOUBLE) ) aMissingNotesTypes.Add( NOTES_TYPE_DANCE_DOUBLE ); // if( !SongHasNotesType(NOTES_TYPE_DANCE_DOUBLE) ) aMissingNotesTypes.push_back( NOTES_TYPE_DANCE_DOUBLE );
// if( !SongHasNotesType(NOTES_TYPE_DANCE_SOLO) ) aMissingNotesTypes.Add( NOTES_TYPE_DANCE_SOLO ); // if( !SongHasNotesType(NOTES_TYPE_DANCE_SOLO) ) aMissingNotesTypes.push_back( NOTES_TYPE_DANCE_SOLO );
// if( !SongHasNotesType(NOTES_TYPE_PUMP_SINGLE) ) aMissingNotesTypes.Add( NOTES_TYPE_PUMP_SINGLE ); // if( !SongHasNotesType(NOTES_TYPE_PUMP_SINGLE) ) aMissingNotesTypes.push_back( NOTES_TYPE_PUMP_SINGLE );
// if( !SongHasNotesType(NOTES_TYPE_PUMP_DOUBLE) ) aMissingNotesTypes.Add( NOTES_TYPE_PUMP_DOUBLE ); // if( !SongHasNotesType(NOTES_TYPE_PUMP_DOUBLE) ) aMissingNotesTypes.push_back( NOTES_TYPE_PUMP_DOUBLE );
// //
// for( unsigned i=0; i<aMissingNotesTypes.size(); i++ ) // for( unsigned i=0; i<aMissingNotesTypes.size(); i++ )
// { // {
@@ -782,7 +782,7 @@ next_notes_type:
pNewNotes->m_sDescription = pOriginalNotes->m_sDescription + " (autogen)"; pNewNotes->m_sDescription = pOriginalNotes->m_sDescription + " (autogen)";
pNewNotes->m_NotesType = ntMissing; pNewNotes->m_NotesType = ntMissing;
pNewNotes->m_sSMNoteData = pOriginalNotes->m_sSMNoteData; pNewNotes->m_sSMNoteData = pOriginalNotes->m_sSMNoteData;
this->m_apNotes.Add( pNewNotes ); this->m_apNotes.push_back( pNewNotes );
goto next_notes_type; goto next_notes_type;
} }
@@ -824,7 +824,7 @@ next_notes_type:
pOriginalNotes->GetNoteData( &originalNoteData ); pOriginalNotes->GetNoteData( &originalNoteData );
newNoteData.LoadTransformedSlidingWindow( &originalNoteData, iNumTracksOfMissing ); newNoteData.LoadTransformedSlidingWindow( &originalNoteData, iNumTracksOfMissing );
pNewNotes->SetNoteData( &newNoteData ); pNewNotes->SetNoteData( &newNoteData );
this->m_apNotes.Add( pNewNotes ); this->m_apNotes.push_back( pNewNotes );
goto next_notes_type; goto next_notes_type;
} }
} }
+8 -8
View File
@@ -106,8 +106,8 @@ void SongManager::AddGroup( CString sDir, CString sGroupDirName )
LOG->Trace( "Group banner for '%s' is '%s'.", sGroupDirName.GetString(), sBannerPath.GetString() ); LOG->Trace( "Group banner for '%s' is '%s'.", sGroupDirName.GetString(), sBannerPath.GetString() );
} }
m_arrayGroupNames.Add( sGroupDirName ); m_arrayGroupNames.push_back( sGroupDirName );
m_GroupBannerPaths.Add(sBannerPath); m_GroupBannerPaths.push_back(sBannerPath);
} }
void SongManager::LoadStepManiaSongDir( CString sDir, void(*callback)() ) void SongManager::LoadStepManiaSongDir( CString sDir, void(*callback)() )
@@ -155,7 +155,7 @@ void SongManager::LoadStepManiaSongDir( CString sDir, void(*callback)() )
continue; continue;
} }
m_pSongs.Add( pNewSong ); m_pSongs.push_back( pNewSong );
loaded++; loaded++;
} }
@@ -221,7 +221,7 @@ void SongManager::LoadDWISongDir( CString DWIHome )
ld.LoadFromDWIFile( ld.LoadFromDWIFile(
ssprintf("%s\\Songs\\%s\\%s\\%s", DWIHome.GetString(), MixDirs[i].GetString(), arrayDirs[b].GetString(), sDWIFileName.GetString()), ssprintf("%s\\Songs\\%s\\%s\\%s", DWIHome.GetString(), MixDirs[i].GetString(), arrayDirs[b].GetString(), sDWIFileName.GetString()),
*pNewSong); *pNewSong);
m_pSongs.Add( pNewSong ); m_pSongs.push_back( pNewSong );
} }
} }
} }
@@ -416,7 +416,7 @@ void SongManager::GetSongsInGroup( const CString sGroupName, CArray<Song*, Song*
{ {
Song* pSong = m_pSongs[i]; Song* pSong = m_pSongs[i];
if( sGroupName == m_pSongs[i]->m_sGroupName ) if( sGroupName == m_pSongs[i]->m_sGroupName )
AddTo.Add( pSong ); AddTo.push_back( pSong );
} }
} }
@@ -453,7 +453,7 @@ void SongManager::InitCoursesFromDisk()
Course course; Course course;
course.LoadFromCRSFile( "Courses\\" + saCourseFiles[i], m_pSongs ); course.LoadFromCRSFile( "Courses\\" + saCourseFiles[i], m_pSongs );
if( course.m_iStages > 0 ) if( course.m_iStages > 0 )
m_aOniCourses.Add( course ); m_aOniCourses.push_back( course );
} }
// //
@@ -474,7 +474,7 @@ void SongManager::InitCoursesFromDisk()
course.CreateEndlessCourseFromGroupAndDifficulty( sGroupName, dc, apGroupSongs ); course.CreateEndlessCourseFromGroupAndDifficulty( sGroupName, dc, apGroupSongs );
if( course.m_iStages > 0 ) if( course.m_iStages > 0 )
m_aEndlessCourses.Add( course ); m_aEndlessCourses.push_back( course );
} }
} }
@@ -492,7 +492,7 @@ void SongManager::InitCoursesFromDisk()
Course course; Course course;
course.LoadFromCRSFile( saCoursePaths[i], m_pSongs ); course.LoadFromCRSFile( saCoursePaths[i], m_pSongs );
if( course.m_iStages > 0 ) if( course.m_iStages > 0 )
m_aExtraCourses.Add( course ); m_aExtraCourses.push_back( course );
} }
} }
+1 -1
View File
@@ -267,7 +267,7 @@ void SongSelector::OnNotesTypeChange()
m_pNotess.clear(); m_pNotess.clear();
GetSelectedSong()->GetNotesThatMatch( GAMEMAN->GetStyleDefForStyle(GetSelectedStyle())->m_NotesType, m_pNotess ); GetSelectedSong()->GetNotesThatMatch( GAMEMAN->GetStyleDefForStyle(GetSelectedStyle())->m_NotesType, m_pNotess );
SortNotesArrayByDifficulty( m_pNotess ); SortNotesArrayByDifficulty( m_pNotess );
m_pNotess.Add( NULL ); // marker for "(NEW)" m_pNotess.push_back( NULL ); // marker for "(NEW)"
m_iSelectedNotes = 0; m_iSelectedNotes = 0;
OnNotesChange(); OnNotesChange();
+2 -2
View File
@@ -158,7 +158,7 @@ void SplitCommandLine(const char *lpCmdLine, CStringArray &aCmds) {
} }
if(cmd.GetLength()) if(cmd.GetLength())
aCmds.Add(cmd); aCmds.push_back(cmd);
} }
} }
@@ -432,7 +432,7 @@ BOOL CALLBACK LoadingWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam
if( GAMESTATE && GAMESTATE->m_sLoadingMessage != "" ) if( GAMESTATE && GAMESTATE->m_sLoadingMessage != "" )
split( GAMESTATE->m_sLoadingMessage, "\n", asMessageLines, false ); split( GAMESTATE->m_sLoadingMessage, "\n", asMessageLines, false );
else else
asMessageLines.Add( "Initializing hardware..." ); asMessageLines.push_back( "Initializing hardware..." );
SendDlgItemMessage( SendDlgItemMessage(
hWnd, hWnd,