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:
Chris Danford
2004-06-27 06:52:49 +00:00
parent 94f61972c8
commit 3809715db0
44 changed files with 308 additions and 383 deletions
+6 -6
View File
@@ -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;