diff --git a/stepmania/src/Game.h b/stepmania/src/Game.h index 24a93c7a50..7c2ac3a253 100644 --- a/stepmania/src/Game.h +++ b/stepmania/src/Game.h @@ -48,7 +48,7 @@ public: char m_szButtonNames[MAX_GAME_BUTTONS][60]; // The name used by the button graphics system. e.g. "left", "right", "middle C", "snare" GameButton m_DedicatedMenuButton[NUM_MenuButton]; GameButton m_SecondaryMenuButton[NUM_MenuButton]; - DeviceButton m_iDefaultKeyboardKey[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS]; // default keyboard keys only have an effect the current game is this game + DeviceButton m_iDefaultKeyboardKey[NUM_GameController][MAX_GAME_BUTTONS]; // default keyboard keys only have an effect the current game is this game GameButton ButtonNameToIndex( const RString &sButtonName ) const; MenuButton GameInputToMenuButton( GameInput GameI ) const; diff --git a/stepmania/src/GameInput.cpp b/stepmania/src/GameInput.cpp index d873bd8369..7cfdc121db 100644 --- a/stepmania/src/GameInput.cpp +++ b/stepmania/src/GameInput.cpp @@ -10,7 +10,7 @@ static const char *GameControllerNames[] = { "Controller1", "Controller2", }; -XToString( GameController, MAX_GAME_CONTROLLERS ); +XToString( GameController, NUM_GameController ); StringToX( GameController ); diff --git a/stepmania/src/GameInput.h b/stepmania/src/GameInput.h index f1c405e88b..af7c507de5 100644 --- a/stepmania/src/GameInput.h +++ b/stepmania/src/GameInput.h @@ -11,10 +11,10 @@ enum GameController { GAME_CONTROLLER_1 = 0, // left controller GAME_CONTROLLER_2, // right controller - MAX_GAME_CONTROLLERS, // leave this at the end + NUM_GameController, // leave this at the end GAME_CONTROLLER_INVALID, }; -#define FOREACH_GameController( gc ) FOREACH_ENUM( GameController, MAX_GAME_CONTROLLERS, gc ) +#define FOREACH_GameController( gc ) FOREACH_ENUM( GameController, NUM_GameController, gc ) typedef int GameButton; RString GameButtonToString( const Game* pGame, GameButton i ); diff --git a/stepmania/src/GameManager.cpp b/stepmania/src/GameManager.cpp index b6aae9b952..999c0ce39a 100644 --- a/stepmania/src/GameManager.cpp +++ b/stepmania/src/GameManager.cpp @@ -1040,7 +1040,7 @@ static Style g_Styles[] = { TRACK_4, +DANCE_COL_SPACING*1.5f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 3, 2, 1, Style::END_MAPPING }, { 0, 3, 2, 1, Style::END_MAPPING } }, @@ -1118,7 +1118,7 @@ static Style g_Styles[] = { TRACK_8, +DANCE_COL_SPACING*3.5f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 3, 2, 1, Style::END_MAPPING }, { 4, 7, 6, 5, Style::END_MAPPING } }, @@ -1153,7 +1153,7 @@ static Style g_Styles[] = { TRACK_8, +DANCE_COL_SPACING*1.5f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 3, 2, 1, Style::END_MAPPING }, { 0, 3, 2, 1, Style::END_MAPPING } }, @@ -1192,7 +1192,7 @@ static Style g_Styles[] = { TRACK_6, +DANCE_COL_SPACING*2.5f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 5, 3, 2, 1, 4, Style::END_MAPPING }, { 0, 5, 3, 2, 1, 4, Style::END_MAPPING } }, @@ -1235,7 +1235,7 @@ static Style g_Styles[] = { TRACK_8, +DANCE_COL_SPACING*4.0f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 1, 2, 3, Style::END_MAPPING }, { 4, 5, 6, 7, Style::END_MAPPING }, }, @@ -1269,7 +1269,7 @@ static Style g_Styles[] = { TRACK_6, +DANCE_6PANEL_VERSUS_COL_SPACING*2.5f }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 5, 3, 2, 1, 4, Style::END_MAPPING }, { 0, 5, 3, 2, 1, 4, Style::END_MAPPING } }, @@ -1312,7 +1312,7 @@ static Style g_Styles[] = { TRACK_8, +DANCE_COL_SPACING*3.5f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 3, 2, 1, Style::END_MAPPING }, { 4, 7, 6, 5, Style::END_MAPPING } }, @@ -1350,7 +1350,7 @@ static Style g_Styles[] = { TRACK_5, +PUMP_COL_SPACING*2.0f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 1, 3, 2, 0, 4, Style::END_MAPPING }, { 1, 3, 2, 0, 4, Style::END_MAPPING }, }, @@ -1387,7 +1387,7 @@ static Style g_Styles[] = { TRACK_5, +PUMP_COL_SPACING*2.0f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 1, 3, 2, 0, 4, Style::END_MAPPING }, { 1, 3, 2, 0, 4, Style::END_MAPPING }, }, @@ -1426,7 +1426,7 @@ static Style g_Styles[] = { TRACK_6, +PUMP_COL_SPACING*2.5f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { Style::NO_MAPPING, 1, 0, Style::NO_MAPPING, 2, Style::END_MAPPING }, { 3, Style::NO_MAPPING, 5, 4, Style::NO_MAPPING, Style::END_MAPPING } }, @@ -1473,7 +1473,7 @@ static Style g_Styles[] = { TRACK_10, +PUMP_COL_SPACING*4.5f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 1, 3, 2, 0, 4, Style::END_MAPPING }, { 6, 8, 7, 5, 9, Style::END_MAPPING }, }, @@ -1510,7 +1510,7 @@ static Style g_Styles[] = { TRACK_10, +PUMP_COL_SPACING*2.0f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 1, 3, 2, 0, 4, Style::END_MAPPING }, { 1, 3, 2, 0, 4, Style::END_MAPPING }, }, @@ -1552,7 +1552,7 @@ static Style g_Styles[] = { TRACK_5, +PUMP_COL_SPACING*2.0f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 1, 3, 2, 0, 4, 6, 8, 7, 5, 9, Style::END_MAPPING }, { 1, 3, 2, 0, 4, 6, 8, 7, 5, 9, Style::END_MAPPING }, }, @@ -1589,7 +1589,7 @@ static Style g_Styles[] = { TRACK_5, +EZ2_COL_SPACING*2.0f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 4, 2, 1, 3, Style::END_MAPPING }, { 0, 4, 2, 1, 3, Style::END_MAPPING }, }, @@ -1630,7 +1630,7 @@ static Style g_Styles[] = { TRACK_7, +EZ2_REAL_COL_SPACING*3.0f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 6, 3, 2, 4, 1, 5, Style::END_MAPPING }, { 0, 6, 3, 2, 4, 1, 5, Style::END_MAPPING }, }, @@ -1667,7 +1667,7 @@ static Style g_Styles[] = { TRACK_5, +EZ2_COL_SPACING*2.0f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 4, 2, 1, 3, Style::END_MAPPING }, { 0, 4, 2, 1, 3, Style::END_MAPPING }, }, @@ -1708,7 +1708,7 @@ static Style g_Styles[] = { TRACK_7, +EZ2_REAL_COL_SPACING*3.0f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 6, 3, 2, 4, 1, 5, Style::END_MAPPING }, { 0, 6, 3, 2, 4, 1, 5, Style::END_MAPPING }, }, @@ -1755,7 +1755,7 @@ static Style g_Styles[] = { TRACK_10, +EZ2_COL_SPACING*4.5f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 4, 2, 1, 3, Style::END_MAPPING }, { 5, 9, 7, 6, 8, Style::END_MAPPING }, }, @@ -1792,7 +1792,7 @@ static Style g_Styles[] = { TRACK_5, +PARA_COL_SPACING*2.0f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 1, 2, 3, 4, Style::END_MAPPING }, { 0, 1, 2, 3, 4, Style::END_MAPPING }, }, @@ -1829,7 +1829,7 @@ static Style g_Styles[] = { TRACK_5, +PARA_COL_SPACING*2.0f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 1, 2, 3, 4, Style::END_MAPPING }, { 0, 1, 2, 3, 4, Style::END_MAPPING }, }, @@ -1872,7 +1872,7 @@ static Style g_Styles[] = { TRACK_8, +DS3DDX_COL_SPACING*3.0f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 1, 2, 3, 4, 5, 6, 7, Style::END_MAPPING }, { 0, 1, 2, 3, 4, 5, 6, 7, Style::END_MAPPING }, }, @@ -1911,7 +1911,7 @@ static Style g_Styles[] = { TRACK_6, +BEAT_COL_SPACING*3.0f, "scratch" }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 1, 2, 3, 4, Style::NO_MAPPING, Style::NO_MAPPING, 5, 5, Style::END_MAPPING }, { 0, 1, 2, 3, 4, Style::NO_MAPPING, Style::NO_MAPPING, 5, 5, Style::END_MAPPING } }, @@ -1962,7 +1962,7 @@ static Style g_Styles[] = { TRACK_12, +BEAT_COL_SPACING*6.0f, "scratch" }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 1, 2, 3, 4, Style::NO_MAPPING, Style::NO_MAPPING, 5, 5, Style::END_MAPPING }, { 5, 6, 7, 8, 9, Style::NO_MAPPING, Style::NO_MAPPING, 10, 10, Style::END_MAPPING } }, @@ -2005,7 +2005,7 @@ static Style g_Styles[] = { TRACK_8, +BEAT_COL_SPACING*4.0f, "scratch" }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 1, 2, 3, 4, 5, 6, 7, 0, 0, Style::END_MAPPING }, { 0, 1, 2, 3, 4, 5, 6, 7, 7, Style::END_MAPPING }, }, @@ -2064,7 +2064,7 @@ static Style g_Styles[] = { TRACK_16, +BEAT_COL_SPACING*8.0f, "scratch" }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 1, 2, 3, 4, 5, 6, 7, 0, 0, Style::END_MAPPING }, { 8, 9, 10, 11, 12, 13, 14, 15, 15, Style::END_MAPPING }, }, @@ -2099,7 +2099,7 @@ static Style g_Styles[] = { TRACK_4, +MANIAX_COL_SPACING*1.5f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 1, 2, 0, 3, Style::END_MAPPING }, { 1, 2, 0, 3, Style::END_MAPPING }, }, @@ -2134,7 +2134,7 @@ static Style g_Styles[] = { TRACK_4, +MANIAX_COL_SPACING*1.5f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 1, 2, 0, 3, Style::END_MAPPING }, { 1, 2, 0, 3, Style::END_MAPPING }, }, @@ -2177,7 +2177,7 @@ static Style g_Styles[] = { TRACK_8, +MANIAX_COL_SPACING*3.5f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 1, 2, 0, 3, Style::END_MAPPING }, { 5, 6, 4, 7, Style::END_MAPPING }, }, @@ -2212,7 +2212,7 @@ static Style g_Styles[] = { TRACK_4, +TECHNO_COL_SPACING*1.5f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 3, 2, 1, Style::END_MAPPING }, { 0, 3, 2, 1, Style::END_MAPPING }, }, @@ -2249,7 +2249,7 @@ static Style g_Styles[] = { TRACK_5, +TECHNO_COL_SPACING*2.0f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { Style::NO_MAPPING, Style::NO_MAPPING, Style::NO_MAPPING, Style::NO_MAPPING, 1, 3, 2, 0, 4, Style::END_MAPPING }, { Style::NO_MAPPING, Style::NO_MAPPING, Style::NO_MAPPING, Style::NO_MAPPING, @@ -2294,7 +2294,7 @@ static Style g_Styles[] = { TRACK_8, +TECHNO_COL_SPACING*2.5f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 1, 6, 4, 3, 2, 5, Style::NO_MAPPING, 0, 7, Style::END_MAPPING }, { 1, 6, 4, 3, 2, 5, Style::NO_MAPPING, 0, 7, Style::END_MAPPING }, }, @@ -2329,7 +2329,7 @@ static Style g_Styles[] = { TRACK_4, +TECHNO_COL_SPACING*1.5f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 3, 2, 1, Style::END_MAPPING }, { 0, 3, 2, 1, Style::END_MAPPING }, }, @@ -2366,7 +2366,7 @@ static Style g_Styles[] = { TRACK_5, +TECHNO_COL_SPACING*2.0f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { Style::NO_MAPPING, Style::NO_MAPPING, Style::NO_MAPPING, Style::NO_MAPPING, 1, 3, 2, 0, 4, Style::END_MAPPING }, { Style::NO_MAPPING, Style::NO_MAPPING, Style::NO_MAPPING, Style::NO_MAPPING, @@ -2411,7 +2411,7 @@ static Style g_Styles[] = { TRACK_8, +TECHNO_VERSUS_COL_SPACING*3.5f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 1, 6, 4, 3, 2, 5, Style::NO_MAPPING, 0, 7, Style::END_MAPPING }, { 1, 6, 4, 3, 2, 5, Style::NO_MAPPING, 0, 7, Style::END_MAPPING }, // { 1, 6, 4, Style::NO_MAPPING, 2, 5, Style::NO_MAPPING, 0, 7, Style::END_MAPPING }, @@ -2456,7 +2456,7 @@ static Style g_Styles[] = { TRACK_8, +TECHNO_COL_SPACING*3.5f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 3, 2, 1, Style::END_MAPPING }, { 4, 7, 6, 5, Style::END_MAPPING }, }, @@ -2503,7 +2503,7 @@ static Style g_Styles[] = { TRACK_10, +TECHNO_COL_SPACING*4.5f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { Style::NO_MAPPING, Style::NO_MAPPING, Style::NO_MAPPING, Style::NO_MAPPING, 1, 3, 2, 0, 4, Style::END_MAPPING }, { Style::NO_MAPPING, Style::NO_MAPPING, Style::NO_MAPPING, Style::NO_MAPPING, @@ -2542,7 +2542,7 @@ static Style g_Styles[] = { TRACK_5, +POPN5_COL_SPACING*2.0f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { Style::NO_MAPPING, Style::NO_MAPPING, 0, 1, 2, 3, 4, Style::END_MAPPING }, { Style::NO_MAPPING, Style::NO_MAPPING, 0, 1, 2, 3, 4, Style::END_MAPPING }, }, @@ -2587,7 +2587,7 @@ static Style g_Styles[] = { TRACK_9, +POPN9_COL_SPACING*4.0f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, Style::END_MAPPING }, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, Style::END_MAPPING }, }, @@ -2630,7 +2630,7 @@ static Style g_Styles[] = { TRACK_8, +DANCE_COL_SPACING*3.5f, NULL }, }, }, - { // m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS] + { // m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS] { 0, 1, 2, 3, 4, 5, 6, 7, 8, Style::END_MAPPING }, { 0, 1, 2, 3, 4, 5, 6, 7, 8, Style::END_MAPPING }, }, diff --git a/stepmania/src/InputMapper.cpp b/stepmania/src/InputMapper.cpp index c7fa415241..9a1d5ad612 100644 --- a/stepmania/src/InputMapper.cpp +++ b/stepmania/src/InputMapper.cpp @@ -481,7 +481,7 @@ void InputMapper::ApplyMapping( const Mapping *maps, GameController gc, InputDev /* If that pushed it over, then it's a second controller for a joystick * that's already a second controller, so we'll just ignore it. (This * can happen if eg. two primary Pump pads are connected.) */ - if( map_gc >= MAX_GAME_CONTROLLERS ) + if( map_gc >= NUM_GameController ) continue; } @@ -520,7 +520,7 @@ void InputMapper::AutoMapJoysticksForCurrentGame() // We have a mapping for this joystick // GameController gc = (GameController)iNumJoysticksMapped; - if( gc >= MAX_GAME_CONTROLLERS ) + if( gc >= NUM_GameController ) break; // stop mapping. We already mapped one device for each game controller. LOG->Info( "Applying default joystick mapping #%d for device '%s' (%s)", @@ -679,8 +679,8 @@ void InputMapper::SetInputMap( const DeviceInput &DeviceI, const GameInput &Game ClearFromInputMap( DeviceI ); ClearFromInputMap( GameI, iSlotIndex ); - ASSERT_M( GameI.controller < MAX_GAME_CONTROLLERS, - ssprintf("controller: %u >= %u", GameI.controller, MAX_GAME_CONTROLLERS) ); + ASSERT_M( GameI.controller < NUM_GameController, + ssprintf("controller: %u >= %u", GameI.controller, NUM_GameController) ); ASSERT_M( GameI.button < MAX_GAME_BUTTONS, ssprintf("button: %u >= %u", GameI.button, MAX_GAME_BUTTONS) ); ASSERT_M( iSlotIndex < NUM_GAME_TO_DEVICE_SLOTS, diff --git a/stepmania/src/InputMapper.h b/stepmania/src/InputMapper.h index 7357d83407..757e472d18 100644 --- a/stepmania/src/InputMapper.h +++ b/stepmania/src/InputMapper.h @@ -79,7 +79,7 @@ public: protected: // all the DeviceInputs that map to a GameInput - DeviceInput m_GItoDI[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS][NUM_GAME_TO_DEVICE_SLOTS]; + DeviceInput m_GItoDI[NUM_GameController][MAX_GAME_BUTTONS][NUM_GAME_TO_DEVICE_SLOTS]; void UpdateTempDItoGI(); }; diff --git a/stepmania/src/InputQueue.h b/stepmania/src/InputQueue.h index b5017d259d..dda441d184 100644 --- a/stepmania/src/InputQueue.h +++ b/stepmania/src/InputQueue.h @@ -21,7 +21,7 @@ public: bool AllWerePressedRecently( GameController c, const GameButton* buttons, int iNumButtons, float fMaxSecondsBack ); protected: - vector m_aQueue[MAX_GAME_CONTROLLERS]; + vector m_aQueue[NUM_GameController]; }; diff --git a/stepmania/src/LightsManager.h b/stepmania/src/LightsManager.h index 50227206a6..00ff1873d8 100644 --- a/stepmania/src/LightsManager.h +++ b/stepmania/src/LightsManager.h @@ -46,7 +46,7 @@ const RString& LightsModeToString( LightsMode lm ); struct LightsState { bool m_bCabinetLights[NUM_CABINET_LIGHTS]; - bool m_bGameButtonLights[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS]; + bool m_bGameButtonLights[NUM_GameController][MAX_GAME_BUTTONS]; }; class LightsDriver; @@ -81,7 +81,7 @@ private: void ChangeTestGameButtonLight( int iDir ); float m_fSecsLeftInCabinetLightBlink[NUM_CABINET_LIGHTS]; - float m_fSecsLeftInGameButtonBlink[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS]; + float m_fSecsLeftInGameButtonBlink[NUM_GameController][MAX_GAME_BUTTONS]; float m_fActorLights[NUM_CABINET_LIGHTS]; // current "power" of each actor light float m_fSecsLeftInActorLightBlink[NUM_CABINET_LIGHTS]; // duration to "power" an actor light diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 402c130555..f1ed478d90 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -1871,7 +1871,7 @@ void ScreenGameplay::UpdateLights() const Style* pStyle = GAMESTATE->GetCurrentStyle(); bool bBlinkCabinetLight[NUM_CABINET_LIGHTS]; - bool bBlinkGameButton[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS]; + bool bBlinkGameButton[NUM_GameController][MAX_GAME_BUTTONS]; ZERO( bBlinkCabinetLight ); ZERO( bBlinkGameButton ); bool bCrossedABeat = false; diff --git a/stepmania/src/ScreenMapControllers.cpp b/stepmania/src/ScreenMapControllers.cpp index 1112b63408..2adc17a202 100644 --- a/stepmania/src/ScreenMapControllers.cpp +++ b/stepmania/src/ScreenMapControllers.cpp @@ -356,7 +356,7 @@ void ScreenMapControllers::Input( const InputEventPlus &input ) case KEY_RIGHT: /* Move the selection right, wrapping down. */ if( m_iCurButton == (int) m_KeysToMap.size() ) break; // on exit - if( m_iCurSlot == NUM_CHANGABLE_SLOTS-1 && m_iCurController == MAX_GAME_CONTROLLERS-1 ) + if( m_iCurSlot == NUM_CHANGABLE_SLOTS-1 && m_iCurController == NUM_GameController-1 ) break; // can't go right any more BeforeChangeFocus(); m_iCurSlot++; diff --git a/stepmania/src/ScreenMapControllers.h b/stepmania/src/ScreenMapControllers.h index cb9f854eec..d496e84074 100644 --- a/stepmania/src/ScreenMapControllers.h +++ b/stepmania/src/ScreenMapControllers.h @@ -42,13 +42,13 @@ private: GameButton m_GameButton; // owned by m_Line - BitmapText *m_textMappedTo[MAX_GAME_CONTROLLERS][NUM_SHOWN_GAME_TO_DEVICE_SLOTS]; + BitmapText *m_textMappedTo[NUM_GameController][NUM_SHOWN_GAME_TO_DEVICE_SLOTS]; }; vector m_KeysToMap; BitmapText m_textDevices; - BitmapText m_textLabel[MAX_GAME_CONTROLLERS]; + BitmapText m_textLabel[NUM_GameController]; AutoActor m_sprExit; diff --git a/stepmania/src/Style.h b/stepmania/src/Style.h index ea5338cf02..4cc3fe8aee 100644 --- a/stepmania/src/Style.h +++ b/stepmania/src/Style.h @@ -47,7 +47,7 @@ public: /* This maps from game inputs to columns. More than one button may map to a * single column. */ enum { NO_MAPPING = -1, END_MAPPING = -2 }; - int m_iInputColumn[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS]; // maps each input to a column, or GAME_BUTTON_INVALID + int m_iInputColumn[NUM_GameController][MAX_GAME_BUTTONS]; // maps each input to a column, or GAME_BUTTON_INVALID int m_iColumnDrawOrder[MAX_COLS_PER_PLAYER]; bool m_bNeedsZoomOutWith2Players; bool m_bCanUseBeginnerHelper;