move CommonMetrics into a namespace so that it's clear where they're coming from when used.
This commit is contained in:
@@ -50,7 +50,7 @@ void SaveCatalogXml( LoadingWindow *loading_window )
|
||||
XNode xml;
|
||||
xml.m_sName = "Catalog";
|
||||
|
||||
const vector<StepsType> &vStepsTypesToShow = STEPS_TYPES_TO_SHOW.GetValue();
|
||||
const vector<StepsType> &vStepsTypesToShow = CommonMetrics::STEPS_TYPES_TO_SHOW.GetValue();
|
||||
|
||||
{
|
||||
XNode* pNode = xml.AppendChild( "Totals" );
|
||||
@@ -88,7 +88,7 @@ void SaveCatalogXml( LoadingWindow *loading_window )
|
||||
iTotalSongs++;
|
||||
iNumSongsInGroup++;
|
||||
|
||||
FOREACH_CONST( Difficulty, DIFFICULTIES_TO_SHOW.GetValue(), dc )
|
||||
FOREACH_CONST( Difficulty, CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue(), dc )
|
||||
{
|
||||
Steps* pSteps = pSong->GetStepsByDifficulty( *st, *dc, false ); // no autogen
|
||||
if( pSteps == NULL )
|
||||
@@ -169,7 +169,7 @@ void SaveCatalogXml( LoadingWindow *loading_window )
|
||||
|
||||
FOREACH_CONST( StepsType, vStepsTypesToShow, st )
|
||||
{
|
||||
FOREACH_CONST( Difficulty, DIFFICULTIES_TO_SHOW.GetValue(), dc )
|
||||
FOREACH_CONST( Difficulty, CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue(), dc )
|
||||
{
|
||||
Steps* pSteps = pSong->GetStepsByDifficulty( *st, *dc, false ); // no autogen
|
||||
if( pSteps == NULL )
|
||||
@@ -218,7 +218,7 @@ void SaveCatalogXml( LoadingWindow *loading_window )
|
||||
pCourseNode->AppendChild( "SubTitle", pCourse->GetDisplaySubTitle() );
|
||||
pCourseNode->AppendChild( "HasMods", pCourse->HasMods() );
|
||||
|
||||
const vector<CourseDifficulty> &vDiffs = COURSE_DIFFICULTIES_TO_SHOW.GetValue();
|
||||
const vector<CourseDifficulty> &vDiffs = CommonMetrics::COURSE_DIFFICULTIES_TO_SHOW.GetValue();
|
||||
|
||||
FOREACH_CONST( StepsType, vStepsTypesToShow, st )
|
||||
{
|
||||
@@ -248,7 +248,7 @@ void SaveCatalogXml( LoadingWindow *loading_window )
|
||||
|
||||
{
|
||||
XNode* pNode2 = pNode->AppendChild( "Difficulty" );
|
||||
FOREACH_CONST( Difficulty, DIFFICULTIES_TO_SHOW.GetValue(), iter )
|
||||
FOREACH_CONST( Difficulty, CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue(), iter )
|
||||
{
|
||||
XNode* pNode3 = pNode2->AppendChild( "Difficulty", DifficultyToString(*iter) );
|
||||
pNode3->AppendAttr( "DisplayAs", DifficultyToThemedString(*iter) );
|
||||
@@ -257,7 +257,7 @@ void SaveCatalogXml( LoadingWindow *loading_window )
|
||||
|
||||
{
|
||||
XNode* pNode2 = pNode->AppendChild( "CourseDifficulty" );
|
||||
FOREACH_CONST( CourseDifficulty, COURSE_DIFFICULTIES_TO_SHOW.GetValue(), iter )
|
||||
FOREACH_CONST( CourseDifficulty, CommonMetrics::COURSE_DIFFICULTIES_TO_SHOW.GetValue(), iter )
|
||||
{
|
||||
XNode* pNode3 = pNode2->AppendChild( "CourseDifficulty", CourseDifficultyToString(*iter) );
|
||||
pNode3->AppendAttr( "DisplayAs", CourseDifficultyToThemedString(*iter) );
|
||||
|
||||
@@ -9,17 +9,17 @@
|
||||
|
||||
static CString PLAYER_COLOR_NAME( size_t p ) { return ssprintf("ColorP%dCommand",int(p+1)); }
|
||||
|
||||
ThemeMetric<CString> INITIAL_SCREEN ("Common","InitialScreen", true); // always reevaluate metric
|
||||
ThemeMetric<CString> FIRST_ATTRACT_SCREEN ("Common","FirstAttractScreen");
|
||||
ThemeMetric<CString> DEFAULT_MODIFIERS ("Common","DefaultModifiers" );
|
||||
ThemeMetric<CString> DEFAULT_CPU_MODIFIERS ("Common","DefaultCpuModifiers" );
|
||||
ThemeMetric1D<apActorCommands> PLAYER_COLOR ("Common",PLAYER_COLOR_NAME,NUM_PLAYERS);
|
||||
ThemeMetric<CString> WINDOW_TITLE ("Common","WindowTitle");
|
||||
ThemeMetric<int> MAX_COURSE_ENTRIES_BEFORE_VARIOUS ("Common","MaxCourseEntriesBeforeShowVarious");
|
||||
ThemeMetric<float> TICK_EARLY_SECONDS ("ScreenGameplay","TickEarlySeconds");
|
||||
ThemeMetricDifficultiesToShow DIFFICULTIES_TO_SHOW ("Common","DifficultiesToShow");
|
||||
ThemeMetricCourseDifficultiesToShow COURSE_DIFFICULTIES_TO_SHOW ("Common","CourseDifficultiesToShow");
|
||||
ThemeMetricStepsTypesToShow STEPS_TYPES_TO_SHOW ("Common","StepsTypesToHide");
|
||||
ThemeMetric<CString> CommonMetrics::INITIAL_SCREEN ("Common","InitialScreen", true); // always reevaluate metric
|
||||
ThemeMetric<CString> CommonMetrics::FIRST_ATTRACT_SCREEN ("Common","FirstAttractScreen");
|
||||
ThemeMetric<CString> CommonMetrics::DEFAULT_MODIFIERS ("Common","DefaultModifiers" );
|
||||
ThemeMetric<CString> CommonMetrics::DEFAULT_CPU_MODIFIERS ("Common","DefaultCpuModifiers" );
|
||||
ThemeMetric1D<apActorCommands> CommonMetrics::PLAYER_COLOR ("Common",PLAYER_COLOR_NAME,NUM_PLAYERS);
|
||||
ThemeMetric<CString> CommonMetrics::WINDOW_TITLE ("Common","WindowTitle");
|
||||
ThemeMetric<int> CommonMetrics::MAX_COURSE_ENTRIES_BEFORE_VARIOUS("Common","MaxCourseEntriesBeforeShowVarious");
|
||||
ThemeMetric<float> CommonMetrics::TICK_EARLY_SECONDS ("ScreenGameplay","TickEarlySeconds");
|
||||
ThemeMetricDifficultiesToShow CommonMetrics::DIFFICULTIES_TO_SHOW ("Common","DifficultiesToShow");
|
||||
ThemeMetricCourseDifficultiesToShow CommonMetrics::COURSE_DIFFICULTIES_TO_SHOW ("Common","CourseDifficultiesToShow");
|
||||
ThemeMetricStepsTypesToShow CommonMetrics::STEPS_TYPES_TO_SHOW ("Common","StepsTypesToHide");
|
||||
|
||||
|
||||
ThemeMetricDifficultiesToShow::ThemeMetricDifficultiesToShow( const CString& sGroup, const CString& sName ) :
|
||||
@@ -121,7 +121,7 @@ void ThemeMetricStepsTypesToShow::Read()
|
||||
const vector<StepsType>& ThemeMetricStepsTypesToShow::GetValue() { return m_v; }
|
||||
|
||||
|
||||
CString THEME_OPTION_ITEM( CString s, bool bOptional )
|
||||
CString CommonMetrics::ThemeOptionItem( CString s, bool bOptional )
|
||||
{
|
||||
if( bOptional && !THEME->HasMetric("OptionNames",s) )
|
||||
return s;
|
||||
|
||||
@@ -47,20 +47,22 @@ private:
|
||||
//
|
||||
// Metrics
|
||||
//
|
||||
extern ThemeMetric<CString> INITIAL_SCREEN;
|
||||
extern ThemeMetric<CString> FIRST_ATTRACT_SCREEN;
|
||||
extern ThemeMetric<CString> DEFAULT_MODIFIERS;
|
||||
extern ThemeMetric<CString> DEFAULT_CPU_MODIFIERS;
|
||||
extern ThemeMetric1D<apActorCommands> PLAYER_COLOR;
|
||||
extern ThemeMetric<CString> WINDOW_TITLE;
|
||||
extern ThemeMetric<int> MAX_COURSE_ENTRIES_BEFORE_VARIOUS;
|
||||
extern ThemeMetric<float> TICK_EARLY_SECONDS;
|
||||
extern ThemeMetricDifficultiesToShow DIFFICULTIES_TO_SHOW;
|
||||
extern ThemeMetricCourseDifficultiesToShow COURSE_DIFFICULTIES_TO_SHOW;
|
||||
extern ThemeMetricStepsTypesToShow STEPS_TYPES_TO_SHOW;
|
||||
|
||||
CString THEME_OPTION_ITEM( CString s, bool bOptional );
|
||||
namespace CommonMetrics
|
||||
{
|
||||
extern ThemeMetric<CString> INITIAL_SCREEN;
|
||||
extern ThemeMetric<CString> FIRST_ATTRACT_SCREEN;
|
||||
extern ThemeMetric<CString> DEFAULT_MODIFIERS;
|
||||
extern ThemeMetric<CString> DEFAULT_CPU_MODIFIERS;
|
||||
extern ThemeMetric1D<apActorCommands> PLAYER_COLOR;
|
||||
extern ThemeMetric<CString> WINDOW_TITLE;
|
||||
extern ThemeMetric<int> MAX_COURSE_ENTRIES_BEFORE_VARIOUS;
|
||||
extern ThemeMetric<float> TICK_EARLY_SECONDS;
|
||||
extern ThemeMetricDifficultiesToShow DIFFICULTIES_TO_SHOW;
|
||||
extern ThemeMetricCourseDifficultiesToShow COURSE_DIFFICULTIES_TO_SHOW;
|
||||
extern ThemeMetricStepsTypesToShow STEPS_TYPES_TO_SHOW;
|
||||
|
||||
CString ThemeOptionItem( CString s, bool bOptional );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -258,7 +258,7 @@ void DifficultyList::SetFromGameState()
|
||||
// it really should round to the nearest difficulty that's in
|
||||
// DIFFICULTIES_TO_SHOW.
|
||||
unsigned i=0;
|
||||
FOREACH_CONST( Difficulty, DIFFICULTIES_TO_SHOW.GetValue(), d )
|
||||
FOREACH_CONST( Difficulty, CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue(), d )
|
||||
{
|
||||
m_Rows.resize( m_Rows.size()+1 );
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ void EditMenu::Load( const CString &sType )
|
||||
// fill in data structures
|
||||
//
|
||||
GetGroupsToShow( m_sGroups );
|
||||
m_StepsTypes = STEPS_TYPES_TO_SHOW.GetValue();
|
||||
m_StepsTypes = CommonMetrics::STEPS_TYPES_TO_SHOW.GetValue();
|
||||
|
||||
|
||||
RefreshAll();
|
||||
|
||||
@@ -243,7 +243,7 @@ void GameState::Reset()
|
||||
// The theme setting is for eg. BM being reverse by default. (This
|
||||
// could be done in the title menu GameCommand, but then it wouldn't
|
||||
// affect demo, and other non-gameplay things ...) -glenn
|
||||
ApplyModifiers( p, DEFAULT_MODIFIERS );
|
||||
ApplyModifiers( p, CommonMetrics::DEFAULT_MODIFIERS );
|
||||
ApplyModifiers( p, PREFSMAN->GetCurrentGamePrefs().m_sDefaultModifiers );
|
||||
}
|
||||
|
||||
@@ -382,7 +382,7 @@ void GameState::PlayersFinalized()
|
||||
}
|
||||
|
||||
FOREACH_PotentialCpuPlayer( pn )
|
||||
ApplyModifiers( pn, DEFAULT_CPU_MODIFIERS );
|
||||
ApplyModifiers( pn, CommonMetrics::DEFAULT_CPU_MODIFIERS );
|
||||
}
|
||||
|
||||
void GameState::EndGame()
|
||||
@@ -1673,7 +1673,7 @@ bool GameState::IsTimeToPlayAttractSounds() const
|
||||
|
||||
void GameState::VisitAttractScreen( const CString sScreenName )
|
||||
{
|
||||
if( sScreenName == FIRST_ATTRACT_SCREEN.GetValue() )
|
||||
if( sScreenName == CommonMetrics::FIRST_ATTRACT_SCREEN.GetValue() )
|
||||
m_iNumTimesThroughAttract++;
|
||||
}
|
||||
|
||||
@@ -1701,7 +1701,7 @@ bool GameState::ChangePreferredDifficulty( PlayerNumber pn, Difficulty dc )
|
||||
|
||||
bool GameState::ChangePreferredDifficulty( PlayerNumber pn, int dir )
|
||||
{
|
||||
const vector<Difficulty> &v = DIFFICULTIES_TO_SHOW.GetValue();
|
||||
const vector<Difficulty> &v = CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue();
|
||||
|
||||
Difficulty d = m_PreferredDifficulty[pn];
|
||||
while( 1 )
|
||||
@@ -1733,7 +1733,7 @@ bool GameState::ChangePreferredCourseDifficulty( PlayerNumber pn, int dir )
|
||||
/* If we have a course selected, only choose among difficulties available in the course. */
|
||||
const Course *pCourse = this->m_pCurCourse;
|
||||
|
||||
const vector<CourseDifficulty> &v = COURSE_DIFFICULTIES_TO_SHOW.GetValue();
|
||||
const vector<CourseDifficulty> &v = CommonMetrics::COURSE_DIFFICULTIES_TO_SHOW.GetValue();
|
||||
|
||||
CourseDifficulty cd = m_PreferredCourseDifficulty[pn];
|
||||
while( 1 )
|
||||
@@ -1752,7 +1752,7 @@ bool GameState::ChangePreferredCourseDifficulty( PlayerNumber pn, int dir )
|
||||
|
||||
bool GameState::IsCourseDifficultyShown( CourseDifficulty cd )
|
||||
{
|
||||
const vector<CourseDifficulty> &v = COURSE_DIFFICULTIES_TO_SHOW.GetValue();
|
||||
const vector<CourseDifficulty> &v = CommonMetrics::COURSE_DIFFICULTIES_TO_SHOW.GetValue();
|
||||
return find(v.begin(), v.end(), cd) != v.end();
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ GrooveRadar::GrooveRadar()
|
||||
{
|
||||
m_GrooveRadarValueMap[p].SetRadius( m_sprRadarBase.GetZoomedWidth() );
|
||||
m_Frame.AddChild( &m_GrooveRadarValueMap[p] );
|
||||
m_GrooveRadarValueMap[p].RunCommands( PLAYER_COLOR.GetValue(p) );
|
||||
m_GrooveRadarValueMap[p].RunCommands( CommonMetrics::PLAYER_COLOR.GetValue(p) );
|
||||
}
|
||||
|
||||
this->AddChild( &m_Frame );
|
||||
|
||||
@@ -56,7 +56,7 @@ static void GetUsedGameInputs( vector<GameInput> &vGameInputsOut )
|
||||
GAMEMAN->GetStylesForGame( GAMESTATE->m_pCurGame, vStyles );
|
||||
FOREACH( const Style*, vStyles, style )
|
||||
{
|
||||
bool bFound = find( STEPS_TYPES_TO_SHOW.GetValue().begin(), STEPS_TYPES_TO_SHOW.GetValue().end(), (*style)->m_StepsType ) != STEPS_TYPES_TO_SHOW.GetValue().end();
|
||||
bool bFound = find( CommonMetrics::STEPS_TYPES_TO_SHOW.GetValue().begin(), CommonMetrics::STEPS_TYPES_TO_SHOW.GetValue().end(), (*style)->m_StepsType ) != CommonMetrics::STEPS_TYPES_TO_SHOW.GetValue().end();
|
||||
if( !bFound )
|
||||
continue;
|
||||
FOREACH_PlayerNumber( pn )
|
||||
|
||||
@@ -41,7 +41,7 @@ void OptionRow::PrepareItemText( CString &s ) const
|
||||
if( m_pParentType->THEME_ITEMS && m_RowDef.m_bAllowThemeItems ) bTheme = true;
|
||||
|
||||
if( bTheme )
|
||||
s = THEME_OPTION_ITEM( s, false );
|
||||
s = CommonMetrics::ThemeOptionItem( s, false );
|
||||
if( m_pParentType->CAPITALIZE_ALL_OPTION_NAMES )
|
||||
s.MakeUpper();
|
||||
}
|
||||
@@ -195,7 +195,7 @@ CString OptionRow::GetRowTitle() const
|
||||
Trail* pTrail = GAMESTATE->m_pCurTrail[GAMESTATE->m_MasterPlayerNumber];
|
||||
ASSERT( pTrail != NULL );
|
||||
const int iNumCourseEntries = pTrail->m_vEntries.size();
|
||||
if( iNumCourseEntries > MAX_COURSE_ENTRIES_BEFORE_VARIOUS )
|
||||
if( iNumCourseEntries > CommonMetrics::MAX_COURSE_ENTRIES_BEFORE_VARIOUS )
|
||||
bShowBpmInSpeedTitle = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -460,7 +460,7 @@ public:
|
||||
ListEntries.push_back( mc );
|
||||
}
|
||||
|
||||
FOREACH_CONST( Difficulty, DIFFICULTIES_TO_SHOW.GetValue(), d )
|
||||
FOREACH_CONST( Difficulty, CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue(), d )
|
||||
{
|
||||
CString s = DifficultyToThemedString( *d );
|
||||
|
||||
@@ -932,7 +932,7 @@ public:
|
||||
defOut.m_bAllowThemeItems = false; // we theme the text ourself
|
||||
|
||||
// calculate which StepsTypes to show
|
||||
m_vStepsTypesToShow = STEPS_TYPES_TO_SHOW.GetValue();
|
||||
m_vStepsTypesToShow = CommonMetrics::STEPS_TYPES_TO_SHOW.GetValue();
|
||||
|
||||
FOREACH_CONST( StepsType, m_vStepsTypesToShow, st )
|
||||
{
|
||||
|
||||
@@ -639,7 +639,7 @@ void PlayerOptions::GetThemedMods( vector<CString> &AddTo ) const
|
||||
|
||||
/* Theme the mod name (the last string). Allow this to not exist, since
|
||||
* characters might use modifiers that don't exist in the theme. */
|
||||
asTokens.back() = THEME_OPTION_ITEM( asTokens.back(), true );
|
||||
asTokens.back() = CommonMetrics::ThemeOptionItem( asTokens.back(), true );
|
||||
|
||||
CString sThemedMod = join( " ", asTokens );
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ void ScoreDisplayLifeTime::Init( const PlayerState* pPlayerState, const PlayerSt
|
||||
m_textTimeRemaining.SetName( "TimeRemaining" );
|
||||
this->AddChild( &m_textTimeRemaining );
|
||||
ActorUtil::OnCommand( m_textTimeRemaining, sType );
|
||||
m_textTimeRemaining.RunCommands( PLAYER_COLOR.GetValue(pn) );
|
||||
m_textTimeRemaining.RunCommands( CommonMetrics::PLAYER_COLOR.GetValue(pn) );
|
||||
|
||||
m_textDeltaSeconds.LoadFromFont( THEME->GetPathF(sType,"DeltaSeconds") );
|
||||
m_textDeltaSeconds.SetName( "DeltaSeconds" );
|
||||
|
||||
@@ -31,7 +31,7 @@ void ScoreDisplayNormal::Init( const PlayerState* pPlayerState, const PlayerStag
|
||||
// TODO: Remove use of PlayerNumber.
|
||||
PlayerNumber pn = pPlayerState->m_PlayerNumber;
|
||||
|
||||
m_text.RunCommands( PLAYER_COLOR.GetValue(pn) );
|
||||
m_text.RunCommands( CommonMetrics::PLAYER_COLOR.GetValue(pn) );
|
||||
}
|
||||
|
||||
void ScoreDisplayNormal::SetScore( int iNewScore )
|
||||
|
||||
@@ -31,7 +31,7 @@ void ScoreDisplayOni::Init( const PlayerState* pPlayerState, const PlayerStageSt
|
||||
// TODO: Remove use of PlayerNumber.
|
||||
PlayerNumber pn = pPlayerState->m_PlayerNumber;
|
||||
|
||||
m_text.RunCommands( PLAYER_COLOR.GetValue(pn) );
|
||||
m_text.RunCommands( CommonMetrics::PLAYER_COLOR.GetValue(pn) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -736,7 +736,7 @@ void ScreenEdit::PlayTicks()
|
||||
* ahead. This is just to make sure that we request the sound early enough for it to
|
||||
* come out on time; the actual precise timing is handled by SetStartTime. */
|
||||
float fPositionSeconds = GAMESTATE->m_fMusicSeconds;
|
||||
fPositionSeconds += SOUND->GetPlayLatency() + (float)TICK_EARLY_SECONDS + 0.250f;
|
||||
fPositionSeconds += SOUND->GetPlayLatency() + (float)CommonMetrics::TICK_EARLY_SECONDS + 0.250f;
|
||||
const float fSongBeat = GAMESTATE->m_pCurSong->GetBeatFromElapsedTime( fPositionSeconds );
|
||||
|
||||
const int iSongRow = max( 0, BeatToNoteRowNotRounded( fSongBeat ) );
|
||||
@@ -760,7 +760,7 @@ void ScreenEdit::PlayTicks()
|
||||
fSecondsUntil /= m_soundMusic.GetPlaybackRate(); /* 2x music rate means the time until the tick is halved */
|
||||
|
||||
RageSoundParams p;
|
||||
p.m_StartTime = GAMESTATE->m_LastBeatUpdate + (fSecondsUntil - (float)TICK_EARLY_SECONDS);
|
||||
p.m_StartTime = GAMESTATE->m_LastBeatUpdate + (fSecondsUntil - (float)CommonMetrics::TICK_EARLY_SECONDS);
|
||||
m_soundAssistTick.Play( &p );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ CString GetStatsLineValue( PlayerNumber pn, EndingStatsLine line )
|
||||
|
||||
if( GAMESTATE->IsCourseMode() )
|
||||
{
|
||||
FOREACH_CONST( CourseDifficulty, COURSE_DIFFICULTIES_TO_SHOW.GetValue(), iter )
|
||||
FOREACH_CONST( CourseDifficulty, CommonMetrics::COURSE_DIFFICULTIES_TO_SHOW.GetValue(), iter )
|
||||
{
|
||||
fActual += pProfile->GetCoursesActual(st,*iter);
|
||||
fPossible += pProfile->GetCoursesPossible(st,*iter);
|
||||
@@ -86,7 +86,7 @@ CString GetStatsLineValue( PlayerNumber pn, EndingStatsLine line )
|
||||
}
|
||||
else
|
||||
{
|
||||
FOREACH_CONST( Difficulty, DIFFICULTIES_TO_SHOW.GetValue(), iter )
|
||||
FOREACH_CONST( Difficulty, CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue(), iter )
|
||||
{
|
||||
fActual += pProfile->GetSongsActual(st,*iter);
|
||||
fPossible += pProfile->GetSongsPossible(st,*iter);
|
||||
|
||||
@@ -489,7 +489,7 @@ void ScreenEvaluation::Init()
|
||||
{
|
||||
m_textJudgeNumbers[l][p].LoadFromFont( THEME->GetPathF(m_sName, "judge") );
|
||||
m_textJudgeNumbers[l][p].SetShadowLength( 0 );
|
||||
m_textJudgeNumbers[l][p].RunCommands( PLAYER_COLOR.GetValue(p) );
|
||||
m_textJudgeNumbers[l][p].RunCommands( CommonMetrics::PLAYER_COLOR.GetValue(p) );
|
||||
m_textJudgeNumbers[l][p].SetName( JudgeLineToString(l)+ssprintf("NumberP%d",p+1) );
|
||||
SET_XY_AND_ON_COMMAND( m_textJudgeNumbers[l][p] );
|
||||
this->AddChild( &m_textJudgeNumbers[l][p] );
|
||||
@@ -533,7 +533,7 @@ void ScreenEvaluation::Init()
|
||||
FOREACH_EnabledPlayer( p )
|
||||
{
|
||||
m_textStatsText[l][p].LoadFromFont( THEME->GetPathF(m_sName,"stats") );
|
||||
m_textStatsText[l][p].RunCommands( PLAYER_COLOR.GetValue(p) );
|
||||
m_textStatsText[l][p].RunCommands( CommonMetrics::PLAYER_COLOR.GetValue(p) );
|
||||
m_textStatsText[l][p].SetName( StatLineToString(l)+ssprintf("TextP%d",p+1) );
|
||||
SET_XY_AND_ON_COMMAND( m_textStatsText[l][p] );
|
||||
this->AddChild( &m_textStatsText[l][p] );
|
||||
@@ -564,7 +564,7 @@ void ScreenEvaluation::Init()
|
||||
{
|
||||
m_textScore[p].LoadFromFont( THEME->GetPathF(m_sName, "score") );
|
||||
m_textScore[p].SetShadowLength( 0 );
|
||||
m_textScore[p].RunCommands( PLAYER_COLOR.GetValue(p) );
|
||||
m_textScore[p].RunCommands( CommonMetrics::PLAYER_COLOR.GetValue(p) );
|
||||
m_textScore[p].SetName( ssprintf("ScoreNumberP%d",p+1) );
|
||||
SET_XY_AND_ON_COMMAND( m_textScore[p] );
|
||||
m_textScore[p].SetText( ssprintf("%*.0i", NUM_SCORE_DIGITS, STATSMAN->m_CurStageStats.m_player[p].iScore) );
|
||||
@@ -589,7 +589,7 @@ void ScreenEvaluation::Init()
|
||||
|
||||
m_textTotalScore[p].LoadFromFont( THEME->GetPathF(m_sName, "totalscore") );
|
||||
m_textTotalScore[p].SetShadowLength( 0 );
|
||||
m_textTotalScore[p].RunCommands( PLAYER_COLOR.GetValue(p) );
|
||||
m_textTotalScore[p].RunCommands( CommonMetrics::PLAYER_COLOR.GetValue(p) );
|
||||
m_textTotalScore[p].SetName( ssprintf("TotalScoreNumberP%d",p+1) );
|
||||
m_textTotalScore[p].SetText( ssprintf("%*.0i", NUM_SCORE_DIGITS+2, iTotalScore) );
|
||||
SET_XY_AND_ON_COMMAND( m_textTotalScore[p] );
|
||||
@@ -612,7 +612,7 @@ void ScreenEvaluation::Init()
|
||||
{
|
||||
m_textTime[p].LoadFromFont( THEME->GetPathF(m_sName, "time") );
|
||||
m_textTime[p].SetShadowLength( 0 );
|
||||
m_textTime[p].RunCommands( PLAYER_COLOR.GetValue(p) );
|
||||
m_textTime[p].RunCommands( CommonMetrics::PLAYER_COLOR.GetValue(p) );
|
||||
m_textTime[p].SetName( ssprintf("TimeNumberP%d",p+1) );
|
||||
SET_XY_AND_ON_COMMAND( m_textTime[p] );
|
||||
m_textTime[p].SetText( SecondsToMMSSMsMs(STATSMAN->m_CurStageStats.m_player[p].fAliveSeconds) );
|
||||
|
||||
@@ -913,7 +913,7 @@ void ScreenGameplay::InitSongQueues()
|
||||
|
||||
// In a survuval course, override stored mods
|
||||
if( pCourse->GetCourseType() == COURSE_TYPE_SURVIVAL )
|
||||
a.push_back( Attack(ATTACK_LEVEL_1, 0, 0, "clearall,"+DEFAULT_MODIFIERS.GetValue(), false, true, false) ); // don't show in AttackList
|
||||
a.push_back( Attack(ATTACK_LEVEL_1, 0, 0, "clearall,"+CommonMetrics::DEFAULT_MODIFIERS.GetValue(), false, true, false) ); // don't show in AttackList
|
||||
|
||||
e->GetAttackArray( a );
|
||||
pi->m_asModifiersQueue.push_back( a );
|
||||
@@ -1434,7 +1434,7 @@ void ScreenGameplay::PlayTicks()
|
||||
* ahead. This is just to make sure that we request the sound early enough for it to
|
||||
* come out on time; the actual precise timing is handled by SetStartTime. */
|
||||
float fPositionSeconds = GAMESTATE->m_fMusicSeconds;
|
||||
fPositionSeconds += SOUND->GetPlayLatency() + (float)TICK_EARLY_SECONDS + 0.250f;
|
||||
fPositionSeconds += SOUND->GetPlayLatency() + (float)CommonMetrics::TICK_EARLY_SECONDS + 0.250f;
|
||||
const float fSongBeat = GAMESTATE->m_pCurSong->GetBeatFromElapsedTime( fPositionSeconds );
|
||||
|
||||
const int iSongRow = max( 0, BeatToNoteRowNotRounded( fSongBeat ) );
|
||||
@@ -1459,7 +1459,7 @@ void ScreenGameplay::PlayTicks()
|
||||
fSecondsUntil /= GAMESTATE->m_SongOptions.m_fMusicRate; /* 2x music rate means the time until the tick is halved */
|
||||
|
||||
RageSoundParams p;
|
||||
p.m_StartTime = GAMESTATE->m_LastBeatUpdate + (fSecondsUntil - (float)TICK_EARLY_SECONDS);
|
||||
p.m_StartTime = GAMESTATE->m_LastBeatUpdate + (fSecondsUntil - (float)CommonMetrics::TICK_EARLY_SECONDS);
|
||||
m_soundAssistTick.Play( &p );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ void ScreenOptionsEditCourseEntry::BeginScreen()
|
||||
def.m_sName = "Base Difficulty";
|
||||
def.m_vsChoices.clear();
|
||||
def.m_vsChoices.push_back( "(any)" );
|
||||
FOREACH_CONST( Difficulty, DIFFICULTIES_TO_SHOW.GetValue(), dc )
|
||||
FOREACH_CONST( Difficulty, CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue(), dc )
|
||||
def.m_vsChoices.push_back( DifficultyToThemedString(*dc) );
|
||||
vDefs.push_back( def );
|
||||
vHands.push_back( NULL );
|
||||
@@ -268,10 +268,10 @@ void ScreenOptionsEditCourseEntry::ImportOptions( int iRow, const vector<PlayerN
|
||||
break;
|
||||
case ROW_BASE_DIFFICULTY:
|
||||
{
|
||||
vector<Difficulty>::const_iterator iter = find( DIFFICULTIES_TO_SHOW.GetValue().begin(), DIFFICULTIES_TO_SHOW.GetValue().end(), ce.baseDifficulty );
|
||||
vector<Difficulty>::const_iterator iter = find( CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue().begin(), CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue().end(), ce.baseDifficulty );
|
||||
int iChoice = 0;
|
||||
if( iter != DIFFICULTIES_TO_SHOW.GetValue().end() )
|
||||
iChoice = iter - DIFFICULTIES_TO_SHOW.GetValue().begin() + 1;
|
||||
if( iter != CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue().end() )
|
||||
iChoice = iter - CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue().begin() + 1;
|
||||
OptionRow &row = *m_pRows[ROW_BASE_DIFFICULTY];
|
||||
row.SetOneSharedSelection( iChoice );
|
||||
}
|
||||
@@ -346,7 +346,7 @@ void ScreenOptionsEditCourseEntry::ExportOptions( int iRow, const vector<PlayerN
|
||||
}
|
||||
else
|
||||
{
|
||||
Difficulty d = DIFFICULTIES_TO_SHOW.GetValue()[iChoice-1];
|
||||
Difficulty d = CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue()[iChoice-1];
|
||||
ce.baseDifficulty = d;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,9 +33,9 @@ static void SetNextCombination()
|
||||
{
|
||||
vector<StepsTypeAndDifficulty> v;
|
||||
{
|
||||
FOREACH_CONST( StepsType, STEPS_TYPES_TO_SHOW.GetValue(), st )
|
||||
FOREACH_CONST( StepsType, CommonMetrics::STEPS_TYPES_TO_SHOW.GetValue(), st )
|
||||
{
|
||||
FOREACH_CONST( CourseDifficulty, COURSE_DIFFICULTIES_TO_SHOW.GetValue(), cd )
|
||||
FOREACH_CONST( CourseDifficulty, CommonMetrics::COURSE_DIFFICULTIES_TO_SHOW.GetValue(), cd )
|
||||
{
|
||||
StepsTypeAndDifficulty stad = { *st, *cd };
|
||||
v.push_back( stad );
|
||||
|
||||
@@ -207,7 +207,7 @@ void ScreenOptionsMaster::HandleScreenMessage( const ScreenMessage SM )
|
||||
if( m_iChangeMask & OPT_RESET_GAME )
|
||||
{
|
||||
ResetGame();
|
||||
SCREENMAN->SetNewScreen( INITIAL_SCREEN );
|
||||
SCREENMAN->SetNewScreen( CommonMetrics::INITIAL_SCREEN );
|
||||
m_bExportWillSetANewScreen = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ void ScoreScroller::SetStepsType( StepsType st, RageColor color )
|
||||
{
|
||||
ScoreRowItem *pItem = (ScoreRowItem *) m_SubActors[s];
|
||||
|
||||
FOREACH_CONST( Difficulty, DIFFICULTIES_TO_SHOW.GetValue(), cd )
|
||||
FOREACH_CONST( Difficulty, CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue(), cd )
|
||||
pItem->m_textScore[*cd].SetDiffuse( color );
|
||||
}
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ void ScreenSelectMusic::Init()
|
||||
m_textHighScore[p].SetName( ssprintf("ScoreP%d",p+1) );
|
||||
m_textHighScore[p].LoadFromFont( THEME->GetPathF(m_sName,"score") );
|
||||
m_textHighScore[p].SetShadowLength( 0 );
|
||||
m_textHighScore[p].RunCommands( PLAYER_COLOR.GetValue(p) );
|
||||
m_textHighScore[p].RunCommands( CommonMetrics::PLAYER_COLOR.GetValue(p) );
|
||||
SET_XY( m_textHighScore[p] );
|
||||
this->AddChild( &m_textHighScore[p] );
|
||||
}
|
||||
@@ -1670,7 +1670,7 @@ void ScreenSelectMusic::AfterMusicChange()
|
||||
if( g_sBannerPath.empty() )
|
||||
m_Banner.LoadFallback();
|
||||
|
||||
if( (int)pTrail->m_vEntries.size() > MAX_COURSE_ENTRIES_BEFORE_VARIOUS )
|
||||
if( (int)pTrail->m_vEntries.size() > CommonMetrics::MAX_COURSE_ENTRIES_BEFORE_VARIOUS )
|
||||
m_BPMDisplay.SetVarious();
|
||||
else
|
||||
m_BPMDisplay.SetBpmFromCourse( pCourse );
|
||||
@@ -1762,7 +1762,7 @@ void ScreenSelectMusic::AfterMusicChange()
|
||||
|
||||
g_StartedLoadingAt.Touch();
|
||||
|
||||
if( (int) m_Artists.size() > MAX_COURSE_ENTRIES_BEFORE_VARIOUS )
|
||||
if( (int) m_Artists.size() > CommonMetrics::MAX_COURSE_ENTRIES_BEFORE_VARIOUS )
|
||||
{
|
||||
m_Artists.clear();
|
||||
m_AltArtists.clear();
|
||||
|
||||
@@ -62,7 +62,7 @@ void ScreenTest::Input( const InputEventPlus &input )
|
||||
if( input.DeviceI.button == KEY_ESC )
|
||||
{
|
||||
if( input.type != IET_FIRST_PRESS ) return;
|
||||
SCREENMAN->SetNewScreen( INITIAL_SCREEN );
|
||||
SCREENMAN->SetNewScreen( CommonMetrics::INITIAL_SCREEN );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ static RageDisplay::VideoModeParams GetCurVideoModeParams()
|
||||
PREFSMAN->m_bSmoothLines,
|
||||
PREFSMAN->m_bTrilinearFiltering,
|
||||
PREFSMAN->m_bAnisotropicFiltering,
|
||||
WINDOW_TITLE,
|
||||
CommonMetrics::WINDOW_TITLE,
|
||||
THEME->GetPathG("Common","window icon"),
|
||||
PREFSMAN->m_bPAL,
|
||||
PREFSMAN->m_fDisplayAspectRatio
|
||||
@@ -1131,7 +1131,7 @@ int main(int argc, char* argv[])
|
||||
/* Now that GAMESTATE is reset, tell SCREENMAN to update the theme (load
|
||||
* overlay screens and global sounds), and load the initial screen. */
|
||||
SCREENMAN->ThemeChanged();
|
||||
SCREENMAN->SetNewScreen( INITIAL_SCREEN );
|
||||
SCREENMAN->SetNewScreen( CommonMetrics::INITIAL_SCREEN );
|
||||
|
||||
CodeDetector::RefreshCacheItems();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user