diff --git a/stepmania/src/CodeDetector.cpp b/stepmania/src/CodeDetector.cpp index 762c82f3b5..2e80beebe3 100644 --- a/stepmania/src/CodeDetector.cpp +++ b/stepmania/src/CodeDetector.cpp @@ -60,7 +60,7 @@ static CodeItem g_CodeItems[NUM_Code]; bool CodeItem::EnteredCode( GameController controller ) const { - if( controller == GAME_CONTROLLER_INVALID ) + if( controller == GameController_Invalid ) return false; if( buttons.size() == 0 ) return false; diff --git a/stepmania/src/GameInput.cpp b/stepmania/src/GameInput.cpp index 7cfdc121db..2375ea4232 100644 --- a/stepmania/src/GameInput.cpp +++ b/stepmania/src/GameInput.cpp @@ -47,7 +47,7 @@ bool GameInput::FromString( const Game* pGame, const RString &s ) if( 2 != sscanf( s, "%31[^_]_%31[^_]", szController, szButton ) ) { - controller = GAME_CONTROLLER_INVALID; + controller = GameController_Invalid; return false; } diff --git a/stepmania/src/GameInput.h b/stepmania/src/GameInput.h index af7c507de5..41e94c755e 100644 --- a/stepmania/src/GameInput.h +++ b/stepmania/src/GameInput.h @@ -12,7 +12,7 @@ enum GameController GAME_CONTROLLER_1 = 0, // left controller GAME_CONTROLLER_2, // right controller NUM_GameController, // leave this at the end - GAME_CONTROLLER_INVALID, + GameController_Invalid, }; #define FOREACH_GameController( gc ) FOREACH_ENUM( GameController, NUM_GameController, gc ) @@ -240,7 +240,7 @@ enum // LightsButtons struct GameInput { - GameInput(): controller(GAME_CONTROLLER_INVALID), button(GAME_BUTTON_INVALID) { } + GameInput(): controller(GameController_Invalid), button(GAME_BUTTON_INVALID) { } GameInput( GameController c, GameButton b ): controller(c), button(b) { } @@ -257,8 +257,8 @@ struct GameInput return button < other.button; } - inline bool IsValid() const { return controller != GAME_CONTROLLER_INVALID; }; - inline void MakeInvalid() { controller = GAME_CONTROLLER_INVALID; button = GAME_BUTTON_INVALID; }; + inline bool IsValid() const { return controller != GameController_Invalid; }; + inline void MakeInvalid() { controller = GameController_Invalid; button = GAME_BUTTON_INVALID; }; RString ToString( const Game* pGame ) const; bool FromString( const Game* pGame, const RString &s ); diff --git a/stepmania/src/InputMapper.cpp b/stepmania/src/InputMapper.cpp index 9a1d5ad612..0bab7edb77 100644 --- a/stepmania/src/InputMapper.cpp +++ b/stepmania/src/InputMapper.cpp @@ -752,7 +752,7 @@ void InputMapper::UpdateTempDItoGI() bool InputMapper::DeviceToGame( const DeviceInput &DeviceI, GameInput& GameI ) // return true if there is a mapping from device to pad { GameI = g_tempDItoGI[DeviceI]; - return GameI.controller != GAME_CONTROLLER_INVALID; + return GameI.controller != GameController_Invalid; } bool InputMapper::GameToDevice( const GameInput &GameI, int iSlotNum, DeviceInput& DeviceI ) // return true if there is a mapping from pad to device diff --git a/stepmania/src/InputQueue.cpp b/stepmania/src/InputQueue.cpp index 0c8d765d98..ba82bf2cc9 100644 --- a/stepmania/src/InputQueue.cpp +++ b/stepmania/src/InputQueue.cpp @@ -23,7 +23,7 @@ void InputQueue::RememberInput( const InputEventPlus &iep ) bool InputQueue::MatchesSequence( GameController c, const GameButton* button_sequence, const int iNumButtons, float fMaxSecondsBack ) { - if( c == GAME_CONTROLLER_INVALID ) + if( c == GameController_Invalid ) return false; if( fMaxSecondsBack == -1 ) diff --git a/stepmania/src/LightsManager.cpp b/stepmania/src/LightsManager.cpp index 5e91a26da9..f70d8a803a 100644 --- a/stepmania/src/LightsManager.cpp +++ b/stepmania/src/LightsManager.cpp @@ -464,7 +464,7 @@ void LightsManager::GetFirstLitGameButtonLight( GameController &gcOut, GameButto } } } - gcOut = GAME_CONTROLLER_INVALID; + gcOut = GameController_Invalid; gbOut = GAME_BUTTON_INVALID; } diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index f1ed478d90..b25954a54e 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -2091,7 +2091,7 @@ void ScreenGameplay::Input( const InputEventPlus &input ) /* If we're paused, only accept MENU_BUTTON_START to unpause. */ if( GAMESTATE->IsHumanPlayer(input.pn) && input.MenuI == MENU_BUTTON_START && input.type == IET_FIRST_PRESS ) { - if( m_PauseController == GAME_CONTROLLER_INVALID || m_PauseController == input.GameI.controller ) + if( m_PauseController == GameController_Invalid || m_PauseController == input.GameI.controller ) this->PauseGame( false ); } return; diff --git a/stepmania/src/ScreenGameplay.h b/stepmania/src/ScreenGameplay.h index 53787eff96..626ae067f9 100644 --- a/stepmania/src/ScreenGameplay.h +++ b/stepmania/src/ScreenGameplay.h @@ -141,7 +141,7 @@ protected: void LoadCourseSongNumber( int SongNumber ); float StartPlayingSong(float MinTimeToNotes, float MinTimeToMusic); void LoadLights(); - void PauseGame( bool bPause, GameController gc = GAME_CONTROLLER_INVALID ); + void PauseGame( bool bPause, GameController gc = GameController_Invalid ); void PlayAnnouncer( RString type, float fSeconds ); void UpdateLights(); void SendCrossedMessages(); diff --git a/stepmania/src/ScreenGameplaySyncMachine.cpp b/stepmania/src/ScreenGameplaySyncMachine.cpp index 91afabaac7..f5f4cf4f6d 100644 --- a/stepmania/src/ScreenGameplaySyncMachine.cpp +++ b/stepmania/src/ScreenGameplaySyncMachine.cpp @@ -61,7 +61,7 @@ void ScreenGameplaySyncMachine::Input( const InputEventPlus &input ) // Hack to make this work from Player2's controls InputEventPlus _input = input; - if( _input.GameI.controller != GAME_CONTROLLER_INVALID ) + if( _input.GameI.controller != GameController_Invalid ) _input.GameI.controller = GAME_CONTROLLER_1; if( _input.pn != PLAYER_INVALID ) _input.pn = PLAYER_1; diff --git a/stepmania/src/ScreenTestLights.cpp b/stepmania/src/ScreenTestLights.cpp index 63bba2e55f..5a2687a292 100644 --- a/stepmania/src/ScreenTestLights.cpp +++ b/stepmania/src/ScreenTestLights.cpp @@ -73,7 +73,7 @@ void ScreenTestLights::Update( float fDeltaTime ) else s += ssprintf( CABINET_LIGHT.GetValue()+": %d %s\n", cl, CabinetLightToString(cl).c_str() ); - if( gc == GAME_CONTROLLER_INVALID ) + if( gc == GameController_Invalid ) { s += ssprintf( CONTROLLER_LIGHT.GetValue()+": -----\n" ); }