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:
@@ -22,7 +22,7 @@ ScreenJukeboxMenu::ScreenJukeboxMenu( CString sClassName ) : ScreenWithMenuEleme
|
||||
{
|
||||
LOG->Trace( "ScreenJukeboxMenu::ScreenJukeboxMenu()" );
|
||||
|
||||
GAMESTATE->m_CurStyle = STYLE_INVALID;
|
||||
GAMESTATE->m_pCurStyleDef = NULL;
|
||||
|
||||
FOREACH_PlayerNumber( pn )
|
||||
GAMESTATE->m_bSideIsJoined[pn] = true;
|
||||
@@ -84,12 +84,12 @@ void ScreenJukeboxMenu::MenuStart( PlayerNumber pn )
|
||||
if( IsTransitioning() )
|
||||
return;
|
||||
|
||||
Style style = m_Selector.GetSelectedStyle();
|
||||
CString sGroup = m_Selector.GetSelectedGroup();
|
||||
Difficulty dc = m_Selector.GetSelectedDifficulty();
|
||||
bool bModifiers = m_Selector.GetSelectedModifiers();
|
||||
const StyleDef *style = m_Selector.GetSelectedStyle();
|
||||
CString sGroup = m_Selector.GetSelectedGroup();
|
||||
Difficulty dc = m_Selector.GetSelectedDifficulty();
|
||||
bool bModifiers = m_Selector.GetSelectedModifiers();
|
||||
|
||||
GAMESTATE->m_CurStyle = style;
|
||||
GAMESTATE->m_pCurStyleDef = style;
|
||||
GAMESTATE->m_sPreferredGroup = (sGroup=="ALL MUSIC") ? GROUP_ALL_MUSIC : sGroup;
|
||||
FOREACH_PlayerNumber( p )
|
||||
GAMESTATE->m_PreferredDifficulty[p] = dc;
|
||||
|
||||
Reference in New Issue
Block a user