cleanup: Remove Style and use StyleDef everywhere. This gets rid of a lot of Style->StyleDef lookups and discourages code that's specific to a Style. All game logic should be data-driven.
This commit is contained in:
@@ -522,14 +522,13 @@ bool InputMapper::GameToDevice( GameInput GameI, int iSoltNum, DeviceInput& Devi
|
||||
|
||||
void InputMapper::GameToStyle( GameInput GameI, StyleInput &StyleI )
|
||||
{
|
||||
if( GAMESTATE->m_CurStyle == STYLE_INVALID )
|
||||
if( GAMESTATE->m_pCurStyleDef == NULL )
|
||||
{
|
||||
StyleI.MakeInvalid();
|
||||
return;
|
||||
}
|
||||
|
||||
const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef();
|
||||
StyleI = pStyleDef->GameInputToStyleInput( GameI );
|
||||
StyleI = GAMESTATE->m_pCurStyleDef->GameInputToStyleInput( GameI );
|
||||
}
|
||||
|
||||
void InputMapper::GameToMenu( GameInput GameI, MenuInput &MenuI )
|
||||
|
||||
Reference in New Issue
Block a user