phase out StyleI.player
This commit is contained in:
@@ -97,7 +97,7 @@ RString Game::ColToButtonName( int col ) const
|
||||
return pzColumnName;
|
||||
|
||||
StyleInput SI( PLAYER_1, col );
|
||||
GameInput GI = pStyle->StyleInputToGameInput( SI );
|
||||
GameInput GI = pStyle->StyleInputToGameInput( SI, PLAYER_1 );
|
||||
|
||||
return m_szButtonNames[GI.button];
|
||||
}
|
||||
|
||||
@@ -791,7 +791,7 @@ void InputMapper::GameToMenu( const GameInput &GameI, MenuInput &MenuI )
|
||||
void InputMapper::StyleToGame( const StyleInput &StyleI, PlayerNumber pn, GameInput &GameI )
|
||||
{
|
||||
const Style* pStyle = GAMESTATE->GetCurrentStyle();
|
||||
GameI = pStyle->StyleInputToGameInput( StyleI );
|
||||
GameI = pStyle->StyleInputToGameInput( StyleI, pn );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ static void GetUsedGameInputs( vector<GameInput> &vGameInputsOut )
|
||||
for( int i=0; i<(*style)->m_iColsPerPlayer; i++ )
|
||||
{
|
||||
StyleInput si( pn, i );
|
||||
GameInput gi = (*style)->StyleInputToGameInput( si );
|
||||
GameInput gi = (*style)->StyleInputToGameInput( si, pn );
|
||||
if( gi.IsValid() )
|
||||
{
|
||||
vGIs.insert( gi );
|
||||
|
||||
@@ -1896,7 +1896,7 @@ void ScreenGameplay::UpdateLights()
|
||||
if( bBlink )
|
||||
{
|
||||
StyleInput si( pi->m_pn, t );
|
||||
GameInput gi = pStyle->StyleInputToGameInput( si );
|
||||
GameInput gi = pStyle->StyleInputToGameInput( si, pi->m_pn );
|
||||
bBlinkGameButton[gi.controller][gi.button] = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ void ScreenNameEntry::Init()
|
||||
|
||||
/* Find out if this column is associated with the START menu button. */
|
||||
StyleInput si(p, t);
|
||||
GameInput gi=GAMESTATE->GetCurrentStyle()->StyleInputToGameInput(si);
|
||||
GameInput gi=GAMESTATE->GetCurrentStyle()->StyleInputToGameInput(si, p);
|
||||
MenuInput m=GAMESTATE->GetCurrentGame()->GameInputToMenuInput(gi);
|
||||
if(m.button == MENU_BUTTON_START)
|
||||
continue;
|
||||
|
||||
@@ -38,15 +38,15 @@ void Style::GetTransformedNoteDataForStyle( PlayerNumber pn, const NoteData& ori
|
||||
noteDataOut.LoadTransformed( original, m_iColsPerPlayer, iNewToOriginalTrack );
|
||||
}
|
||||
|
||||
GameInput Style::StyleInputToGameInput( const StyleInput& StyleI ) const
|
||||
GameInput Style::StyleInputToGameInput( const StyleInput& StyleI, PlayerNumber pn ) const
|
||||
{
|
||||
ASSERT_M( StyleI.player < NUM_PLAYERS && StyleI.col < MAX_COLS_PER_PLAYER,
|
||||
ssprintf("P%i C%i", StyleI.player, StyleI.col) );
|
||||
ASSERT_M( pn < NUM_PLAYERS && StyleI.col < MAX_COLS_PER_PLAYER,
|
||||
ssprintf("P%i C%i", pn, StyleI.col) );
|
||||
bool bUsingOneSide = m_StyleType != ONE_PLAYER_TWO_SIDES && m_StyleType != TWO_PLAYERS_SHARED_SIDES;
|
||||
|
||||
FOREACH_GameController(gc)
|
||||
{
|
||||
if( bUsingOneSide && gc != (int) StyleI.player )
|
||||
if( bUsingOneSide && gc != (int) pn )
|
||||
continue;
|
||||
|
||||
for( int i = 0; i < m_pGame->m_iButtonsPerController && m_iInputColumn[gc][i] != END_MAPPING; ++i )
|
||||
@@ -54,7 +54,7 @@ GameInput Style::StyleInputToGameInput( const StyleInput& StyleI ) const
|
||||
return GameInput( gc, i );
|
||||
}
|
||||
|
||||
FAIL_M( ssprintf("Unknown StyleInput %i,%i", StyleI.player, StyleI.col) );
|
||||
FAIL_M( ssprintf("Unknown StyleInput %i,%i", pn, StyleI.col) );
|
||||
};
|
||||
|
||||
StyleInput Style::GameInputToStyleInput( const GameInput &GameI ) const
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
bool m_bCanUseBeginnerHelper;
|
||||
bool m_bLockDifficulties; // used in couple Styles
|
||||
|
||||
GameInput StyleInputToGameInput( const StyleInput& StyleI ) const;
|
||||
GameInput StyleInputToGameInput( const StyleInput& StyleI, PlayerNumber pn ) const;
|
||||
StyleInput GameInputToStyleInput( const GameInput &GameI ) const;
|
||||
|
||||
PlayerNumber ControllerToPlayerNumber( GameController controller ) const;
|
||||
|
||||
Reference in New Issue
Block a user