diff --git a/stepmania/src/Game.cpp b/stepmania/src/Game.cpp index bfd9db94c8..6a8d5eb95a 100644 --- a/stepmania/src/Game.cpp +++ b/stepmania/src/Game.cpp @@ -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]; } diff --git a/stepmania/src/InputMapper.cpp b/stepmania/src/InputMapper.cpp index 168edf9ec3..1ccc490b63 100644 --- a/stepmania/src/InputMapper.cpp +++ b/stepmania/src/InputMapper.cpp @@ -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 ); } diff --git a/stepmania/src/LightsManager.cpp b/stepmania/src/LightsManager.cpp index 859037fb56..df433fe6af 100644 --- a/stepmania/src/LightsManager.cpp +++ b/stepmania/src/LightsManager.cpp @@ -66,7 +66,7 @@ static void GetUsedGameInputs( vector &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 ); diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 217c0711fa..7dbfd48f25 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -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; } } diff --git a/stepmania/src/ScreenNameEntry.cpp b/stepmania/src/ScreenNameEntry.cpp index 89c7541987..394d832025 100644 --- a/stepmania/src/ScreenNameEntry.cpp +++ b/stepmania/src/ScreenNameEntry.cpp @@ -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; diff --git a/stepmania/src/Style.cpp b/stepmania/src/Style.cpp index df197b7a80..1c04f296cd 100644 --- a/stepmania/src/Style.cpp +++ b/stepmania/src/Style.cpp @@ -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 diff --git a/stepmania/src/Style.h b/stepmania/src/Style.h index 38f8c5da53..b572a84f56 100644 --- a/stepmania/src/Style.h +++ b/stepmania/src/Style.h @@ -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;