diff --git a/stepmania/src/CodeDetector.cpp b/stepmania/src/CodeDetector.cpp index a032302a62..228a3f6b12 100644 --- a/stepmania/src/CodeDetector.cpp +++ b/stepmania/src/CodeDetector.cpp @@ -6,7 +6,7 @@ #include "InputMapper.h" #include "ThemeManager.h" #include "RageLog.h" -#include "GameDef.h" +#include "Game.h" #include "Style.h" #include "RageUtil.h" #include "PrefsManager.h" @@ -95,7 +95,7 @@ bool CodeItem::Load( CString sButtonsNames ) { buttons.clear(); - const GameDef* pGameDef = GAMESTATE->GetCurrentGameDef(); + const Game* pGame = GAMESTATE->GetCurrentGame(); CStringArray asButtonNames; bool bHasAPlus = sButtonsNames.Find( '+' ) != -1; @@ -129,7 +129,7 @@ bool CodeItem::Load( CString sButtonsNames ) const CString sButtonName = asButtonNames[i]; // Search for the corresponding GameButton - const GameButton gb = pGameDef->ButtonNameToIndex( sButtonName ); + const GameButton gb = pGame->ButtonNameToIndex( sButtonName ); if( gb == GAME_BUTTON_INVALID ) { LOG->Trace( "The code '%s' contains an unrecognized button '%s'.", sButtonsNames.c_str(), sButtonName.c_str() ); diff --git a/stepmania/src/Font.cpp b/stepmania/src/Font.cpp index 16c3e2a9e9..d8c809c4eb 100644 --- a/stepmania/src/Font.cpp +++ b/stepmania/src/Font.cpp @@ -509,7 +509,7 @@ void Font::LoadFontPageSettings(FontPageSettings &cfg, IniFile &ini, const CStri */ CString codepoint = val.substr(4); /* "CODEPOINT" */ - const GameDef* pGame = NULL; + const Game* pGame = NULL; if(codepoint.find_first_of(' ') != codepoint.npos) { diff --git a/stepmania/src/FontManager.cpp b/stepmania/src/FontManager.cpp index b1c830e04f..43c28371c5 100644 --- a/stepmania/src/FontManager.cpp +++ b/stepmania/src/FontManager.cpp @@ -31,7 +31,7 @@ FontManager::~FontManager() /* A longchar is at least 32 bits. If c & 0xFF000000, it's a game-custom * character; game 0 is 0x0100nnnn, game 1 is 0x0200nnnn, and so on. */ -longchar FontManager::MakeGameGlyph(wchar_t c, const GameDef* g) +longchar FontManager::MakeGameGlyph(wchar_t c, const Game* g) { ASSERT(c >= 0 && c <= 0xFFFF); int index = GAMEMAN->GetIndexFromGame(g); @@ -39,7 +39,7 @@ longchar FontManager::MakeGameGlyph(wchar_t c, const GameDef* g) return longchar (((index+1) << 24) + c); } -bool FontManager::ExtractGameGlyph(longchar ch, wchar_t &cOut, const GameDef *&gOut) +bool FontManager::ExtractGameGlyph(longchar ch, wchar_t &cOut, const Game *&gOut) { if((ch & 0xFF000000) == 0) return false; /* not a game glyph */ diff --git a/stepmania/src/FontManager.h b/stepmania/src/FontManager.h index 8a57399915..500e5f71d9 100644 --- a/stepmania/src/FontManager.h +++ b/stepmania/src/FontManager.h @@ -6,7 +6,7 @@ #include "RageUtil.h" class Font; -class GameDef; +class Game; class FontManager { @@ -24,8 +24,8 @@ public: * adjustment of fonts in ScreenTestFonts at the moment. */ void ReloadFonts(); - static longchar MakeGameGlyph(wchar_t c, const GameDef* g); - static bool ExtractGameGlyph(longchar ch, wchar_t &c, const GameDef*& g); + static longchar MakeGameGlyph(wchar_t c, const Game* g); + static bool ExtractGameGlyph(longchar ch, wchar_t &c, const Game*& g); }; extern FontManager* FONT; // global and accessable from anywhere in our program diff --git a/stepmania/src/GameDef.cpp b/stepmania/src/GameDef.cpp index df91b9e991..7956791d8e 100644 --- a/stepmania/src/GameDef.cpp +++ b/stepmania/src/GameDef.cpp @@ -1,5 +1,5 @@ #include "global.h" -#include "GameDef.h" +#include "Game.h" #include "RageLog.h" #include "RageUtil.h" #include "IniFile.h" @@ -9,14 +9,14 @@ #include "InputMapper.h" #include "PrefsManager.h" -int GameDef::GetNumGameplayButtons() const +int Game::GetNumGameplayButtons() const { int iIndexOfStart = ButtonNameToIndex( "Start" ); ASSERT( iIndexOfStart != GAME_BUTTON_INVALID ); return iIndexOfStart; } -GameButton GameDef::ButtonNameToIndex( const CString &sButtonName ) const +GameButton Game::ButtonNameToIndex( const CString &sButtonName ) const { for( int i=0; i& aStylesAddTo, bool editor ) +void GameManager::GetStylesForGame( const Game *pGame, vector& aStylesAddTo, bool editor ) { for( unsigned s=0; sm_pGameDef != pGame) + if( style->m_pGame != pGame) continue; if( !editor && !style->m_bUsedForGameplay ) continue; @@ -2854,7 +2854,7 @@ const Style* GameManager::GetEditorStyleForStepsType( StepsType st ) } -void GameManager::GetStepsTypesForGame( const GameDef *pGame, vector& aStepsTypeAddTo ) +void GameManager::GetStepsTypesForGame( const Game *pGame, vector& aStepsTypeAddTo ) { FOREACH_StepsType( st ) { @@ -2862,7 +2862,7 @@ void GameManager::GetStepsTypesForGame( const GameDef *pGame, vector& for( unsigned s=0; !found && sm_pGameDef != pGame || style->m_StepsType != st ) + if( style->m_pGame != pGame || style->m_StepsType != st ) continue; found = true; @@ -2872,12 +2872,12 @@ void GameManager::GetStepsTypesForGame( const GameDef *pGame, vector& } } -const Style* GameManager::GetDemonstrationStyleForGame( const GameDef *pGame ) +const Style* GameManager::GetDemonstrationStyleForGame( const Game *pGame ) { for( unsigned s=0; sm_pGameDef == pGame && style->m_bUsedForDemonstration ) + if( style->m_pGame == pGame && style->m_bUsedForDemonstration ) return style; } @@ -2885,12 +2885,12 @@ const Style* GameManager::GetDemonstrationStyleForGame( const GameDef *pGame ) return NULL; } -const Style* GameManager::GetHowToPlayStyleForGame( const GameDef *pGame ) +const Style* GameManager::GetHowToPlayStyleForGame( const Game *pGame ) { for( unsigned s=0; sm_pGameDef == pGame && style->m_bUsedForHowToPlay ) + if( style->m_pGame == pGame && style->m_bUsedForHowToPlay ) return style; } @@ -2898,11 +2898,11 @@ const Style* GameManager::GetHowToPlayStyleForGame( const GameDef *pGame ) return NULL; } -void GameManager::GetEnabledGames( vector& aGamesOut ) +void GameManager::GetEnabledGames( vector& aGamesOut ) { for( int g=0; gGetNoteSkinNames( pGame, asNoteSkins ); if( !asNoteSkins.empty() ) @@ -2910,32 +2910,32 @@ void GameManager::GetEnabledGames( vector& aGamesOut ) } } -const GameDef* GameManager::GetDefaultGame() +const Game* GameManager::GetDefaultGame() { - return &g_GameDefs[0]; + return &g_Games[0]; } -int GameManager::GetIndexFromGame( const GameDef* pGame ) +int GameManager::GetIndexFromGame( const Game* pGame ) { for( int g=0; g= 0 ); ASSERT( index < NUM_GAMES ); - return &g_GameDefs[index]; + return &g_Games[index]; } -bool GameManager::IsGameEnabled( const GameDef *pGame ) +bool GameManager::IsGameEnabled( const Game *pGame ) { - vector aGames; + vector aGames; GetEnabledGames( aGames ); return find( aGames.begin(), aGames.end(), pGame ) != aGames.end(); } @@ -2992,22 +2992,22 @@ CString GameManager::StyleToThemedString( const Style* style ) return s; } -const GameDef* GameManager::StringToGameType( CString sGameType ) +const Game* GameManager::StringToGameType( CString sGameType ) { for( int i=0; im_pGameDef != game ) + if( style->m_pGame != game ) continue; if( sStyle.CompareNoCase(style->m_szName) == 0 ) return style; diff --git a/stepmania/src/GameManager.h b/stepmania/src/GameManager.h index 51ccec32bd..9e3a29d083 100644 --- a/stepmania/src/GameManager.h +++ b/stepmania/src/GameManager.h @@ -1,11 +1,11 @@ -/* GameManager - Manages GameDefs and Styles. */ +/* GameManager - Manages Games and Styles. */ #ifndef GAMEMANAGER_H #define GAMEMANAGER_H class IniFile; class Style; -class GameDef; +class Game; #include "GameConstantsAndTypes.h" @@ -15,25 +15,25 @@ public: GameManager(); ~GameManager(); - void GetStylesForGame( const GameDef* pGame, vector& aStylesAddTo, bool editor=false ); + void GetStylesForGame( const Game* pGame, vector& aStylesAddTo, bool editor=false ); void GetAllStyles( vector& aStylesAddTo, bool editor=false ); - void GetStepsTypesForGame( const GameDef* pGame, vector& aStepsTypeAddTo ); + void GetStepsTypesForGame( const Game* pGame, vector& aStepsTypeAddTo ); const Style* GetEditorStyleForStepsType( StepsType st ); - const Style* GetDemonstrationStyleForGame( const GameDef* pGame ); - const Style* GetHowToPlayStyleForGame( const GameDef* pGame ); + const Style* GetDemonstrationStyleForGame( const Game* pGame ); + const Style* GetHowToPlayStyleForGame( const Game* pGame ); - void GetEnabledGames( vector& aGamesOut ); - const GameDef* GetDefaultGame(); - bool IsGameEnabled( const GameDef* pGame ); - int GetIndexFromGame( const GameDef* pGame ); - const GameDef* GetGameFromIndex( int index ); + void GetEnabledGames( vector& aGamesOut ); + const Game* GetDefaultGame(); + bool IsGameEnabled( const Game* pGame ); + int GetIndexFromGame( const Game* pGame ); + const Game* GetGameFromIndex( int index ); static int StepsTypeToNumTracks( StepsType st ); static StepsType StringToStepsType( CString sStepsType ); static CString StepsTypeToString( StepsType st ); static CString StepsTypeToThemedString( StepsType st ); - static const GameDef* StringToGameType( CString sGameType ); - const Style* GameAndStringToStyle( const GameDef* pGame, CString sStyle ); + static const Game* StringToGameType( CString sGameType ); + const Style* GameAndStringToStyle( const Game* pGame, CString sStyle ); static CString StyleToThemedString( const Style* s ); }; diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 8ad3bcf4f4..721eab6c6d 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -784,7 +784,7 @@ int GameState::GetNumSidesJoined() const return iNumSidesJoined; } -const GameDef* GameState::GetCurrentGameDef() +const Game* GameState::GetCurrentGame() { ASSERT( m_pCurGame != NULL ); // the game must be set before calling this return m_pCurGame; diff --git a/stepmania/src/GameState.h b/stepmania/src/GameState.h index 569d2b7838..574a5a2f0a 100644 --- a/stepmania/src/GameState.h +++ b/stepmania/src/GameState.h @@ -18,14 +18,12 @@ class Song; class Steps; class Course; class Trail; -class GameDef; +class Game; class Style; class NoteFieldPositioning; class Character; class TimingData; struct StageStats; -class GameDef; -class Style; class GameState { @@ -46,7 +44,7 @@ public: // // Main state info // - const GameDef* m_pCurGame; + const Game* m_pCurGame; const Style* m_pCurStyle; bool m_bSideIsJoined[NUM_PLAYERS]; // left side, right side bool m_bPlayersFinalized; @@ -72,7 +70,7 @@ public: bool EnoughCreditsToJoin() const; // true if an unjoined player can join by pressint start int GetNumSidesJoined() const; - const GameDef* GetCurrentGameDef(); + const Game* GetCurrentGame(); const Style* GetCurrentStyle() const; void GetPlayerInfo( PlayerNumber pn, bool& bIsEnabledOut, bool& bIsHumanOut ); diff --git a/stepmania/src/InputMapper.cpp b/stepmania/src/InputMapper.cpp index 4c30d3dee8..7a26fe06a0 100644 --- a/stepmania/src/InputMapper.cpp +++ b/stepmania/src/InputMapper.cpp @@ -9,7 +9,7 @@ #include "PrefsManager.h" #include "RageInput.h" #include "arch/arch.h" -#include "GameDef.h" +#include "Game.h" #include "Style.h" @@ -43,12 +43,12 @@ void InputMapper::AddDefaultMappingsForCurrentGameIfUnmapped() for( int j=0; jGetCurrentGameDef(); + const Game* pGame = GAMESTATE->GetCurrentGame(); for( int c=0; cm_iButtonsPerController; b++ ) + for( int b=0; bm_iButtonsPerController; b++ ) { - int key = pGameDef->m_iDefaultKeyboardKey[c][b]; + int key = pGame->m_iDefaultKeyboardKey[c][b]; if( key == NO_DEFAULT_KEY ) continue; DeviceInput DeviceI( DEVICE_KEYBOARD, key ); @@ -310,7 +310,7 @@ void InputMapper::AutoMapJoysticksForCurrentGame() int iNumJoysticksMapped = 0; - const GameDef* pGameDef = GAMESTATE->m_pCurGame; + const Game* pGame = GAMESTATE->m_pCurGame; for( unsigned i=0; iStringToGameType(mapping.szGame) ) + if( pGame != GAMEMAN->StringToGameType(mapping.szGame) ) continue; // games don't match CString sDriverRegex = mapping.szDriverRegex; @@ -373,7 +373,7 @@ void InputMapper::ReadMappingsFromDisk() if( !ini.ReadFile( KEYMAPS_PATH ) ) LOG->Trace( "Couldn't open mapping file \"%s\": %s.", KEYMAPS_PATH, ini.GetError().c_str() ); - const IniFile::key *Key = ini.GetKey( GAMESTATE->GetCurrentGameDef()->m_szName ); + const IniFile::key *Key = ini.GetKey( GAMESTATE->GetCurrentGame()->m_szName ); if( Key ) { @@ -409,7 +409,7 @@ void InputMapper::SaveMappingsToDisk() ini.ReadFile( KEYMAPS_PATH ); // erase the key so that we overwrite everything for this game - ini.DeleteKey( GAMESTATE->GetCurrentGameDef()->m_szName ); + ini.DeleteKey( GAMESTATE->GetCurrentGame()->m_szName ); // iterate over our input map and write all mappings to the ini file for( int i=0; iGetCurrentGameDef()->m_szName, sNameString, sValueString ); + ini.SetValue( GAMESTATE->GetCurrentGame()->m_szName, sNameString, sValueString ); } } @@ -541,8 +541,8 @@ void InputMapper::GameToStyle( GameInput GameI, StyleInput &StyleI ) void InputMapper::GameToMenu( GameInput GameI, MenuInput &MenuI ) { - const GameDef* pGameDef = GAMESTATE->GetCurrentGameDef(); - MenuI = pGameDef->GameInputToMenuInput( GameI ); + const Game* pGame = GAMESTATE->GetCurrentGame(); + MenuI = pGame->GameInputToMenuInput( GameI ); } void InputMapper::StyleToGame( StyleInput StyleI, GameInput &GameI ) @@ -554,8 +554,8 @@ void InputMapper::StyleToGame( StyleInput StyleI, GameInput &GameI ) void InputMapper::MenuToGame( MenuInput MenuI, GameInput GameIout[4] ) { - const GameDef* pGameDef = GAMESTATE->GetCurrentGameDef(); - pGameDef->MenuInputToGameInput( MenuI, GameIout ); + const Game* pGame = GAMESTATE->GetCurrentGame(); + pGame->MenuInputToGameInput( MenuI, GameIout ); } diff --git a/stepmania/src/LightsManager.cpp b/stepmania/src/LightsManager.cpp index c0d9328061..41096baab1 100644 --- a/stepmania/src/LightsManager.cpp +++ b/stepmania/src/LightsManager.cpp @@ -6,7 +6,7 @@ #include "RageUtil.h" #include "GameInput.h" // for GameController #include "InputMapper.h" -#include "GameDef.h" +#include "Game.h" #include "PrefsManager.h" @@ -238,7 +238,7 @@ void LightsManager::Update( float fDeltaTime ) { int iSec = (int)RageTimer::GetTimeSinceStart(); - int iNumGameButtonsToShow = GAMESTATE->GetCurrentGameDef()->GetNumGameplayButtons(); + int iNumGameButtonsToShow = GAMESTATE->GetCurrentGame()->GetNumGameplayButtons(); FOREACH_GameController( gc ) { diff --git a/stepmania/src/Makefile.am b/stepmania/src/Makefile.am index 3404ec2ac4..e315cf1491 100644 --- a/stepmania/src/Makefile.am +++ b/stepmania/src/Makefile.am @@ -56,7 +56,7 @@ Attack.cpp Attack.h BannerCache.cpp BannerCache.h CatalogXml.cpp CatalogXml.h \ Character.cpp Character.h CharacterHead.cpp CharacterHead.h \ CodeDetector.cpp CodeDetector.h Difficulty.cpp Difficulty.h EnumHelper.cpp EnumHelper.h Course.cpp Course.h \ CourseUtil.cpp CourseUtil.h DateTime.cpp DateTime.h Font.cpp Font.h FontCharAliases.cpp FontCharAliases.h \ -FontCharmaps.cpp FontCharmaps.h Game.h GameConstantsAndTypes.cpp GameConstantsAndTypes.h GameDef.cpp GameDef.h \ +FontCharmaps.cpp FontCharmaps.h Game.cpp Game.h GameConstantsAndTypes.cpp GameConstantsAndTypes.h \ GameInput.cpp GameInput.h Grade.cpp Grade.h HighScore.cpp HighScore.h Inventory.cpp Inventory.h LuaFunctions.h \ LuaHelpers.cpp LuaHelpers.h LyricsLoader.cpp LyricsLoader.h MenuInput.h ModeChoice.cpp ModeChoice.h \ NoteData.cpp NoteData.h NoteDataUtil.cpp NoteDataUtil.h NoteDataWithScoring.cpp NoteDataWithScoring.h \ diff --git a/stepmania/src/MenuInput.h b/stepmania/src/MenuInput.h index b6546c108e..e0469bdf3a 100644 --- a/stepmania/src/MenuInput.h +++ b/stepmania/src/MenuInput.h @@ -1,4 +1,4 @@ -/* MenuInput - An input event specific to a menu navigation. This is generated based on a GameDef. */ +/* MenuInput - An input event specific to a menu navigation. This is generated based on a Game. */ #ifndef MENUINPUT_H #define MENUINPUT_H diff --git a/stepmania/src/ModeChoice.cpp b/stepmania/src/ModeChoice.cpp index 0a3d16e871..bfbba1829e 100644 --- a/stepmania/src/ModeChoice.cpp +++ b/stepmania/src/ModeChoice.cpp @@ -14,14 +14,14 @@ #include "arch/ArchHooks/ArchHooks.h" #include "MemoryCardManager.h" #include "song.h" -#include "GameDef.h" +#include "Game.h" void ModeChoice::Init() { m_sName = ""; m_bInvalid = true; m_iIndex = -1; - m_pGameDef = NULL; + m_pGame = NULL; m_pStyle = NULL; m_pm = PLAY_MODE_INVALID; m_dc = DIFFICULTY_INVALID; @@ -49,7 +49,7 @@ bool ModeChoice::DescribesCurrentModeForAllPlayers() const bool ModeChoice::DescribesCurrentMode( PlayerNumber pn ) const { - if( m_pGameDef != NULL && m_pGameDef != GAMESTATE->m_pCurGame ) + if( m_pGame != NULL && m_pGame != GAMESTATE->m_pCurGame ) return false; if( m_pm != PLAY_MODE_INVALID && GAMESTATE->m_PlayMode != m_pm ) return false; @@ -121,9 +121,9 @@ void ModeChoice::Load( int iIndex, CString sChoice ) if( sName == "game" ) { - const GameDef* pGame = GAMEMAN->StringToGameType( sValue ); + const Game* pGame = GAMEMAN->StringToGameType( sValue ); if( pGame != NULL ) - m_pGameDef = pGame; + m_pGame = pGame; else m_bInvalid |= true; } @@ -404,8 +404,8 @@ void ModeChoice::Apply( PlayerNumber pn ) const const PlayMode OldPlayMode = GAMESTATE->m_PlayMode; - if( m_pGameDef != NULL ) - GAMESTATE->m_pCurGame = m_pGameDef; + if( m_pGame != NULL ) + GAMESTATE->m_pCurGame = m_pGame; if( m_pm != PLAY_MODE_INVALID ) GAMESTATE->m_PlayMode = m_pm; @@ -485,7 +485,7 @@ void ModeChoice::Apply( PlayerNumber pn ) const bool ModeChoice::IsZero() const { - if( m_pGameDef != NULL || + if( m_pGame != NULL || m_pm != PLAY_MODE_INVALID || m_pStyle != NULL || m_dc != DIFFICULTY_INVALID || diff --git a/stepmania/src/ModeChoice.h b/stepmania/src/ModeChoice.h index 69d80072b9..c4900c542d 100644 --- a/stepmania/src/ModeChoice.h +++ b/stepmania/src/ModeChoice.h @@ -13,7 +13,7 @@ class Course; class Trail; class Character; class Style; -class GameDef; +class Game; struct ModeChoice // used in SelectMode { @@ -32,7 +32,7 @@ struct ModeChoice // used in SelectMode bool m_bInvalid; CString m_sInvalidReason; int m_iIndex; - const GameDef* m_pGameDef; + const Game* m_pGame; const Style* m_pStyle; PlayMode m_pm; Difficulty m_dc; diff --git a/stepmania/src/ModeSwitcher.cpp b/stepmania/src/ModeSwitcher.cpp index 4698e71a5d..d583571916 100644 --- a/stepmania/src/ModeSwitcher.cpp +++ b/stepmania/src/ModeSwitcher.cpp @@ -9,7 +9,7 @@ #include "song.h" #include "ActorUtil.h" #include "GameManager.h" -#include "GameDef.h" +#include "Game.h" #define PREVMODE_X THEME->GetMetricF("ModeSwitcher","PrevModeX") #define PREVMODE_Y THEME->GetMetricF("ModeSwitcher","PrevModeY") diff --git a/stepmania/src/NoteFieldPositioning.cpp b/stepmania/src/NoteFieldPositioning.cpp index 17b003c65a..69b139db53 100644 --- a/stepmania/src/NoteFieldPositioning.cpp +++ b/stepmania/src/NoteFieldPositioning.cpp @@ -9,7 +9,7 @@ #include "GameState.h" #include "GameManager.h" #include "IniFile.h" -#include "GameDef.h" +#include "Game.h" /* Copies of the current mode. Update this by calling Load. */ NoteFieldMode g_NoteFieldMode[NUM_PLAYERS]; @@ -93,7 +93,7 @@ void NoteFieldMode::Load(IniFile &ini, CString id, int pn) split(games[n], "-", bits); ASSERT(bits.size() == 2); - const GameDef* pGame = GAMEMAN->StringToGameType( bits[0] ); + const Game* pGame = GAMEMAN->StringToGameType( bits[0] ); ASSERT(pGame != NULL); const Style *style = GAMEMAN->GameAndStringToStyle( pGame, bits[1] ); diff --git a/stepmania/src/NoteSkinManager.cpp b/stepmania/src/NoteSkinManager.cpp index 1c2c6cd69e..36240c48e5 100644 --- a/stepmania/src/NoteSkinManager.cpp +++ b/stepmania/src/NoteSkinManager.cpp @@ -3,7 +3,7 @@ #include "RageLog.h" #include "RageException.h" #include "GameState.h" -#include "GameDef.h" +#include "Game.h" #include "StyleInput.h" #include "Style.h" #include "RageUtil.h" @@ -31,18 +31,18 @@ NoteSkinManager::~NoteSkinManager() { } -void NoteSkinManager::RefreshNoteSkinData( const GameDef* game ) +void NoteSkinManager::RefreshNoteSkinData( const Game* game ) { /* Reload even if we don't need to, so exiting out of the menus refreshes the note * skin list (so you don't have to restart to see new noteskins). */ m_pCurGame = GAMESTATE->m_pCurGame; - const GameDef* pGameDef = game; + const Game* pGame = game; // clear path cache g_PathCache.clear(); - CString sBaseSkinFolder = NOTESKINS_DIR + pGameDef->m_szName + "/"; + CString sBaseSkinFolder = NOTESKINS_DIR + pGame->m_szName + "/"; CStringArray asNoteSkinNames; GetDirListing( sBaseSkinFolder + "*", asNoteSkinNames, true ); @@ -103,7 +103,7 @@ void NoteSkinManager::GetNoteSkinNames( CStringArray &AddTo ) } } -void NoteSkinManager::GetNoteSkinNames( const GameDef* game, CStringArray &AddTo ) +void NoteSkinManager::GetNoteSkinNames( const Game* game, CStringArray &AddTo ) { RefreshNoteSkinData( game ); @@ -130,7 +130,7 @@ bool NoteSkinManager::DoesNoteSkinExist( CString sSkinName ) CString NoteSkinManager::GetNoteSkinDir( CString sSkinName ) { - CString sGame = GAMESTATE->GetCurrentGameDef()->m_szName; + CString sGame = GAMESTATE->GetCurrentGame()->m_szName; return NOTESKINS_DIR + sGame + "/" + sSkinName + "/"; } @@ -186,11 +186,11 @@ RageColor NoteSkinManager::GetMetricC( CString sNoteSkinName, CString sButtonNam CString NoteSkinManager::ColToButtonName(int col) { const Style* pStyle = GAMESTATE->GetCurrentStyle(); - const GameDef* pGameDef = GAMESTATE->GetCurrentGameDef(); + const Game* pGame = GAMESTATE->GetCurrentGame(); StyleInput SI( PLAYER_1, col ); GameInput GI = pStyle->StyleInputToGameInput( SI ); - return pGameDef->m_szButtonNames[GI.button]; + return pGame->m_szButtonNames[GI.button]; } CString NoteSkinManager::GetPathToFromPlayerAndCol( PlayerNumber pn, int col, CString sFileName, bool bOptional ) diff --git a/stepmania/src/NoteSkinManager.h b/stepmania/src/NoteSkinManager.h index 0c361b0620..2da3746e99 100644 --- a/stepmania/src/NoteSkinManager.h +++ b/stepmania/src/NoteSkinManager.h @@ -6,7 +6,7 @@ #include "IniFile.h" #include -class GameDef; +class Game; class NoteSkinManager { @@ -14,10 +14,10 @@ public: NoteSkinManager(); ~NoteSkinManager(); - void RefreshNoteSkinData( const GameDef* game ); - void GetNoteSkinNames( const GameDef* game, CStringArray &AddTo ); - void GetNoteSkinNames( CStringArray &AddTo ); // looks up current const GameDef* in GAMESTATE - bool DoesNoteSkinExist( CString sSkinName ); // looks up current const GameDef* in GAMESTATE + void RefreshNoteSkinData( const Game* game ); + void GetNoteSkinNames( const Game* game, CStringArray &AddTo ); + void GetNoteSkinNames( CStringArray &AddTo ); // looks up current const Game* in GAMESTATE + bool DoesNoteSkinExist( CString sSkinName ); // looks up current const Game* in GAMESTATE CString GetPathToFromPlayerAndCol( PlayerNumber pn, int col, CString sElement, bool bOptional=false ); CString GetPathToFromNoteSkinAndButton( CString NoteSkin, CString sButtonName, CString sElement, bool bOptional=false ); @@ -43,7 +43,7 @@ protected: }; void LoadNoteSkinData( CString sNoteSkinName, NoteSkinData& data_out ); map m_mapNameToData; - const GameDef* m_pCurGame; + const Game* m_pCurGame; }; diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index e0b0e79ad2..8453b44bf3 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -24,7 +24,7 @@ #include "ScreenManager.h" #include "StageStats.h" #include "ArrowEffects.h" -#include "GameDef.h" +#include "Game.h" CachedThemeMetricF GRAY_ARROWS_Y_STANDARD ("Player","ReceptorArrowsYStandard"); CachedThemeMetricF GRAY_ARROWS_Y_REVERSE ("Player","ReceptorArrowsYReverse"); @@ -816,12 +816,12 @@ void PlayerMinus::Step( int col, RageTimer tm ) // Do game-specific score mapping. - const GameDef* pGameDef = GAMESTATE->GetCurrentGameDef(); - if( score == TNS_MARVELOUS ) score = pGameDef->m_mapMarvelousTo; - if( score == TNS_PERFECT ) score = pGameDef->m_mapPerfectTo; - if( score == TNS_GREAT ) score = pGameDef->m_mapGreatTo; - if( score == TNS_GOOD ) score = pGameDef->m_mapGoodTo; - if( score == TNS_BOO ) score = pGameDef->m_mapBooTo; + const Game* pGame = GAMESTATE->GetCurrentGame(); + if( score == TNS_MARVELOUS ) score = pGame->m_mapMarvelousTo; + if( score == TNS_PERFECT ) score = pGame->m_mapPerfectTo; + if( score == TNS_GREAT ) score = pGame->m_mapGreatTo; + if( score == TNS_GOOD ) score = pGame->m_mapGoodTo; + if( score == TNS_BOO ) score = pGame->m_mapBooTo; diff --git a/stepmania/src/ScreenHowToPlay.cpp b/stepmania/src/ScreenHowToPlay.cpp index 33e3608768..ffba6a93eb 100644 --- a/stepmania/src/ScreenHowToPlay.cpp +++ b/stepmania/src/ScreenHowToPlay.cpp @@ -3,7 +3,7 @@ #include "ScreenHowToPlay.h" #include "ThemeManager.h" #include "GameState.h" -#include "GameDef.h" +#include "Game.h" #include "RageLog.h" #include "RageDisplay.h" #include "SongManager.h" diff --git a/stepmania/src/ScreenLogo.cpp b/stepmania/src/ScreenLogo.cpp index fb08f15b2a..8ba1922126 100644 --- a/stepmania/src/ScreenLogo.cpp +++ b/stepmania/src/ScreenLogo.cpp @@ -3,12 +3,12 @@ #include "ActorUtil.h" #include "ThemeManager.h" #include "GameState.h" -#include "GameDef.h" +#include "Game.h" ScreenLogo::ScreenLogo( CString sName ) : ScreenAttract( sName ) { m_sprLogo.SetName( "Logo" ); - m_sprLogo.Load( THEME->GetPathG("ScreenLogo",GAMESTATE->GetCurrentGameDef()->m_szName) ); + m_sprLogo.Load( THEME->GetPathG("ScreenLogo",GAMESTATE->GetCurrentGame()->m_szName) ); ON_COMMAND( m_sprLogo ); this->AddChild( &m_sprLogo ); diff --git a/stepmania/src/ScreenMapControllers.cpp b/stepmania/src/ScreenMapControllers.cpp index 790e16183d..5ff63395e7 100644 --- a/stepmania/src/ScreenMapControllers.cpp +++ b/stepmania/src/ScreenMapControllers.cpp @@ -11,7 +11,7 @@ #include "GameSoundManager.h" #include "ThemeManager.h" #include "RageDisplay.h" -#include "GameDef.h" +#include "Game.h" #define EVEN_LINE_IN THEME->GetMetric("ScreenMapControllers","EvenLineIn") @@ -37,10 +37,10 @@ ScreenMapControllers::ScreenMapControllers( CString sClassName ) : ScreenWithMen { LOG->Trace( "ScreenMapControllers::ScreenMapControllers()" ); - for( int b=0; bGetCurrentGameDef()->m_iButtonsPerController; b++ ) + for( int b=0; bGetCurrentGame()->m_iButtonsPerController; b++ ) { - CString sName = GAMESTATE->GetCurrentGameDef()->m_szButtonNames[b]; - CString sSecondary = GAMESTATE->GetCurrentGameDef()->m_szSecondaryFunction[b]; + CString sName = GAMESTATE->GetCurrentGame()->m_szButtonNames[b]; + CString sSecondary = GAMESTATE->GetCurrentGame()->m_szSecondaryFunction[b]; m_textName[b].LoadFromFont( THEME->GetPathToF("Common title") ); m_textName[b].SetXY( CENTER_X, -6 ); @@ -246,7 +246,7 @@ void ScreenMapControllers::Input( const DeviceInput& DeviceI, const InputEventTy m_iCurButton--; break; case SDLK_DOWN: /* Move the selection down. */ - if( m_iCurButton == GAMESTATE->GetCurrentGameDef()->m_iButtonsPerController-1 ) + if( m_iCurButton == GAMESTATE->GetCurrentGame()->m_iButtonsPerController-1 ) break; // can't go down any more m_iCurButton++; break; @@ -255,7 +255,7 @@ void ScreenMapControllers::Input( const DeviceInput& DeviceI, const InputEventTy { SCREENMAN->PlayStartSound(); StartTransitioning( SM_GoToNextScreen ); - for( int b=0; bGetCurrentGameDef()->m_iButtonsPerController; b++ ) + for( int b=0; bGetCurrentGame()->m_iButtonsPerController; b++ ) m_Line[b].Command( (b%2)? ODD_LINE_OUT:EVEN_LINE_OUT ); } break; @@ -288,7 +288,7 @@ void ScreenMapControllers::Refresh() { for( int p=0; pGetCurrentGameDef()->m_iButtonsPerController; b++ ) + for( int b=0; bGetCurrentGame()->m_iButtonsPerController; b++ ) { for( int s=0; sGetCurrentStyle()->StyleInputToGameInput(si); - MenuInput m=GAMESTATE->GetCurrentGameDef()->GameInputToMenuInput(gi); + MenuInput m=GAMESTATE->GetCurrentGame()->GameInputToMenuInput(gi); if(m.button == MENU_BUTTON_START) continue; m_ColToStringIndex[p][t] = CurrentStringIndex++; diff --git a/stepmania/src/ScreenOptionsMasterPrefs.cpp b/stepmania/src/ScreenOptionsMasterPrefs.cpp index 39e5c8fbe4..e98b77d6e8 100644 --- a/stepmania/src/ScreenOptionsMasterPrefs.cpp +++ b/stepmania/src/ScreenOptionsMasterPrefs.cpp @@ -12,7 +12,7 @@ #include "GameState.h" #include "InputMapper.h" #include "StepMania.h" -#include "GameDef.h" +#include "Game.h" #include "Foreach.h" static void GetDefaultModifiers( PlayerOptions &po, SongOptions &so ) @@ -84,9 +84,9 @@ static void MoveData( int &sel, bool &opt, bool ToSel ) static void GameChoices( CStringArray &out ) { - vector aGames; + vector aGames; GAMEMAN->GetEnabledGames( aGames ); - FOREACH( const GameDef*, aGames, g ) + FOREACH( const Game*, aGames, g ) { CString sGameName = (*g)->m_szName; sGameName.MakeUpper(); @@ -105,7 +105,7 @@ static void GameSel( int &sel, bool ToSel, const CStringArray &choices ) if( !stricmp(choices[i], sCurGameName) ) sel = i; } else { - vector aGames; + vector aGames; GAMEMAN->GetEnabledGames( aGames ); ChangeCurrentGame( aGames[sel] ); } diff --git a/stepmania/src/ScreenStyleSplash.cpp b/stepmania/src/ScreenStyleSplash.cpp index cf1db2c9dc..c9731756f0 100644 --- a/stepmania/src/ScreenStyleSplash.cpp +++ b/stepmania/src/ScreenStyleSplash.cpp @@ -8,7 +8,7 @@ #include "GameState.h" #include "GameManager.h" #include "RageLog.h" -#include "GameDef.h" +#include "Game.h" #include "Style.h" #define NEXT_SCREEN THEME->GetMetric("ScreenStyleSplash","NextScreen") @@ -23,7 +23,7 @@ ScreenStyleSplash::ScreenStyleSplash( CString sName ) : ScreenWithMenuElements( { SOUND->StopMusic(); - CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName; + CString sGameName = GAMESTATE->GetCurrentGame()->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/ScreenTestInput.cpp b/stepmania/src/ScreenTestInput.cpp index 7100260698..8b1a388e4b 100644 --- a/stepmania/src/ScreenTestInput.cpp +++ b/stepmania/src/ScreenTestInput.cpp @@ -11,7 +11,7 @@ #include "GameSoundManager.h" #include "ThemeManager.h" #include "RageDisplay.h" -#include "GameDef.h" +#include "Game.h" ScreenTestInput::ScreenTestInput( CString sClassName ) : ScreenWithMenuElements( sClassName ) @@ -60,8 +60,8 @@ void ScreenTestInput::Update( float fDeltaTime ) GameInput gi; if( INPUTMAPPER->DeviceToGame(di,gi) ) { - CString sName = GAMESTATE->GetCurrentGameDef()->m_szButtonNames[gi.button]; - CString sSecondary = GAMESTATE->GetCurrentGameDef()->m_szSecondaryFunction[gi.button]; + CString sName = GAMESTATE->GetCurrentGame()->m_szButtonNames[gi.button]; + CString sSecondary = GAMESTATE->GetCurrentGame()->m_szSecondaryFunction[gi.button]; sTemp += ssprintf(" (Controller %d %s) %s", gi.controller+1, sName.c_str(), sSecondary.c_str() ); } diff --git a/stepmania/src/ScreenTestLights.cpp b/stepmania/src/ScreenTestLights.cpp index 85e7c33bd5..becb89397b 100644 --- a/stepmania/src/ScreenTestLights.cpp +++ b/stepmania/src/ScreenTestLights.cpp @@ -12,7 +12,7 @@ #include "ThemeManager.h" #include "RageDisplay.h" #include "LightsManager.h" -#include "GameDef.h" +#include "Game.h" ScreenTestLights::ScreenTestLights( CString sClassName ) : ScreenWithMenuElements( sClassName ) @@ -47,10 +47,10 @@ void ScreenTestLights::Update( float fDeltaTime ) int iSec = (int)RageTimer::GetTimeSinceStart(); CabinetLight cl = (CabinetLight)(iSec%NUM_CABINET_LIGHTS); - int iNumGameButtonsToShow = GAMESTATE->GetCurrentGameDef()->GetNumGameplayButtons(); + int iNumGameButtonsToShow = GAMESTATE->GetCurrentGame()->GetNumGameplayButtons(); GameButton gb = (GameButton)(iSec%iNumGameButtonsToShow); CString sCabLight = CabinetLightToString(cl); - CString sGameButton = GAMESTATE->GetCurrentGameDef()->m_szButtonNames[gb]; + CString sGameButton = GAMESTATE->GetCurrentGame()->m_szButtonNames[gb]; CString s; s += ssprintf("cabinet light %d: %s\n", cl, sCabLight.c_str()); diff --git a/stepmania/src/ScreenTitleMenu.cpp b/stepmania/src/ScreenTitleMenu.cpp index 68b7dd3d62..925742c4f1 100644 --- a/stepmania/src/ScreenTitleMenu.cpp +++ b/stepmania/src/ScreenTitleMenu.cpp @@ -21,7 +21,7 @@ #include "LightsManager.h" #include "CodeDetector.h" #include "CommonMetrics.h" -#include "GameDef.h" +#include "Game.h" #define LOGO_ON_COMMAND THEME->GetMetric("ScreenTitleMenu","LogoOnCommand") @@ -74,7 +74,7 @@ ScreenTitleMenu::ScreenTitleMenu( CString sClassName ) : ScreenSelect( sClassNam LIGHTSMAN->SetLightsMode( LIGHTSMODE_JOINING ); // do this after Reset! - m_sprLogo.Load( THEME->GetPathG("ScreenLogo",GAMESTATE->GetCurrentGameDef()->m_szName) ); + m_sprLogo.Load( THEME->GetPathG("ScreenLogo",GAMESTATE->GetCurrentGame()->m_szName) ); m_sprLogo.Command( PREFSMAN->GetCoinMode()==COIN_HOME ? LOGO_HOME_ON_COMMAND : LOGO_ON_COMMAND ); this->AddChild( &m_sprLogo ); @@ -288,10 +288,10 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty if( CodeDetector::EnteredCode(GameI.controller,CodeDetector::CODE_NEXT_GAME) || CodeDetector::EnteredCode(GameI.controller,CodeDetector::CODE_NEXT_GAME2) ) { - vector vGames; + vector vGames; GAMEMAN->GetEnabledGames( vGames ); ASSERT( !vGames.empty() ); - vector::iterator iter = find(vGames.begin(),vGames.end(),GAMESTATE->m_pCurGame); + vector::iterator iter = find(vGames.begin(),vGames.end(),GAMESTATE->m_pCurGame); ASSERT( iter != vGames.end() ); iter++; // move to the next game @@ -305,7 +305,7 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty /* Reload the theme if it's changed, but don't back to the initial screen. */ ResetGame( false ); - SCREENMAN->SystemMessage( CString("Game: ") + GAMESTATE->GetCurrentGameDef()->m_szName ); + SCREENMAN->SystemMessage( CString("Game: ") + GAMESTATE->GetCurrentGame()->m_szName ); SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); } diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index b0d15101eb..b1af85483c 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -29,7 +29,7 @@ #include "Screen.h" #include "CodeDetector.h" #include "CommonMetrics.h" -#include "GameDef.h" +#include "Game.h" // // StepMania global classes @@ -205,7 +205,7 @@ void ResetGame( bool ReturnToFirstScreen ) */ if( !THEME->DoesThemeExist( THEME->GetCurThemeName() ) ) { - CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName; + CString sGameName = GAMESTATE->GetCurrentGame()->m_szName; if( THEME->DoesThemeExist( sGameName ) ) THEME->SwitchThemeAndLanguage( sGameName, THEME->GetCurLanguage() ); else @@ -690,7 +690,7 @@ static void RestoreAppPri() #define GAMEPREFS_INI_PATH "Data/GamePrefs.ini" #define STATIC_INI_PATH "Data/Static.ini" -void ChangeCurrentGame( const GameDef* g ) +void ChangeCurrentGame( const Game* g ) { ASSERT( g ); @@ -715,7 +715,7 @@ void ReadGamePrefsFromDisk( bool bSwitchToLastPlayedGame ) if( GAMESTATE->m_pCurGame == NULL ) GAMESTATE->m_pCurGame = GAMEMAN->GetDefaultGame(); - CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName; + CString sGameName = GAMESTATE->GetCurrentGame()->m_szName; IniFile ini; ini.ReadFile( GAMEPREFS_INI_PATH ); // it's OK if this fails @@ -752,14 +752,14 @@ void SaveGamePrefsToDisk() if( !GAMESTATE ) return; - CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName; + CString sGameName = GAMESTATE->GetCurrentGame()->m_szName; IniFile ini; ini.ReadFile( GAMEPREFS_INI_PATH ); // it's OK if this fails ini.SetValue( sGameName, "Announcer", ANNOUNCER->GetCurAnnouncerName() ); ini.SetValue( sGameName, "Theme", THEME->GetCurThemeName() ); ini.SetValue( sGameName, "DefaultModifiers", PREFSMAN->m_sDefaultModifiers ); - ini.SetValue( "Options", "Game", (CString)GAMESTATE->GetCurrentGameDef()->m_szName ); + ini.SetValue( "Options", "Game", (CString)GAMESTATE->GetCurrentGame()->m_szName ); ini.WriteFile( GAMEPREFS_INI_PATH ); } diff --git a/stepmania/src/StepMania.dsp b/stepmania/src/StepMania.dsp index 7b7948e2c4..27c865a008 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 @@ -684,6 +684,14 @@ SOURCE=.\Foreach.h # End Source File # Begin Source File +SOURCE=.\Game.cpp +# End Source File +# Begin Source File + +SOURCE=.\Game.h +# End Source File +# Begin Source File + SOURCE=.\GameConstantsAndTypes.cpp # End Source File # Begin Source File @@ -692,14 +700,6 @@ SOURCE=.\GameConstantsAndTypes.h # End Source File # Begin Source File -SOURCE=.\GameDef.cpp -# End Source File -# Begin Source File - -SOURCE=.\GameDef.h -# End Source File -# Begin Source File - SOURCE=.\GameInput.cpp # End Source File # Begin Source File diff --git a/stepmania/src/StepMania.h b/stepmania/src/StepMania.h index 33821a3baa..49a2435772 100644 --- a/stepmania/src/StepMania.h +++ b/stepmania/src/StepMania.h @@ -1,7 +1,7 @@ #ifndef STEPMANIA_H #define STEPMANIA_H -class GameDef; +class Game; #ifdef _XBOX #include "Xbox Compilance\stdafx.h" @@ -15,7 +15,7 @@ void ExitGame(); void ResetGame( bool ReturnToFirstScreen=true ); void ReadGamePrefsFromDisk( bool bSwitchToLastPlayedGame=true ); void SaveGamePrefsToDisk(); -void ChangeCurrentGame( const GameDef* g ); +void ChangeCurrentGame( const Game* g ); void FocusChanged( bool bHasFocus ); // If successful, return filename of screenshot in sDir, else return "" diff --git a/stepmania/src/StepMania.vcproj b/stepmania/src/StepMania.vcproj index d8aadbc9e9..043fb489bb 100644 --- a/stepmania/src/StepMania.vcproj +++ b/stepmania/src/StepMania.vcproj @@ -163,6 +163,9 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\ + + @@ -647,12 +650,6 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\ - - - - diff --git a/stepmania/src/StepManiaXbox.vcproj b/stepmania/src/StepManiaXbox.vcproj index 6a5545cc22..eb8f115d3c 100644 --- a/stepmania/src/StepManiaXbox.vcproj +++ b/stepmania/src/StepManiaXbox.vcproj @@ -760,6 +760,9 @@ cl + + @@ -769,12 +772,6 @@ cl - - - - diff --git a/stepmania/src/Style.cpp b/stepmania/src/Style.cpp index ca45848657..df16298de7 100644 --- a/stepmania/src/Style.cpp +++ b/stepmania/src/Style.cpp @@ -16,7 +16,7 @@ #include "Style.h" #include "RageLog.h" #include "RageUtil.h" -#include "GameDef.h" +#include "Game.h" #include "IniFile.h" #include "GameState.h" #include "NoteData.h" diff --git a/stepmania/src/Style.h b/stepmania/src/Style.h index ee41945b47..01d61f382f 100644 --- a/stepmania/src/Style.h +++ b/stepmania/src/Style.h @@ -13,12 +13,12 @@ const int MAX_COLS_PER_PLAYER = MAX_NOTE_TRACKS; class NoteData; -class GameDef; +class Game; class Style { public: - const GameDef* m_pGameDef; // Which Game is this Style used with? + const Game* m_pGame; // Which Game is this Style used with? bool m_bUsedForGameplay; // Can be used only for gameplay? bool m_bUsedForEdit; // Can be used for editing? bool m_bUsedForDemonstration; // Can be used for demonstration? diff --git a/stepmania/src/StyleUtil.cpp b/stepmania/src/StyleUtil.cpp index 93784b9459..b982d38f0c 100644 --- a/stepmania/src/StyleUtil.cpp +++ b/stepmania/src/StyleUtil.cpp @@ -2,14 +2,14 @@ #include "StyleUtil.h" #include "GameManager.h" #include "XmlFile.h" -#include "GameDef.h" +#include "Game.h" void StyleID::FromStyle( const Style *p ) { if( p ) { - sGame = p->m_pGameDef->m_szName; + sGame = p->m_pGame->m_szName; sStyle = p->m_szName; } else @@ -21,7 +21,7 @@ void StyleID::FromStyle( const Style *p ) const Style *StyleID::ToStyle() const { - const GameDef* pGame = GameManager::StringToGameType( sGame ); + const Game* pGame = GameManager::StringToGameType( sGame ); if( pGame == NULL ) return NULL; diff --git a/stepmania/src/ThemeManager.cpp b/stepmania/src/ThemeManager.cpp index 997aaa15fe..1ba0829bc5 100644 --- a/stepmania/src/ThemeManager.cpp +++ b/stepmania/src/ThemeManager.cpp @@ -6,7 +6,7 @@ #include "RageTimer.h" #include "RageUtil.h" #include "GameState.h" -#include "GameDef.h" +#include "Game.h" #include "IniFile.h" #include "RageTimer.h" #include "Font.h"