GameController_Invalid

This commit is contained in:
Glenn Maynard
2006-09-26 20:59:40 +00:00
parent d19fdc9caf
commit cf5dba03a4
10 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
}
+4 -4
View File
@@ -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 );
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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 )
+1 -1
View File
@@ -464,7 +464,7 @@ void LightsManager::GetFirstLitGameButtonLight( GameController &gcOut, GameButto
}
}
}
gcOut = GAME_CONTROLLER_INVALID;
gcOut = GameController_Invalid;
gbOut = GAME_BUTTON_INVALID;
}
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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" );
}