From 7b797a724bc96e00e1d2e677ae024b2b3b491ccf Mon Sep 17 00:00:00 2001 From: Andrew Livy Date: Thu, 20 Jun 2002 22:09:05 +0000 Subject: [PATCH] Some Changes Ready For Ez2dancer Support --- stepmania/src/AnnouncerManager.cpp | 1 + stepmania/src/GameConstantsAndTypes.h | 24 ++++- stepmania/src/GameManager.cpp | 132 +++++++++++++++++++++++++- stepmania/src/ScreenSelectGame.cpp | 16 +++- stepmania/src/ScreenSelectGame.h | 2 +- stepmania/src/StepMania.dsp | 4 - 6 files changed, 166 insertions(+), 13 deletions(-) diff --git a/stepmania/src/AnnouncerManager.cpp b/stepmania/src/AnnouncerManager.cpp index 571945e0aa..a84352bdde 100644 --- a/stepmania/src/AnnouncerManager.cpp +++ b/stepmania/src/AnnouncerManager.cpp @@ -18,6 +18,7 @@ AnnouncerManager* ANNOUNCER = NULL; // global object accessable from anywhere in const CString DEFAULT_ANNOUNCER_NAME = "default"; +const CString EZ2_ANNOUNCER_NAME = "ez2"; const CString ANNOUNER_BASE_DIR = "Announcers\\"; diff --git a/stepmania/src/GameConstantsAndTypes.h b/stepmania/src/GameConstantsAndTypes.h index fd8027fc4b..2f9c7919fb 100644 --- a/stepmania/src/GameConstantsAndTypes.h +++ b/stepmania/src/GameConstantsAndTypes.h @@ -153,6 +153,9 @@ enum NotesType NOTES_TYPE_DANCE_SOLO, NOTES_TYPE_PUMP_SINGLE, NOTES_TYPE_PUMP_DOUBLE, + NOTES_TYPE_EZ2_SINGLE, + NOTES_TYPE_EZ2_DOUBLE, + NOTES_TYPE_EZ2_REAL, NUM_NOTES_TYPES, // leave this at the end NOTES_TYPE_INVALID, }; @@ -167,6 +170,9 @@ inline int NotesTypeToNumColumns( NotesType nt ) case NOTES_TYPE_DANCE_SOLO: return 6; case NOTES_TYPE_PUMP_SINGLE: return 5; case NOTES_TYPE_PUMP_DOUBLE: return 10; + case NOTES_TYPE_EZ2_SINGLE: return 5; // Single: TL,LHH,D,RHH,TR + case NOTES_TYPE_EZ2_DOUBLE: return 10; // Double: Single x2 + case NOTES_TYPE_EZ2_REAL: return 7; // Real: TL,LHH,LHL,D,RHL,RHH,TR default: ASSERT(0); return -1; // invalid NotesType } } @@ -179,6 +185,9 @@ inline NotesType StringToNotesType( CString sNotesType ) else if( sNotesType == "dance-solo" ) return NOTES_TYPE_DANCE_SOLO; else if( sNotesType == "pump-single" ) return NOTES_TYPE_PUMP_SINGLE; else if( sNotesType == "pump-double" ) return NOTES_TYPE_PUMP_DOUBLE; + else if( sNotesType == "ez2-single" ) return NOTES_TYPE_EZ2_SINGLE; + else if( sNotesType == "ez2-double" ) return NOTES_TYPE_EZ2_DOUBLE; + else if( sNotesType == "ez2-real" ) return NOTES_TYPE_EZ2_REAL; else ASSERT(0); return NOTES_TYPE_DANCE_SINGLE; // invalid NotesType } @@ -192,6 +201,9 @@ inline CString NotesTypeToString( NotesType nt ) case NOTES_TYPE_DANCE_SOLO: return "dance-solo"; case NOTES_TYPE_PUMP_SINGLE: return "pump-single"; case NOTES_TYPE_PUMP_DOUBLE: return "pump-double"; + case NOTES_TYPE_EZ2_SINGLE: return "ez2-single"; + case NOTES_TYPE_EZ2_DOUBLE: return "ez2-double"; + case NOTES_TYPE_EZ2_REAL: return "ez2-real"; default: ASSERT(0); return ""; // invalid NotesType } } @@ -240,8 +252,9 @@ enum SongSortOrder { /////////////////////////////// enum Game { - GAME_DANCE, - GAME_PUMP, + GAME_DANCE, // Dance Dance Revolution + GAME_PUMP, // Pump It Up + GAME_EZ2, // Ez2dancer NUM_GAMES, // leave this at the end GAME_NONE, }; @@ -256,6 +269,9 @@ enum Style STYLE_PUMP_SINGLE, STYLE_PUMP_VERSUS, STYLE_PUMP_DOUBLE, + STYLE_EZ2_SINGLE, + STYLE_EZ2_DOUBLE, + STYLE_EZ2_REAL, NUM_STYLES, // leave this at the end STYLE_NONE, }; @@ -274,6 +290,10 @@ inline Game StyleToGame( Style s ) case STYLE_PUMP_VERSUS: case STYLE_PUMP_DOUBLE: return GAME_PUMP; + case STYLE_EZ2_SINGLE: + case STYLE_EZ2_DOUBLE: + case STYLE_EZ2_REAL: + return GAME_EZ2; default: ASSERT(0); // invalid Style return GAME_DANCE; diff --git a/stepmania/src/GameManager.cpp b/stepmania/src/GameManager.cpp index 16c1244330..82521767b3 100644 --- a/stepmania/src/GameManager.cpp +++ b/stepmania/src/GameManager.cpp @@ -34,11 +34,20 @@ InstrumentButton PUMP_BUTTON_DOWNRIGHT = (InstrumentButton)4; InstrumentButton PUMP_BUTTON_SELECT = (InstrumentButton)5; int NUM_PUMP_BUTTONS = 6; +InstrumentButton EZ2_BUTTON_UPLEFT = (InstrumentButton)0; +InstrumentButton EZ2_BUTTON_UPLEFTHAND = (InstrumentButton)1; +InstrumentButton EZ2_BUTTON_LRLEFTHAND = (InstrumentButton)2; +InstrumentButton EZ2_BUTTON_DOWN = (InstrumentButton)3; +InstrumentButton EZ2_BUTTON_LRRIGHTHAND = (InstrumentButton)4; +InstrumentButton EZ2_BUTTON_UPRIGHTHAND = (InstrumentButton)5; +InstrumentButton EZ2_BUTTON_UPRIGHT = (InstrumentButton)6; +InstrumentButton EZ2_BUTTON_SELECT = (InstrumentButton)7; +int NUM_EZ2_BUTTONS = 8; const int DANCE_COL_SPACING = 64; const int DANCE_6PANEL_VERSUS_COL_SPACING = 54; const int PUMP_COL_SPACING = 60; - +const int EZ2_COL_SPACING = 60; // CHANGE THIS LATER (Actually don't know colspaces yet) GameDef g_GameDefs[NUM_GAMES] = { @@ -66,11 +75,11 @@ GameDef g_GameDefs[NUM_GAMES] = DANCE_BUTTON_SELECT, // MENU_BUTTON_BACK }, }, - { // GAME_DANCE + { // GAME_PUMP "pump", // m_szName "Pump It Up", // m_szDescription 2, // m_iNumInstruments - NUM_DANCE_BUTTONS, // m_iButtonsPerInstrument + NUM_DANCE_BUTTONS, // m_iButtonsPerInstrument //? DANCE buttons (from Andy) { // m_szButtonNames "UpLeft", "UpRight", @@ -88,6 +97,28 @@ GameDef g_GameDefs[NUM_GAMES] = PUMP_BUTTON_SELECT, // MENU_BUTTON_BACK }, }, + { // GAME_EZ2 + "ez2", // m_szName + "Ez2dancer", // m_szDescription + 2, // m_iNumInstruments + NUM_DANCE_BUTTONS, // m_iButtonsPerInstrument // If it works, i'll go with it, but i'm a bit unsure here... + { // m_szButtonNames + "UpLeftHand", + "UpRightHand", + "LrLeftHand", + "LrRightHand", + "Down", + "Back" + }, + { // m_iMenuButtons[NUM_MENU_BUTTONS]; // map from MenuButton to m_szButtonNames + EZ2_BUTTON_UPLEFTHAND, // MENU_BUTTON_LEFT + EZ2_BUTTON_UPRIGHTHAND, // MENU_BUTTON_RIGHT + EZ2_BUTTON_LRLEFTHAND, // MENU_BUTTON_UP + EZ2_BUTTON_LRRIGHTHAND, // MENU_BUTTON_DOWN + EZ2_BUTTON_DOWN, // MENU_BUTTON_START + EZ2_BUTTON_SELECT, // MENU_BUTTON_BACK + }, + }, }; @@ -342,6 +373,101 @@ StyleDef g_StyleDefs[NUM_STYLES] = 0,2,4,1,3,5,7,9,6,8 }, }, + + + { // EZ2_STYLE_SINGLE + "ez2-single", // m_szName + NOTES_TYPE_EZ2_SINGLE, // m_NotesType + StyleDef::ONE_PLAYER_USES_ONE_SIDE, // m_StyleType + { 160, 480 }, // m_iCenterX + 5, // m_iColsPerPlayer + { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; + { // PLAYER_1 + { TRACK_1, INSTRUMENT_1, EZ2_BUTTON_UPLEFT, -EZ2_COL_SPACING*2 }, // CHANGE THESE WHEN WE CAN SEE THE + { TRACK_2, INSTRUMENT_1, EZ2_BUTTON_UPLEFTHAND, -EZ2_COL_SPACING*1 }, // NOTES IN-GAME !!!!!!!!!! + { TRACK_3, INSTRUMENT_1, EZ2_BUTTON_DOWN, +EZ2_COL_SPACING*0 }, + { TRACK_4, INSTRUMENT_1, EZ2_BUTTON_UPRIGHTHAND, +EZ2_COL_SPACING*1 }, + { TRACK_5, INSTRUMENT_1, EZ2_BUTTON_UPRIGHT, +EZ2_COL_SPACING*2 }, + }, + { // PLAYER_2 + { TRACK_1, INSTRUMENT_1, EZ2_BUTTON_UPLEFT, -EZ2_COL_SPACING*2 }, // CHANGE THESE WHEN WE CAN SEE THE + { TRACK_2, INSTRUMENT_1, EZ2_BUTTON_UPLEFTHAND, -EZ2_COL_SPACING*1 }, // NOTES IN-GAME !!!!!!!!!! + { TRACK_3, INSTRUMENT_1, EZ2_BUTTON_DOWN, +EZ2_COL_SPACING*0 }, + { TRACK_4, INSTRUMENT_1, EZ2_BUTTON_UPRIGHTHAND, +EZ2_COL_SPACING*1 }, + { TRACK_5, INSTRUMENT_1, EZ2_BUTTON_UPRIGHT, +EZ2_COL_SPACING*2 }, + }, + }, + { // m_iColumnDrawOrder[MAX_COLS_PER_PLAYER]; + 2,0,4,1,3 // This should be from back to front: Down, UpLeft, UpRight, Upper Left Hand, Upper Right Hand + }, + }, + { // EZ2_STYLE_DOUBLE + "ez2-double", // m_szName + NOTES_TYPE_EZ2_DOUBLE, // m_NotesType + StyleDef::ONE_PLAYER_USES_TWO_SIDES, // m_StyleType + { 160, 480 }, // m_iCenterX + 10, // m_iColsPerPlayer + { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; + { // PLAYER_1 + { TRACK_1, INSTRUMENT_1, EZ2_BUTTON_UPLEFT, -EZ2_COL_SPACING*4.5f }, // CHANGE THESE WHEN WE CAN SEE THE + { TRACK_2, INSTRUMENT_1, EZ2_BUTTON_UPLEFTHAND, -EZ2_COL_SPACING*3.5f }, // NOTES IN-GAME !!!!!!!!!! + { TRACK_3, INSTRUMENT_1, EZ2_BUTTON_DOWN, -EZ2_COL_SPACING*2.5f }, + { TRACK_4, INSTRUMENT_1, EZ2_BUTTON_UPRIGHTHAND, -EZ2_COL_SPACING*1.5f }, + { TRACK_5, INSTRUMENT_1, EZ2_BUTTON_UPRIGHT, -EZ2_COL_SPACING*0.5f }, + { TRACK_6, INSTRUMENT_1, EZ2_BUTTON_UPLEFT, +EZ2_COL_SPACING*0.5f }, + { TRACK_7, INSTRUMENT_1, EZ2_BUTTON_UPLEFTHAND, +EZ2_COL_SPACING*1.5f }, + { TRACK_8, INSTRUMENT_1, EZ2_BUTTON_DOWN, +EZ2_COL_SPACING*2.5f }, + { TRACK_9, INSTRUMENT_1, EZ2_BUTTON_UPRIGHTHAND, +EZ2_COL_SPACING*3.5f }, + { TRACK_10, INSTRUMENT_1, EZ2_BUTTON_UPRIGHT, +EZ2_COL_SPACING*4.5f }, + }, + { // PLAYER_2 + { TRACK_1, INSTRUMENT_1, EZ2_BUTTON_UPLEFT, -EZ2_COL_SPACING*4.5f }, // CHANGE THESE WHEN WE CAN SEE THE + { TRACK_2, INSTRUMENT_1, EZ2_BUTTON_UPLEFTHAND, -EZ2_COL_SPACING*3.5f }, // NOTES IN-GAME !!!!!!!!!! + { TRACK_3, INSTRUMENT_1, EZ2_BUTTON_DOWN, -EZ2_COL_SPACING*2.5f }, + { TRACK_4, INSTRUMENT_1, EZ2_BUTTON_UPRIGHTHAND, -EZ2_COL_SPACING*1.5f }, + { TRACK_5, INSTRUMENT_1, EZ2_BUTTON_UPRIGHT, -EZ2_COL_SPACING*0.5f }, + { TRACK_6, INSTRUMENT_1, EZ2_BUTTON_UPLEFT, +EZ2_COL_SPACING*0.5f }, + { TRACK_7, INSTRUMENT_1, EZ2_BUTTON_UPLEFTHAND, +EZ2_COL_SPACING*1.5f }, + { TRACK_8, INSTRUMENT_1, EZ2_BUTTON_DOWN, +EZ2_COL_SPACING*2.5f }, + { TRACK_9, INSTRUMENT_1, EZ2_BUTTON_UPRIGHTHAND, +EZ2_COL_SPACING*3.5f }, + { TRACK_10, INSTRUMENT_1, EZ2_BUTTON_UPRIGHT, +EZ2_COL_SPACING*4.5f }, + }, + }, + { // m_iColumnDrawOrder[MAX_COLS_PER_PLAYER]; + 2,0,4,1,3 // This should be from back to front: Down, UpLeft, UpRight, Upper Left Hand, Upper Right Hand + }, + }, + { // EZ2_STYLE_REAL + "ez2-real", // m_szName + NOTES_TYPE_EZ2_REAL, // m_NotesType + StyleDef::ONE_PLAYER_USES_ONE_SIDE, // m_StyleType + { 160, 480 }, // m_iCenterX + 7, // m_iColsPerPlayer + { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; + { // PLAYER_1 + { TRACK_1, INSTRUMENT_1, EZ2_BUTTON_UPLEFT, -EZ2_COL_SPACING*3 }, // CHANGE THESE WHEN WE CAN SEE THE + { TRACK_2, INSTRUMENT_1, EZ2_BUTTON_UPLEFTHAND, -EZ2_COL_SPACING*2 }, // NOTES IN-GAME !!!!!!!!!! + { TRACK_3, INSTRUMENT_1, EZ2_BUTTON_LRLEFTHAND, -EZ2_COL_SPACING*1 }, + { TRACK_4, INSTRUMENT_1, EZ2_BUTTON_DOWN, +EZ2_COL_SPACING*0 }, + { TRACK_5, INSTRUMENT_1, EZ2_BUTTON_LRRIGHTHAND, +EZ2_COL_SPACING*1 }, + { TRACK_6, INSTRUMENT_1, EZ2_BUTTON_UPRIGHTHAND, +EZ2_COL_SPACING*2 }, + { TRACK_7, INSTRUMENT_1, EZ2_BUTTON_UPRIGHT, +EZ2_COL_SPACING*3 }, + }, + { // PLAYER_2 + { TRACK_1, INSTRUMENT_1, EZ2_BUTTON_UPLEFT, -EZ2_COL_SPACING*3 }, // CHANGE THESE WHEN WE CAN SEE THE + { TRACK_2, INSTRUMENT_1, EZ2_BUTTON_UPLEFTHAND, -EZ2_COL_SPACING*2 }, // NOTES IN-GAME !!!!!!!!!! + { TRACK_3, INSTRUMENT_1, EZ2_BUTTON_LRLEFTHAND, -EZ2_COL_SPACING*1 }, + { TRACK_4, INSTRUMENT_1, EZ2_BUTTON_DOWN, +EZ2_COL_SPACING*0 }, + { TRACK_5, INSTRUMENT_1, EZ2_BUTTON_LRRIGHTHAND, +EZ2_COL_SPACING*1 }, + { TRACK_6, INSTRUMENT_1, EZ2_BUTTON_UPRIGHTHAND, +EZ2_COL_SPACING*2 }, + { TRACK_7, INSTRUMENT_1, EZ2_BUTTON_UPRIGHT, +EZ2_COL_SPACING*3 }, + }, + }, + { // m_iColumnDrawOrder[MAX_COLS_PER_PLAYER]; + 3,0,6,2,4,1,5 // This should be from back to front: Down, UpLeft, UpRight, Lower Left Hand, Lower Right Hand, Upper Left Hand, Upper Right Hand + }, + }, + }; diff --git a/stepmania/src/ScreenSelectGame.cpp b/stepmania/src/ScreenSelectGame.cpp index 125854e489..1d3397e815 100644 --- a/stepmania/src/ScreenSelectGame.cpp +++ b/stepmania/src/ScreenSelectGame.cpp @@ -24,7 +24,7 @@ #include "RageLog.h" #include "GameManager.h" #include "string.h" - +#include "AnnouncerManager.h" enum { @@ -75,8 +75,18 @@ void ScreenSelectGame::ExportOptions() Game game = (Game)m_iSelectedOption[0][SG_GAME]; switch( game ) { - case GAME_DANCE: GAMEMAN->m_CurStyle = STYLE_DANCE_SINGLE; break; - case GAME_PUMP: GAMEMAN->m_CurStyle = STYLE_PUMP_SINGLE; break; + case GAME_DANCE: + GAMEMAN->m_CurStyle = STYLE_DANCE_SINGLE; + ANNOUNCER->SwitchAnnouncer( "default" ); + break; + case GAME_PUMP: + GAMEMAN->m_CurStyle = STYLE_PUMP_SINGLE; + ANNOUNCER->SwitchAnnouncer( "default" ); + break; + case GAME_EZ2: + GAMEMAN->m_CurStyle = STYLE_EZ2_SINGLE; + ANNOUNCER->SwitchAnnouncer( "ez2" ); + break; default: ASSERT(0); // invalid Game } diff --git a/stepmania/src/ScreenSelectGame.h b/stepmania/src/ScreenSelectGame.h index 24d18472b2..d0c373c9aa 100644 --- a/stepmania/src/ScreenSelectGame.h +++ b/stepmania/src/ScreenSelectGame.h @@ -15,7 +15,7 @@ #include "RandomSample.h" #include "TransitionFade.h" #include "Quad.h" - +#include "AnnouncerManager.h" class ScreenSelectGame : public ScreenOptions { diff --git a/stepmania/src/StepMania.dsp b/stepmania/src/StepMania.dsp index 61fe265db8..00e2022d09 100644 --- a/stepmania/src/StepMania.dsp +++ b/stepmania/src/StepMania.dsp @@ -1032,10 +1032,6 @@ SOURCE=.\ScreenTitleMenu.h # PROP Default_Filter "" # Begin Source File -SOURCE=.\AnnouncerManager.cpp -# End Source File -# Begin Source File - SOURCE=.\AnnouncerManager.h # End Source File # Begin Source File