simplify (now InputMapper::ControllerToPlayerNumber logic is the
same as InputMapper::MenuToGame)
This commit is contained in:
@@ -763,8 +763,8 @@ bool InputMapper::GameToDevice( const GameInput &GameI, int iSlotNum, DeviceInpu
|
|||||||
|
|
||||||
PlayerNumber InputMapper::ControllerToPlayerNumber( GameController controller )
|
PlayerNumber InputMapper::ControllerToPlayerNumber( GameController controller )
|
||||||
{
|
{
|
||||||
if( GAMESTATE->GetCurrentStyle() )
|
if( GAMESTATE->GetCurrentStyle() && GAMESTATE->GetCurrentStyle()->m_StyleType == ONE_PLAYER_TWO_SIDES )
|
||||||
return GAMESTATE->GetCurrentStyle()->ControllerToPlayerNumber(controller);
|
return GAMESTATE->m_MasterPlayerNumber;
|
||||||
else
|
else
|
||||||
return (PlayerNumber) controller;
|
return (PlayerNumber) controller;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
void Style::GetMinAndMaxColX( PlayerNumber pn, float& fMixXOut, float& fMaxXOut ) const
|
||||||
{
|
{
|
||||||
ASSERT( pn != PLAYER_INVALID );
|
ASSERT( pn != PLAYER_INVALID );
|
||||||
|
|||||||
@@ -57,8 +57,6 @@ public:
|
|||||||
int GameInputToColumn( const GameInput &GameI ) const;
|
int GameInputToColumn( const GameInput &GameI ) const;
|
||||||
RString ColToButtonName( int iCol ) const;
|
RString ColToButtonName( int iCol ) const;
|
||||||
|
|
||||||
PlayerNumber ControllerToPlayerNumber( GameController controller ) const;
|
|
||||||
|
|
||||||
void GetTransformedNoteDataForStyle( PlayerNumber pn, const NoteData& original, NoteData& noteDataOut ) const;
|
void GetTransformedNoteDataForStyle( PlayerNumber pn, const NoteData& original, NoteData& noteDataOut ) const;
|
||||||
|
|
||||||
void GetMinAndMaxColX( PlayerNumber pn, float& fMixXOut, float& fMaxXOut ) const;
|
void GetMinAndMaxColX( PlayerNumber pn, float& fMixXOut, float& fMaxXOut ) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user