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
+2 -11
View File
@@ -8,6 +8,7 @@
#include "RageDisplay.h"
#include "ThemeManager.h"
#include "Steps.h"
#include "StyleDef.h"
// "PLAYER_X" offsets are relative to the pad.. ex: Setting this to 10, and the HELPER to 300, will put the dancer at 310
#define PLAYER_X( px ) THEME->GetMetricF("BeginnerHelper",ssprintf("Player%d_X",px+1))
@@ -109,17 +110,7 @@ bool BeginnerHelper::CanUse()
if(!DoesFileExist(GetAnimPath((Animation)i)))
return false;
if(GAMESTATE->m_CurGame != GAME_DANCE)
return false;
switch( GAMESTATE->m_CurStyle )
{
case STYLE_DANCE_SOLO:
case STYLE_DANCE_DOUBLE:
return false;
}
return true;
return GAMESTATE->m_pCurStyleDef->m_bCanUseBeginnerHelper;
}
bool BeginnerHelper::Initialize( int iDancePadType )