phase out StyleI.player

This commit is contained in:
Glenn Maynard
2006-09-13 00:09:00 +00:00
parent 6e40d3e5ef
commit 5be4331e71
7 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -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];
}
+1 -1
View File
@@ -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 );
}
+1 -1
View File
@@ -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 );
+1 -1
View File
@@ -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;
}
}
+1 -1
View File
@@ -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;
+5 -5
View File
@@ -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
+1 -1
View File
@@ -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;