Stop using Input.StyleI. Just convert it when needed; the vast majority

of screens don't.
This commit is contained in:
Glenn Maynard
2006-09-13 01:29:33 +00:00
parent 9139883e64
commit e4d0b41da1
3 changed files with 21 additions and 14 deletions
+6 -4
View File
@@ -1921,7 +1921,7 @@ void ScreenEdit::InputRecord( const InputEventPlus &input, EditButton EditB )
if( input.MenuI.player != PLAYER_1 )
return; // ignore
const int iCol = input.StyleI;
const int iCol = GAMESTATE->m_pCurStyle->GameInputToStyleInput( input.GameI );
switch( input.type )
{
@@ -2077,17 +2077,19 @@ void ScreenEdit::InputPlay( const InputEventPlus &input, EditButton EditB )
return;
}
if( PREFSMAN->m_AutoPlay != PC_HUMAN || input.StyleI == -1 )
const int iCol = GAMESTATE->m_pCurStyle->GameInputToStyleInput( input.GameI );
if( PREFSMAN->m_AutoPlay != PC_HUMAN || iCol == -1 )
return;
switch( input.MenuI.player )
{
case PLAYER_1:
m_Player->Step( input.StyleI, -1, input.DeviceI.ts, false, input.type == IET_RELEASE );
m_Player->Step( iCol, -1, input.DeviceI.ts, false, input.type == IET_RELEASE );
break;
case PLAYER_2:
if( GAMESTATE->GetCurrentStyle()->m_StyleType == TWO_PLAYERS_SHARED_SIDES )
m_Player->Step( input.StyleI, -1, input.DeviceI.ts, false, input.type == IET_RELEASE );
m_Player->Step( iCol, -1, input.DeviceI.ts, false, input.type == IET_RELEASE );
}
}