simplify (now InputMapper::ControllerToPlayerNumber logic is the

same as InputMapper::MenuToGame)
This commit is contained in:
Glenn Maynard
2006-09-30 05:52:06 +00:00
parent 13085923c5
commit 85fc5a2dfb
3 changed files with 2 additions and 18 deletions
+2 -2
View File
@@ -763,8 +763,8 @@ bool InputMapper::GameToDevice( const GameInput &GameI, int iSlotNum, DeviceInpu
PlayerNumber InputMapper::ControllerToPlayerNumber( GameController controller )
{
if( GAMESTATE->GetCurrentStyle() )
return GAMESTATE->GetCurrentStyle()->ControllerToPlayerNumber(controller);
if( GAMESTATE->GetCurrentStyle() && GAMESTATE->GetCurrentStyle()->m_StyleType == ONE_PLAYER_TWO_SIDES )
return GAMESTATE->m_MasterPlayerNumber;
else
return (PlayerNumber) controller;
}
-14
View File
@@ -68,20 +68,6 @@ int Style::GameInputToColumn( const GameInput &GameI ) const
}
PlayerNumber Style::ControllerToPlayerNumber( GameController controller ) const
{
switch( m_StyleType )
{
case ONE_PLAYER_ONE_SIDE:
case TWO_PLAYERS_TWO_SIDES:
case TWO_PLAYERS_SHARED_SIDES:
return (PlayerNumber)controller;
case ONE_PLAYER_TWO_SIDES:
return GAMESTATE->m_MasterPlayerNumber;
DEFAULT_FAIL( m_StyleType );
}
}
void Style::GetMinAndMaxColX( PlayerNumber pn, float& fMixXOut, float& fMaxXOut ) const
{
ASSERT( pn != PLAYER_INVALID );
-2
View File
@@ -57,8 +57,6 @@ public:
int GameInputToColumn( const GameInput &GameI ) const;
RString ColToButtonName( int iCol ) const;
PlayerNumber ControllerToPlayerNumber( GameController controller ) const;
void GetTransformedNoteDataForStyle( PlayerNumber pn, const NoteData& original, NoteData& noteDataOut ) const;
void GetMinAndMaxColX( PlayerNumber pn, float& fMixXOut, float& fMaxXOut ) const;