Split CachedThemeMetric into separate types (CString, int, float) to prevent ambiguous types when casting
This commit is contained in:
+14
-14
@@ -14,20 +14,20 @@
|
||||
#include "ThemeManager.h"
|
||||
|
||||
|
||||
CachedThemeMetric LABEL_X ("Combo","LabelX");
|
||||
CachedThemeMetric LABEL_Y ("Combo","LabelY");
|
||||
CachedThemeMetric LABEL_HORIZ_ALIGN ("Combo","LabelHorizAlign");
|
||||
CachedThemeMetric LABEL_VERT_ALIGN ("Combo","LabelVertAlign");
|
||||
CachedThemeMetric NUMBER_X ("Combo","NumberX");
|
||||
CachedThemeMetric NUMBER_Y ("Combo","NumberY");
|
||||
CachedThemeMetric NUMBER_HORIZ_ALIGN ("Combo","NumberHorizAlign");
|
||||
CachedThemeMetric NUMBER_VERT_ALIGN ("Combo","NumberVertAlign");
|
||||
CachedThemeMetric SHOW_COMBO_AT ("Combo","ShowComboAt");
|
||||
CachedThemeMetric NUMBER_MIN_ZOOM ("Combo","NumberMinZoom");
|
||||
CachedThemeMetric NUMBER_MAX_ZOOM ("Combo","NumberMaxZoom");
|
||||
CachedThemeMetric NUMBER_MAX_ZOOM_AT ("Combo","NumberMaxZoomAt");
|
||||
CachedThemeMetric PULSE_ZOOM ("Combo","PulseZoom");
|
||||
CachedThemeMetric C_TWEEN_SECONDS ("Combo","TweenSeconds");
|
||||
CachedThemeMetricF LABEL_X ("Combo","LabelX");
|
||||
CachedThemeMetricF LABEL_Y ("Combo","LabelY");
|
||||
CachedThemeMetricI LABEL_HORIZ_ALIGN ("Combo","LabelHorizAlign");
|
||||
CachedThemeMetricI LABEL_VERT_ALIGN ("Combo","LabelVertAlign");
|
||||
CachedThemeMetricF NUMBER_X ("Combo","NumberX");
|
||||
CachedThemeMetricF NUMBER_Y ("Combo","NumberY");
|
||||
CachedThemeMetricI NUMBER_HORIZ_ALIGN ("Combo","NumberHorizAlign");
|
||||
CachedThemeMetricI NUMBER_VERT_ALIGN ("Combo","NumberVertAlign");
|
||||
CachedThemeMetricI SHOW_COMBO_AT ("Combo","ShowComboAt");
|
||||
CachedThemeMetricF NUMBER_MIN_ZOOM ("Combo","NumberMinZoom");
|
||||
CachedThemeMetricF NUMBER_MAX_ZOOM ("Combo","NumberMaxZoom");
|
||||
CachedThemeMetricF NUMBER_MAX_ZOOM_AT ("Combo","NumberMaxZoomAt");
|
||||
CachedThemeMetricF PULSE_ZOOM ("Combo","PulseZoom");
|
||||
CachedThemeMetricF C_TWEEN_SECONDS ("Combo","TweenSeconds");
|
||||
|
||||
|
||||
Combo::Combo()
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
#include "ThemeManager.h"
|
||||
|
||||
|
||||
CachedThemeMetric GA_SHOW_SECONDS ("GhostArrow","ShowSeconds");
|
||||
CachedThemeMetric GA_ZOOM_START ("GhostArrow","ZoomStart");
|
||||
CachedThemeMetric GA_ZOOM_END ("GhostArrow","ZoomEnd");
|
||||
CachedThemeMetric GA_COLOR_MARVELOUS ("GhostArrow","ColorMarvelous");
|
||||
CachedThemeMetric GA_COLOR_PERFECT ("GhostArrow","ColorPerfect");
|
||||
CachedThemeMetric GA_COLOR_GREAT ("GhostArrow","ColorGreat");
|
||||
CachedThemeMetric GA_COLOR_GOOD ("GhostArrow","ColorGood");
|
||||
CachedThemeMetric GA_COLOR_BOO ("GhostArrow","ColorBoo");
|
||||
CachedThemeMetricF GA_SHOW_SECONDS ("GhostArrow","ShowSeconds");
|
||||
CachedThemeMetricF GA_ZOOM_START ("GhostArrow","ZoomStart");
|
||||
CachedThemeMetricF GA_ZOOM_END ("GhostArrow","ZoomEnd");
|
||||
CachedThemeMetricC GA_COLOR_MARVELOUS ("GhostArrow","ColorMarvelous");
|
||||
CachedThemeMetricC GA_COLOR_PERFECT ("GhostArrow","ColorPerfect");
|
||||
CachedThemeMetricC GA_COLOR_GREAT ("GhostArrow","ColorGreat");
|
||||
CachedThemeMetricC GA_COLOR_GOOD ("GhostArrow","ColorGood");
|
||||
CachedThemeMetricC GA_COLOR_BOO ("GhostArrow","ColorBoo");
|
||||
|
||||
|
||||
GhostArrow::GhostArrow()
|
||||
@@ -50,7 +50,7 @@ void GhostArrow::Step( TapNoteScore score )
|
||||
// HACK: set the length of each frame so the animation plays in exactly 1 pop up time.
|
||||
// We can't do this in the constructor because the image hasn't been loaded yet
|
||||
for( int i=0; i<Sprite::GetNumStates(); i++ )
|
||||
Sprite::m_fDelay[i] = (float)GA_SHOW_SECONDS / (float)Sprite::GetNumStates();
|
||||
Sprite::m_fDelay[i] = GA_SHOW_SECONDS / Sprite::GetNumStates();
|
||||
|
||||
RageColor colorStart;
|
||||
switch( score )
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
#include "ThemeManager.h"
|
||||
|
||||
|
||||
CachedThemeMetric GAB_SHOW_SECONDS ("GhostArrowBright","ShowSeconds");
|
||||
CachedThemeMetric GAB_ZOOM_START ("GhostArrowBright","ZoomStart");
|
||||
CachedThemeMetric GAB_ZOOM_END ("GhostArrowBright","ZoomEnd");
|
||||
CachedThemeMetric GAB_COLOR_MARVELOUS ("GhostArrowBright","ColorMarvelous");
|
||||
CachedThemeMetric GAB_COLOR_PERFECT ("GhostArrowBright","ColorPerfect");
|
||||
CachedThemeMetric GAB_COLOR_GREAT ("GhostArrowBright","ColorGreat");
|
||||
CachedThemeMetric GAB_COLOR_GOOD ("GhostArrowBright","ColorGood");
|
||||
CachedThemeMetric GAB_COLOR_BOO ("GhostArrowBright","ColorBoo");
|
||||
CachedThemeMetricF GAB_SHOW_SECONDS ("GhostArrowBright","ShowSeconds");
|
||||
CachedThemeMetricF GAB_ZOOM_START ("GhostArrowBright","ZoomStart");
|
||||
CachedThemeMetricF GAB_ZOOM_END ("GhostArrowBright","ZoomEnd");
|
||||
CachedThemeMetricC GAB_COLOR_MARVELOUS ("GhostArrowBright","ColorMarvelous");
|
||||
CachedThemeMetricC GAB_COLOR_PERFECT ("GhostArrowBright","ColorPerfect");
|
||||
CachedThemeMetricC GAB_COLOR_GREAT ("GhostArrowBright","ColorGreat");
|
||||
CachedThemeMetricC GAB_COLOR_GOOD ("GhostArrowBright","ColorGood");
|
||||
CachedThemeMetricC GAB_COLOR_BOO ("GhostArrowBright","ColorBoo");
|
||||
|
||||
|
||||
GhostArrowBright::GhostArrowBright()
|
||||
@@ -50,7 +50,7 @@ void GhostArrowBright::Step( TapNoteScore score )
|
||||
// HACK: set the length of each frame so the animation plays in exactly 1 pop up time.
|
||||
// We can't do this in the constructor because the image hasn't been loaded yet
|
||||
for( int i=0; i<Sprite::GetNumStates(); i++ )
|
||||
Sprite::m_fDelay[i] = (float)GAB_SHOW_SECONDS / (float)Sprite::GetNumStates();
|
||||
Sprite::m_fDelay[i] = GAB_SHOW_SECONDS / Sprite::GetNumStates();
|
||||
|
||||
RageColor colorStart;
|
||||
switch( score )
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
|
||||
#include "RageLog.h"
|
||||
|
||||
CachedThemeMetric GR_STEP_SECONDS ("GrayArrow","StepSeconds");
|
||||
CachedThemeMetric GR_STEP_ZOOM ("GrayArrow","StepZoom");
|
||||
CachedThemeMetricF GR_STEP_SECONDS ("GrayArrow","StepSeconds");
|
||||
CachedThemeMetricF GR_STEP_ZOOM ("GrayArrow","StepZoom");
|
||||
|
||||
|
||||
GrayArrow::GrayArrow()
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "ThemeManager.h"
|
||||
|
||||
|
||||
CachedThemeMetric WARM_UP_SECONDS ("HoldGhostArrow","WarmUpSeconds");
|
||||
CachedThemeMetricF WARM_UP_SECONDS ("HoldGhostArrow","WarmUpSeconds");
|
||||
|
||||
|
||||
HoldGhostArrow::HoldGhostArrow()
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "ThemeManager.h"
|
||||
|
||||
|
||||
// MusicWheel stuff
|
||||
#define NUM_WHEEL_ITEMS min( MAX_WHEEL_ITEMS, THEME->GetMetricI("MusicWheel","NumWheelItems") )
|
||||
#define FADE_SECONDS THEME->GetMetricF("MusicWheel","FadeSeconds")
|
||||
#define SWITCH_SECONDS THEME->GetMetricF("MusicWheel","SwitchSeconds")
|
||||
#define ROULETTE_SWITCH_SECONDS THEME->GetMetricF("MusicWheel","RouletteSwitchSeconds")
|
||||
@@ -34,8 +34,8 @@
|
||||
#define LOCKED_INITIAL_VELOCITY THEME->GetMetricF("MusicWheel","LockedInitialVelocity")
|
||||
#define SCROLL_BAR_X THEME->GetMetricF("MusicWheel","ScrollBarX")
|
||||
#define SCROLL_BAR_HEIGHT THEME->GetMetricI("MusicWheel","ScrollBarHeight")
|
||||
#define ITEM_CURVE_X THEME->GetMetricF("MusicWheel","ItemCurveX")
|
||||
#define ITEM_SPACING_Y THEME->GetMetricF("MusicWheel","ItemSpacingY")
|
||||
CachedThemeMetricF ITEM_CURVE_X ("MusicWheel","ItemCurveX");
|
||||
CachedThemeMetricF ITEM_SPACING_Y ("MusicWheel","ItemSpacingY");
|
||||
#define NUM_SECTION_COLORS THEME->GetMetricI("MusicWheel","NumSectionColors")
|
||||
#define SECTION_COLORS( i ) THEME->GetMetricC("MusicWheel",ssprintf("SectionColor%d",i+1))
|
||||
#define DEFAULT_SCROLL_DIRECTION THEME->GetMetricI("Notes","DefaultScrollDirection")
|
||||
@@ -45,7 +45,6 @@
|
||||
|
||||
|
||||
const int MAX_WHEEL_SOUND_SPEED = 15;
|
||||
float g_fItemSpacingY, g_fItemCurveX; // cache
|
||||
|
||||
static const SongSortOrder MaxSelectableSort = SORT_MOST_PLAYED;
|
||||
|
||||
@@ -70,10 +69,9 @@ MusicWheel::MusicWheel()
|
||||
GAMESTATE->m_PlayerOptions[i].m_fReverseScroll = 1;
|
||||
}
|
||||
|
||||
|
||||
// update theme metric cache
|
||||
g_fItemSpacingY = ITEM_SPACING_Y;
|
||||
g_fItemCurveX = ITEM_CURVE_X;
|
||||
ITEM_CURVE_X.Refresh();
|
||||
ITEM_SPACING_Y.Refresh();
|
||||
|
||||
// for debugging
|
||||
if( GAMESTATE->m_CurStyle == STYLE_INVALID )
|
||||
@@ -510,12 +508,12 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
|
||||
|
||||
float MusicWheel::GetBannerY( float fPosOffsetsFromMiddle )
|
||||
{
|
||||
return roundf( fPosOffsetsFromMiddle*g_fItemSpacingY );
|
||||
return roundf( fPosOffsetsFromMiddle*ITEM_SPACING_Y );
|
||||
}
|
||||
|
||||
float MusicWheel::GetBannerX( float fPosOffsetsFromMiddle )
|
||||
{
|
||||
float fX = (1-cosf(fPosOffsetsFromMiddle/PI))*g_fItemCurveX;
|
||||
float fX = (1-cosf(fPosOffsetsFromMiddle/PI))*ITEM_CURVE_X;
|
||||
|
||||
return roundf( fX );
|
||||
}
|
||||
@@ -527,14 +525,14 @@ void MusicWheel::RebuildWheelItemDisplays()
|
||||
if( m_iSelection > int(m_CurWheelItemData.size()-1) )
|
||||
m_iSelection = 0;
|
||||
|
||||
iIndex -= NUM_WHEEL_ITEMS_TO_DRAW/2;
|
||||
iIndex -= NUM_WHEEL_ITEMS/2;
|
||||
|
||||
ASSERT(m_CurWheelItemData.size());
|
||||
while(iIndex < 0)
|
||||
iIndex += m_CurWheelItemData.size();
|
||||
|
||||
// iIndex is now the index of the lowest WheelItem to draw
|
||||
for( int i=0; i<NUM_WHEEL_ITEMS_TO_DRAW; i++ )
|
||||
for( int i=0; i<NUM_WHEEL_ITEMS; i++ )
|
||||
{
|
||||
WheelItemData *data = m_CurWheelItemData[iIndex];
|
||||
WheelItemDisplay& display = m_WheelItemDisplays[i];
|
||||
@@ -551,7 +549,7 @@ void MusicWheel::RebuildWheelItemDisplays()
|
||||
|
||||
void MusicWheel::NotesChanged( PlayerNumber pn ) // update grade graphics and top score
|
||||
{
|
||||
for( int i=0; i<NUM_WHEEL_ITEMS_TO_DRAW; i++ )
|
||||
for( int i=0; i<NUM_WHEEL_ITEMS; i++ )
|
||||
{
|
||||
WheelItemDisplay& display = m_WheelItemDisplays[i];
|
||||
display.RefreshGrades();
|
||||
@@ -562,7 +560,7 @@ void MusicWheel::NotesChanged( PlayerNumber pn ) // update grade graphics and to
|
||||
|
||||
void MusicWheel::DrawPrimitives()
|
||||
{
|
||||
for( int i=0; i<NUM_WHEEL_ITEMS_TO_DRAW; i++ )
|
||||
for( int i=0; i<NUM_WHEEL_ITEMS; i++ )
|
||||
{
|
||||
WheelItemDisplay& display = m_WheelItemDisplays[i];
|
||||
|
||||
@@ -574,7 +572,7 @@ void MusicWheel::DrawPrimitives()
|
||||
case STATE_RANDOM_SPINNING:
|
||||
case STATE_LOCKED:
|
||||
{
|
||||
float fThisBannerPositionOffsetFromSelection = i - NUM_WHEEL_ITEMS_TO_DRAW/2 + m_fPositionOffsetFromSelection;
|
||||
float fThisBannerPositionOffsetFromSelection = i - NUM_WHEEL_ITEMS/2 + m_fPositionOffsetFromSelection;
|
||||
|
||||
float fY = GetBannerY( fThisBannerPositionOffsetFromSelection );
|
||||
if( fY < -SCREEN_HEIGHT/2 || fY > SCREEN_HEIGHT/2 )
|
||||
@@ -586,7 +584,7 @@ void MusicWheel::DrawPrimitives()
|
||||
break;
|
||||
}
|
||||
|
||||
if( m_WheelState == STATE_LOCKED && i != NUM_WHEEL_ITEMS_TO_DRAW/2 )
|
||||
if( m_WheelState == STATE_LOCKED && i != NUM_WHEEL_ITEMS/2 )
|
||||
display.m_fPercentGray = 0.5f;
|
||||
else
|
||||
display.m_fPercentGray = 0;
|
||||
@@ -602,10 +600,10 @@ void MusicWheel::UpdateScrollbar()
|
||||
int total_num_items = m_CurWheelItemData.size();
|
||||
float item_at=m_iSelection - m_fPositionOffsetFromSelection;
|
||||
|
||||
if(NUM_WHEEL_ITEMS_TO_DRAW > total_num_items) {
|
||||
if(NUM_WHEEL_ITEMS > total_num_items) {
|
||||
m_ScrollBar.SetPercentage( 0, 1 );
|
||||
} else {
|
||||
float size = float(NUM_WHEEL_ITEMS_TO_DRAW) / total_num_items;
|
||||
float size = float(NUM_WHEEL_ITEMS) / total_num_items;
|
||||
float center = item_at / total_num_items;
|
||||
size *= 0.5f;
|
||||
|
||||
@@ -618,7 +616,7 @@ void MusicWheel::Update( float fDeltaTime )
|
||||
ActorFrame::Update( fDeltaTime );
|
||||
|
||||
unsigned i;
|
||||
for( i=0; i<int(NUM_WHEEL_ITEMS_TO_DRAW); i++ )
|
||||
for( i=0; i<int(NUM_WHEEL_ITEMS); i++ )
|
||||
{
|
||||
WheelItemDisplay& display = m_WheelItemDisplays[i];
|
||||
|
||||
@@ -1052,7 +1050,7 @@ void MusicWheel::TweenOnScreen(bool changing_sort)
|
||||
m_sprSelectionOverlay.SetXY( fX+320, fY );
|
||||
|
||||
if(changing_sort) {
|
||||
m_sprSelectionOverlay.BeginTweening( 0.04f * NUM_WHEEL_ITEMS_TO_DRAW/2 * factor ); // sleep
|
||||
m_sprSelectionOverlay.BeginTweening( 0.04f * NUM_WHEEL_ITEMS/2 * factor ); // sleep
|
||||
m_sprSelectionOverlay.BeginTweening( 0.2f * factor, Actor::TWEEN_ACCELERATE );
|
||||
} else {
|
||||
m_sprSelectionOverlay.BeginTweening( 0.05f * factor ); // sleep
|
||||
@@ -1068,10 +1066,10 @@ void MusicWheel::TweenOnScreen(bool changing_sort)
|
||||
m_ScrollBar.BeginTweening( 0.2f * factor , Actor::TWEEN_ACCELERATE );
|
||||
m_ScrollBar.SetTweenX( SCROLL_BAR_X );
|
||||
|
||||
for( int i=0; i<NUM_WHEEL_ITEMS_TO_DRAW; i++ )
|
||||
for( int i=0; i<NUM_WHEEL_ITEMS; i++ )
|
||||
{
|
||||
WheelItemDisplay& display = m_WheelItemDisplays[i];
|
||||
float fThisBannerPositionOffsetFromSelection = i - NUM_WHEEL_ITEMS_TO_DRAW/2 + m_fPositionOffsetFromSelection;
|
||||
float fThisBannerPositionOffsetFromSelection = i - NUM_WHEEL_ITEMS/2 + m_fPositionOffsetFromSelection;
|
||||
|
||||
float fX = GetBannerX(fThisBannerPositionOffsetFromSelection);
|
||||
float fY = GetBannerY(fThisBannerPositionOffsetFromSelection);
|
||||
@@ -1099,7 +1097,7 @@ void MusicWheel::TweenOffScreen(bool changing_sort)
|
||||
if(changing_sort) {
|
||||
/* When changing sort, tween the overlay with the item in the center;
|
||||
* having it separate looks messy when we're moving fast. */
|
||||
m_sprSelectionOverlay.BeginTweening( 0.04f * NUM_WHEEL_ITEMS_TO_DRAW/2 * factor ); // sleep
|
||||
m_sprSelectionOverlay.BeginTweening( 0.04f * NUM_WHEEL_ITEMS/2 * factor ); // sleep
|
||||
m_sprSelectionOverlay.BeginTweening( 0.2f * factor, Actor::TWEEN_DECELERATE );
|
||||
} else {
|
||||
m_sprSelectionOverlay.BeginTweening( 0 ); // sleep
|
||||
@@ -1111,10 +1109,10 @@ void MusicWheel::TweenOffScreen(bool changing_sort)
|
||||
m_ScrollBar.BeginTweening( 0.2f * factor, Actor::TWEEN_ACCELERATE );
|
||||
m_ScrollBar.SetTweenX( SCROLL_BAR_X+30 );
|
||||
|
||||
for( int i=0; i<NUM_WHEEL_ITEMS_TO_DRAW; i++ )
|
||||
for( int i=0; i<NUM_WHEEL_ITEMS; i++ )
|
||||
{
|
||||
WheelItemDisplay& display = m_WheelItemDisplays[i];
|
||||
float fThisBannerPositionOffsetFromSelection = i - NUM_WHEEL_ITEMS_TO_DRAW/2 + m_fPositionOffsetFromSelection;
|
||||
float fThisBannerPositionOffsetFromSelection = i - NUM_WHEEL_ITEMS/2 + m_fPositionOffsetFromSelection;
|
||||
|
||||
float fX = GetBannerX(fThisBannerPositionOffsetFromSelection);
|
||||
float fY = GetBannerY(fThisBannerPositionOffsetFromSelection);
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "MusicWheelItem.h"
|
||||
|
||||
|
||||
const int NUM_WHEEL_ITEMS_TO_DRAW = 13;
|
||||
const int MAX_WHEEL_ITEMS = 15;
|
||||
|
||||
|
||||
const ScreenMessage SM_SongChanged = ScreenMessage(SM_User+47); // this should be unique!
|
||||
@@ -94,7 +94,7 @@ protected:
|
||||
vector<WheelItemData> m_WheelItemDatas[NUM_SORT_ORDERS];
|
||||
vector<WheelItemData *> m_CurWheelItemData;
|
||||
|
||||
WheelItemDisplay m_WheelItemDisplays[NUM_WHEEL_ITEMS_TO_DRAW];
|
||||
WheelItemDisplay m_WheelItemDisplays[MAX_WHEEL_ITEMS];
|
||||
|
||||
int m_iSelection; // index into m_CurWheelItemData
|
||||
CString m_sExpandedSectionName;
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#define JUDGMENT_Y THEME->GetMetricF("Player","JudgmentY")
|
||||
#define COMBO_Y THEME->GetMetricF("Player","ComboY")
|
||||
#define HOLD_JUDGMENT_Y THEME->GetMetricF("Player","HoldJudgmentY")
|
||||
CachedThemeMetric BRIGHT_GHOST_COMBO_THRESHOLD("Player","BrightGhostComboThreshold");
|
||||
CachedThemeMetricI BRIGHT_GHOST_COMBO_THRESHOLD("Player","BrightGhostComboThreshold");
|
||||
#define START_DRAWING_AT_PIXELS THEME->GetMetricI("Player","StartDrawingAtPixels")
|
||||
#define STOP_DRAWING_AT_PIXELS THEME->GetMetricI("Player","StopDrawingAtPixels")
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ const float NAMING_MENU_ITEM_X = CENTER_X-200;
|
||||
const float NAMING_MENU_ITEM_START_Y = SCREEN_TOP + 24;
|
||||
const float NAMING_MENU_ITEM_SPACING_Y = 18;
|
||||
|
||||
CachedThemeMetric TICK_EARLY_SECONDS ("ScreenGameplay","TickEarlySeconds");
|
||||
CachedThemeMetricF TICK_EARLY_SECONDS ("ScreenGameplay","TickEarlySeconds");
|
||||
|
||||
|
||||
const ScreenMessage SM_BackFromMainMenu = (ScreenMessage)(SM_User+1);
|
||||
|
||||
@@ -78,8 +78,8 @@
|
||||
#define AUTOPLAY_Y THEME->GetMetricF("ScreenGameplay","AutoPlayY")
|
||||
#define SURVIVE_TIME_X THEME->GetMetricF("ScreenGameplay","SurviveTimeX")
|
||||
#define SURVIVE_TIME_Y THEME->GetMetricF("ScreenGameplay","SurviveTimeY")
|
||||
CachedThemeMetric SECONDS_BETWEEN_COMMENTS ("ScreenGameplay","SecondsBetweenComments");
|
||||
CachedThemeMetric G_TICK_EARLY_SECONDS ("ScreenGameplay","TickEarlySeconds");
|
||||
CachedThemeMetricF SECONDS_BETWEEN_COMMENTS ("ScreenGameplay","SecondsBetweenComments");
|
||||
CachedThemeMetricF G_TICK_EARLY_SECONDS ("ScreenGameplay","TickEarlySeconds");
|
||||
|
||||
|
||||
const ScreenMessage SM_PlayReady = ScreenMessage(SM_User+0);
|
||||
@@ -355,9 +355,9 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration )
|
||||
switch( GAMESTATE->m_PlayMode )
|
||||
{
|
||||
case PLAY_MODE_ARCADE:
|
||||
case PLAY_MODE_NONSTOP:
|
||||
m_pScoreDisplay[p] = new ScoreDisplayNormal;
|
||||
break;
|
||||
case PLAY_MODE_NONSTOP:
|
||||
case PLAY_MODE_ONI:
|
||||
case PLAY_MODE_ENDLESS:
|
||||
m_pScoreDisplay[p] = new ScoreDisplayOni;
|
||||
|
||||
@@ -57,6 +57,7 @@ extern ThemeManager* THEME; // global and accessable from anywhere in our progra
|
||||
|
||||
class CachedThemeMetric
|
||||
{
|
||||
protected:
|
||||
CString m_sClassName;
|
||||
CString m_sValueName;
|
||||
bool m_bInited;
|
||||
@@ -87,10 +88,36 @@ public:
|
||||
}
|
||||
|
||||
operator const CString () const { ASSERT(m_bInited); return m_sValue; };
|
||||
operator const int () const { ASSERT(m_bInited); return m_iValue; };
|
||||
};
|
||||
|
||||
class CachedThemeMetricF : public CachedThemeMetric
|
||||
{
|
||||
public:
|
||||
CachedThemeMetricF( CString sClassName, CString sValueName ) : CachedThemeMetric( sClassName, sValueName ) {}
|
||||
operator const float () const { ASSERT(m_bInited); return m_fValue; };
|
||||
};
|
||||
|
||||
class CachedThemeMetricI : public CachedThemeMetric
|
||||
{
|
||||
public:
|
||||
CachedThemeMetricI( CString sClassName, CString sValueName ) : CachedThemeMetric( sClassName, sValueName ) {}
|
||||
operator const int () const { ASSERT(m_bInited); return m_iValue; };
|
||||
};
|
||||
|
||||
class CachedThemeMetricB : public CachedThemeMetric
|
||||
{
|
||||
public:
|
||||
CachedThemeMetricB( CString sClassName, CString sValueName ) : CachedThemeMetric( sClassName, sValueName ) {}
|
||||
operator const bool () const { ASSERT(m_bInited); return m_bValue; };
|
||||
};
|
||||
|
||||
class CachedThemeMetricC : public CachedThemeMetric
|
||||
{
|
||||
public:
|
||||
CachedThemeMetricC( CString sClassName, CString sValueName ) : CachedThemeMetric( sClassName, sValueName ) {}
|
||||
operator const RageColor () const { ASSERT(m_bInited); return m_cValue; };
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user