diff --git a/stepmania/src/Background.cpp b/stepmania/src/Background.cpp index ca17d292ec..bacd85902f 100644 --- a/stepmania/src/Background.cpp +++ b/stepmania/src/Background.cpp @@ -75,7 +75,7 @@ Background::~Background() void Background::Unload() { - for( int i=0; im_sSongDir+aniseg.m_sBGName, asFiles, false, true ); - if( asFiles.GetSize() > 0 ) + if( !asFiles.empty() ) { pTempBGA = new BGAnimation; pTempBGA->LoadFromMovie( asFiles[0], true, true ); @@ -112,7 +112,7 @@ BGAnimation *Background::GetBGA(const Song *pSong, const BackgroundChange &anise } // Look for BGAnims in the song dir GetDirListing( pSong->m_sSongDir+aniseg.m_sBGName, asFiles, true, true ); - if( asFiles.GetSize() > 0 ) + if( !asFiles.empty() ) { pTempBGA = new BGAnimation; pTempBGA->LoadFromAniDir( asFiles[0], bgpath ); @@ -121,7 +121,7 @@ BGAnimation *Background::GetBGA(const Song *pSong, const BackgroundChange &anise // Look for movies in the RandomMovies dir GetDirListing( RANDOMMOVIES_DIR+aniseg.m_sBGName, asFiles, false, true ); - if( asFiles.GetSize() > 0 ) + if( !asFiles.empty() ) { pTempBGA = new BGAnimation; pTempBGA->LoadFromMovie( asFiles[0], true, false ); @@ -130,7 +130,7 @@ BGAnimation *Background::GetBGA(const Song *pSong, const BackgroundChange &anise // Look for BGAnims in the BGAnims dir GetDirListing( BG_ANIMS_DIR+aniseg.m_sBGName, asFiles, true, true ); - if( asFiles.GetSize() > 0 ) + if( !asFiles.empty() ) { pTempBGA = new BGAnimation; pTempBGA->LoadFromAniDir( asFiles[0], bgpath ); @@ -139,7 +139,7 @@ BGAnimation *Background::GetBGA(const Song *pSong, const BackgroundChange &anise // Look for BGAnims in the BGAnims dir GetDirListing( VISUALIZATIONS_DIR+aniseg.m_sBGName, asFiles, false, true ); - if( asFiles.GetSize() > 0 ) + if( !asFiles.empty() ) { pTempBGA = new BGAnimation; pTempBGA->LoadFromVisualization( asFiles[0], bgpath ); @@ -189,7 +189,7 @@ void Background::LoadFromSong( Song* pSong ) // Load the animations used by the song's pre-defined animation plan. // the song has a plan. Use it. - for( int i=0; im_BackgroundChanges.GetSize(); i++ ) + for( unsigned i=0; im_BackgroundChanges.size(); i++ ) { const BackgroundChange& aniseg = pSong->m_BackgroundChanges[i]; bool bFade = i==0; @@ -200,7 +200,7 @@ void Background::LoadFromSong( Song* pSong ) { m_BGAnimations.Add( pTempBGA ); // add to the plan - m_aBGSegments.Add( BGSegment(aniseg.m_fStartBeat, m_BGAnimations.GetSize()-1, bFade) ); + m_aBGSegments.Add( BGSegment(aniseg.m_fStartBeat, m_BGAnimations.size()-1, bFade) ); } } @@ -243,9 +243,9 @@ void Background::LoadFromSong( Song* pSong ) GetDirListing( VISUALIZATIONS_DIR + "*.mpeg", arrayPossibleMovies, false, true ); BGAnimation *pTempBGA = NULL; - if( arrayPossibleMovies.GetSize() > 0 ) + if( !arrayPossibleMovies.empty() ) { - int index = rand() % arrayPossibleMovies.GetSize(); + unsigned index = rand() % arrayPossibleMovies.size(); pTempBGA = new BGAnimation; pTempBGA->LoadFromVisualization( arrayPossibleMovies[index], sSongBackgroundPath ); } @@ -262,12 +262,12 @@ void Background::LoadFromSong( Song* pSong ) CStringArray arrayPossibleAnims; GetDirListing( BG_ANIMS_DIR+"*.*", arrayPossibleAnims, true, true ); // strip out "cvs" and "danger - for( int i=arrayPossibleAnims.GetSize()-1; i>=0; i-- ) + for( int i=arrayPossibleAnims.size()-1; i>=0; i-- ) if( 0==stricmp(arrayPossibleAnims[i].Right(3),"cvs") || 0==stricmp(arrayPossibleAnims[i].Right(3),"danger") ) arrayPossibleAnims.RemoveAt(i); - for( i=0; i<4 && arrayPossibleAnims.GetSize()>0; i++ ) + for( i=0; i<4 && !arrayPossibleAnims.empty(); i++ ) { - int index = rand() % arrayPossibleAnims.GetSize(); + unsigned index = rand() % arrayPossibleAnims.size(); BGAnimation *pTempBGA = new BGAnimation; pTempBGA->LoadFromAniDir( arrayPossibleAnims[index], sSongBackgroundPath ); m_BGAnimations.Add( pTempBGA ); @@ -281,9 +281,9 @@ void Background::LoadFromSong( Song* pSong ) GetDirListing( RANDOMMOVIES_DIR + "*.avi", arrayPossibleMovies, false, true ); GetDirListing( RANDOMMOVIES_DIR + "*.mpg", arrayPossibleMovies, false, true ); GetDirListing( RANDOMMOVIES_DIR + "*.mpeg", arrayPossibleMovies, false, true ); - for( int i=0; i<4 && arrayPossibleMovies.GetSize()>0; i++ ) + for( int i=0; i<4 && !arrayPossibleMovies.empty(); i++ ) { - int index = rand() % arrayPossibleMovies.GetSize(); + unsigned index = rand() % arrayPossibleMovies.size(); BGAnimation *pTempBGA = new BGAnimation; pTempBGA->LoadFromMovie( arrayPossibleMovies[index], true, false ); m_BGAnimations.Add( pTempBGA ); @@ -318,24 +318,24 @@ void Background::LoadFromSong( Song* pSong ) /* If we have only 2, only generate a single animation segment for for the * whole song. Otherwise, if it's a movie, it'll loop every four measures; we * want it to play continuously. */ - if( m_BGAnimations.GetSize() == 2) { + if( m_BGAnimations.size() == 2) { m_aBGSegments.Add( BGSegment(fFirstBeat,1,bFade) ); } else { // change BG every 4 bars for( float f=fFirstBeat; fm_BPMSegments.GetSize(); i++ ) + for( unsigned i=0; im_BPMSegments.size(); i++ ) { const BPMSegment& bpmseg = pSong->m_BPMSegments[i]; @@ -343,10 +343,10 @@ void Background::LoadFromSong( Song* pSong ) continue; // skip] int index; - if( m_BGAnimations.GetSize()==1 ) + if( m_BGAnimations.size()==1 ) index = 0; else - index = 1 + int(bpmseg.m_fBPM)%(m_BGAnimations.GetSize()-1); + index = 1 + int(bpmseg.m_fBPM)%(m_BGAnimations.size()-1); m_aBGSegments.Add( BGSegment(bpmseg.m_fStartBeat,index,bFade) ); } } @@ -358,7 +358,7 @@ void Background::LoadFromSong( Song* pSong ) SortBGSegmentArray( m_aBGSegments ); } - for( int i=0; iSetXY( (float)LEFT_EDGE, (float)TOP_EDGE ); m_BGAnimations[i]->SetZoomX( fXZoom ); @@ -385,12 +385,13 @@ void Background::Update( float fDeltaTime ) return; // Find the BGSegment we're in - for( int i=0; im_fSongBeat < m_aBGSegments[i+1].m_fStartBeat ) break; - ASSERT( i >= 0 && i= 0 && i m_iCurBGSegment ) + if( int(i) > m_iCurBGSegment ) { // printf( "%d, %d, %f, %f\n", m_iCurBGSegment, i, m_aBGSegments[i].m_fStartBeat, GAMESTATE->m_fSongBeat ); BGAnimation* pOld = GetCurBGA(); diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index 2ac68d5c10..662d3d652c 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -360,7 +360,7 @@ MusicWheel::MusicWheel() { CStringArray asGroupNames; SONGMAN->GetGroupNames( asGroupNames ); - if( asGroupNames.GetSize() > 0 ) + if( !asGroupNames.empty() ) { /* XXX: Do groups get added if they're empty? * This will select songs we can't use; we want the first song @@ -368,7 +368,7 @@ MusicWheel::MusicWheel() * -glenn */ CArray arraySongs; SONGMAN->GetSongsInGroup( asGroupNames[0], arraySongs ); - if( arraySongs.GetSize() > 0 ) // still nothing selected + if( !arraySongs.empty() ) // still nothing selected GAMESTATE->m_pCurSong = arraySongs[0]; // select the first song } } @@ -377,7 +377,7 @@ MusicWheel::MusicWheel() // Select the the previously selected song (if any) if( GAMESTATE->m_pCurSong ) { - for( int i=0; im_pCurSong ) { @@ -391,7 +391,7 @@ MusicWheel::MusicWheel() // Select the the previously selected course (if any) if( GAMESTATE->m_pCurCourse != NULL ) { - for( int i=0; im_pCurCourse ) { @@ -418,7 +418,7 @@ CArray& MusicWheel::GetCurWheelItemDatas() void MusicWheel::BuildWheelItemDatas( CArray &arrayWheelItemDatas, SongSortOrder so, bool bRoulette ) { - int i; + unsigned i; switch( GAMESTATE->m_PlayMode ) { @@ -430,7 +430,7 @@ void MusicWheel::BuildWheelItemDatas( CArray &arr CArray arraySongs; // copy only songs that have at least one Notes for the current GameMode - for( i=0; im_pSongs.GetSize(); i++ ) + for( i=0; im_pSongs.size(); i++ ) { Song* pSong = SONGMAN->m_pSongs[i]; @@ -448,7 +448,7 @@ void MusicWheel::BuildWheelItemDatas( CArray &arr CArray arraySteps; pSong->GetNotesThatMatch( GAMESTATE->GetCurrentStyleDef()->m_NotesType, arraySteps ); - if( arraySteps.GetSize() > 0 ) + if( !arraySteps.empty() ) arraySongs.Add( pSong ); } @@ -470,7 +470,7 @@ void MusicWheel::BuildWheelItemDatas( CArray &arr // break; case SORT_MOST_PLAYED: SortSongPointerArrayByMostPlayed( arraySongs ); - if( arraySongs.GetSize() > 30 ) + if( arraySongs.size() > 30 ) arraySongs.erase(arraySongs.begin()+30, arraySongs.end()); break; default: @@ -502,7 +502,7 @@ void MusicWheel::BuildWheelItemDatas( CArray &arr // make WheelItemDatas with sections CString sLastSection = ""; RageColor colorSection; - for( int i=0; i< arraySongs.GetSize(); i++ ) + for( unsigned i=0; i< arraySongs.size(); i++ ) { Song* pSong = arraySongs[i]; CString sThisSection = GetSectionNameFromSongAndSort( pSong, so ); @@ -523,7 +523,7 @@ void MusicWheel::BuildWheelItemDatas( CArray &arr } else { - for( int i=0; im_sPreferredGroup != "ALL MUSIC" && pSong->m_sGroupName != GAMESTATE->m_sPreferredGroup ) @@ -550,7 +550,7 @@ void MusicWheel::BuildWheelItemDatas( CArray &arr bool bFoundExtraSong = false; - for( int i=0; i &arr case PLAY_MODE_ONI: case PLAY_MODE_ENDLESS: { - int i; + unsigned i; CArray apCourses; switch( GAMESTATE->m_PlayMode ) { case PLAY_MODE_ONI: - for( i=0; im_aOniCourses.GetSize(); i++ ) + for( i=0; im_aOniCourses.size(); i++ ) apCourses.Add( &SONGMAN->m_aOniCourses[i] ); SortCoursePointerArrayByDifficulty( apCourses ); break; case PLAY_MODE_ENDLESS: - for( i=0; im_aEndlessCourses.GetSize(); i++ ) + for( i=0; im_aEndlessCourses.size(); i++ ) apCourses.Add( &SONGMAN->m_aEndlessCourses[i] ); break; } - for( int c=0; c &arr CStringArray asModifiers; pCourse->GetSongAndNotesForCurrentStyle( apSongs, apNotes, asModifiers, false ); - if( apNotes.GetSize() > 0 ) + if( !apNotes.empty() ) arrayWheelItemDatas.Add( WheelItemData(TYPE_COURSE, NULL, "", pCourse, pCourse->GetColor()) ); } } @@ -603,7 +603,7 @@ void MusicWheel::BuildWheelItemDatas( CArray &arr } // init crowns - for( i=0; i &arr if( so == SORT_MOST_PLAYED ) { // init crown icons - for( int i=0; i< min(3,arrayWheelItemDatas.GetSize()); i++ ) + for( i=0; i< min(3u,arrayWheelItemDatas.size()); i++ ) { WheelItemData& WID = arrayWheelItemDatas[i]; WID.m_IconType = MusicStatusDisplay::IconType(MusicStatusDisplay::crown1 + i); } } - - - if( arrayWheelItemDatas.GetSize() == 0 ) + if( arrayWheelItemDatas.empty() ) { arrayWheelItemDatas.Add( WheelItemData(TYPE_SECTION, NULL, "- EMPTY -", NULL, RageColor(1,0,0,1)) ); } @@ -684,7 +682,7 @@ void MusicWheel::RebuildWheelItemDisplays() { // rewind to first index that will be displayed; int iIndex = m_iSelection; - if( m_iSelection > GetCurWheelItemDatas().GetSize()-1 ) + if( m_iSelection > int(GetCurWheelItemDatas().size()-1) ) m_iSelection = 0; for( int i=0; i GetCurWheelItemDatas().GetSize()-1 ) + if( iIndex > int(GetCurWheelItemDatas().size()-1) ) iIndex = 0; } while( GetCurWheelItemDatas()[iIndex].m_WheelItemType == TYPE_SONG @@ -773,16 +771,16 @@ void MusicWheel::Update( float fDeltaTime ) { ActorFrame::Update( fDeltaTime ); - - for( int i=0; im_SongSortOrder == SORT_MOST_PLAYED ) { - for( i=0; i GetCurWheelItemDatas().GetSize()-1 ) + if( m_iSelection > int(GetCurWheelItemDatas().size()-1) ) m_iSelection = 0; } while( (GetCurWheelItemDatas()[m_iSelection].m_WheelItemType == TYPE_SONG || GetCurWheelItemDatas()[m_iSelection].m_WheelItemType == TYPE_COURSE) @@ -1123,7 +1121,7 @@ bool MusicWheel::Select() // return true of a playable item was chosen m_iSelection = 0; // reset in case we can't find the last selected song // find the section header and select it - for( int i=0; im_bPlayersCanJoin = true; GAMEMAN->GetGameplayStylesForGame( GAMESTATE->m_CurGame, m_aPossibleStyles ); - ASSERT( m_aPossibleStyles.GetSize() > 0 ); // every game should have at least one Style, or else why have the Game? :-) + ASSERT( !m_aPossibleStyles.empty() ); // every game should have at least one Style, or else why have the Game? :-) m_iSelection = 0; - for( int i=0; iGetPathTo("Graphics",ssprintf("select style icons %s",GAMESTATE->GetCurrentGameDef()->m_szName) ) ); m_sprIcon[i].StopAnimating(); @@ -80,7 +81,7 @@ ScreenSelectStyle::ScreenSelectStyle() const StyleDef* pStyleDef = GAMEMAN->GetStyleDefForStyle( m_aPossibleStyles[m_iSelection] ); // Load dummy Sprites - for( i=0; iGetPathTo("Graphics",ssprintf("select style preview %s %s",pGameDef->m_szName,pStyleDef->m_szName)) ); m_sprDummyInfo[i].Load( THEME->GetPathTo("Graphics",ssprintf("select style info %s %s",pGameDef->m_szName,pStyleDef->m_szName)) ); @@ -217,7 +218,7 @@ void ScreenSelectStyle::MenuRight( PlayerNumber pn ) { // search for a style to the right of the current selection that is enabled int iSwitchToStyleIndex = -1; // -1 means none found - for( int i=m_iSelection+1; im_asAdditionalSongFolders.GetSize(); i++ ) + for( unsigned i=0; im_asAdditionalSongFolders.size(); i++ ) LoadStepManiaSongDir( PREFSMAN->m_asAdditionalSongFolders[i], callback ); if( PREFSMAN->m_DWIPath != "" ) LoadStepManiaSongDir( PREFSMAN->m_DWIPath + "\\Songs", callback ); - LOG->Trace( "Found %d Songs.", m_pSongs.GetSize() ); + LOG->Trace( "Found %d Songs.", m_pSongs.size() ); } void SongManager::SanityCheckGroupDir( CString sDir ) const @@ -72,7 +72,7 @@ void SongManager::SanityCheckGroupDir( CString sDir ) const GetDirListing( sDir + "\\*.mp3", arrayFiles ); GetDirListing( sDir + "\\*.ogg", arrayFiles ); GetDirListing( sDir + "\\*.wav", arrayFiles ); - if( arrayFiles.GetSize() > 0 ) + if( !arrayFiles.empty() ) throw RageException( "The folder '%s' contains music files.\n\n" "This means that you have a music outside of a song folder.\n" @@ -85,11 +85,11 @@ void SongManager::SanityCheckGroupDir( CString sDir ) const void SongManager::AddGroup( CString sDir, CString sGroupDirName ) { - int j; - for(j = 0; j < m_arrayGroupNames.GetSize(); ++j) + unsigned j; + for(j = 0; j < m_arrayGroupNames.size(); ++j) if( sGroupDirName == m_arrayGroupNames[j] ) break; - if( j != m_arrayGroupNames.GetSize() ) + if( j != m_arrayGroupNames.size() ) return; /* the group is already added */ // Look for a group banner in this group folder @@ -100,7 +100,7 @@ void SongManager::AddGroup( CString sDir, CString sGroupDirName ) GetDirListing( ssprintf("%s\\%s\\*.bmp", sDir.GetString(), sGroupDirName.GetString()), arrayGroupBanners ); CString sBannerPath; - if( arrayGroupBanners.GetSize() > 0 ) + if( !arrayGroupBanners.empty() ) { sBannerPath = ssprintf("%s\\%s\\%s", sDir.GetString(), sGroupDirName.GetString(), arrayGroupBanners[0].GetString() ); LOG->Trace( "Group banner for '%s' is '%s'.", sGroupDirName.GetString(), sBannerPath.GetString() ); @@ -120,7 +120,7 @@ void SongManager::LoadStepManiaSongDir( CString sDir, void(*callback)() ) GetDirListing( sDir+"\\*.*", arrayGroupDirs, true ); SortCStringArray( arrayGroupDirs ); - for( int i=0; i< arrayGroupDirs.GetSize(); i++ ) // for each dir in /Songs/ + for( unsigned i=0; i< arrayGroupDirs.size(); i++ ) // for each dir in /Songs/ { CString sGroupDirName = arrayGroupDirs[i]; @@ -134,10 +134,10 @@ void SongManager::LoadStepManiaSongDir( CString sDir, void(*callback)() ) GetDirListing( ssprintf("%s\\%s\\*.*", sDir.GetString(), sGroupDirName.GetString()), arraySongDirs, true ); SortCStringArray( arraySongDirs ); - int j; + unsigned j; int loaded = 0; - for( j=0; j< arraySongDirs.GetSize(); j++ ) // for each song dir + for( j=0; j< arraySongDirs.size(); j++ ) // for each song dir { CString sSongDirName = arraySongDirs[j]; @@ -192,7 +192,7 @@ void SongManager::LoadDWISongDir( CString DWIHome ) GetDirListing( ssprintf("%s\\Songs\\*.*", DWIHome ), MixDirs.GetString(), true ); SortCStringArray( MixDirs ); - for( int i=0; i< MixDirs.GetSize(); i++ ) // for each dir in /Songs/ + for( unsigned i=0; i< MixDirs.size(); i++ ) // for each dir in /Songs/ { // the dir name will most likely be something like // Dance Dance Revolution 4th Mix, etc. @@ -203,14 +203,14 @@ void SongManager::LoadDWISongDir( CString DWIHome ) GetDirListing( ssprintf("%s\\Songs\\%s\\*.*", DWIHome.GetString(), MixDirs[i].GetString()), arrayDirs, true); SortCStringArray(arrayDirs, true); - for( int b = 0; b < arrayDirs.GetSize(); b++) + for( unsigned b = 0; b < arrayDirs.size(); b++) { // Find all DWIs in this directory CStringArray arrayDWIFiles; GetDirListing( ssprintf("%s\\Songs\\%s\\%s\\*.dwi", DWIHome.GetString(), MixDirs[i].GetString(), arrayDirs[b].GetString()), arrayDWIFiles, false); SortCStringArray( arrayDWIFiles ); - for( int j=0; j< arrayDWIFiles.GetSize(); j++ ) // for each DWI file + for( unsigned j=0; j< arrayDWIFiles.size(); j++ ) // for each DWI file { CString sDWIFileName = arrayDWIFiles[j]; sDWIFileName.MakeLower(); @@ -231,7 +231,7 @@ void SongManager::LoadDWISongDir( CString DWIHome ) void SongManager::FreeSongArray() { - for( int i=0; im_sSongDir == szSongDir ) // match! { @@ -297,7 +297,7 @@ void SongManager::ReadStatisticsFromDisk() // Search for the corresponding Notes pointer. Notes* pNotes = NULL; - for( i=0; im_apNotes.GetSize(); i++ ) + for( i=0; im_apNotes.size(); i++ ) { if( pSong->m_apNotes[i]->m_NotesType == notesType && pSong->m_apNotes[i]->m_sDescription == szNotesDescription ) // match! @@ -335,11 +335,11 @@ void SongManager::SaveStatisticsToDisk() ini.SetPath( g_sStatisticsFileName ); // save song statistics - for( int i=0; im_apNotes.GetSize(); j++ ) // for each Notes + for( unsigned j=0; jm_apNotes.size(); j++ ) // for each Notes { Notes* pNotes = pSong->m_apNotes[j]; @@ -367,11 +367,11 @@ void SongManager::SaveStatisticsToDisk() CString SongManager::GetGroupBannerPath( CString sGroupName ) { - int i; - for(i = 0; i < m_arrayGroupNames.GetSize(); ++i) + unsigned i; + for(i = 0; i < m_arrayGroupNames.size(); ++i) if( sGroupName == m_arrayGroupNames[i] ) break; - if( i == m_arrayGroupNames.GetSize() ) + if( i == m_arrayGroupNames.size() ) return ""; return m_GroupBannerPaths[i]; @@ -385,12 +385,13 @@ void SongManager::GetGroupNames( CStringArray &AddTo ) RageColor SongManager::GetGroupColor( const CString &sGroupName ) { // search for the group index - for( int i=0; im_apNotes.GetSize(); i++ ) + for( unsigned i=0; im_apNotes.size(); i++ ) { Notes* pNotes = pSong->m_apNotes[i]; if( pNotes->m_iMeter == 10 ) @@ -411,7 +412,7 @@ RageColor SongManager::GetSongColor( Song* pSong ) void SongManager::GetSongsInGroup( const CString sGroupName, CArray &AddTo ) { - for( int i=0; im_sGroupName ) @@ -447,7 +448,7 @@ void SongManager::InitCoursesFromDisk() // CStringArray saCourseFiles; GetDirListing( "Courses\\*.crs", saCourseFiles ); - for( int i=0; iGetGroupNames( saGroupNames ); - for( int g=0; g apGroupSongs; @@ -480,12 +482,12 @@ void SongManager::InitCoursesFromDisk() // // Load extra stages // - for( g=0; g apSongs; SONGMAN->GetSongsInGroup( GAMESTATE->m_sPreferredGroup, apSongs ); - for( int s=0; s apNotes; pSong->GetNotesThatMatch( sd->m_NotesType, apNotes ); - for( int n=0; nm_pSongs.GetSize() == 0 ) + if( SONGMAN->m_pSongs.empty() ) return false; int i; for( i=0; i<600; i++ ) // try 600 times { - Song* pSong = m_pSongs[ rand()%m_pSongs.GetSize() ]; + Song* pSong = m_pSongs[ rand()%m_pSongs.size() ]; - if( pSong->m_apNotes.GetSize() == 0 ) + if( pSong->m_apNotes.empty() ) continue; // skip if( !pSong->HasMusic() ) @@ -619,7 +621,7 @@ bool SongManager::ChooseRandomSong() for( int j=0; j<3; j++ ) // try 3 times { - Notes* pNotes = pSong->m_apNotes[ rand()%pSong->m_apNotes.GetSize() ]; + Notes* pNotes = pSong->m_apNotes[ rand()%pSong->m_apNotes.size() ]; if( pNotes->m_NotesType != GAMESTATE->GetCurrentStyleDef()->m_NotesType ) continue;