From cc63cec6f62a642e636d5034166086bf47395918 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 24 Aug 2002 04:25:30 +0000 Subject: [PATCH] Fix braindead change on my part (though I don't think it actually broke anything) --- stepmania/src/GameManager.cpp | 49 +++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/stepmania/src/GameManager.cpp b/stepmania/src/GameManager.cpp index ae006dcef3..40841c2a03 100644 --- a/stepmania/src/GameManager.cpp +++ b/stepmania/src/GameManager.cpp @@ -28,6 +28,21 @@ const int EZ2_COL_SPACING = 46; const int EZ2_DOUBLE_ADJUST = 150; +struct { + char *name; + int NumTracks; +} const NotesTypes[NUM_NOTES_TYPES] = { + { "dance-single", 4 }, + { "dance-double", 8 }, + { "dance-couple", 8 }, + { "dance-solo", 6 }, + { "pump-single", 5 }, + { "pump-double", 5 }, + { "ez2-single", 5 }, // Single: TL,LHH,D,RHH,TR + { "ez2-single-hard", 5 }, // Single: TL,LHH,D,RHH,TR + { "ez2-double", 10 }, // Double: Single x2 + { "ez2-real", 7 } // Real: TL,LHH,LHL,D,RHL,RHH,TR +}; // // Important: Every game must define the buttons: "Start", "Back", "MenuLeft", and "MenuRight" @@ -972,21 +987,22 @@ void GameManager::GetEnabledGames( CArray& aGamesOut ) int GameManager::NotesTypeToNumTracks( NotesType nt ) { - for( int i=0; i= NUM_NOTES_TYPES) + { + // invalid NotesType + ASSERT(0); + return -1; + } + + return NotesTypes[nt].NumTracks; } NotesType GameManager::StringToNotesType( CString sNotesType ) { sNotesType.MakeLower(); - for( int i=0; i= NUM_NOTES_TYPES) + { + // invalid NotesType + ASSERT(0); + return ""; + } - // invalid NotesType - ASSERT(0); - return ""; + return NotesTypes[nt].name; } /* once we're sure the above lookups works, nuke this */