move all metrics in the "Common" group into one header file
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
/* Definitions of metrics that are in the "Common" group */
|
||||
|
||||
#ifndef COMMON_METRICS_H
|
||||
#define COMMON_METRICS_H
|
||||
|
||||
#define DIFFICULTIES_TO_SHOW THEME->GetMetric ("Common","DifficultiesToShow")
|
||||
#define INITIAL_SCREEN THEME->GetMetric ("Common","InitialScreen")
|
||||
#define FIRST_RUN_INITIAL_SCREEN THEME->GetMetric ("Common","FirstRunInitialScreen")
|
||||
#define DEFAULT_MODIFIERS THEME->GetMetric ("Common","DefaultModifiers" )
|
||||
#define DEFAULT_CPU_MODIFIERS THEME->GetMetric ("Common","DefaultCpuModifiers" )
|
||||
#define COURSE_DIFFICULTIES_TO_SHOW THEME->GetMetric ("Common","CourseDifficultiesToShow")
|
||||
#define COLOR_P1 THEME->GetMetricC("Common","ColorP1")
|
||||
#define COLOR_P2 THEME->GetMetricC("Common","ColorP2")
|
||||
#define INITIAL_SCREEN THEME->GetMetric ("Common","InitialScreen")
|
||||
#define JOIN_PAUSE_SECONDS THEME->GetMetricF("Common","JoinPauseSeconds")
|
||||
#define WINDOW_TITLE THEME->GetMetric ("Common","WindowTitle")
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2003-2004 Chris Danford
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@@ -10,12 +10,12 @@
|
||||
#include "SongManager.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "StepsUtil.h"
|
||||
#include "CommonMetrics.h"
|
||||
|
||||
#define ITEMS_SPACING_Y THEME->GetMetricF(m_sName,"ItemsSpacingY")
|
||||
#define DESCRIPTION_MAX_WIDTH THEME->GetMetricF(m_sName,"DescriptionMaxWidth")
|
||||
#define NUM_SHOWN_ITEMS THEME->GetMetricI(m_sName,"NumShownItems")
|
||||
#define MOVE_COMMAND THEME->GetMetric (m_sName,"MoveCommand")
|
||||
#define DIFFICULTIES_TO_SHOW THEME->GetMetric( "Common","DifficultiesToShow" )
|
||||
#define CAPITALIZE_DIFFICULTY_NAMES THEME->GetMetric( m_sName,"CapitalizeDifficultyNames" )
|
||||
|
||||
#define MAX_METERS NUM_DIFFICULTIES + MAX_EDITS_PER_SONG
|
||||
|
||||
@@ -26,14 +26,11 @@
|
||||
#include "StageStats.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "StepMania.h"
|
||||
#include "CommonMetrics.h"
|
||||
|
||||
#include <ctime>
|
||||
#include <set>
|
||||
|
||||
#define DEFAULT_MODIFIERS THEME->GetMetric( "Common","DefaultModifiers" )
|
||||
#define DEFAULT_CPU_MODIFIERS THEME->GetMetric( "Common","DefaultCpuModifiers" )
|
||||
#define DIFFICULTIES_TO_SHOW THEME->GetMetric( "Common","DifficultiesToShow" )
|
||||
#define COURSE_DIFFICULTIES_TO_SHOW THEME->GetMetric( "Common","CourseDifficultiesToShow" )
|
||||
|
||||
GameState* GAMESTATE = NULL; // global and accessable from anywhere in our program
|
||||
|
||||
|
||||
@@ -2,10 +2,7 @@
|
||||
#include "PlayerNumber.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "GameState.h"
|
||||
|
||||
|
||||
#define COLOR_P1 THEME->GetMetricC("Common","ColorP1")
|
||||
#define COLOR_P2 THEME->GetMetricC("Common","ColorP2")
|
||||
#include "CommonMetrics.h"
|
||||
|
||||
|
||||
RageColor PlayerToColor( PlayerNumber pn )
|
||||
|
||||
@@ -14,10 +14,9 @@
|
||||
#include "InputMapper.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "GameSoundManager.h"
|
||||
#include "CommonMetrics.h"
|
||||
|
||||
#define NEXT_SCREEN THEME->GetMetric (m_sName,"NextScreen")
|
||||
#define INITIAL_SCREEN THEME->GetMetric ("Common","InitialScreen")
|
||||
#define JOIN_PAUSE_SECONDS THEME->GetMetricF("Common","JoinPauseSeconds")
|
||||
|
||||
|
||||
ScreenAttract::ScreenAttract( CString sName, bool bResetGameState ) : Screen( sName )
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "AnnouncerManager.h"
|
||||
#include "ActorUtil.h"
|
||||
#include "LightsManager.h"
|
||||
#include "CommonMetrics.h"
|
||||
|
||||
|
||||
#define ICON_GAIN_FOCUS_COMMAND THEME->GetMetric (m_sName,"IconGainFocusCommand")
|
||||
@@ -244,7 +245,7 @@ void ScreenSelectStyle::UpdateSelectableChoices()
|
||||
{
|
||||
DEBUG_ASSERT(0);
|
||||
SCREENMAN->SystemMessage( "No Styles are selectable." );
|
||||
SCREENMAN->SetNewScreen( THEME->GetMetric("Common","InitialScreen") );
|
||||
SCREENMAN->SetNewScreen( INITIAL_SCREEN );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "ProductInfo.h"
|
||||
#include "LightsManager.h"
|
||||
#include "CodeDetector.h"
|
||||
#include "CommonMetrics.h"
|
||||
|
||||
|
||||
#define LOGO_ON_COMMAND THEME->GetMetric("ScreenTitleMenu","LogoOnCommand")
|
||||
@@ -59,7 +60,7 @@ ScreenTitleMenu::ScreenTitleMenu( CString sClassName ) : ScreenSelect( sClassNam
|
||||
if( PREFSMAN->GetCoinMode() == COIN_PAY &&
|
||||
GAMESTATE->m_iCoins < PREFSMAN->m_iCoinsPerCredit )
|
||||
{
|
||||
SCREENMAN->SetNewScreen( THEME->GetMetric("Common","InitialScreen") );
|
||||
SCREENMAN->SetNewScreen( INITIAL_SCREEN );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -349,7 +350,7 @@ void ScreenTitleMenu::HandleScreenMessage( const ScreenMessage SM )
|
||||
m_aModeChoices[m_Choice].ApplyToAllPlayers();
|
||||
break;
|
||||
case SM_GoToAttractLoop:
|
||||
SCREENMAN->SetNewScreen( THEME->GetMetric("Common","InitialScreen") );
|
||||
SCREENMAN->SetNewScreen( INITIAL_SCREEN );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#include "Screen.h"
|
||||
#include "CodeDetector.h"
|
||||
#include "CommonMetrics.h"
|
||||
|
||||
//
|
||||
// StepMania global classes
|
||||
@@ -98,7 +99,7 @@ static RageDisplay::VideoModeParams GetCurVideoModeParams()
|
||||
PREFSMAN->m_bSmoothLines,
|
||||
PREFSMAN->m_bTrilinearFiltering,
|
||||
PREFSMAN->m_bAnisotropicFiltering,
|
||||
THEME->GetMetric("Common","WindowTitle"),
|
||||
WINDOW_TITLE,
|
||||
THEME->GetPathToG("Common window icon"),
|
||||
PREFSMAN->m_bPAL
|
||||
);
|
||||
@@ -238,9 +239,9 @@ void ResetGame( bool ReturnToFirstScreen )
|
||||
if( ReturnToFirstScreen )
|
||||
{
|
||||
if( PREFSMAN->m_bFirstRun )
|
||||
SCREENMAN->SetNewScreen( THEME->GetMetric("Common","FirstRunInitialScreen") );
|
||||
SCREENMAN->SetNewScreen( FIRST_RUN_INITIAL_SCREEN );
|
||||
else
|
||||
SCREENMAN->SetNewScreen( THEME->GetMetric("Common","InitialScreen") );
|
||||
SCREENMAN->SetNewScreen( INITIAL_SCREEN );
|
||||
}
|
||||
|
||||
PREFSMAN->m_bFirstRun = false;
|
||||
|
||||
Reference in New Issue
Block a user