diff --git a/stepmania/src/ArrowEffects.cpp b/stepmania/src/ArrowEffects.cpp index 5039c6a9a4..22242d3b4d 100644 --- a/stepmania/src/ArrowEffects.cpp +++ b/stepmania/src/ArrowEffects.cpp @@ -161,27 +161,27 @@ float ArrowGetXPos( PlayerNumber pn, int iColNum, float fYOffset ) if( fEffects[PlayerOptions::EFFECT_TORNADO] > 0 ) { - const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); + const Style* pStyle = GAMESTATE->GetCurrentStyle(); // TRICKY: Tornado is very unplayable in doubles, so use a smaller // tornado width if there are many columns - bool bWideField = pStyleDef->m_iColsPerPlayer > 4; + bool bWideField = pStyle->m_iColsPerPlayer > 4; int iTornadoWidth = bWideField ? 2 : 3; int iStartCol = iColNum - iTornadoWidth; int iEndCol = iColNum + iTornadoWidth; - CLAMP( iStartCol, 0, pStyleDef->m_iColsPerPlayer-1 ); - CLAMP( iEndCol, 0, pStyleDef->m_iColsPerPlayer-1 ); + CLAMP( iStartCol, 0, pStyle->m_iColsPerPlayer-1 ); + CLAMP( iEndCol, 0, pStyle->m_iColsPerPlayer-1 ); float fMinX = +100000; float fMaxX = -100000; for( int i=iStartCol; i<=iEndCol; i++ ) { - fMinX = min( fMinX, pStyleDef->m_ColumnInfo[pn][i].fXOffset ); - fMaxX = max( fMaxX, pStyleDef->m_ColumnInfo[pn][i].fXOffset ); + fMinX = min( fMinX, pStyle->m_ColumnInfo[pn][i].fXOffset ); + fMaxX = max( fMaxX, pStyle->m_ColumnInfo[pn][i].fXOffset ); } - const float fRealPixelOffset = GAMESTATE->GetCurrentStyleDef()->m_ColumnInfo[pn][iColNum].fXOffset; + const float fRealPixelOffset = GAMESTATE->GetCurrentStyle()->m_ColumnInfo[pn][iColNum].fXOffset; const float fPositionBetween = SCALE( fRealPixelOffset, fMinX, fMaxX, -1, 1 ); float fRads = acosf( fPositionBetween ); fRads += fYOffset * 6 / SCREEN_HEIGHT; @@ -196,7 +196,7 @@ float ArrowGetXPos( PlayerNumber pn, int iColNum, float fYOffset ) if( fEffects[PlayerOptions::EFFECT_FLIP] > 0 ) { // fPixelOffsetFromCenter *= SCALE(fEffects[PlayerOptions::EFFECT_FLIP], 0.f, 1.f, 1.f, -1.f); - const float fRealPixelOffset = GAMESTATE->GetCurrentStyleDef()->m_ColumnInfo[pn][iColNum].fXOffset; + const float fRealPixelOffset = GAMESTATE->GetCurrentStyle()->m_ColumnInfo[pn][iColNum].fXOffset; const float fDistance = -fRealPixelOffset * 2; fPixelOffsetFromCenter += fDistance * fEffects[PlayerOptions::EFFECT_FLIP]; } @@ -419,8 +419,8 @@ bool ArrowsNeedZBuffer( PlayerNumber pn ) float ArrowGetZoom( PlayerNumber pn ) { - // FIXME: Move the zoom values into StyleDef - if( GAMESTATE->m_pCurStyleDef->m_bNeedsZoomOutWith2Players && + // FIXME: Move the zoom values into Style + if( GAMESTATE->m_pCurStyle->m_bNeedsZoomOutWith2Players && (GAMESTATE->GetNumSidesJoined()==2 || GAMESTATE->AnyPlayersAreCpu()) ) return 0.6f; return 1.0f; diff --git a/stepmania/src/ArrowEffects.h b/stepmania/src/ArrowEffects.h index d7a415d8f2..9afa836063 100644 --- a/stepmania/src/ArrowEffects.h +++ b/stepmania/src/ArrowEffects.h @@ -1,11 +1,11 @@ -/* ArrowEffects - Functions that return properties of arrows based on StyleDef and PlayerOptions. */ +/* ArrowEffects - Functions that return properties of arrows based on Style and PlayerOptions. */ #ifndef ARROWEFFECTS_H #define ARROWEFFECTS_H #include "GameConstantsAndTypes.h" -#include "StyleDef.h" +#include "Style.h" // fYOffset is a vertical position in pixels relative to the center. diff --git a/stepmania/src/BPMDisplay.cpp b/stepmania/src/BPMDisplay.cpp index 5210a46d44..303527eb20 100644 --- a/stepmania/src/BPMDisplay.cpp +++ b/stepmania/src/BPMDisplay.cpp @@ -6,7 +6,7 @@ #include "GameState.h" #include "ThemeManager.h" #include "Course.h" -#include "StyleDef.h" +#include "Style.h" #define NORMAL_COLOR THEME->GetMetricC(m_sName,"NormalColor") @@ -193,7 +193,7 @@ void BPMDisplay::SetBPM( const Course* pCourse ) { ASSERT( pCourse ); - StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType; + StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType; Trail *pTrail = pCourse->GetTrail( st ); ASSERT( pTrail ); diff --git a/stepmania/src/BeginnerHelper.cpp b/stepmania/src/BeginnerHelper.cpp index 46f820b2c0..229911f65a 100644 --- a/stepmania/src/BeginnerHelper.cpp +++ b/stepmania/src/BeginnerHelper.cpp @@ -8,7 +8,7 @@ #include "RageDisplay.h" #include "ThemeManager.h" #include "Steps.h" -#include "StyleDef.h" +#include "Style.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)) @@ -110,7 +110,7 @@ bool BeginnerHelper::CanUse() if(!DoesFileExist(GetAnimPath((Animation)i))) return false; - return GAMESTATE->m_pCurStyleDef->m_bCanUseBeginnerHelper; + return GAMESTATE->m_pCurStyle->m_bCanUseBeginnerHelper; } bool BeginnerHelper::Initialize( int iDancePadType ) diff --git a/stepmania/src/CodeDetector.cpp b/stepmania/src/CodeDetector.cpp index eaaafdfb86..a032302a62 100644 --- a/stepmania/src/CodeDetector.cpp +++ b/stepmania/src/CodeDetector.cpp @@ -7,7 +7,7 @@ #include "ThemeManager.h" #include "RageLog.h" #include "GameDef.h" -#include "StyleDef.h" +#include "Style.h" #include "RageUtil.h" #include "PrefsManager.h" @@ -224,8 +224,8 @@ bool CodeDetector::EnteredModeMenu( GameController controller ) bool CodeDetector::DetectAndAdjustMusicOptions( GameController controller ) { - const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); - PlayerNumber pn = pStyleDef->ControllerToPlayerNumber( controller ); + const Style* pStyle = GAMESTATE->GetCurrentStyle(); + PlayerNumber pn = pStyle->ControllerToPlayerNumber( controller ); for( int c=CODE_MIRROR; c<=CODE_CANCEL_ALL; c++ ) { diff --git a/stepmania/src/ConditionalBGA.cpp b/stepmania/src/ConditionalBGA.cpp index a64c087c95..48f2ac7913 100644 --- a/stepmania/src/ConditionalBGA.cpp +++ b/stepmania/src/ConditionalBGA.cpp @@ -489,8 +489,8 @@ void ConditionalBGA::CheckBgaRequirements(BgaCondInfo info) bool foundmatchingstyle=false; for(unsigned d=0;dInfo("info.styles = %d m_CurStyle = %d",info.styles[d],GAMESTATE->m_pCurStyleDef); - if(info.styles[d] == GAMESTATE->m_pCurStyleDef) + //LOG->Info("info.styles = %d m_CurStyle = %d",info.styles[d],GAMESTATE->m_pCurStyle); + if(info.styles[d] == GAMESTATE->m_pCurStyle) { foundmatchingstyle = true; LOG->Info("Found Valid Style"); diff --git a/stepmania/src/ConditionalBGA.h b/stepmania/src/ConditionalBGA.h index 77a627b905..ccdff1584e 100644 --- a/stepmania/src/ConditionalBGA.h +++ b/stepmania/src/ConditionalBGA.h @@ -4,7 +4,7 @@ #include "PlayerOptions.h" #include "GameConstantsAndTypes.h" #include "BGAnimation.h" -//#include "StyleDef.h" +//#include "Style.h" enum CBGACLEAREDSTATES { @@ -30,7 +30,7 @@ struct BgaCondInfo vector songdows; vector songmonths; vector grades; - vector styles; + vector styles; PlayerOptions disallowedpo; bool dpoused; // indicate if disallowed po has been set }; diff --git a/stepmania/src/CourseContentsList.cpp b/stepmania/src/CourseContentsList.cpp index 6cb4ca1c32..9fd2cbda14 100644 --- a/stepmania/src/CourseContentsList.cpp +++ b/stepmania/src/CourseContentsList.cpp @@ -10,7 +10,7 @@ #include "ThemeManager.h" #include "Steps.h" #include "GameState.h" -#include "StyleDef.h" +#include "Style.h" #include "RageTexture.h" diff --git a/stepmania/src/CourseEntryDisplay.cpp b/stepmania/src/CourseEntryDisplay.cpp index b740d4cb83..de81f0af81 100644 --- a/stepmania/src/CourseEntryDisplay.cpp +++ b/stepmania/src/CourseEntryDisplay.cpp @@ -10,7 +10,7 @@ #include "ThemeManager.h" #include "Steps.h" #include "GameState.h" -#include "StyleDef.h" +#include "Style.h" #include "ActorUtil.h" #define SEPARATE_COURSE_METERS THEME->GetMetricB(m_sName,"SeparateCourseMeters") diff --git a/stepmania/src/CourseUtil.cpp b/stepmania/src/CourseUtil.cpp index 52f2a07308..907a9653d1 100644 --- a/stepmania/src/CourseUtil.cpp +++ b/stepmania/src/CourseUtil.cpp @@ -6,7 +6,7 @@ #include "SongManager.h" #include "XmlFile.h" #include "GameState.h" -#include "StyleDef.h" +#include "Style.h" // @@ -100,14 +100,14 @@ void CourseUtil::SortCoursePointerArrayByDifficulty( vector &apCourses void CourseUtil::SortCoursePointerArrayByRanking( vector &apCourses ) { for(unsigned i=0; iUpdateCourseStats( GAMESTATE->GetCurrentStyleDef()->m_StepsType ); + apCourses[i]->UpdateCourseStats( GAMESTATE->GetCurrentStyle()->m_StepsType ); sort( apCourses.begin(), apCourses.end(), CompareCoursePointersByRanking ); } void CourseUtil::SortCoursePointerArrayByTotalDifficulty( vector &apCourses ) { for(unsigned i=0; iUpdateCourseStats( GAMESTATE->GetCurrentStyleDef()->m_StepsType ); + apCourses[i]->UpdateCourseStats( GAMESTATE->GetCurrentStyle()->m_StepsType ); sort( apCourses.begin(), apCourses.end(), CompareCoursePointersByTotalDifficulty ); } @@ -149,7 +149,7 @@ void CourseUtil::SortCoursePointerArrayByAvgDifficulty( vector &apCours course_sort_val.clear(); for(unsigned i = 0; i < apCourses.size(); ++i) { - const Trail* pTrail = apCourses[i]->GetTrail( GAMESTATE->GetCurrentStyleDef()->m_StepsType ); + const Trail* pTrail = apCourses[i]->GetTrail( GAMESTATE->GetCurrentStyle()->m_StepsType ); course_sort_val[apCourses[i]] = pTrail != NULL? (float) pTrail->GetMeter(): 0.0f; } sort( apCourses.begin(), apCourses.end(), CompareCoursePointersByTitle ); diff --git a/stepmania/src/DifficultyList.cpp b/stepmania/src/DifficultyList.cpp index 0e22af8534..33863fa170 100644 --- a/stepmania/src/DifficultyList.cpp +++ b/stepmania/src/DifficultyList.cpp @@ -3,7 +3,7 @@ #include "GameState.h" #include "song.h" #include "Steps.h" -#include "StyleDef.h" +#include "Style.h" #include "DifficultyMeter.h" #include "RageLog.h" #include "BitmapText.h" @@ -303,7 +303,7 @@ void DifficultyList::SetFromGameState() else { vector CurSteps; - song->GetSteps( CurSteps, GAMESTATE->GetCurrentStyleDef()->m_StepsType ); + song->GetSteps( CurSteps, GAMESTATE->GetCurrentStyle()->m_StepsType ); /* Should match the sort in ScreenSelectMusic::AfterMusicChange. */ StepsUtil::SortNotesArrayByDifficulty( CurSteps ); diff --git a/stepmania/src/DifficultyMeter.cpp b/stepmania/src/DifficultyMeter.cpp index 1f84a8323a..3f4463e803 100644 --- a/stepmania/src/DifficultyMeter.cpp +++ b/stepmania/src/DifficultyMeter.cpp @@ -9,7 +9,7 @@ #include "Course.h" #include "SongManager.h" #include "ActorUtil.h" -#include "StyleDef.h" +#include "Style.h" #define NUM_FEET_IN_METER THEME->GetMetricI(m_sName,"NumFeetInMeter") diff --git a/stepmania/src/GameDef.cpp b/stepmania/src/GameDef.cpp index 00b690b094..c00f5c4663 100644 --- a/stepmania/src/GameDef.cpp +++ b/stepmania/src/GameDef.cpp @@ -3,7 +3,7 @@ #include "RageLog.h" #include "RageUtil.h" #include "IniFile.h" -#include "StyleDef.h" +#include "Style.h" #include "RageException.h" #include "GameState.h" #include "InputMapper.h" @@ -29,16 +29,16 @@ MenuInput GameDef::GameInputToMenuInput( GameInput GameI ) const { PlayerNumber pn; - StyleDef::StyleType type = StyleDef::TWO_PLAYERS_TWO_CREDITS; - if( GAMESTATE->GetCurrentStyleDef() ) - type = GAMESTATE->GetCurrentStyleDef()->m_StyleType; + Style::StyleType type = Style::TWO_PLAYERS_TWO_CREDITS; + if( GAMESTATE->GetCurrentStyle() ) + type = GAMESTATE->GetCurrentStyle()->m_StyleType; switch( type ) { - case StyleDef::ONE_PLAYER_ONE_CREDIT: - case StyleDef::TWO_PLAYERS_TWO_CREDITS: + case Style::ONE_PLAYER_ONE_CREDIT: + case Style::TWO_PLAYERS_TWO_CREDITS: pn = (PlayerNumber)GameI.controller; break; - case StyleDef::ONE_PLAYER_TWO_CREDITS: + case Style::ONE_PLAYER_TWO_CREDITS: pn = GAMESTATE->m_MasterPlayerNumber; break; default: @@ -70,19 +70,19 @@ void GameDef::MenuInputToGameInput( MenuInput MenuI, GameInput GameIout[4] ) con GameIout[3].MakeInvalid(); GameController controller[2]; - StyleDef::StyleType type = StyleDef::TWO_PLAYERS_TWO_CREDITS; - if( GAMESTATE->GetCurrentStyleDef() ) - type = GAMESTATE->GetCurrentStyleDef()->m_StyleType; + Style::StyleType type = Style::TWO_PLAYERS_TWO_CREDITS; + if( GAMESTATE->GetCurrentStyle() ) + type = GAMESTATE->GetCurrentStyle()->m_StyleType; int iNumSidesUsing = 1; switch( type ) { - case StyleDef::ONE_PLAYER_ONE_CREDIT: - case StyleDef::TWO_PLAYERS_TWO_CREDITS: + case Style::ONE_PLAYER_ONE_CREDIT: + case Style::TWO_PLAYERS_TWO_CREDITS: controller[0] = (GameController)MenuI.player; iNumSidesUsing = 1; break; - case StyleDef::ONE_PLAYER_TWO_CREDITS: + case Style::ONE_PLAYER_TWO_CREDITS: controller[0] = GAME_CONTROLLER_1; controller[1] = GAME_CONTROLLER_2; iNumSidesUsing = 2; diff --git a/stepmania/src/GameDef.h b/stepmania/src/GameDef.h index 93af66458c..ebd750a7f0 100644 --- a/stepmania/src/GameDef.h +++ b/stepmania/src/GameDef.h @@ -31,7 +31,7 @@ const int MAX_STYLES_PER_GAME = 10; // MenuLeft and MenuRight as long as "MenuLeft (optional)" and "MenuRight (optional)" are not mapped. // -class StyleDef; +class Style; #define NO_DEFAULT_KEY -1 diff --git a/stepmania/src/GameManager.cpp b/stepmania/src/GameManager.cpp index 96ee1537bf..7fa3bf448f 100644 --- a/stepmania/src/GameManager.cpp +++ b/stepmania/src/GameManager.cpp @@ -1184,7 +1184,7 @@ GameDef g_GameDefs[NUM_GAMES] = }, }; -StyleDef g_StyleDefs[] = +Style g_Styles[] = { { // STYLE_DANCE_SINGLE GAME_DANCE, // m_Game @@ -1194,7 +1194,7 @@ StyleDef g_StyleDefs[] = true, // m_bUsedForHowToPlay "single", // m_szName STEPS_TYPE_DANCE_SINGLE, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 160, 480 }, // m_iCenterX 4, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1225,7 +1225,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "versus", // m_szName STEPS_TYPE_DANCE_SINGLE, // m_StepsType - StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType + Style::TWO_PLAYERS_TWO_CREDITS, // m_StyleType { 160, 480 }, // m_iCenterX 4, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1256,7 +1256,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "double", // m_szName STEPS_TYPE_DANCE_DOUBLE, // m_StepsType - StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType + Style::ONE_PLAYER_TWO_CREDITS, // m_StyleType { 320, 320 }, // m_iCenterX 8, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1295,7 +1295,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "couple", // m_szName STEPS_TYPE_DANCE_COUPLE, // m_StepsType - StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType + Style::TWO_PLAYERS_TWO_CREDITS, // m_StyleType { 160, 480 }, // m_iCenterX 4, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1326,7 +1326,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "solo", // m_szName STEPS_TYPE_DANCE_SOLO, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 320, 320 }, // m_iCenterX 6, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1361,7 +1361,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "couple-edit", // m_szName STEPS_TYPE_DANCE_COUPLE, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 160, 480 }, // m_iCenterX 8, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1395,7 +1395,7 @@ StyleDef g_StyleDefs[] = /* { // STYLE_DANCE_SOLO_VERSUS "dance-solo-versus", // m_szName STEPS_TYPE_DANCE_SOLO, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 160, 480 }, // m_iCenterX 6, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1430,7 +1430,7 @@ StyleDef g_StyleDefs[] = true, // m_bUsedForHowToPlay "single", // m_szName STEPS_TYPE_PUMP_SINGLE, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 160, 480 }, // m_iCenterX 5, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1463,7 +1463,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "versus", // m_szName STEPS_TYPE_PUMP_SINGLE, // m_StepsType - StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType + Style::TWO_PLAYERS_TWO_CREDITS, // m_StyleType { 160, 480 }, // m_iCenterX 5, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1496,7 +1496,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "halfdouble", // m_szName STEPS_TYPE_PUMP_HALFDOUBLE, // m_StepsType - StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType + Style::ONE_PLAYER_TWO_CREDITS, // m_StyleType { 320, 320 }, // m_iCenterX 6, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1531,7 +1531,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "double", // m_szName STEPS_TYPE_PUMP_DOUBLE, // m_StepsType - StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType + Style::ONE_PLAYER_TWO_CREDITS, // m_StyleType { 320, 320 }, // m_iCenterX 10, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1574,7 +1574,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "couple", // m_szName STEPS_TYPE_PUMP_COUPLE, // m_StepsType - StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType + Style::TWO_PLAYERS_TWO_CREDITS, // m_StyleType { 160, 480 }, // m_iCenterX 5, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1607,7 +1607,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "couple-edit", // m_szName STEPS_TYPE_PUMP_COUPLE, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 160, 480 }, // m_iCenterX 10, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1645,7 +1645,7 @@ StyleDef g_StyleDefs[] = true, // m_bUsedForHowToPlay "single", // m_szName STEPS_TYPE_EZ2_SINGLE, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 160, 480 }, // m_iCenterX 5, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1678,7 +1678,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "real", // m_szName STEPS_TYPE_EZ2_REAL, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 160, 480 }, // m_iCenterX 7, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1715,7 +1715,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "versus", // m_szName STEPS_TYPE_EZ2_SINGLE, // m_StepsType - StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType + Style::TWO_PLAYERS_TWO_CREDITS, // m_StyleType { 160, 480 }, // m_iCenterX 5, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1748,7 +1748,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "versusReal", // m_szName STEPS_TYPE_EZ2_REAL, // m_StepsType - StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType + Style::TWO_PLAYERS_TWO_CREDITS, // m_StyleType { 160, 480 }, // m_iCenterX 7, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1785,7 +1785,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "double", // m_szName STEPS_TYPE_EZ2_DOUBLE, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 320, 320 }, // m_iCenterX 10, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1828,7 +1828,7 @@ StyleDef g_StyleDefs[] = true, // m_bUsedForHowToPlay "single", // m_szName STEPS_TYPE_PARA_SINGLE, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 320, 320 }, // m_iCenterX 5, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1861,7 +1861,7 @@ StyleDef g_StyleDefs[] = true, // m_bUsedForHowToPlay "single", // m_szName STEPS_TYPE_DS3DDX_SINGLE, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 160, 480 }, // m_iCenterX 8, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1900,7 +1900,7 @@ StyleDef g_StyleDefs[] = true, // m_bUsedForHowToPlay "single", // m_szName STEPS_TYPE_BM_SINGLE, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 160, 480 }, // m_iCenterX 6, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1935,7 +1935,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "double", // m_szName STEPS_TYPE_BM_DOUBLE, // m_StepsType - StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType + Style::ONE_PLAYER_TWO_CREDITS, // m_StyleType { 320, 320 }, // m_iCenterX 12, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -1982,7 +1982,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "single7", // m_szName STEPS_TYPE_IIDX_SINGLE7, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 160, 480 }, // m_iCenterX 8, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -2021,7 +2021,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "double7", // m_szName STEPS_TYPE_IIDX_DOUBLE7, // m_StepsType - StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType + Style::ONE_PLAYER_TWO_CREDITS, // m_StyleType { 320, 320 }, // m_iCenterX 16, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -2076,7 +2076,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "single5", // m_szName STEPS_TYPE_IIDX_SINGLE5, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 160, 480 }, // m_iCenterX 8, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -2115,7 +2115,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "double5", // m_szName STEPS_TYPE_IIDX_DOUBLE5, // m_StepsType - StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType + Style::ONE_PLAYER_TWO_CREDITS, // m_StyleType { 320, 320 }, // m_iCenterX 16, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -2170,7 +2170,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "single5-edit", // m_szName STEPS_TYPE_IIDX_SINGLE5, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 160, 480 }, // m_iCenterX 8, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -2209,7 +2209,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "double5-edit", // m_szName STEPS_TYPE_IIDX_DOUBLE5, // m_StepsType - StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType + Style::ONE_PLAYER_TWO_CREDITS, // m_StyleType { 320, 320 }, // m_iCenterX 16, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -2264,7 +2264,7 @@ StyleDef g_StyleDefs[] = true, // m_bUsedForHowToPlay "single", // m_szName STEPS_TYPE_MANIAX_SINGLE, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 160, 480 }, // m_iCenterX 4, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -2295,7 +2295,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "versus", // m_szName STEPS_TYPE_MANIAX_SINGLE, // m_StepsType - StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType + Style::TWO_PLAYERS_TWO_CREDITS, // m_StyleType { 160, 480 }, // m_iCenterX 4, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -2326,7 +2326,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "double", // m_szName STEPS_TYPE_MANIAX_DOUBLE, // m_StepsType - StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType + Style::ONE_PLAYER_TWO_CREDITS, // m_StyleType { 320, 320 }, // m_iCenterX 8, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -2365,7 +2365,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "single4", // m_szName STEPS_TYPE_TECHNO_SINGLE4, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 112, 528 }, // m_iCenterX 4, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -2396,7 +2396,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "single5", // m_szName STEPS_TYPE_TECHNO_SINGLE5, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 140, 500 }, // m_iCenterX 5, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -2429,7 +2429,7 @@ StyleDef g_StyleDefs[] = true, // m_bUsedForHowToPlay "single8", // m_szName STEPS_TYPE_TECHNO_SINGLE8, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 224, 416 }, // m_iCenterX 8, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -2468,7 +2468,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "versus4", // m_szName STEPS_TYPE_TECHNO_SINGLE4, // m_StepsType - StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType + Style::TWO_PLAYERS_TWO_CREDITS, // m_StyleType { 112, 528 }, // m_iCenterX 4, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -2499,7 +2499,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "versus5", // m_szName STEPS_TYPE_TECHNO_SINGLE5, // m_StepsType - StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType + Style::TWO_PLAYERS_TWO_CREDITS, // m_StyleType { 140, 500 }, // m_iCenterX 5, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -2532,7 +2532,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "versus8", // m_szName STEPS_TYPE_TECHNO_SINGLE8, // m_StepsType - StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType + Style::TWO_PLAYERS_TWO_CREDITS, // m_StyleType { 132, 508 }, // m_iCenterX 8, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -2571,7 +2571,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "double4", // m_szName STEPS_TYPE_TECHNO_DOUBLE4, // m_StepsType - StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType + Style::ONE_PLAYER_TWO_CREDITS, // m_StyleType { 320, 320 }, // m_iCenterX 8, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -2610,7 +2610,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "double5", // m_szName STEPS_TYPE_TECHNO_DOUBLE5, // m_StepsType - StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType + Style::ONE_PLAYER_TWO_CREDITS, // m_StyleType { 320, 320 }, // m_iCenterX 10, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -2653,7 +2653,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "pnm-five", // m_szName STEPS_TYPE_PNM_FIVE, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 320, 320 }, // m_iCenterX 5, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -2686,7 +2686,7 @@ StyleDef g_StyleDefs[] = true, // m_bUsedForHowToPlay "pnm-nine", // m_szName STEPS_TYPE_PNM_NINE, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 320, 320 }, // m_iCenterX 9, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -2727,7 +2727,7 @@ StyleDef g_StyleDefs[] = false, // m_bUsedForHowToPlay "cabinet", // m_szName STEPS_TYPE_LIGHTS_CABINET, // m_StepsType - StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType + Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType { 320, 320 }, // m_iCenterX NUM_CABINET_LIGHTS, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; @@ -2760,7 +2760,7 @@ StyleDef g_StyleDefs[] = }, }; -#define NUM_STYLES ARRAYSIZE(g_StyleDefs) +#define NUM_STYLES ARRAYSIZE(g_Styles) GameManager::GameManager() @@ -2777,11 +2777,11 @@ GameDef* GameManager::GetGameDefForGame( Game g ) return &g_GameDefs[ g ]; } -void GameManager::GetStylesForGame( Game game, vector& aStylesAddTo, bool editor ) +void GameManager::GetStylesForGame( Game game, vector& aStylesAddTo, bool editor ) { for( unsigned s=0; sm_Game != game) continue; if( !editor && !style->m_bUsedForGameplay ) @@ -2793,16 +2793,16 @@ void GameManager::GetStylesForGame( Game game, vector& aStylesA } } -const StyleDef* GameManager::GetEditorStyleForNotesType( StepsType st ) +const Style* GameManager::GetEditorStyleForNotesType( StepsType st ) { for( unsigned s=0; sm_StepsType == st && style->m_bUsedForEdit ) return style; } - ASSERT(0); // this Game is missing a StyleDef that can be used with the editor + ASSERT(0); // this Game is missing a Style that can be used with the editor return NULL; } @@ -2814,7 +2814,7 @@ void GameManager::GetNotesTypesForGame( Game game, vector& aNotesType bool found = false; for( unsigned s=0; !found && sm_Game != game ) continue; for( int pl = 0; !found && pl < NUM_PLAYERS; ++pl) @@ -2830,29 +2830,29 @@ void GameManager::GetNotesTypesForGame( Game game, vector& aNotesType } } -const StyleDef* GameManager::GetDemonstrationStyleForGame( Game game ) +const Style* GameManager::GetDemonstrationStyleForGame( Game game ) { for( unsigned s=0; sm_Game == game && style->m_bUsedForDemonstration ) return style; } - ASSERT(0); // this Game is missing a StyleDef that can be used with the demonstration + ASSERT(0); // this Game is missing a Style that can be used with the demonstration return NULL; } -const StyleDef* GameManager::GetHowToPlayStyleForGame( Game game ) +const Style* GameManager::GetHowToPlayStyleForGame( Game game ) { for( unsigned s=0; sm_Game == game && style->m_bUsedForHowToPlay ) return style; } - ASSERT(0); // this Game is missing a StyleDef that can be used with HowToPlay + ASSERT(0); // this Game is missing a Style that can be used with HowToPlay return NULL; } @@ -2930,7 +2930,7 @@ CString GameManager::NotesTypeToThemedString( StepsType st ) return s; } -CString GameManager::StyleToThemedString( const StyleDef* style ) +CString GameManager::StyleToThemedString( const Style* style ) { CString s = style->m_szName; s = Capitalize( s ); @@ -2950,11 +2950,11 @@ Game GameManager::StringToGameType( CString sGameType ) } -const StyleDef* GameManager::GameAndStringToStyle( Game game, CString sStyle ) +const Style* GameManager::GameAndStringToStyle( Game game, CString sStyle ) { for( unsigned s=0; sm_Game != game ) continue; if( sStyle.CompareNoCase(style->m_szName) == 0 ) diff --git a/stepmania/src/GameManager.h b/stepmania/src/GameManager.h index 9f436203c8..0cd8ee9c62 100644 --- a/stepmania/src/GameManager.h +++ b/stepmania/src/GameManager.h @@ -1,10 +1,10 @@ -/* GameManager - Manages GameDefs and StyleDefs. */ +/* GameManager - Manages GameDefs and Styles. */ #ifndef GAMEMANAGER_H #define GAMEMANAGER_H #include "GameDef.h" -#include "StyleDef.h" +#include "Style.h" #include "Game.h" class IniFile; @@ -17,12 +17,12 @@ public: GameDef* GetGameDefForGame( Game g ); - void GetStylesForGame( Game game, vector& aStylesAddTo, bool editor=false ); - void GetAllStyles( vector& aStylesAddTo, bool editor=false ); + void GetStylesForGame( Game game, vector& aStylesAddTo, bool editor=false ); + void GetAllStyles( vector& aStylesAddTo, bool editor=false ); void GetNotesTypesForGame( Game game, vector& aNotesTypeAddTo ); - const StyleDef* GetEditorStyleForNotesType( StepsType st ); - const StyleDef* GetDemonstrationStyleForGame( Game game ); - const StyleDef* GetHowToPlayStyleForGame( Game game ); + const Style* GetEditorStyleForNotesType( StepsType st ); + const Style* GetDemonstrationStyleForGame( Game game ); + const Style* GetHowToPlayStyleForGame( Game game ); void GetEnabledGames( vector& aGamesOut ); bool IsGameEnabled( Game game ); @@ -32,8 +32,8 @@ public: static CString NotesTypeToString( StepsType st ); static CString NotesTypeToThemedString( StepsType st ); static Game StringToGameType( CString sGameType ); - const StyleDef* GameAndStringToStyle( Game game, CString sStyle ); - static CString StyleToThemedString( const StyleDef* s ); + const Style* GameAndStringToStyle( Game game, CString sStyle ); + static CString StyleToThemedString( const Style* s ); }; extern GameManager* GAMEMAN; // global and accessable from anywhere in our program diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 682fb9639e..6c6a0e178a 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -101,7 +101,7 @@ void GameState::Reset() ASSERT( THEME ); m_timeGameStarted.SetZero(); - m_pCurStyleDef = NULL; + m_pCurStyle = NULL; FOREACH_PlayerNumber( p ) m_bSideIsJoined[p] = false; m_bPlayersFinalized = false; @@ -228,7 +228,7 @@ void CheckStageStats( const StageStats &ss, int p ) CHECKPOINT_M( ss.pSong->GetFullTranslitTitle() ); ASSERT( ss.pSteps[p] ); ASSERT_M( ss.playMode < NUM_PLAY_MODES, ssprintf("playmode %i", ss.playMode) ); - ASSERT( ss.pStyleDef != NULL ); + ASSERT( ss.pStyle != NULL ); ASSERT_M( ss.pSteps[p]->GetDifficulty() < NUM_DIFFICULTIES, ssprintf("difficulty %i", ss.pSteps[p]->GetDifficulty()) ); /* Meter values can exceed MAX_METER; MAX_METER is just the highest meter value we * display/track. */ @@ -287,7 +287,7 @@ void AddPlayerStatsToProfile( Profile *pProfile, const StageStats &ss, PlayerNum const int iMeter = clamp( ss.iMeter[p], 0, MAX_METER ); pProfile->m_iNumSongsPlayedByPlayMode[ss.playMode]++; - pProfile->m_iNumSongsPlayedByStyle[ss.pStyleDef]++; + pProfile->m_iNumSongsPlayedByStyle[ss.pStyle]++; pProfile->m_iNumSongsPlayedByDifficulty[ss.pSteps[p]->GetDifficulty()]++; pProfile->m_iNumSongsPlayedByMeter[iMeter]++; pProfile->m_iTotalDancePoints += ss.iActualDancePoints[p]; @@ -744,7 +744,7 @@ CString GameState::GetPlayerDisplayName( PlayerNumber pn ) const bool GameState::PlayersCanJoin() const { - return GetNumSidesJoined() == 0 || this->m_pCurStyleDef == NULL; // selecting a style finalizes the players + return GetNumSidesJoined() == 0 || this->m_pCurStyle == NULL; // selecting a style finalizes the players } bool GameState::EnoughCreditsToJoin() const @@ -777,7 +777,7 @@ GameDef* GameState::GetCurrentGameDef() return GAMEMAN->GetGameDefForGame( m_CurGame ); } -const StyleDef* GameState::GetCurrentStyleDef() const +const Style* GameState::GetCurrentStyle() const { /* // HACK: if we're in TM doing PLAY_MODE_BATTLE or PLAY_MODE_RAVE, @@ -785,10 +785,10 @@ const StyleDef* GameState::GetCurrentStyleDef() const // What is the problem that this is fixing? -Chris if( m_CurGame == GAME_TECHNO && ( m_PlayMode == PLAY_MODE_BATTLE || m_PlayMode == PLAY_MODE_RAVE ) ) - return GAMEMAN->GetStyleDefForStyle( STYLE_TECHNO_VERSUS8 ); + return GAMEMAN->GetStyleForStyle( STYLE_TECHNO_VERSUS8 ); */ - return m_pCurStyleDef; + return m_pCurStyle; } @@ -816,12 +816,12 @@ int GameState::GetNumPlayersEnabled() const bool GameState::PlayerUsingBothSides() const { - return this->GetCurrentStyleDef()->m_StyleType==StyleDef::ONE_PLAYER_TWO_CREDITS; + return this->GetCurrentStyle()->m_StyleType==Style::ONE_PLAYER_TWO_CREDITS; } bool GameState::IsHumanPlayer( PlayerNumber pn ) const { - if( m_pCurStyleDef == NULL ) // no style chosen + if( m_pCurStyle == NULL ) // no style chosen { if( this->PlayersCanJoin() ) return m_bSideIsJoined[pn]; // only allow input from sides that have already joined @@ -829,12 +829,12 @@ bool GameState::IsHumanPlayer( PlayerNumber pn ) const return true; // if we can't join, then we're on a screen like MusicScroll or GameOver } - switch( GetCurrentStyleDef()->m_StyleType ) + switch( GetCurrentStyle()->m_StyleType ) { - case StyleDef::TWO_PLAYERS_TWO_CREDITS: + case Style::TWO_PLAYERS_TWO_CREDITS: return true; - case StyleDef::ONE_PLAYER_ONE_CREDIT: - case StyleDef::ONE_PLAYER_TWO_CREDITS: + case Style::ONE_PLAYER_ONE_CREDIT: + case Style::ONE_PLAYER_TWO_CREDITS: return pn == m_MasterPlayerNumber; default: ASSERT(0); // invalid style type @@ -1346,7 +1346,7 @@ void GameState::GetRankingFeats( PlayerNumber pn, vector &asFeatsOu CHECKPOINT; unsigned i, j; - StepsType st = this->GetCurrentStyleDef()->m_StepsType; + StepsType st = this->GetCurrentStyle()->m_StepsType; // // Find unique Song and Steps combinations that were played. @@ -1751,7 +1751,7 @@ bool GameState::ChangePreferredCourseDifficulty( PlayerNumber pn, int dir ) return false; if( asDiff.find(cd) == asDiff.end() ) continue; /* not available */ - if( !pCourse || pCourse->GetTrail( GAMESTATE->GetCurrentStyleDef()->m_StepsType, cd ) ) + if( !pCourse || pCourse->GetTrail( GAMESTATE->GetCurrentStyle()->m_StepsType, cd ) ) break; } @@ -1804,7 +1804,7 @@ LuaFunction_NoArgs( IsExtraStage, GAMESTATE->IsExtraStage() ) LuaFunction_NoArgs( IsExtraStage2, GAMESTATE->IsExtraStage2() ) LuaFunction_NoArgs( CourseSongIndex, GAMESTATE->GetCourseSongIndex() ) LuaFunction_NoArgs( PlayModeName, PlayModeToString(GAMESTATE->m_PlayMode) ) -LuaFunction_NoArgs( CurStyleName, CString( GAMESTATE->m_pCurStyleDef == NULL ? "none": GAMESTATE->GetCurrentStyleDef()->m_szName ) ) +LuaFunction_NoArgs( CurStyleName, CString( GAMESTATE->m_pCurStyle == NULL ? "none": GAMESTATE->GetCurrentStyle()->m_szName ) ) LuaFunction_NoArgs( GetNumPlayersEnabled, GAMESTATE->GetNumPlayersEnabled() ) LuaFunction_NoArgs( PlayerUsingBothSides, GAMESTATE->PlayerUsingBothSides() ) LuaFunction_NoArgs( GetEasiestNotesDifficulty, GAMESTATE->GetEasiestNotesDifficulty() ) diff --git a/stepmania/src/GameState.h b/stepmania/src/GameState.h index 6239892a3e..ead504cde6 100644 --- a/stepmania/src/GameState.h +++ b/stepmania/src/GameState.h @@ -19,12 +19,12 @@ class Steps; class Course; class Trail; class GameDef; -class StyleDef; +class Style; class NoteFieldPositioning; class Character; class TimingData; struct StageStats; -class StyleDef; +class Style; class GameState { @@ -46,7 +46,7 @@ public: // Main state info // Game m_CurGame; - const StyleDef* m_pCurStyleDef; + const Style* m_pCurStyle; bool m_bSideIsJoined[NUM_PLAYERS]; // left side, right side bool m_bPlayersFinalized; PlayMode m_PlayMode; // many screens display different info depending on this value @@ -72,7 +72,7 @@ public: int GetNumSidesJoined() const; GameDef* GetCurrentGameDef(); - const StyleDef* GetCurrentStyleDef() const; + const Style* GetCurrentStyle() const; void GetPlayerInfo( PlayerNumber pn, bool& bIsEnabledOut, bool& bIsHumanOut ); bool IsPlayerEnabled( PlayerNumber pn ) const; diff --git a/stepmania/src/GhostArrowRow.cpp b/stepmania/src/GhostArrowRow.cpp index 2e7394dfaf..e6cea90b02 100644 --- a/stepmania/src/GhostArrowRow.cpp +++ b/stepmania/src/GhostArrowRow.cpp @@ -20,9 +20,9 @@ void GhostArrowRow::Load( PlayerNumber pn, CString NoteSkin, float fYReverseOffs m_PlayerNumber = pn; m_fYReverseOffsetPixels = fYReverseOffset; - const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); + const Style* pStyle = GAMESTATE->GetCurrentStyle(); - m_iNumCols = pStyleDef->m_iColsPerPlayer; + m_iNumCols = pStyle->m_iColsPerPlayer; // init arrows for( int c=0; cGetStepsByDifficulty( GAMESTATE->GetCurrentStyleDef()->m_StepsType, (Difficulty)i ); + Steps* pSteps = pSong->GetStepsByDifficulty( GAMESTATE->GetCurrentStyle()->m_StepsType, (Difficulty)i ); if( pSteps ) rvs[i] = pSteps->GetRadarValues(); } diff --git a/stepmania/src/InputMapper.cpp b/stepmania/src/InputMapper.cpp index 6052fbb8ea..881a2b9b3f 100644 --- a/stepmania/src/InputMapper.cpp +++ b/stepmania/src/InputMapper.cpp @@ -522,13 +522,13 @@ bool InputMapper::GameToDevice( GameInput GameI, int iSoltNum, DeviceInput& Devi void InputMapper::GameToStyle( GameInput GameI, StyleInput &StyleI ) { - if( GAMESTATE->m_pCurStyleDef == NULL ) + if( GAMESTATE->m_pCurStyle == NULL ) { StyleI.MakeInvalid(); return; } - StyleI = GAMESTATE->m_pCurStyleDef->GameInputToStyleInput( GameI ); + StyleI = GAMESTATE->m_pCurStyle->GameInputToStyleInput( GameI ); } void InputMapper::GameToMenu( GameInput GameI, MenuInput &MenuI ) @@ -539,8 +539,8 @@ void InputMapper::GameToMenu( GameInput GameI, MenuInput &MenuI ) void InputMapper::StyleToGame( StyleInput StyleI, GameInput &GameI ) { - const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); - GameI = pStyleDef->StyleInputToGameInput( StyleI ); + const Style* pStyle = GAMESTATE->GetCurrentStyle(); + GameI = pStyle->StyleInputToGameInput( StyleI ); } diff --git a/stepmania/src/JukeboxMenu.h b/stepmania/src/JukeboxMenu.h index ecf29f3041..beb0ae061b 100644 --- a/stepmania/src/JukeboxMenu.h +++ b/stepmania/src/JukeboxMenu.h @@ -9,7 +9,7 @@ #include "RandomSample.h" #include "BitmapText.h" -class StyleDef; +class Style; class JukeboxMenu: public ActorFrame { @@ -49,7 +49,7 @@ public: } - const StyleDef* GetSelectedStyle() { return m_Styles[m_iSelection[ROW_STYLE]]; } + const Style* GetSelectedStyle() { return m_Styles[m_iSelection[ROW_STYLE]]; } CString GetSelectedGroup() { return m_sGroups[m_iSelection[ROW_GROUP]]; } CString GetSelectedDifficultyString() { return m_sDifficulties[m_iSelection[ROW_DIFFICULTY]]; } Difficulty GetSelectedDifficulty() { return StringToDifficulty( GetSelectedDifficultyString() ); } @@ -62,7 +62,7 @@ private: BitmapText m_textLabel[NUM_ROWS]; BitmapText m_textValue[NUM_ROWS]; - vector m_Styles; + vector m_Styles; CStringArray m_sGroups; vector m_sDifficulties; CStringArray m_sModifiers; diff --git a/stepmania/src/ListDisplay.cpp b/stepmania/src/ListDisplay.cpp index a22381f9f3..64b7e00d66 100644 --- a/stepmania/src/ListDisplay.cpp +++ b/stepmania/src/ListDisplay.cpp @@ -10,7 +10,7 @@ #include "ThemeManager.h" #include "Steps.h" #include "GameState.h" -#include "StyleDef.h" +#include "Style.h" #include "RageTexture.h" diff --git a/stepmania/src/Makefile.am b/stepmania/src/Makefile.am index 5a92f3b562..c11182d529 100644 --- a/stepmania/src/Makefile.am +++ b/stepmania/src/Makefile.am @@ -67,7 +67,7 @@ PlayerAI.cpp PlayerAI.h PlayerNumber.cpp PlayerNumber.h PlayerOptions.cpp Player ProfileHtml.cpp ProfileHtml.h RandomSample.cpp RandomSample.h ScoreKeeper.h ScoreKeeperMAX2.cpp ScoreKeeperMAX2.h \ ScoreKeeperRave.cpp ScoreKeeperRave.h Song.cpp song.h SongCacheIndex.cpp SongCacheIndex.h \ SongOptions.cpp SongOptions.h SongUtil.cpp SongUtil.h StageStats.cpp StageStats.h Steps.cpp Steps.h \ -StepsUtil.cpp StepsUtil.h StyleDef.cpp StyleDef.h \ +StepsUtil.cpp StepsUtil.h Style.cpp Style.h \ StyleInput.h TimeConstants.cpp TimeConstants.h TimingData.cpp TimingData.h \ Trail.cpp Trail.h TrailUtil.cpp TrailUtil.h TitleSubstitution.cpp TitleSubstitution.h diff --git a/stepmania/src/ModeChoice.cpp b/stepmania/src/ModeChoice.cpp index 942e5f17af..280924b508 100644 --- a/stepmania/src/ModeChoice.cpp +++ b/stepmania/src/ModeChoice.cpp @@ -21,7 +21,7 @@ void ModeChoice::Init() m_bInvalid = true; m_iIndex = -1; m_game = GAME_INVALID; - m_pStyleDef = NULL; + m_pStyle = NULL; m_pm = PLAY_MODE_INVALID; m_dc = DIFFICULTY_INVALID; m_CourseDifficulty = DIFFICULTY_INVALID; @@ -52,7 +52,7 @@ bool ModeChoice::DescribesCurrentMode( PlayerNumber pn ) const return false; if( m_pm != PLAY_MODE_INVALID && GAMESTATE->m_PlayMode != m_pm ) return false; - if( m_pStyleDef && GAMESTATE->m_pCurStyleDef != m_pStyleDef ) + if( m_pStyle && GAMESTATE->m_pCurStyle != m_pStyle ) return false; // HACK: don't compare m_dc if m_pSteps is set. This causes problems // in ScreenSelectOptionsMaster::ImportOptions if m_PreferredDifficulty @@ -130,9 +130,9 @@ void ModeChoice::Load( int iIndex, CString sChoice ) if( sName == "style" ) { - const StyleDef* style = GAMEMAN->GameAndStringToStyle( GAMESTATE->m_CurGame, sValue ); + const Style* style = GAMEMAN->GameAndStringToStyle( GAMESTATE->m_CurGame, sValue ); if( style ) - m_pStyleDef = style; + m_pStyle = style; else m_bInvalid |= true; } @@ -208,15 +208,15 @@ void ModeChoice::Load( int iIndex, CString sChoice ) if( !m_bInvalid && sSteps != "" ) { Song *pSong = (m_pSong != NULL)? m_pSong:GAMESTATE->m_pCurSong; - const StyleDef *style = m_pStyleDef ? m_pStyleDef : GAMESTATE->m_pCurStyleDef; + const Style *style = m_pStyle ? m_pStyle : GAMESTATE->m_pCurStyle; if( pSong == NULL || style == NULL ) RageException::Throw( "Must set Song and Style to set Steps" ); Difficulty dc = StringToDifficulty( sSteps ); if( dc != DIFFICULTY_EDIT ) - m_pSteps = pSong->GetStepsByDifficulty( m_pStyleDef->m_StepsType, dc ); + m_pSteps = pSong->GetStepsByDifficulty( m_pStyle->m_StepsType, dc ); else - m_pSteps = pSong->GetStepsByDescription( m_pStyleDef->m_StepsType, sSteps ); + m_pSteps = pSong->GetStepsByDescription( m_pStyle->m_StepsType, sSteps ); if( m_pSteps == NULL ) { m_sInvalidReason = "steps not found"; @@ -237,18 +237,18 @@ int GetNumCreditsPaid() } -int GetCreditsRequiredToPlayStyle( const StyleDef *style ) +int GetCreditsRequiredToPlayStyle( const Style *style ) { if( PREFSMAN->GetPremium() == PrefsManager::JOINT_PREMIUM ) return 1; switch( style->m_StyleType ) { - case StyleDef::ONE_PLAYER_ONE_CREDIT: + case Style::ONE_PLAYER_ONE_CREDIT: return 1; - case StyleDef::TWO_PLAYERS_TWO_CREDITS: + case Style::TWO_PLAYERS_TWO_CREDITS: return 2; - case StyleDef::ONE_PLAYER_TWO_CREDITS: + case Style::ONE_PLAYER_TWO_CREDITS: return (PREFSMAN->GetPremium() == PrefsManager::DOUBLES_PREMIUM) ? 1 : 2; default: ASSERT(0); @@ -256,7 +256,7 @@ int GetCreditsRequiredToPlayStyle( const StyleDef *style ) } } -static bool AreStyleAndPlayModeCompatible( const StyleDef *style, PlayMode pm ) +static bool AreStyleAndPlayModeCompatible( const Style *style, PlayMode pm ) { if( style == NULL || pm == PLAY_MODE_INVALID ) return true; @@ -273,7 +273,7 @@ static bool AreStyleAndPlayModeCompatible( const StyleDef *style, PlayMode pm ) return false; /* Don't allow battle modes if the style takes both sides. */ - if( style->m_StyleType==StyleDef::ONE_PLAYER_TWO_CREDITS ) + if( style->m_StyleType==Style::ONE_PLAYER_TWO_CREDITS ) return false; } @@ -289,11 +289,11 @@ bool ModeChoice::IsPlayable( CString *why ) const return false; } - if ( m_pStyleDef ) + if ( m_pStyle ) { int iCredits = GAMESTATE->m_iCoins / PREFSMAN->m_iCoinsPerCredit; const int iNumCreditsPaid = GetNumCreditsPaid(); - const int iNumCreditsRequired = GetCreditsRequiredToPlayStyle(m_pStyleDef); + const int iNumCreditsRequired = GetCreditsRequiredToPlayStyle(m_pStyle); switch( PREFSMAN->GetCoinMode() ) { @@ -334,7 +334,7 @@ bool ModeChoice::IsPlayable( CString *why ) const /* If both sides are joined, disallow singles modes, since easy to select them * accidentally, instead of versus mode. */ - if( m_pStyleDef->m_StyleType == StyleDef::ONE_PLAYER_ONE_CREDIT && + if( m_pStyle->m_StyleType == Style::ONE_PLAYER_ONE_CREDIT && GAMESTATE->GetNumSidesJoined() > 1 ) { if( why ) @@ -345,10 +345,10 @@ bool ModeChoice::IsPlayable( CString *why ) const /* Don't allow a PlayMode that's incompatible with our current Style (if set), * and vice versa. */ - if( m_pm != PLAY_MODE_INVALID || m_pStyleDef != NULL ) + if( m_pm != PLAY_MODE_INVALID || m_pStyle != NULL ) { const PlayMode pm = (m_pm != PLAY_MODE_INVALID) ? m_pm : GAMESTATE->m_PlayMode; - const StyleDef *style = (m_pStyleDef != NULL)? m_pStyleDef: GAMESTATE->m_pCurStyleDef; + const Style *style = (m_pStyle != NULL)? m_pStyle: GAMESTATE->m_pCurStyle; if( !AreStyleAndPlayModeCompatible( style, pm ) ) { if( why ) @@ -408,15 +408,15 @@ void ModeChoice::Apply( PlayerNumber pn ) const if( m_pm != PLAY_MODE_INVALID ) GAMESTATE->m_PlayMode = m_pm; - if( m_pStyleDef != NULL ) + if( m_pStyle != NULL ) { - GAMESTATE->m_pCurStyleDef = m_pStyleDef; + GAMESTATE->m_pCurStyle = m_pStyle; // It's possible to choose a style that didn't have enough // players joined. If enough players aren't joined, then // we need to subtract credits for the sides that will be // joined as a result of applying this option. - int iNumCreditsRequired = GetCreditsRequiredToPlayStyle(m_pStyleDef); + int iNumCreditsRequired = GetCreditsRequiredToPlayStyle(m_pStyle); int iNumCreditsPaid = GetNumCreditsPaid(); int iNumCreditsOwed = iNumCreditsRequired - iNumCreditsPaid; @@ -425,12 +425,12 @@ void ModeChoice::Apply( PlayerNumber pn ) const // If only one side is joined and we picked a style // that requires both sides, join the other side. - switch( m_pStyleDef->m_StyleType ) + switch( m_pStyle->m_StyleType ) { - case StyleDef::ONE_PLAYER_ONE_CREDIT: + case Style::ONE_PLAYER_ONE_CREDIT: break; - case StyleDef::TWO_PLAYERS_TWO_CREDITS: - case StyleDef::ONE_PLAYER_TWO_CREDITS: + case Style::TWO_PLAYERS_TWO_CREDITS: + case Style::ONE_PLAYER_TWO_CREDITS: { FOREACH_PlayerNumber( p ) GAMESTATE->m_bSideIsJoined[p] = true; @@ -476,7 +476,7 @@ void ModeChoice::Apply( PlayerNumber pn ) const // // We know what players are joined at the time we set the Style // - if( m_pStyleDef != NULL ) + if( m_pStyle != NULL ) { GAMESTATE->PlayersFinalized(); } @@ -486,7 +486,7 @@ bool ModeChoice::IsZero() const { if( m_game != GAME_INVALID || m_pm != PLAY_MODE_INVALID || - m_pStyleDef != NULL || + m_pStyle != NULL || m_dc != DIFFICULTY_INVALID || m_sAnnouncer != "" || m_sModifiers != "" || diff --git a/stepmania/src/ModeChoice.h b/stepmania/src/ModeChoice.h index b3473e8b58..6f1844acde 100644 --- a/stepmania/src/ModeChoice.h +++ b/stepmania/src/ModeChoice.h @@ -13,7 +13,7 @@ class Steps; class Course; class Trail; class Character; -class StyleDef; +class Style; struct ModeChoice // used in SelectMode { @@ -33,7 +33,7 @@ struct ModeChoice // used in SelectMode CString m_sInvalidReason; int m_iIndex; Game m_game; - const StyleDef* m_pStyleDef; + const Style* m_pStyle; PlayMode m_pm; Difficulty m_dc; CourseDifficulty m_CourseDifficulty; diff --git a/stepmania/src/ModeSwitcher.cpp b/stepmania/src/ModeSwitcher.cpp index 293f30c765..b34c4b02ad 100644 --- a/stepmania/src/ModeSwitcher.cpp +++ b/stepmania/src/ModeSwitcher.cpp @@ -5,7 +5,7 @@ #include "PrefsManager.h" #include "SongManager.h" #include "ThemeManager.h" -#include "StyleDef.h" +#include "Style.h" #include "song.h" #include "ActorUtil.h" #include "GameManager.h" @@ -63,7 +63,7 @@ CString ModeSwitcher::GetStyleName() CString sStyleName; CString sDiff[NUM_PLAYERS]; - sStyleName = GAMESTATE->m_pCurStyleDef->m_szName; + sStyleName = GAMESTATE->m_pCurStyle->m_szName; sStyleName.MakeUpper(); FOREACH_PlayerNumber(i) @@ -131,7 +131,7 @@ CString ModeSwitcher::GetNextStyleName() { if(GAMESTATE->m_PreferredDifficulty[i] != DIFFICULTY_CHALLENGE) { - sStyleName[i] = GAMESTATE->m_pCurStyleDef->m_szName; + sStyleName[i] = GAMESTATE->m_pCurStyle->m_szName; sStyleName[i].MakeUpper(); switch(GAMESTATE->m_PreferredDifficulty[i]) @@ -176,7 +176,7 @@ CString ModeSwitcher::GetNextStyleName() } else { - sStyleName[i] = GAMESTATE->m_pCurStyleDef->m_szName; + sStyleName[i] = GAMESTATE->m_pCurStyle->m_szName; sStyleName[i].MakeUpper(); sDiff[i] = "Beginner\n"; @@ -204,7 +204,7 @@ CString ModeSwitcher::GetPrevStyleName() { if(GAMESTATE->m_PreferredDifficulty[i] != DIFFICULTY_BEGINNER) { - sStyleName[i] = GAMESTATE->m_pCurStyleDef->m_szName; + sStyleName[i] = GAMESTATE->m_pCurStyle->m_szName; sStyleName[i].MakeUpper(); switch(GAMESTATE->m_PreferredDifficulty[i]) @@ -249,7 +249,7 @@ CString ModeSwitcher::GetPrevStyleName() } else { - sStyleName[i] = GAMESTATE->m_pCurStyleDef->m_szName; + sStyleName[i] = GAMESTATE->m_pCurStyle->m_szName; sStyleName[i].MakeUpper(); sDiff[i] = "Challenge\n"; @@ -296,12 +296,12 @@ void ModeSwitcher::ChangeMode(PlayerNumber pn, int dir) } // Make a list of all styles for the current Game. - vector vPossibleStyles; + vector vPossibleStyles; GAMEMAN->GetStylesForGame( GAMESTATE->m_CurGame, vPossibleStyles ); ASSERT( !vPossibleStyles.empty() ); int index = 0; - vector::const_iterator iter = find(vPossibleStyles.begin(), vPossibleStyles.end(), GAMESTATE->m_pCurStyleDef ); + vector::const_iterator iter = find(vPossibleStyles.begin(), vPossibleStyles.end(), GAMESTATE->m_pCurStyle ); if( iter != vPossibleStyles.end() ) { index = iter - vPossibleStyles.begin(); @@ -309,7 +309,7 @@ void ModeSwitcher::ChangeMode(PlayerNumber pn, int dir) wrap( index, vPossibleStyles.size() ); } - GAMESTATE->m_pCurStyleDef = vPossibleStyles[index]; + GAMESTATE->m_pCurStyle = vPossibleStyles[index]; } m_Stylename.SetText(GetStyleName()); m_Nextmode.SetText(GetNextStyleName()); diff --git a/stepmania/src/MusicBannerWheel.cpp b/stepmania/src/MusicBannerWheel.cpp index a45f31429c..48e2eb761e 100644 --- a/stepmania/src/MusicBannerWheel.cpp +++ b/stepmania/src/MusicBannerWheel.cpp @@ -16,7 +16,7 @@ TODO: #include "SongManager.h" #include "ThemeManager.h" #include "RageSounds.h" -#include "StyleDef.h" +#include "Style.h" #include "song.h" #include "ActorUtil.h" diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index de9b1a81fd..846db12b01 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -146,7 +146,7 @@ void MusicWheel::Load() SongOptions so; SONGMAN->GetExtraStageInfo( GAMESTATE->IsExtraStage2(), - GAMESTATE->GetCurrentStyleDef(), + GAMESTATE->GetCurrentStyle(), pSong, pSteps, po, @@ -389,7 +389,7 @@ void MusicWheel::GetSongList(vector &arraySongs, SortOrder so, CString sP continue; vector arraySteps; - pSong->GetSteps( arraySteps, GAMESTATE->GetCurrentStyleDef()->m_StepsType, DIFFICULTY_INVALID, -1, -1, "", 1 ); + pSong->GetSteps( arraySteps, GAMESTATE->GetCurrentStyle()->m_StepsType, DIFFICULTY_INVALID, -1, -1, "", 1 ); if( !arraySteps.empty() ) arraySongs.push_back( pSong ); @@ -589,7 +589,7 @@ void MusicWheel::BuildWheelItemDatas( vector &arrayWheelItemDatas Steps* pSteps; PlayerOptions po; SongOptions so; - SONGMAN->GetExtraStageInfo( GAMESTATE->IsExtraStage2(), GAMESTATE->GetCurrentStyleDef(), pSong, pSteps, po, so ); + SONGMAN->GetExtraStageInfo( GAMESTATE->IsExtraStage2(), GAMESTATE->GetCurrentStyle(), pSong, pSteps, po, so ); bool bFoundExtraSong = false; @@ -667,7 +667,7 @@ void MusicWheel::BuildWheelItemDatas( vector &arrayWheelItemDatas } // check that this course has at least one song playable in the current style - if( !pCourse->IsPlayableIn(GAMESTATE->GetCurrentStyleDef()->m_StepsType) ) + if( !pCourse->IsPlayableIn(GAMESTATE->GetCurrentStyle()->m_StepsType) ) continue; if( sThisSection != sLastSection ) // new section, make a section item @@ -1524,7 +1524,7 @@ int MusicWheel::GetPreferredSelectionForRandomOrPortal() if( GAMESTATE->m_PreferredDifficulty[p] != DIFFICULTY_INVALID ) vDifficultiesToRequire.push_back( GAMESTATE->m_PreferredDifficulty[p] ); - StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType; + StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType; #define NUM_PROBES 1000 for( int i=0; im_PreferredDifficulty[p]; Grade grade; if( PROFILEMAN->IsUsingProfile((PlayerNumber)p) ) - grade = PROFILEMAN->GetHighScoreForDifficulty( data->m_pSong, GAMESTATE->GetCurrentStyleDef(), (ProfileSlot)p, dc ).grade; + grade = PROFILEMAN->GetHighScoreForDifficulty( data->m_pSong, GAMESTATE->GetCurrentStyle(), (ProfileSlot)p, dc ).grade; else - grade = PROFILEMAN->GetHighScoreForDifficulty( data->m_pSong, GAMESTATE->GetCurrentStyleDef(), PROFILE_SLOT_MACHINE, dc ).grade; + grade = PROFILEMAN->GetHighScoreForDifficulty( data->m_pSong, GAMESTATE->GetCurrentStyle(), PROFILE_SLOT_MACHINE, dc ).grade; m_GradeDisplay[p].SetGrade( (PlayerNumber)p, grade ); } diff --git a/stepmania/src/NoteField.cpp b/stepmania/src/NoteField.cpp index 80a7256074..be07e65e39 100644 --- a/stepmania/src/NoteField.cpp +++ b/stepmania/src/NoteField.cpp @@ -88,7 +88,7 @@ void NoteField::Load( const NoteData* pNoteData, PlayerNumber pn, int iFirstPixe m_ActiveHoldNotes.clear(); this->CopyAll( pNoteData ); - ASSERT( GetNumTracks() == GAMESTATE->GetCurrentStyleDef()->m_iColsPerPlayer ); + ASSERT( GetNumTracks() == GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer ); CacheAllUsedNoteSkins(); RefreshBeatToNoteSkin(); @@ -179,9 +179,9 @@ void NoteField::Update( float fDeltaTime ) float NoteField::GetWidth() { - const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); + const Style* pStyle = GAMESTATE->GetCurrentStyle(); float fMinX, fMaxX; - pStyleDef->GetMinAndMaxColX( m_PlayerNumber, fMinX, fMaxX ); + pStyle->GetMinAndMaxColX( m_PlayerNumber, fMinX, fMaxX ); return fMaxX - fMinX + ARROW_SIZE; } diff --git a/stepmania/src/NoteField.h b/stepmania/src/NoteField.h index b10017b898..d54992a419 100644 --- a/stepmania/src/NoteField.h +++ b/stepmania/src/NoteField.h @@ -5,7 +5,7 @@ #include "ActorFrame.h" #include "BitmapText.h" #include "PrefsManager.h" -#include "StyleDef.h" +#include "Style.h" #include "BitmapText.h" #include "Quad.h" #include "NoteDataWithScoring.h" diff --git a/stepmania/src/NoteFieldPositioning.cpp b/stepmania/src/NoteFieldPositioning.cpp index 0a7c8d6527..3e742a9576 100644 --- a/stepmania/src/NoteFieldPositioning.cpp +++ b/stepmania/src/NoteFieldPositioning.cpp @@ -97,7 +97,7 @@ void NoteFieldMode::Load(IniFile &ini, CString id, int pn) const Game game = GAMEMAN->StringToGameType( bits[0] ); ASSERT(game != GAME_INVALID); - const StyleDef *style = GAMEMAN->GameAndStringToStyle( game, bits[1] ); + const Style *style = GAMEMAN->GameAndStringToStyle( game, bits[1] ); ASSERT(style != NULL); Styles.insert(style); } @@ -161,7 +161,7 @@ bool NoteFieldMode::MatchesCurrentGame() const if(Styles.empty()) return true; - if(Styles.find(GAMESTATE->m_pCurStyleDef) == Styles.end()) + if(Styles.find(GAMESTATE->m_pCurStyle) == Styles.end()) return false; return true; @@ -173,7 +173,7 @@ void NoteFieldPositioning::Load(PlayerNumber pn) mode = NoteFieldMode(); /* reset */ - const StyleDef *s = GAMESTATE->GetCurrentStyleDef(); + const Style *s = GAMESTATE->GetCurrentStyle(); /* Load the settings in the style table by default. */ for(int tn = 0; tn < MAX_NOTE_TRACKS; ++tn) diff --git a/stepmania/src/NoteFieldPositioning.h b/stepmania/src/NoteFieldPositioning.h index 627e0453dd..9d5d775939 100644 --- a/stepmania/src/NoteFieldPositioning.h +++ b/stepmania/src/NoteFieldPositioning.h @@ -2,7 +2,7 @@ #define NOTEFIELD_POSITIONING_H #include "PlayerNumber.h" -#include "StyleDef.h" +#include "Style.h" #include "PlayerNumber.h" #include "Actor.h" @@ -26,7 +26,7 @@ struct NoteFieldMode CString m_Id; /* Styles that this is valid for; empty means all. */ - set Styles; + set Styles; Actor m_Center; Actor m_CenterTrack[MAX_NOTE_TRACKS]; diff --git a/stepmania/src/NoteSkinManager.cpp b/stepmania/src/NoteSkinManager.cpp index b1f2ee8629..4d56462fb3 100644 --- a/stepmania/src/NoteSkinManager.cpp +++ b/stepmania/src/NoteSkinManager.cpp @@ -5,7 +5,7 @@ #include "GameState.h" #include "GameDef.h" #include "StyleInput.h" -#include "StyleDef.h" +#include "Style.h" #include "RageUtil.h" #include "GameManager.h" #include "arch/arch.h" @@ -185,11 +185,11 @@ RageColor NoteSkinManager::GetMetricC( CString sNoteSkinName, CString sButtonNam CString NoteSkinManager::ColToButtonName(int col) { - const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); + const Style* pStyle = GAMESTATE->GetCurrentStyle(); const GameDef* pGameDef = GAMESTATE->GetCurrentGameDef(); StyleInput SI( PLAYER_1, col ); - GameInput GI = pStyleDef->StyleInputToGameInput( SI ); + GameInput GI = pStyle->StyleInputToGameInput( SI ); return pGameDef->m_szButtonNames[GI.button]; } diff --git a/stepmania/src/PaneDisplay.cpp b/stepmania/src/PaneDisplay.cpp index b955892510..4da379a2b8 100644 --- a/stepmania/src/PaneDisplay.cpp +++ b/stepmania/src/PaneDisplay.cpp @@ -8,7 +8,7 @@ #include "ProfileManager.h" #include "SongManager.h" #include "Course.h" -#include "StyleDef.h" +#include "Style.h" #define SHIFT_X(p) THEME->GetMetricF(m_sName, ssprintf("ShiftP%iX", p+1)) #define SHIFT_Y(p) THEME->GetMetricF(m_sName, ssprintf("ShiftP%iY", p+1)) diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index 0d6e27e1e1..378c059ec0 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -114,7 +114,7 @@ void PlayerMinus::Load( PlayerNumber pn, const NoteData* pNoteData, LifeMeter* p /* Ensure that this is up-to-date. */ GAMESTATE->m_pPosition->Load(pn); - const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); + const Style* pStyle = GAMESTATE->GetCurrentStyle(); // init scoring NoteDataWithScoring::Init(); @@ -140,7 +140,7 @@ void PlayerMinus::Load( PlayerNumber pn, const NoteData* pNoteData, LifeMeter* p // m_pScore->Init( pn ); /* Apply transforms. */ - NoteDataUtil::TransformNoteData( *this, GAMESTATE->m_PlayerOptions[pn], GAMESTATE->GetCurrentStyleDef()->m_StepsType ); + NoteDataUtil::TransformNoteData( *this, GAMESTATE->m_PlayerOptions[pn], GAMESTATE->GetCurrentStyle()->m_StepsType ); switch( GAMESTATE->m_PlayMode ) { @@ -148,7 +148,7 @@ void PlayerMinus::Load( PlayerNumber pn, const NoteData* pNoteData, LifeMeter* p case PLAY_MODE_BATTLE: { // ugly, ugly, ugly. Works only w/ dance. - NoteDataUtil::TransformNoteData( *this, GAMESTATE->m_PlayerOptions[pn], GAMESTATE->GetCurrentStyleDef()->m_StepsType ); + NoteDataUtil::TransformNoteData( *this, GAMESTATE->m_PlayerOptions[pn], GAMESTATE->GetCurrentStyle()->m_StepsType ); // shuffle either p1 or p2 static int count = 0; @@ -186,7 +186,7 @@ void PlayerMinus::Load( PlayerNumber pn, const NoteData* pNoteData, LifeMeter* p m_ArrowBackdrop.SetPlayer( pn ); const bool bReverse = GAMESTATE->m_PlayerOptions[pn].GetReversePercentForColumn(0) == 1; - bool bPlayerUsingBothSides = GAMESTATE->GetCurrentStyleDef()->m_StyleType==StyleDef::ONE_PLAYER_TWO_CREDITS; + bool bPlayerUsingBothSides = GAMESTATE->GetCurrentStyle()->m_StyleType==Style::ONE_PLAYER_TWO_CREDITS; m_Combo.SetX( COMBO_X(m_PlayerNumber,bPlayerUsingBothSides) ); m_Combo.SetY( bReverse ? COMBO_Y_REVERSE : COMBO_Y ); m_AttackDisplay.SetX( ATTACK_DISPLAY_X(m_PlayerNumber,bPlayerUsingBothSides) ); @@ -203,7 +203,7 @@ void PlayerMinus::Load( PlayerNumber pn, const NoteData* pNoteData, LifeMeter* p m_AttackDisplay.Command( g_NoteFieldMode[pn].m_AttackDisplayCmd ); int c; - for( c=0; cm_iColsPerPlayer; c++ ) + for( c=0; cm_iColsPerPlayer; c++ ) { NoteFieldMode &mode = g_NoteFieldMode[pn]; m_HoldJudgment[c].Command( mode.m_HoldJudgmentCmd[c] ); @@ -260,7 +260,7 @@ void PlayerMinus::Update( float fDeltaTime ) // Update Y positions // { - for( int c=0; cGetCurrentStyleDef()->m_iColsPerPlayer; c++ ) + for( int c=0; cGetCurrentStyle()->m_iColsPerPlayer; c++ ) { float fPercentReverse = GAMESTATE->m_CurrentPlayerOptions[m_PlayerNumber].GetReversePercentForColumn(c); float fHoldJudgeYPos = SCALE( fPercentReverse, 0.f, 1.f, HOLD_JUDGMENT_Y_STANDARD, HOLD_JUDGMENT_Y_REVERSE ); @@ -296,13 +296,13 @@ void PlayerMinus::Update( float fDeltaTime ) // // update pressed flag // - const int iNumCols = GAMESTATE->GetCurrentStyleDef()->m_iColsPerPlayer; + const int iNumCols = GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer; ASSERT_M( iNumCols < MAX_COLS_PER_PLAYER, ssprintf("%i >= %i", iNumCols, MAX_COLS_PER_PLAYER) ); for( int col=0; col < iNumCols; ++col ) { CHECKPOINT_M( ssprintf("%i %i", col, iNumCols) ); const StyleInput StyleI( m_PlayerNumber, col ); - const GameInput GameI = GAMESTATE->GetCurrentStyleDef()->StyleInputToGameInput( StyleI ); + const GameInput GameI = GAMESTATE->GetCurrentStyle()->StyleInputToGameInput( StyleI ); bool bIsHoldingButton = INPUTMAPPER->IsButtonDown( GameI ); // TODO: Make this work for non-human-controlled players if( bIsHoldingButton && !GAMESTATE->m_bDemonstrationOrJukebox && GAMESTATE->m_PlayerController[m_PlayerNumber]==PC_HUMAN ) @@ -327,7 +327,7 @@ void PlayerMinus::Update( float fDeltaTime ) continue; // hold hasn't happened yet const StyleInput StyleI( m_PlayerNumber, hn.iTrack ); - const GameInput GameI = GAMESTATE->GetCurrentStyleDef()->StyleInputToGameInput( StyleI ); + const GameInput GameI = GAMESTATE->GetCurrentStyle()->StyleInputToGameInput( StyleI ); // if they got a bad score or haven't stepped on the corresponding tap yet const TapNoteScore tns = GetTapNoteScore( hn.iTrack, hn.iStartRow ); @@ -475,7 +475,7 @@ void PlayerMinus::ApplyWaitingTransforms() if( po.m_sNoteSkin != "" ) GAMESTATE->SetNoteSkinForBeatRange( m_PlayerNumber, po.m_sNoteSkin, fStartBeat, fEndBeat ); - NoteDataUtil::TransformNoteData( *this, po, GAMESTATE->GetCurrentStyleDef()->m_StepsType, fStartBeat, fEndBeat ); + NoteDataUtil::TransformNoteData( *this, po, GAMESTATE->GetCurrentStyle()->m_StepsType, fStartBeat, fEndBeat ); m_pNoteField->CopyRange( this, BeatToNoteRow(fStartBeat), BeatToNoteRow(fEndBeat), BeatToNoteRow(fStartBeat) ); } GAMESTATE->m_ModsToApply[m_PlayerNumber].clear(); @@ -484,7 +484,7 @@ void PlayerMinus::ApplyWaitingTransforms() void PlayerMinus::DrawPrimitives() { // May have both players in doubles (for battle play); only draw primary player. - if( GAMESTATE->GetCurrentStyleDef()->m_StyleType == StyleDef::ONE_PLAYER_TWO_CREDITS && + if( GAMESTATE->GetCurrentStyle()->m_StyleType == Style::ONE_PLAYER_TWO_CREDITS && m_PlayerNumber != GAMESTATE->m_MasterPlayerNumber ) return; @@ -1055,7 +1055,7 @@ void PlayerMinus::CrossedMineRow( int iNoteRow ) if( GetTapNote(t,iNoteRow) == TAP_MINE ) { const StyleInput StyleI( m_PlayerNumber, t ); - const GameInput GameI = GAMESTATE->GetCurrentStyleDef()->StyleInputToGameInput( StyleI ); + const GameInput GameI = GAMESTATE->GetCurrentStyle()->StyleInputToGameInput( StyleI ); if( PREFSMAN->m_fPadStickSeconds > 0 ) { float fSecsHeld = INPUTMAPPER->GetSecsHeld( GameI ); diff --git a/stepmania/src/PlayerOptions.cpp b/stepmania/src/PlayerOptions.cpp index ef79e1d5ad..4cf7683643 100644 --- a/stepmania/src/PlayerOptions.cpp +++ b/stepmania/src/PlayerOptions.cpp @@ -481,7 +481,7 @@ void PlayerOptions::ToggleOneTurn( Turn t ) float PlayerOptions::GetReversePercentForColumn( int iCol ) { float f = 0; - int iNumCols = GAMESTATE->GetCurrentStyleDef()->m_iColsPerPlayer; + int iNumCols = GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer; f += m_fScrolls[SCROLL_REVERSE]; diff --git a/stepmania/src/Profile.cpp b/stepmania/src/Profile.cpp index dc8237a49a..e0a671f41b 100644 --- a/stepmania/src/Profile.cpp +++ b/stepmania/src/Profile.cpp @@ -785,11 +785,11 @@ XNode* Profile::SaveGeneralDataCreateNode() const { XNode* pNumSongsPlayedByStyle = pGeneralDataNode->AppendChild("NumSongsPlayedByStyle"); - for( map::const_iterator iter = m_iNumSongsPlayedByStyle.begin(); + for( map::const_iterator iter = m_iNumSongsPlayedByStyle.begin(); iter != m_iNumSongsPlayedByStyle.end(); iter++ ) { - const StyleDef *s = iter->first; + const Style *s = iter->first; const GameDef *g = GAMEMAN->GetGameDefForGame( s->m_Game ); ASSERT( g ); int iNumPlays = iter->second; @@ -945,7 +945,7 @@ void Profile::LoadGeneralDataFromNode( const XNode* pNode ) CString sStyle; if( !style->GetAttrValue( "Style", sStyle ) ) WARN_AND_CONTINUE; - const StyleDef* s = GAMEMAN->GameAndStringToStyle( g, sStyle ); + const Style* s = GAMEMAN->GameAndStringToStyle( g, sStyle ); if( s == NULL ) WARN_AND_CONTINUE; diff --git a/stepmania/src/Profile.h b/stepmania/src/Profile.h index ca5cc890f2..bc6ab05e5d 100644 --- a/stepmania/src/Profile.h +++ b/stepmania/src/Profile.h @@ -40,7 +40,7 @@ const CString PUBLIC_KEY_FILE = "public.key"; const CString SCREENSHOTS_SUBDIR = "Screenshots/"; const CString EDITS_SUBDIR = "Edits/"; -class StyleDef; +class Style; class Song; class Steps; @@ -111,7 +111,7 @@ public: set m_UnlockedSongs; mutable CString m_sLastPlayedMachineGuid; // mutable because we overwrite this on save, and I don't want to remove const from the whole save chain. -Chris int m_iNumSongsPlayedByPlayMode[NUM_PLAY_MODES]; - map m_iNumSongsPlayedByStyle; + map m_iNumSongsPlayedByStyle; int m_iNumSongsPlayedByDifficulty[NUM_DIFFICULTIES]; int m_iNumSongsPlayedByMeter[MAX_METER+1]; int m_iNumSongsPassedByPlayMode[NUM_PLAY_MODES]; diff --git a/stepmania/src/ProfileHtml.cpp b/stepmania/src/ProfileHtml.cpp index 6ed28b48ca..fcd390b50a 100644 --- a/stepmania/src/ProfileHtml.cpp +++ b/stepmania/src/ProfileHtml.cpp @@ -360,19 +360,19 @@ void PrintStatistics( RageFile &f, const Profile *pProfile, CString sTitle, vect { BEGIN_TABLE(4); - for( map::const_iterator iter = pProfile->m_iNumSongsPlayedByStyle.begin(); + for( map::const_iterator iter = pProfile->m_iNumSongsPlayedByStyle.begin(); iter != pProfile->m_iNumSongsPlayedByStyle.end(); iter++ ) { - const StyleDef* pStyleDef = iter->first; + const Style* pStyle = iter->first; int iNumTimesPlayed = iter->second; - StepsType st = pStyleDef->m_StepsType; + StepsType st = pStyle->m_StepsType; // only show if this style plays a StepsType that we're showing if( find(vStepsTypesToShow.begin(),vStepsTypesToShow.end(),st) == vStepsTypesToShow.end() ) continue; // skip - if( StylesToShow.find(pStyleDef->m_szName) == StylesToShow.end() ) + if( StylesToShow.find(pStyle->m_szName) == StylesToShow.end() ) continue; - TABLE_LINE2( GAMEMAN->StyleToThemedString(pStyleDef), iNumTimesPlayed ); + TABLE_LINE2( GAMEMAN->StyleToThemedString(pStyle), iNumTimesPlayed ); } END_TABLE; } diff --git a/stepmania/src/ProfileManager.cpp b/stepmania/src/ProfileManager.cpp index fe042e25c9..ee45964d4b 100644 --- a/stepmania/src/ProfileManager.cpp +++ b/stepmania/src/ProfileManager.cpp @@ -426,7 +426,7 @@ void ProfileManager::IncrementStepsPlayCount( const Song* pSong, const Steps* pS PROFILEMAN->GetMachineProfile()->IncrementStepsPlayCount( pSong, pSteps ); } -HighScore ProfileManager::GetHighScoreForDifficulty( const Song *s, const StyleDef *st, ProfileSlot slot, Difficulty dc ) const +HighScore ProfileManager::GetHighScoreForDifficulty( const Song *s, const Style *st, ProfileSlot slot, Difficulty dc ) const { // return max grade of notes in difficulty class vector aNotes; diff --git a/stepmania/src/ProfileManager.h b/stepmania/src/ProfileManager.h index b041068213..d2ad52076d 100644 --- a/stepmania/src/ProfileManager.h +++ b/stepmania/src/ProfileManager.h @@ -8,7 +8,7 @@ #include "Profile.h" class Song; -class StyleDef; +class Style; class ProfileManager { @@ -64,7 +64,7 @@ public: bool IsSongNew( const Song* pSong ) const { return GetSongNumTimesPlayed(pSong,PROFILE_SLOT_MACHINE)==0; } void AddStepsScore( const Song* pSong, const Steps* pSteps, PlayerNumber pn, HighScore hs, int &iPersonalIndexOut, int &iMachineIndexOut ); void IncrementStepsPlayCount( const Song* pSong, const Steps* pSteps, PlayerNumber pn ); - HighScore GetHighScoreForDifficulty( const Song *s, const StyleDef *st, ProfileSlot slot, Difficulty dc ) const; + HighScore GetHighScoreForDifficulty( const Song *s, const Style *st, ProfileSlot slot, Difficulty dc ) const; // // Course stats diff --git a/stepmania/src/ReceptorArrowRow.cpp b/stepmania/src/ReceptorArrowRow.cpp index fad25c9543..ab9068b03f 100644 --- a/stepmania/src/ReceptorArrowRow.cpp +++ b/stepmania/src/ReceptorArrowRow.cpp @@ -19,9 +19,9 @@ void ReceptorArrowRow::Load( PlayerNumber pn, CString NoteSkin, float fYReverseO m_PlayerNumber = pn; m_fYReverseOffsetPixels = fYReverseOffset; - const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); + const Style* pStyle = GAMESTATE->GetCurrentStyle(); - m_iNumCols = pStyleDef->m_iColsPerPlayer; + m_iNumCols = pStyle->m_iColsPerPlayer; for( int c=0; c& apSongs, const vectorCompress(); - const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); + const Style* pStyle = GAMESTATE->GetCurrentStyle(); NoteData playerNoteData; - pStyleDef->GetTransformedNoteDataForStyle( pn_, ¬edata, &playerNoteData ); + pStyle->GetTransformedNoteDataForStyle( pn_, ¬edata, &playerNoteData ); /* Apply transforms to find out how the notes will really look. * @@ -46,7 +46,7 @@ ScoreKeeperMAX2::ScoreKeeperMAX2( const vector& apSongs, const vectorm_PlayerOptions[pn_], GAMESTATE->GetCurrentStyleDef()->m_StepsType ); + NoteDataUtil::TransformNoteData( playerNoteDataPostModifiers, GAMESTATE->m_PlayerOptions[pn_], GAMESTATE->GetCurrentStyle()->m_StepsType ); for( unsigned j=0; j < asModifiers[i].size(); j++ ) { @@ -57,7 +57,7 @@ ScoreKeeperMAX2::ScoreKeeperMAX2( const vector& apSongs, const vectorGetCurrentStyleDef()->m_StepsType, fStartBeat, fEndBeat ); + NoteDataUtil::TransformNoteData( playerNoteDataPostModifiers, po, GAMESTATE->GetCurrentStyle()->m_StepsType, fStartBeat, fEndBeat ); } RadarValues radarValuesPostModifiers; diff --git a/stepmania/src/ScreenAward.cpp b/stepmania/src/ScreenAward.cpp index 46f02bc0b5..3ae5b92436 100644 --- a/stepmania/src/ScreenAward.cpp +++ b/stepmania/src/ScreenAward.cpp @@ -7,7 +7,7 @@ #include "GameState.h" #include "SongManager.h" #include "Steps.h" -#include "StyleDef.h" +#include "Style.h" #include "CodeDetector.h" #include "ProfileManager.h" #include "StepMania.h" @@ -92,7 +92,7 @@ void ScreenAward::Input( const DeviceInput& DeviceI, const InputEventType type, if( GameI.IsValid() ) { - PlayerNumber pn = GAMESTATE->GetCurrentStyleDef()->ControllerToPlayerNumber( GameI.controller ); + PlayerNumber pn = GAMESTATE->GetCurrentStyle()->ControllerToPlayerNumber( GameI.controller ); if( CodeDetector::EnteredCode(GameI.controller, CodeDetector::CODE_SAVE_SCREENSHOT) ) { diff --git a/stepmania/src/ScreenDemonstration.cpp b/stepmania/src/ScreenDemonstration.cpp index f04fb6c1c6..f059ad849f 100644 --- a/stepmania/src/ScreenDemonstration.cpp +++ b/stepmania/src/ScreenDemonstration.cpp @@ -20,7 +20,7 @@ const ScreenMessage SM_NotesEnded = ScreenMessage(SM_User+10); // MUST be sam bool PrepareForDemonstration() // always return true. { - GAMESTATE->m_pCurStyleDef = GAMEMAN->GetDemonstrationStyleForGame(GAMESTATE->m_CurGame); + GAMESTATE->m_pCurStyle = GAMEMAN->GetDemonstrationStyleForGame(GAMESTATE->m_CurGame); GAMESTATE->m_PlayMode = PLAY_MODE_REGULAR; diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 9a74822f1b..7b9609c3df 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -437,7 +437,7 @@ void ScreenEdit::Update( float fDeltaTime ) { // add or extend holds - for( int t=0; tGetCurrentStyleDef()->m_iColsPerPlayer; t++ ) // for each track + for( int t=0; tGetCurrentStyle()->m_iColsPerPlayer; t++ ) // for each track { StyleInput StyleI( PLAYER_1, t ); float fSecsHeld = INPUTMAPPER->GetSecsHeld( StyleI ); @@ -705,7 +705,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ const float fSongBeat = GAMESTATE->m_fSongBeat; const int iSongIndex = BeatToNoteRow( fSongBeat ); - if( iCol >= m_NoteFieldEdit.GetNumTracks() ) // this button is not in the range of columns for this StyleDef + if( iCol >= m_NoteFieldEdit.GetNumTracks() ) // this button is not in the range of columns for this Style break; int i; @@ -1751,7 +1751,7 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, int* iAnswers ) { HandleAreaMenuChoice( cut, NULL ); - StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType; + StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType; TurnType tt = (TurnType)iAnswers[c]; switch( tt ) { @@ -1771,7 +1771,7 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, int* iAnswers ) float fBeginBeat = m_NoteFieldEdit.m_fBeginMarker; float fEndBeat = m_NoteFieldEdit.m_fEndMarker; TransformType tt = (TransformType)iAnswers[c]; - StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType; + StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType; switch( tt ) { case noholds: NoteDataUtil::RemoveHoldNotes( m_NoteFieldEdit, fBeginBeat, fEndBeat ); break; diff --git a/stepmania/src/ScreenEditMenu.cpp b/stepmania/src/ScreenEditMenu.cpp index 6e94182bd9..4e70beabf8 100644 --- a/stepmania/src/ScreenEditMenu.cpp +++ b/stepmania/src/ScreenEditMenu.cpp @@ -105,7 +105,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn ) EditMenu::Action action = m_Selector.GetSelectedAction(); GAMESTATE->m_pCurSong = pSong; - GAMESTATE->m_pCurStyleDef = GAMEMAN->GetEditorStyleForNotesType( st ); + GAMESTATE->m_pCurStyle = GAMEMAN->GetEditorStyleForNotesType( st ); GAMESTATE->m_pCurSteps[PLAYER_1] = pSteps; // diff --git a/stepmania/src/ScreenEnding.cpp b/stepmania/src/ScreenEnding.cpp index 9d4c61905a..a9cefa2791 100644 --- a/stepmania/src/ScreenEnding.cpp +++ b/stepmania/src/ScreenEnding.cpp @@ -10,7 +10,7 @@ #include "GameState.h" #include "MemoryCardManager.h" #include "RageLog.h" -#include "StyleDef.h" +#include "Style.h" #include "GameManager.h" #include "SongUtil.h" #include "ScreenManager.h" @@ -36,7 +36,7 @@ CString GetStatsLineTitle( PlayerNumber pn, EndingStatsLine line ) case PERCENT_COMPLETE_CHALLENGE: // Ugly... { - StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType; + StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType; CString sStepsType = GAMEMAN->NotesTypeToThemedString(st); if( GAMESTATE->IsCourseMode() ) { @@ -72,7 +72,7 @@ CString GetStatsLineValue( PlayerNumber pn, EndingStatsLine line ) case PERCENT_COMPLETE_CHALLENGE: // Ugly... { - StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType; + StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType; CString sStepsType = GAMEMAN->NotesTypeToThemedString(st); if( GAMESTATE->IsCourseMode() ) { @@ -102,7 +102,7 @@ ScreenEnding::ScreenEnding( CString sClassName ) : ScreenAttract( sClassName, fa PROFILEMAN->LoadFirstAvailableProfile(PLAYER_2, false); GAMESTATE->m_PlayMode = PLAY_MODE_REGULAR; - GAMESTATE->m_pCurStyleDef = GAMEMAN->GameAndStringToStyle( GAME_DANCE, "versus" ); + GAMESTATE->m_pCurStyle = GAMEMAN->GameAndStringToStyle( GAME_DANCE, "versus" ); GAMESTATE->m_bSideIsJoined[PLAYER_1] = true; GAMESTATE->m_bSideIsJoined[PLAYER_2] = true; GAMESTATE->m_MasterPlayerNumber = PLAYER_1; diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index 5dcdab91ea..95c5b1393d 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -101,7 +101,7 @@ void ScreenEvaluation::Init() PROFILEMAN->LoadFirstAvailableProfile(PLAYER_2, false); GAMESTATE->m_PlayMode = PLAY_MODE_REGULAR; - GAMESTATE->m_pCurStyleDef = GAMEMAN->GameAndStringToStyle( GAME_DANCE, "versus" ); + GAMESTATE->m_pCurStyle = GAMEMAN->GameAndStringToStyle( GAME_DANCE, "versus" ); GAMESTATE->m_bSideIsJoined[PLAYER_1] = true; GAMESTATE->m_bSideIsJoined[PLAYER_2] = true; GAMESTATE->m_MasterPlayerNumber = PLAYER_1; @@ -942,7 +942,7 @@ void ScreenEvaluation::CommitScores( memcpy( hs.iHoldNoteScores, stageStats.iHoldNoteScores[p], sizeof(hs.iHoldNoteScores) ); memcpy( hs.fRadarActual, stageStats.fRadarActual[p], sizeof(hs.fRadarActual) ); - StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType; + StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType; switch( m_Type ) { @@ -1007,7 +1007,7 @@ void ScreenEvaluation::CommitScores( HighScore &hs = m_HighScore[p]; Profile* pProfile = PROFILEMAN->GetMachineProfile(); - StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType; + StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType; const HighScoreList *pHSL = NULL; switch( m_Type ) @@ -1413,7 +1413,7 @@ void ScreenEvaluation::Input( const DeviceInput& DeviceI, const InputEventType t if( GameI.IsValid() ) { - PlayerNumber pn = GAMESTATE->GetCurrentStyleDef()->ControllerToPlayerNumber( GameI.controller ); + PlayerNumber pn = GAMESTATE->GetCurrentStyle()->ControllerToPlayerNumber( GameI.controller ); HighScore &hs = m_HighScore[pn]; diff --git a/stepmania/src/ScreenEz2SelectMusic.cpp b/stepmania/src/ScreenEz2SelectMusic.cpp index 8d018b62c2..27ebf5c69f 100644 --- a/stepmania/src/ScreenEz2SelectMusic.cpp +++ b/stepmania/src/ScreenEz2SelectMusic.cpp @@ -6,7 +6,7 @@ #include "PrefsManager.h" #include "ThemeManager.h" #include "GameState.h" -#include "StyleDef.h" +#include "Style.h" #include "InputMapper.h" #include "CodeDetector.h" #include "Steps.h" @@ -247,7 +247,7 @@ void ScreenEz2SelectMusic::Input( const DeviceInput& DeviceI, const InputEventTy if( m_bMadeChoice ) return; - PlayerNumber pn = GAMESTATE->GetCurrentStyleDef()->ControllerToPlayerNumber( GameI.controller ); + PlayerNumber pn = GAMESTATE->GetCurrentStyle()->ControllerToPlayerNumber( GameI.controller ); if( CodeDetector::EnteredEasierDifficulty(GameI.controller) ) { @@ -637,7 +637,7 @@ void ScreenEz2SelectMusic::MusicChanged() for( pn = 0; pn < NUM_PLAYERS; ++pn) { - pSong->GetSteps( m_arrayNotes[pn], GAMESTATE->GetCurrentStyleDef()->m_StepsType ); + pSong->GetSteps( m_arrayNotes[pn], GAMESTATE->GetCurrentStyle()->m_StepsType ); StepsUtil::SortNotesArrayByDifficulty( m_arrayNotes[pn] ); } diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 2df685f40e..0934e5f4c9 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -222,7 +222,7 @@ void ScreenGameplay::Init() g_CurStageStats.pSong = NULL; // set in LoadNextSong g_CurStageStats.playMode = GAMESTATE->m_PlayMode; - g_CurStageStats.pStyleDef = GAMESTATE->m_pCurStyleDef; + g_CurStageStats.pStyle = GAMESTATE->m_pCurStyle; FOREACH_EnabledPlayer(p) { @@ -302,7 +302,7 @@ void ScreenGameplay::Init() FOREACH_EnabledPlayer(p) { - float fPlayerX = (float) GAMESTATE->GetCurrentStyleDef()->m_iCenterX[p]; + float fPlayerX = (float) GAMESTATE->GetCurrentStyle()->m_iCenterX[p]; /* Perhaps this should be handled better by defining a new * StyleType for ONE_PLAYER_ONE_CREDIT_AND_ONE_COMPUTER, @@ -311,7 +311,7 @@ void ScreenGameplay::Init() if( PREFSMAN->m_bSoloSingle && GAMESTATE->m_PlayMode != PLAY_MODE_BATTLE && GAMESTATE->m_PlayMode != PLAY_MODE_RAVE && - GAMESTATE->GetCurrentStyleDef()->m_StyleType == StyleDef::ONE_PLAYER_ONE_CREDIT ) + GAMESTATE->GetCurrentStyle()->m_StyleType == Style::ONE_PLAYER_ONE_CREDIT ) fPlayerX = SCREEN_WIDTH/2; m_Player[p].SetX( fPlayerX ); @@ -797,9 +797,9 @@ void ScreenGameplay::SetupSong( int p, int iSongIndex ) NoteData pOriginalNoteData; GAMESTATE->m_pCurSteps[p]->GetNoteData( &pOriginalNoteData ); - const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); + const Style* pStyle = GAMESTATE->GetCurrentStyle(); NoteData pNewNoteData; - pStyleDef->GetTransformedNoteDataForStyle( (PlayerNumber)p, &pOriginalNoteData, &pNewNoteData ); + pStyle->GetTransformedNoteDataForStyle( (PlayerNumber)p, &pOriginalNoteData, &pNewNoteData ); m_Player[p].Load( (PlayerNumber)p, &pNewNoteData, m_pLifeMeter[p], m_pCombinedLifeMeter, m_pPrimaryScoreDisplay[p], m_pSecondaryScoreDisplay[p], m_pInventory[p], m_pPrimaryScoreKeeper[p], m_pSecondaryScoreKeeper[p] ); } @@ -1417,7 +1417,7 @@ void ScreenGameplay::Update( float fDeltaTime ) // // update lights // - const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); + const Style* pStyle = GAMESTATE->GetCurrentStyle(); bool bBlinkCabinetLight[NUM_CABINET_LIGHTS]; bool bBlinkGameButton[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS]; ZERO( bBlinkCabinetLight ); @@ -1453,7 +1453,7 @@ void ScreenGameplay::Update( float fDeltaTime ) if( bBlink ) { StyleInput si( pn, t ); - GameInput gi = pStyleDef->StyleInputToGameInput( si ); + GameInput gi = pStyle->StyleInputToGameInput( si ); bBlinkGameButton[gi.controller][gi.button] |= bBlink; } } @@ -1478,7 +1478,7 @@ void ScreenGameplay::Update( float fDeltaTime ) if( hn.iStartRow <= iSongRow && iSongRow <= hn.iEndRow ) { StyleInput si( pn, hn.iTrack ); - GameInput gi = pStyleDef->StyleInputToGameInput( si ); + GameInput gi = pStyle->StyleInputToGameInput( si ); bBlinkGameButton[gi.controller][gi.button] |= true; } } diff --git a/stepmania/src/ScreenHowToPlay.cpp b/stepmania/src/ScreenHowToPlay.cpp index aae40f9e61..abceb3d524 100644 --- a/stepmania/src/ScreenHowToPlay.cpp +++ b/stepmania/src/ScreenHowToPlay.cpp @@ -130,7 +130,7 @@ ScreenHowToPlay::ScreenHowToPlay( CString sName ) : ScreenAttract( sName ) m_pLifeMeterBar->FillForHowToPlay( NUM_PERFECTS, NUM_MISSES ); } - GAMESTATE->m_pCurStyleDef = GAMEMAN->GetHowToPlayStyleForGame(GAMESTATE->m_CurGame); + GAMESTATE->m_pCurStyle = GAMEMAN->GetHowToPlayStyleForGame(GAMESTATE->m_CurGame); if( USEPLAYER ) { @@ -138,15 +138,15 @@ ScreenHowToPlay::ScreenHowToPlay( CString sName ) : ScreenAttract( sName ) smfile.LoadFromSMFile( THEME->GetPathToO(STEPFILE), m_Song, false ); m_Song.AddAutoGenNotes(); - const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); + const Style* pStyle = GAMESTATE->GetCurrentStyle(); vector notes; - m_Song.GetSteps( notes, pStyleDef->m_StepsType ); + m_Song.GetSteps( notes, pStyle->m_StepsType ); ASSERT( notes.size() >= 1 ); NoteData TempNoteData; notes[0]->GetNoteData( &TempNoteData ); - pStyleDef->GetTransformedNoteDataForStyle( PLAYER_1, &TempNoteData, &m_NoteData ); + pStyle->GetTransformedNoteDataForStyle( PLAYER_1, &TempNoteData, &m_NoteData ); GAMESTATE->m_pCurSong = &m_Song; GAMESTATE->m_bPastHereWeGo = true; diff --git a/stepmania/src/ScreenJukebox.cpp b/stepmania/src/ScreenJukebox.cpp index 59587addda..75f070b02c 100644 --- a/stepmania/src/ScreenJukebox.cpp +++ b/stepmania/src/ScreenJukebox.cpp @@ -74,7 +74,7 @@ bool ScreenJukebox::SetSong( bool bDemonstration ) continue; // skip Difficulty dc = vDifficultiesToShow[ rand()%vDifficultiesToShow.size() ]; - Steps* pSteps = pSong->GetStepsByDifficulty( GAMESTATE->GetCurrentStyleDef()->m_StepsType, dc ); + Steps* pSteps = pSong->GetStepsByDifficulty( GAMESTATE->GetCurrentStyle()->m_StepsType, dc ); if( pSteps == NULL ) continue; // skip @@ -96,7 +96,7 @@ bool ScreenJukebox::SetSong( bool bDemonstration ) bool ScreenJukebox::PrepareForJukebox( bool bDemonstration ) // always return true. { // ScreeJukeboxMenu must set this - ASSERT( GAMESTATE->m_pCurStyleDef ); + ASSERT( GAMESTATE->m_pCurStyle ); GAMESTATE->m_PlayMode = PLAY_MODE_REGULAR; SetSong( bDemonstration ); diff --git a/stepmania/src/ScreenJukeboxMenu.cpp b/stepmania/src/ScreenJukeboxMenu.cpp index 41607f1048..46359eb69d 100644 --- a/stepmania/src/ScreenJukeboxMenu.cpp +++ b/stepmania/src/ScreenJukeboxMenu.cpp @@ -22,7 +22,7 @@ ScreenJukeboxMenu::ScreenJukeboxMenu( CString sClassName ) : ScreenWithMenuEleme { LOG->Trace( "ScreenJukeboxMenu::ScreenJukeboxMenu()" ); - GAMESTATE->m_pCurStyleDef = NULL; + GAMESTATE->m_pCurStyle = NULL; FOREACH_PlayerNumber( pn ) GAMESTATE->m_bSideIsJoined[pn] = true; @@ -84,12 +84,12 @@ void ScreenJukeboxMenu::MenuStart( PlayerNumber pn ) if( IsTransitioning() ) return; - const StyleDef *style = m_Selector.GetSelectedStyle(); + const Style *style = m_Selector.GetSelectedStyle(); CString sGroup = m_Selector.GetSelectedGroup(); Difficulty dc = m_Selector.GetSelectedDifficulty(); bool bModifiers = m_Selector.GetSelectedModifiers(); - GAMESTATE->m_pCurStyleDef = style; + GAMESTATE->m_pCurStyle = style; GAMESTATE->m_sPreferredGroup = (sGroup=="ALL MUSIC") ? GROUP_ALL_MUSIC : sGroup; FOREACH_PlayerNumber( p ) GAMESTATE->m_PreferredDifficulty[p] = dc; diff --git a/stepmania/src/ScreenNameEntry.cpp b/stepmania/src/ScreenNameEntry.cpp index e348d48a8c..6586f00d4c 100644 --- a/stepmania/src/ScreenNameEntry.cpp +++ b/stepmania/src/ScreenNameEntry.cpp @@ -180,30 +180,30 @@ ScreenNameEntry::ScreenNameEntry( CString sClassName ) : Screen( sClassName ) GAMESTATE->m_pPosition->Load( (PlayerNumber)p ); m_ReceptorArrowRow[p].Load( (PlayerNumber)p, GAMESTATE->m_PlayerOptions[p].m_sNoteSkin, 0 ); - m_ReceptorArrowRow[p].SetX( (float)GAMESTATE->GetCurrentStyleDef()->m_iCenterX[p] ); + m_ReceptorArrowRow[p].SetX( (float)GAMESTATE->GetCurrentStyle()->m_iCenterX[p] ); m_ReceptorArrowRow[p].SetY( SCREEN_TOP + 100 ); this->AddChild( &m_ReceptorArrowRow[p] ); - const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); + const Style* pStyle = GAMESTATE->GetCurrentStyle(); - m_ColToStringIndex[p].insert(m_ColToStringIndex[p].begin(), pStyleDef->m_iColsPerPlayer, -1); + m_ColToStringIndex[p].insert(m_ColToStringIndex[p].begin(), pStyle->m_iColsPerPlayer, -1); int CurrentStringIndex = 0; - for( int t=0; tm_iColsPerPlayer; t++ ) + for( int t=0; tm_iColsPerPlayer; t++ ) { if(CurrentStringIndex == MAX_RANKING_NAME_LENGTH) continue; /* We have enough columns. */ /* Find out if this column is associated with the START menu button. */ StyleInput si((PlayerNumber)p, t); - GameInput gi=GAMESTATE->GetCurrentStyleDef()->StyleInputToGameInput(si); + GameInput gi=GAMESTATE->GetCurrentStyle()->StyleInputToGameInput(si); MenuInput m=GAMESTATE->GetCurrentGameDef()->GameInputToMenuInput(gi); if(m.button == MENU_BUTTON_START) continue; m_ColToStringIndex[p][t] = CurrentStringIndex++; - float ColX = pStyleDef->m_iCenterX[p] + pStyleDef->m_ColumnInfo[p][t].fXOffset; + float ColX = pStyle->m_iCenterX[p] + pStyle->m_ColumnInfo[p][t].fXOffset; m_textSelectedChars[p][t].LoadFromFont( THEME->GetPathToF("ScreenNameEntry letters") ); m_textSelectedChars[p][t].SetX( ColX ); @@ -222,7 +222,7 @@ ScreenNameEntry::ScreenNameEntry( CString sClassName ) : Screen( sClassName ) } m_textCategory[p].LoadFromFont( THEME->GetPathToF("ScreenNameEntry category") ); - m_textCategory[p].SetX( (float)GAMESTATE->GetCurrentStyleDef()->m_iCenterX[p] ); + m_textCategory[p].SetX( (float)GAMESTATE->GetCurrentStyle()->m_iCenterX[p] ); m_textCategory[p].SetY( CATEGORY_Y ); m_textCategory[p].SetZoom( CATEGORY_ZOOM ); CString joined; @@ -293,7 +293,7 @@ void ScreenNameEntry::DrawPrimitives() int iStartDrawingIndex = iClosestIndex - NUM_CHARS_TO_DRAW_BEHIND; iStartDrawingIndex += NUM_NAME_CHARS; // make positive - const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); + const Style* pStyle = GAMESTATE->GetCurrentStyle(); FOREACH_PlayerNumber( p ) { @@ -306,7 +306,7 @@ void ScreenNameEntry::DrawPrimitives() for( int i=0; im_iColsPerPlayer; t++ ) + for( int t=0; tm_iColsPerPlayer; t++ ) { if(m_ColToStringIndex[p][t] == -1) continue; @@ -330,7 +330,7 @@ void ScreenNameEntry::DrawPrimitives() } - for( int t=0; tm_iColsPerPlayer; t++ ) + for( int t=0; tm_iColsPerPlayer; t++ ) { m_textSelectedChars[p][t].Draw(); } diff --git a/stepmania/src/ScreenNameEntryTraditional.cpp b/stepmania/src/ScreenNameEntryTraditional.cpp index 93e2f2d62f..0e4ffe44e7 100644 --- a/stepmania/src/ScreenNameEntryTraditional.cpp +++ b/stepmania/src/ScreenNameEntryTraditional.cpp @@ -131,7 +131,7 @@ ScreenNameEntryTraditional::ScreenNameEntryTraditional( CString sClassName ) : S GAMESTATE->m_bSideIsJoined[PLAYER_2] = true; GAMESTATE->m_MasterPlayerNumber = PLAYER_1; GAMESTATE->m_PlayMode = PLAY_MODE_REGULAR; - GAMESTATE->m_pCurStyleDef = GAMEMAN->GameAndStringToStyle( GAME_DANCE, "versus" ); + GAMESTATE->m_pCurStyle = GAMEMAN->GameAndStringToStyle( GAME_DANCE, "versus" ); StageStats ss; for( int z = 0; z < 3; ++z ) { @@ -154,7 +154,7 @@ ScreenNameEntryTraditional::ScreenNameEntryTraditional( CString sClassName ) : S hs.grade = GRADE_TIER_3; hs.fPercentDP = ss.GetPercentDancePoints((PlayerNumber)p); hs.iScore = ss.iScore[p]; - StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType; + StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType; int a, b; PROFILEMAN->AddStepsScore( ss.pSong, GAMESTATE->m_pCurSteps[p], (PlayerNumber)p, hs, a, b ); PROFILEMAN->AddStepsScore( ss.pSong, GAMESTATE->m_pCurSteps[p], (PlayerNumber)p, hs, a, b ); diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index 0531450de4..3a9e4c4492 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -12,7 +12,7 @@ #include "ProfileManager.h" #include "song.h" #include "Course.h" -#include "StyleDef.h" +#include "Style.h" const float ITEM_X[NUM_PLAYERS] = { 260, 420 }; @@ -379,7 +379,7 @@ void ScreenOptions::Init( InputMode im, OptionRowData OptionRows[], int iNumOpti /* Hack: if m_CurStyle is set, we're probably in the player or song options menu, so * the player name is meaningful. Otherwise, we're probably in the system menu. */ - if( GAMESTATE->m_pCurStyleDef != NULL ) + if( GAMESTATE->m_pCurStyle != NULL ) { FOREACH_HumanPlayer( p ) { @@ -529,7 +529,7 @@ CString ScreenOptions::GetExplanationTitle( int iRow ) const else if( GAMESTATE->m_pCurCourse ) { Course *pCourse = GAMESTATE->m_pCurCourse; - StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType; + StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType; Trail* pTrail = pCourse->GetTrail( st ); ASSERT( pTrail ); pTrail->GetDisplayBpms( bpms ); diff --git a/stepmania/src/ScreenOptionsMaster.cpp b/stepmania/src/ScreenOptionsMaster.cpp index c61f0a7feb..8d6584f052 100644 --- a/stepmania/src/ScreenOptionsMaster.cpp +++ b/stepmania/src/ScreenOptionsMaster.cpp @@ -10,7 +10,7 @@ #include "NoteSkinManager.h" #include "Course.h" #include "Steps.h" -#include "StyleDef.h" +#include "Style.h" #include "song.h" #include "SongManager.h" #include "Character.h" @@ -111,7 +111,7 @@ void ScreenOptionsMaster::SetStep( OptionRowData &row, OptionRowHandler &hand ) row.bOneChoiceForAllPlayers = PREFSMAN->m_bLockCourseDifficulties; vector vTrails; - GAMESTATE->m_pCurCourse->GetTrails( vTrails, GAMESTATE->GetCurrentStyleDef()->m_StepsType ); + GAMESTATE->m_pCurCourse->GetTrails( vTrails, GAMESTATE->GetCurrentStyle()->m_StepsType ); for( unsigned i=0; iIsCourseMode(), playing a song { vector vSteps; - GAMESTATE->m_pCurSong->GetSteps( vSteps, GAMESTATE->GetCurrentStyleDef()->m_StepsType ); + GAMESTATE->m_pCurSong->GetSteps( vSteps, GAMESTATE->GetCurrentStyle()->m_StepsType ); StepsUtil::SortNotesArrayByDifficulty( vSteps ); for( unsigned i=0; im_pCurStyleDef = m_aModeChoices[sel].m_pStyleDef; + if( m_aModeChoices[sel].m_pStyle ) + GAMESTATE->m_pCurStyle = m_aModeChoices[sel].m_pStyle; } SCREENMAN->RefreshCreditsMessages(); } diff --git a/stepmania/src/ScreenSelectGroup.cpp b/stepmania/src/ScreenSelectGroup.cpp index 5bdd7ebf9d..64bf351ecd 100644 --- a/stepmania/src/ScreenSelectGroup.cpp +++ b/stepmania/src/ScreenSelectGroup.cpp @@ -48,7 +48,7 @@ ScreenSelectGroup::ScreenSelectGroup( CString sClassName ) : ScreenWithMenuEleme if( UNLOCKMAN->SongIsLocked( aAllSongs[j] ) ) DisplaySong = false; - if( aAllSongs[j]->SongCompleteForStyle(GAMESTATE->GetCurrentStyleDef()) && + if( aAllSongs[j]->SongCompleteForStyle(GAMESTATE->GetCurrentStyle()) && DisplaySong ) continue; diff --git a/stepmania/src/ScreenSelectMode.cpp b/stepmania/src/ScreenSelectMode.cpp index d73b0bdc10..fb95931062 100644 --- a/stepmania/src/ScreenSelectMode.cpp +++ b/stepmania/src/ScreenSelectMode.cpp @@ -194,7 +194,7 @@ void ScreenSelectMode::UpdateSelectableChoices() // FIXME for new premium prefs const int SidesJoinedToPlay = - (mc.m_pStyleDef == NULL) ? + (mc.m_pStyle == NULL) ? 1 : 1; if( PREFSMAN->GetPremium()!=PrefsManager::JOINT_PREMIUM || diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index 0469af7afe..c33c8d09fc 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -65,7 +65,7 @@ ScreenSelectMusic::ScreenSelectMusic( CString sClassName ) : ScreenWithMenuEleme /* Cache: */ g_sFallbackCDTitlePath = THEME->GetPathG(m_sName,"fallback cdtitle"); - if( GAMESTATE->m_pCurStyleDef == NULL ) + if( GAMESTATE->m_pCurStyle == NULL ) RageException::Throw( "The Style has not been set. A theme must set the Style before loading ScreenSelectMusic." ); if( GAMESTATE->m_PlayMode == PLAY_MODE_INVALID ) @@ -680,7 +680,7 @@ void ScreenSelectMusic::Input( const DeviceInput& DeviceI, InputEventType type, /* XXX: What's the difference between this and StyleI.player? */ /* StyleI won't be valid if it's a menu button that's pressed. * There's got to be a better way of doing this. -Chris */ - PlayerNumber pn = GAMESTATE->GetCurrentStyleDef()->ControllerToPlayerNumber( GameI.controller ); + PlayerNumber pn = GAMESTATE->GetCurrentStyle()->ControllerToPlayerNumber( GameI.controller ); if( !GAMESTATE->IsHumanPlayer(pn) ) return; @@ -1135,7 +1135,7 @@ void ScreenSelectMusic::MenuStart( PlayerNumber pn ) Steps* pSteps; PlayerOptions po; SongOptions so; - SONGMAN->GetExtraStageInfo( false, GAMESTATE->GetCurrentStyleDef(), pSong, pSteps, po, so ); + SONGMAN->GetExtraStageInfo( false, GAMESTATE->GetCurrentStyle(), pSong, pSteps, po, so ); ASSERT(pSong); /* Enable 2nd extra stage if user chose the correct song */ @@ -1295,7 +1295,7 @@ int FindCourseIndexOfSameMode( T begin, T end, const Course *p ) /* If it's not playable in this mode, don't increment. It might result in * different output in different modes, but that's better than having holes. */ - if( !(*it)->IsPlayableIn( GAMESTATE->GetCurrentStyleDef()->m_StepsType ) ) + if( !(*it)->IsPlayableIn( GAMESTATE->GetCurrentStyle()->m_StepsType ) ) continue; if( (*it)->GetPlayMode() != pm ) continue; @@ -1407,7 +1407,7 @@ void ScreenSelectMusic::AfterMusicChange() m_textNumSongs.SetText( ssprintf("%d", SongManager::GetNumStagesForSong(pSong) ) ); m_textTotalTime.SetText( SecondsToMMSSMsMs(pSong->m_fMusicLengthSeconds) ); - pSong->GetSteps( m_vpSteps, GAMESTATE->GetCurrentStyleDef()->m_StepsType ); + pSong->GetSteps( m_vpSteps, GAMESTATE->GetCurrentStyle()->m_StepsType ); StepsUtil::SortNotesArrayByDifficulty( m_vpSteps ); if ( PREFSMAN->m_bShowBanners ) @@ -1435,7 +1435,7 @@ void ScreenSelectMusic::AfterMusicChange() if( index != -1 ) m_MachineRank.SetText( ssprintf("%i", index+1) ); - m_DifficultyDisplay.SetDifficulties( pSong, GAMESTATE->GetCurrentStyleDef()->m_StepsType ); + m_DifficultyDisplay.SetDifficulties( pSong, GAMESTATE->GetCurrentStyle()->m_StepsType ); SwitchToPreferredDifficulty(); @@ -1512,11 +1512,11 @@ void ScreenSelectMusic::AfterMusicChange() case TYPE_COURSE: { Course* pCourse = m_MusicWheel.GetSelectedCourse(); - StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType; + StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType; Trail *pTrail = pCourse->GetTrail( st ); ASSERT( pTrail ); - pCourse->GetTrails( m_vpTrails, GAMESTATE->GetCurrentStyleDef()->m_StepsType ); + pCourse->GetTrails( m_vpTrails, GAMESTATE->GetCurrentStyle()->m_StepsType ); SampleMusicToPlay = THEME->GetPathS(m_sName,"course music"); m_fSampleStartSeconds = 0; diff --git a/stepmania/src/ScreenStyleSplash.cpp b/stepmania/src/ScreenStyleSplash.cpp index 695c397247..46e19d97ad 100644 --- a/stepmania/src/ScreenStyleSplash.cpp +++ b/stepmania/src/ScreenStyleSplash.cpp @@ -22,7 +22,7 @@ ScreenStyleSplash::ScreenStyleSplash( CString sName ) : ScreenWithMenuElements( SOUND->StopMusic(); CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName; - CString sStyleName = GAMESTATE->GetCurrentStyleDef()->m_szName; + CString sStyleName = GAMESTATE->GetCurrentStyle()->m_szName; LOG->Trace( ssprintf("ScreenStyleSplash: Displaying Splash for style: %s", sStyleName.c_str())); diff --git a/stepmania/src/ScreenWithMenuElements.cpp b/stepmania/src/ScreenWithMenuElements.cpp index 38b85d31ee..6e2042ee4f 100644 --- a/stepmania/src/ScreenWithMenuElements.cpp +++ b/stepmania/src/ScreenWithMenuElements.cpp @@ -5,7 +5,7 @@ #include "RageLog.h" #include "ThemeManager.h" #include "GameState.h" -#include "StyleDef.h" +#include "Style.h" #include "PrefsManager.h" #include "ScreenManager.h" @@ -36,9 +36,9 @@ ScreenWithMenuElements::ScreenWithMenuElements( CString sClassName ) : Screen( s UtilOnCommand( m_autoHeader, m_sName ); this->AddChild( m_autoHeader ); - if( STYLE_ICON && GAMESTATE->m_pCurStyleDef ) + if( STYLE_ICON && GAMESTATE->m_pCurStyle ) { - CString sIconFileName = ssprintf("MenuElements icon %s", GAMESTATE->GetCurrentStyleDef()->m_szName ); + CString sIconFileName = ssprintf("MenuElements icon %s", GAMESTATE->GetCurrentStyle()->m_szName ); m_sprStyleIcon.SetName( "StyleIcon" ); m_sprStyleIcon.Load( THEME->GetPathToG(sIconFileName) ); m_sprStyleIcon.StopAnimating(); diff --git a/stepmania/src/SnapDisplay.cpp b/stepmania/src/SnapDisplay.cpp index c5fe14bb61..eb1588ac91 100644 --- a/stepmania/src/SnapDisplay.cpp +++ b/stepmania/src/SnapDisplay.cpp @@ -25,7 +25,7 @@ SnapDisplay::SnapDisplay() void SnapDisplay::Load( PlayerNumber pn ) { - m_iNumCols = GAMESTATE->GetCurrentStyleDef()->m_iColsPerPlayer; + m_iNumCols = GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer; m_sprIndicators[0].SetX( -ARROW_SIZE * (m_iNumCols/2 + 0.5f) ); m_sprIndicators[1].SetX( ARROW_SIZE * (m_iNumCols/2 + 0.5f) ); diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index 3763fddaab..0d37cbe816 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -12,7 +12,7 @@ #include "SongCacheIndex.h" #include "GameManager.h" #include "PrefsManager.h" -#include "StyleDef.h" +#include "Style.h" #include "GameState.h" #include "FontCharAliases.h" #include "TitleSubstitution.h" @@ -995,7 +995,7 @@ Steps* Song::GetClosestNotes( StepsType st, Difficulty dc ) const } /* Return whether the song is playable in the given style. */ -bool Song::SongCompleteForStyle( const StyleDef *st ) const +bool Song::SongCompleteForStyle( const Style *st ) const { return HasStepsType( st->m_StepsType ); } diff --git a/stepmania/src/SongManager.cpp b/stepmania/src/SongManager.cpp index 95cca2adf0..d221d53f1b 100644 --- a/stepmania/src/SongManager.cpp +++ b/stepmania/src/SongManager.cpp @@ -382,7 +382,7 @@ RageColor SongManager::GetSongColor( const Song* pSong ) * XXX: Ack. This means this function can only be called when we have a style * set up, which is too restrictive. How to handle this? */ -// const StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType; +// const StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType; const vector& vpSteps = pSong->GetAllSteps(); for( unsigned i=0; iGetCurrentStyleDef()->m_StepsType ); + Trail *pTrail = course.GetTrail( GAMESTATE->GetCurrentStyle()->m_StepsType ); if( pTrail->m_vEntries.empty() ) return false; @@ -763,7 +763,7 @@ bool CompareNotesPointersForExtra(const Steps *n1, const Steps *n2) return StepsUtil::CompareNotesPointersByRadarValues(n1,n2); } -void SongManager::GetExtraStageInfo( bool bExtra2, const StyleDef *sd, +void SongManager::GetExtraStageInfo( bool bExtra2, const Style *sd, Song*& pSongOut, Steps*& pStepsOut, PlayerOptions& po_out, SongOptions& so_out ) { CString sGroup = GAMESTATE->m_sPreferredGroup; diff --git a/stepmania/src/SongManager.h b/stepmania/src/SongManager.h index 069656d226..c5934c7966 100644 --- a/stepmania/src/SongManager.h +++ b/stepmania/src/SongManager.h @@ -5,7 +5,7 @@ class LoadingWindow; class Song; -class StyleDef; +class Style; class Course; class Steps; struct PlayerOptions; @@ -76,7 +76,7 @@ public: void GetOniCourses( vector &AddTo, bool bIncludeAutogen ); // add to if life meter type is BATTERY. void GetEndlessCourses( vector &AddTo, bool bIncludeAutogen ); // add to if set to REPEAT. - void GetExtraStageInfo( bool bExtra2, const StyleDef *s, + void GetExtraStageInfo( bool bExtra2, const Style *s, Song*& pSongOut, Steps*& pStepsOut, PlayerOptions& po_out, SongOptions& so_out ); Song* GetSongFromDir( CString sDir ); diff --git a/stepmania/src/SongUtil.cpp b/stepmania/src/SongUtil.cpp index 10efa52127..2d4f53a69d 100644 --- a/stepmania/src/SongUtil.cpp +++ b/stepmania/src/SongUtil.cpp @@ -3,7 +3,7 @@ #include "song.h" #include "Steps.h" #include "GameState.h" -#include "StyleDef.h" +#include "Style.h" #include "ProfileManager.h" #include "PrefsManager.h" #include "SongManager.h" @@ -77,7 +77,7 @@ void SongUtil::SortSongPointerArrayByTitle( vector &arraySongPointers ) static int GetSongSortDifficulty(const Song *pSong) { vector aNotes; - pSong->GetSteps( aNotes, GAMESTATE->GetCurrentStyleDef()->m_StepsType ); + pSong->GetSteps( aNotes, GAMESTATE->GetCurrentStyle()->m_StepsType ); /* Sort by the first difficulty found in the following order: */ const Difficulty d[] = { DIFFICULTY_EASY, DIFFICULTY_MEDIUM, DIFFICULTY_HARD, @@ -151,7 +151,7 @@ void SongUtil::SortSongPointerArrayByGrade( vector &arraySongPointers ) Song *pSong = arraySongPointers[i]; int iCounts[NUM_GRADES]; - PROFILEMAN->GetMachineProfile()->GetGrades( pSong, GAMESTATE->GetCurrentStyleDef()->m_StepsType, iCounts ); + PROFILEMAN->GetMachineProfile()->GetGrades( pSong, GAMESTATE->GetCurrentStyle()->m_StepsType, iCounts ); CString foo; foo.reserve(256); @@ -276,7 +276,7 @@ CString SongUtil::GetSectionNameFromSongAndSort( const Song* pSong, SortOrder so case SORT_GRADE: { int iCounts[NUM_GRADES]; - PROFILEMAN->GetMachineProfile()->GetGrades( pSong, GAMESTATE->GetCurrentStyleDef()->m_StepsType, iCounts ); + PROFILEMAN->GetMachineProfile()->GetGrades( pSong, GAMESTATE->GetCurrentStyle()->m_StepsType, iCounts ); for( int i=GRADE_TIER_1; iGetStepsByDifficulty(GAMESTATE->GetCurrentStyleDef()->m_StepsType,DIFFICULTY_EASY); + Steps* pSteps = pSong->GetStepsByDifficulty(GAMESTATE->GetCurrentStyle()->m_StepsType,DIFFICULTY_EASY); if( pSteps ) return ssprintf("%02d", pSteps->GetMeter() ); return "N/A"; } case SORT_MEDIUM_METER: { - Steps* pSteps = pSong->GetStepsByDifficulty(GAMESTATE->GetCurrentStyleDef()->m_StepsType,DIFFICULTY_MEDIUM); + Steps* pSteps = pSong->GetStepsByDifficulty(GAMESTATE->GetCurrentStyle()->m_StepsType,DIFFICULTY_MEDIUM); if( pSteps ) return ssprintf("%02d", pSteps->GetMeter() ); return "N/A"; } case SORT_HARD_METER: { - Steps* pSteps = pSong->GetStepsByDifficulty(GAMESTATE->GetCurrentStyleDef()->m_StepsType,DIFFICULTY_HARD); + Steps* pSteps = pSong->GetStepsByDifficulty(GAMESTATE->GetCurrentStyle()->m_StepsType,DIFFICULTY_HARD); if( pSteps ) return ssprintf("%02d", pSteps->GetMeter() ); return "N/A"; } case SORT_CHALLENGE_METER: { - Steps* pSteps = pSong->GetStepsByDifficulty(GAMESTATE->GetCurrentStyleDef()->m_StepsType,DIFFICULTY_CHALLENGE); + Steps* pSteps = pSong->GetStepsByDifficulty(GAMESTATE->GetCurrentStyle()->m_StepsType,DIFFICULTY_CHALLENGE); if( pSteps ) return ssprintf("%02d", pSteps->GetMeter() ); return "N/A"; @@ -350,7 +350,7 @@ void SongUtil::SortSongPointerArrayByMeter( vector &arraySongPointers, Di song_sort_val.clear(); for(unsigned i = 0; i < arraySongPointers.size(); ++i) { - Steps* pSteps = arraySongPointers[i]->GetStepsByDifficulty( GAMESTATE->GetCurrentStyleDef()->m_StepsType, dc ); + Steps* pSteps = arraySongPointers[i]->GetStepsByDifficulty( GAMESTATE->GetCurrentStyle()->m_StepsType, dc ); CString &s = song_sort_val[arraySongPointers[i]]; s = ssprintf("%03d", pSteps ? pSteps->GetMeter() : 0); if( PREFSMAN->m_bSubSortByNumSteps ) diff --git a/stepmania/src/StageStats.cpp b/stepmania/src/StageStats.cpp index e7e50538a1..952622dcb4 100644 --- a/stepmania/src/StageStats.cpp +++ b/stepmania/src/StageStats.cpp @@ -12,7 +12,7 @@ vector g_vPlayedStageStats; void StageStats::Init() { playMode = PLAY_MODE_INVALID; - pStyleDef = NULL; + pStyle = NULL; pSong = NULL; StageType = STAGE_INVALID; fGameplaySeconds = 0; diff --git a/stepmania/src/StageStats.h b/stepmania/src/StageStats.h index e8d8bb1675..129296e77e 100644 --- a/stepmania/src/StageStats.h +++ b/stepmania/src/StageStats.h @@ -9,7 +9,7 @@ #include class Song; class Steps; -class StyleDef; +class Style; struct StageStats { @@ -23,7 +23,7 @@ struct StageStats float GetPercentDancePoints( PlayerNumber pn ) const; PlayMode playMode; - const StyleDef* pStyleDef; + const Style* pStyle; Song* pSong; enum { STAGE_INVALID, STAGE_NORMAL, STAGE_EXTRA, STAGE_EXTRA2 } StageType; Steps* pSteps[NUM_PLAYERS]; diff --git a/stepmania/src/StepMania.dsp b/stepmania/src/StepMania.dsp index 26c1d32308..42728ec7f6 100644 --- a/stepmania/src/StepMania.dsp +++ b/stepmania/src/StepMania.dsp @@ -62,7 +62,7 @@ IntDir=.\../Debug6 TargetDir=\stepmania\stepmania\Program TargetName=StepMania-debug SOURCE="$(InputPath)" -PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi # End Special Build Tool @@ -99,7 +99,7 @@ IntDir=.\../Release6 TargetDir=\stepmania\stepmania\Program TargetName=StepMania SOURCE="$(InputPath)" -PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi # End Special Build Tool @@ -984,11 +984,11 @@ SOURCE=.\StepsUtil.h # End Source File # Begin Source File -SOURCE=.\StyleDef.cpp +SOURCE=.\Style.cpp # End Source File # Begin Source File -SOURCE=.\StyleDef.h +SOURCE=.\Style.h # End Source File # Begin Source File diff --git a/stepmania/src/StepMania.vcproj b/stepmania/src/StepMania.vcproj index dc46b16c3a..5c9c23f0ee 100644 --- a/stepmania/src/StepMania.vcproj +++ b/stepmania/src/StepMania.vcproj @@ -869,15 +869,12 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\ + + - - - - diff --git a/stepmania/src/StyleDef.cpp b/stepmania/src/Style.cpp similarity index 88% rename from stepmania/src/StyleDef.cpp rename to stepmania/src/Style.cpp index 45cafd0862..be15c096ae 100644 --- a/stepmania/src/StyleDef.cpp +++ b/stepmania/src/Style.cpp @@ -13,7 +13,7 @@ * because two players place from the same set of 4 tracks. */ -#include "StyleDef.h" +#include "Style.h" #include "RageLog.h" #include "RageUtil.h" #include "GameDef.h" @@ -22,7 +22,7 @@ #include "NoteData.h" -void StyleDef::GetTransformedNoteDataForStyle( PlayerNumber pn, const NoteData* pOriginal, NoteData* pNoteDataOut ) const +void Style::GetTransformedNoteDataForStyle( PlayerNumber pn, const NoteData* pOriginal, NoteData* pNoteDataOut ) const { int iNewToOriginalTrack[MAX_COLS_PER_PLAYER]; for( int col=0; col& GetAllSteps( StepsType st=STEPS_TYPE_INVALID ) const { return st==STEPS_TYPE_INVALID? m_vpSteps:m_vpStepsByType[st]; }