rename GameDef -> Game
This commit is contained in:
@@ -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() );
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<m_iButtonsPerController; i++ )
|
||||
if( stricmp(m_szButtonNames[i], sButtonName) == 0 )
|
||||
@@ -25,7 +25,7 @@ GameButton GameDef::ButtonNameToIndex( const CString &sButtonName ) const
|
||||
return GAME_BUTTON_INVALID;
|
||||
}
|
||||
|
||||
MenuInput GameDef::GameInputToMenuInput( GameInput GameI ) const
|
||||
MenuInput Game::GameInputToMenuInput( GameInput GameI ) const
|
||||
{
|
||||
PlayerNumber pn;
|
||||
|
||||
@@ -60,7 +60,7 @@ MenuInput GameDef::GameInputToMenuInput( GameInput GameI ) const
|
||||
return MenuInput(); // invalid GameInput
|
||||
}
|
||||
|
||||
void GameDef::MenuInputToGameInput( MenuInput MenuI, GameInput GameIout[4] ) const
|
||||
void Game::MenuInputToGameInput( MenuInput MenuI, GameInput GameIout[4] ) const
|
||||
{
|
||||
ASSERT( MenuI.IsValid() );
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* GameDef - Holds information about a particular style of a game (e.g. "single", "double"). */
|
||||
/* Game - Holds information about a particular style of a game (e.g. "single", "double"). */
|
||||
|
||||
#ifndef GAMEDEF_H
|
||||
#define GAMEDEF_H
|
||||
@@ -35,7 +35,7 @@ class Style;
|
||||
|
||||
#define NO_DEFAULT_KEY -1
|
||||
|
||||
class GameDef
|
||||
class Game
|
||||
{
|
||||
public:
|
||||
const char *m_szName;
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
#include "RageInputDevice.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "LightsManager.h" // for NUM_CABINET_LIGHTS
|
||||
#include "GameDef.h"
|
||||
#include "Game.h"
|
||||
#include "Style.h"
|
||||
|
||||
GameManager* GAMEMAN = NULL; // global and accessable from anywhere in our program
|
||||
|
||||
enum Game
|
||||
enum
|
||||
{
|
||||
GAME_DANCE, // Dance Dance Revolution
|
||||
GAME_PUMP, // Pump It Up
|
||||
@@ -88,7 +88,7 @@ struct {
|
||||
//
|
||||
// Important: Every game must define the buttons: "Start", "Back", "MenuLeft", "Operator" and "MenuRight"
|
||||
//
|
||||
GameDef g_GameDefs[NUM_GAMES] =
|
||||
Game g_Games[NUM_GAMES] =
|
||||
{
|
||||
{ // GAME_DANCE
|
||||
"dance", // m_szName
|
||||
@@ -1207,7 +1207,7 @@ GameDef g_GameDefs[NUM_GAMES] =
|
||||
Style g_Styles[] =
|
||||
{
|
||||
{ // STYLE_DANCE_SINGLE
|
||||
&g_GameDefs[GAME_DANCE], // m_Game
|
||||
&g_Games[GAME_DANCE], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -1238,7 +1238,7 @@ Style g_Styles[] =
|
||||
true, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_DANCE_VERSUS
|
||||
&g_GameDefs[GAME_DANCE], // m_Game
|
||||
&g_Games[GAME_DANCE], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
false, // m_bUsedForEdit
|
||||
true, // m_bUsedForDemonstration
|
||||
@@ -1269,7 +1269,7 @@ Style g_Styles[] =
|
||||
true, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_DANCE_DOUBLE
|
||||
&g_GameDefs[GAME_DANCE], // m_Game
|
||||
&g_Games[GAME_DANCE], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -1308,7 +1308,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_DANCE_COUPLE
|
||||
&g_GameDefs[GAME_DANCE], // m_Game
|
||||
&g_Games[GAME_DANCE], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
false, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -1339,7 +1339,7 @@ Style g_Styles[] =
|
||||
true, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_DANCE_SOLO
|
||||
&g_GameDefs[GAME_DANCE], // m_Game
|
||||
&g_Games[GAME_DANCE], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -1374,7 +1374,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_DANCE_EDIT_COUPLE
|
||||
&g_GameDefs[GAME_DANCE], // m_Game
|
||||
&g_Games[GAME_DANCE], // m_Game
|
||||
false, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -1443,7 +1443,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
}, */
|
||||
{ // STYLE_PUMP_SINGLE
|
||||
&g_GameDefs[GAME_PUMP], // m_Game
|
||||
&g_Games[GAME_PUMP], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -1476,7 +1476,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_PUMP_VERSUS
|
||||
&g_GameDefs[GAME_PUMP], // m_Game
|
||||
&g_Games[GAME_PUMP], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
false, // m_bUsedForEdit
|
||||
true, // m_bUsedForDemonstration
|
||||
@@ -1509,7 +1509,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_PUMP_HALFDOUBLE
|
||||
&g_GameDefs[GAME_PUMP], // m_Game
|
||||
&g_Games[GAME_PUMP], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -1544,7 +1544,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_PUMP_DOUBLE
|
||||
&g_GameDefs[GAME_PUMP], // m_Game
|
||||
&g_Games[GAME_PUMP], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -1587,7 +1587,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_PUMP_COUPLE
|
||||
&g_GameDefs[GAME_PUMP], // m_Game
|
||||
&g_Games[GAME_PUMP], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
false, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -1620,7 +1620,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_PUMP_EDIT_COUPLE
|
||||
&g_GameDefs[GAME_PUMP], // m_Game
|
||||
&g_Games[GAME_PUMP], // m_Game
|
||||
false, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -1658,7 +1658,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_EZ2_SINGLE
|
||||
&g_GameDefs[GAME_EZ2], // m_Game
|
||||
&g_Games[GAME_EZ2], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -1691,7 +1691,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_EZ2_REAL
|
||||
&g_GameDefs[GAME_EZ2], // m_Game
|
||||
&g_Games[GAME_EZ2], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -1728,7 +1728,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_EZ2_SINGLE_VERSUS
|
||||
&g_GameDefs[GAME_EZ2], // m_Game
|
||||
&g_Games[GAME_EZ2], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
true, // m_bUsedForDemonstration
|
||||
@@ -1761,7 +1761,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_EZ2_REAL_VERSUS
|
||||
&g_GameDefs[GAME_EZ2], // m_Game
|
||||
&g_Games[GAME_EZ2], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -1798,7 +1798,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_EZ2_DOUBLE
|
||||
&g_GameDefs[GAME_EZ2], // m_Game
|
||||
&g_Games[GAME_EZ2], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -1841,7 +1841,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_PARA_SINGLE
|
||||
&g_GameDefs[GAME_PARA], // m_Game
|
||||
&g_Games[GAME_PARA], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
true, // m_bUsedForDemonstration
|
||||
@@ -1874,7 +1874,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_PARA_VERSUS
|
||||
&g_GameDefs[GAME_PARA], // m_Game
|
||||
&g_Games[GAME_PARA], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
true, // m_bUsedForDemonstration
|
||||
@@ -1907,7 +1907,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_DS3DDX_SINGLE
|
||||
&g_GameDefs[GAME_DS3DDX], // m_Game
|
||||
&g_Games[GAME_DS3DDX], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
true, // m_bUsedForDemonstration
|
||||
@@ -1946,7 +1946,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_BM_SINGLE
|
||||
&g_GameDefs[GAME_BM], // m_Game
|
||||
&g_Games[GAME_BM], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
true, // m_bUsedForDemonstration
|
||||
@@ -1981,7 +1981,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_BM_DOUBLE
|
||||
&g_GameDefs[GAME_BM], // m_Game
|
||||
&g_Games[GAME_BM], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -2028,7 +2028,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_IIDX_SINGLE7
|
||||
&g_GameDefs[GAME_IIDX], // m_Game
|
||||
&g_Games[GAME_IIDX], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -2067,7 +2067,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_IIDX_DOUBLE7
|
||||
&g_GameDefs[GAME_IIDX], // m_Game
|
||||
&g_Games[GAME_IIDX], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -2122,7 +2122,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_IIDX_SINGLE5
|
||||
&g_GameDefs[GAME_IIDX], // m_Game
|
||||
&g_Games[GAME_IIDX], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
false, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -2161,7 +2161,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_IIDX_DOUBLE5
|
||||
&g_GameDefs[GAME_IIDX], // m_Game
|
||||
&g_Games[GAME_IIDX], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
false, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -2216,7 +2216,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_IIDX_EDIT_SINGLE5
|
||||
&g_GameDefs[GAME_IIDX], // m_Game
|
||||
&g_Games[GAME_IIDX], // m_Game
|
||||
false, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -2255,7 +2255,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_IIDX_EDIT_DOUBLE5
|
||||
&g_GameDefs[GAME_IIDX], // m_Game
|
||||
&g_Games[GAME_IIDX], // m_Game
|
||||
false, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -2310,7 +2310,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_MANIAX_SINGLE
|
||||
&g_GameDefs[GAME_MANIAX], // m_Game
|
||||
&g_Games[GAME_MANIAX], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
true, // m_bUsedForDemonstration
|
||||
@@ -2341,7 +2341,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_MANIAX_VERSUS
|
||||
&g_GameDefs[GAME_MANIAX], // m_Game
|
||||
&g_Games[GAME_MANIAX], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
false, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -2372,7 +2372,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_MANIAX_DOUBLE
|
||||
&g_GameDefs[GAME_MANIAX], // m_Game
|
||||
&g_Games[GAME_MANIAX], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -2411,7 +2411,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_TECHNO_SINGLE4
|
||||
&g_GameDefs[GAME_TECHNO], // m_Game
|
||||
&g_Games[GAME_TECHNO], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -2442,7 +2442,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_TECHNO_SINGLE5
|
||||
&g_GameDefs[GAME_TECHNO], // m_Game
|
||||
&g_Games[GAME_TECHNO], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -2475,7 +2475,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_TECHNO_SINGLE8
|
||||
&g_GameDefs[GAME_TECHNO], // m_Game
|
||||
&g_Games[GAME_TECHNO], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -2514,7 +2514,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_TECHNO_VERSUS4
|
||||
&g_GameDefs[GAME_TECHNO], // m_Game
|
||||
&g_Games[GAME_TECHNO], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
false, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -2545,7 +2545,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_TECHNO_VERSUS5
|
||||
&g_GameDefs[GAME_TECHNO], // m_Game
|
||||
&g_Games[GAME_TECHNO], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
false, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -2578,7 +2578,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_TECHNO_VERSUS8
|
||||
&g_GameDefs[GAME_TECHNO], // m_Game
|
||||
&g_Games[GAME_TECHNO], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
false, // m_bUsedForEdit
|
||||
true, // m_bUsedForDemonstration
|
||||
@@ -2617,7 +2617,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_TECHNO_DOUBLE4
|
||||
&g_GameDefs[GAME_TECHNO], // m_Game
|
||||
&g_Games[GAME_TECHNO], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -2656,7 +2656,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_TECHNO_DOUBLE5
|
||||
&g_GameDefs[GAME_TECHNO], // m_Game
|
||||
&g_Games[GAME_TECHNO], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -2699,7 +2699,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_PNM_FIVE
|
||||
&g_GameDefs[GAME_PNM], // m_Game
|
||||
&g_Games[GAME_PNM], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -2732,7 +2732,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_PNM_NINE
|
||||
&g_GameDefs[GAME_PNM], // m_Game
|
||||
&g_Games[GAME_PNM], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
true, // m_bUsedForDemonstration
|
||||
@@ -2773,7 +2773,7 @@ Style g_Styles[] =
|
||||
false, // m_bCanUseBeginnerHelper
|
||||
},
|
||||
{ // STYLE_LIGHTS_CABINET
|
||||
&g_GameDefs[GAME_LIGHTS], // m_Game
|
||||
&g_Games[GAME_LIGHTS], // m_Game
|
||||
true, // m_bUsedForGameplay
|
||||
true, // m_bUsedForEdit
|
||||
false, // m_bUsedForDemonstration
|
||||
@@ -2824,12 +2824,12 @@ GameManager::~GameManager()
|
||||
{
|
||||
}
|
||||
|
||||
void GameManager::GetStylesForGame( const GameDef *pGame, vector<const Style*>& aStylesAddTo, bool editor )
|
||||
void GameManager::GetStylesForGame( const Game *pGame, vector<const Style*>& aStylesAddTo, bool editor )
|
||||
{
|
||||
for( unsigned s=0; s<NUM_STYLES; s++ )
|
||||
{
|
||||
const Style* style = &g_Styles[s];
|
||||
if( style->m_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<StepsType>& aStepsTypeAddTo )
|
||||
void GameManager::GetStepsTypesForGame( const Game *pGame, vector<StepsType>& aStepsTypeAddTo )
|
||||
{
|
||||
FOREACH_StepsType( st )
|
||||
{
|
||||
@@ -2862,7 +2862,7 @@ void GameManager::GetStepsTypesForGame( const GameDef *pGame, vector<StepsType>&
|
||||
for( unsigned s=0; !found && s<NUM_STYLES; s++ )
|
||||
{
|
||||
const Style* style = &g_Styles[s];
|
||||
if( style->m_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<StepsType>&
|
||||
}
|
||||
}
|
||||
|
||||
const Style* GameManager::GetDemonstrationStyleForGame( const GameDef *pGame )
|
||||
const Style* GameManager::GetDemonstrationStyleForGame( const Game *pGame )
|
||||
{
|
||||
for( unsigned s=0; s<NUM_STYLES; s++ )
|
||||
{
|
||||
const Style* style = &g_Styles[s];
|
||||
if( style->m_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; s<NUM_STYLES; s++ )
|
||||
{
|
||||
const Style* style = &g_Styles[s];
|
||||
if( style->m_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<const GameDef*>& aGamesOut )
|
||||
void GameManager::GetEnabledGames( vector<const Game*>& aGamesOut )
|
||||
{
|
||||
for( int g=0; g<NUM_GAMES; g++ )
|
||||
{
|
||||
const GameDef *pGame = &g_GameDefs[g];
|
||||
const Game *pGame = &g_Games[g];
|
||||
CStringArray asNoteSkins;
|
||||
NOTESKIN->GetNoteSkinNames( pGame, asNoteSkins );
|
||||
if( !asNoteSkins.empty() )
|
||||
@@ -2910,32 +2910,32 @@ void GameManager::GetEnabledGames( vector<const GameDef*>& 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<NUM_GAMES; g++ )
|
||||
{
|
||||
if( &g_GameDefs[g] == pGame )
|
||||
if( &g_Games[g] == pGame )
|
||||
return g;
|
||||
}
|
||||
ASSERT(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
const GameDef* GameManager::GetGameFromIndex( int index )
|
||||
const Game* GameManager::GetGameFromIndex( int index )
|
||||
{
|
||||
ASSERT( index >= 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<const GameDef*> aGames;
|
||||
vector<const Game*> 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; i<NUM_GAMES; i++ )
|
||||
if( !sGameType.CompareNoCase(g_GameDefs[i].m_szName) )
|
||||
return &g_GameDefs[i];
|
||||
if( !sGameType.CompareNoCase(g_Games[i].m_szName) )
|
||||
return &g_Games[i];
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
const Style* GameManager::GameAndStringToStyle( const GameDef *game, CString sStyle )
|
||||
const Style* GameManager::GameAndStringToStyle( const Game *game, CString sStyle )
|
||||
{
|
||||
for( unsigned s=0; s<NUM_STYLES; s++ )
|
||||
{
|
||||
const Style* style = &g_Styles[s];
|
||||
if( style->m_pGameDef != game )
|
||||
if( style->m_pGame != game )
|
||||
continue;
|
||||
if( sStyle.CompareNoCase(style->m_szName) == 0 )
|
||||
return style;
|
||||
|
||||
+13
-13
@@ -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<const Style*>& aStylesAddTo, bool editor=false );
|
||||
void GetStylesForGame( const Game* pGame, vector<const Style*>& aStylesAddTo, bool editor=false );
|
||||
void GetAllStyles( vector<const Style*>& aStylesAddTo, bool editor=false );
|
||||
void GetStepsTypesForGame( const GameDef* pGame, vector<StepsType>& aStepsTypeAddTo );
|
||||
void GetStepsTypesForGame( const Game* pGame, vector<StepsType>& 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<const GameDef*>& aGamesOut );
|
||||
const GameDef* GetDefaultGame();
|
||||
bool IsGameEnabled( const GameDef* pGame );
|
||||
int GetIndexFromGame( const GameDef* pGame );
|
||||
const GameDef* GetGameFromIndex( int index );
|
||||
void GetEnabledGames( vector<const Game*>& 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 );
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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; j<MAX_GAME_BUTTONS; j++ )
|
||||
ClearFromInputMap( GameInput((GameController)i,(GameButton)j), 2 );
|
||||
|
||||
const GameDef* pGameDef = GAMESTATE->GetCurrentGameDef();
|
||||
const Game* pGame = GAMESTATE->GetCurrentGame();
|
||||
for( int c=0; c<MAX_GAME_CONTROLLERS; c++ )
|
||||
{
|
||||
for( int b=0; b<pGameDef->m_iButtonsPerController; b++ )
|
||||
for( int b=0; b<pGame->m_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; i<vDevices.size(); i++ )
|
||||
{
|
||||
@@ -320,7 +320,7 @@ void InputMapper::AutoMapJoysticksForCurrentGame()
|
||||
{
|
||||
const AutoJoyMapping& mapping = g_AutoJoyMappings[j];
|
||||
|
||||
if( pGameDef != GAMEMAN->StringToGameType(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; i<MAX_GAME_CONTROLLERS; i++ )
|
||||
@@ -423,7 +423,7 @@ void InputMapper::SaveMappingsToDisk()
|
||||
sValueString = ssprintf( "%s,%s,%s",
|
||||
m_GItoDI[i][j][0].toString().c_str(), m_GItoDI[i][j][1].toString().c_str(), m_GItoDI[i][j][2].toString().c_str() );
|
||||
|
||||
ini.SetValue( GAMESTATE->GetCurrentGameDef()->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 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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] );
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "IniFile.h"
|
||||
#include <map>
|
||||
|
||||
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<CString,NoteSkinData> m_mapNameToData;
|
||||
const GameDef* m_pCurGame;
|
||||
const Game* m_pCurGame;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
@@ -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; b<GAMESTATE->GetCurrentGameDef()->m_iButtonsPerController; b++ )
|
||||
for( int b=0; b<GAMESTATE->GetCurrentGame()->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; b<GAMESTATE->GetCurrentGameDef()->m_iButtonsPerController; b++ )
|
||||
for( int b=0; b<GAMESTATE->GetCurrentGame()->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; p<MAX_GAME_CONTROLLERS; p++ )
|
||||
{
|
||||
for( int b=0; b<GAMESTATE->GetCurrentGameDef()->m_iButtonsPerController; b++ )
|
||||
for( int b=0; b<GAMESTATE->GetCurrentGame()->m_iButtonsPerController; b++ )
|
||||
{
|
||||
for( int s=0; s<NUM_GAME_TO_DEVICE_SLOTS; s++ )
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "ProfileManager.h"
|
||||
#include "NoteFieldPositioning.h"
|
||||
#include "StageStats.h"
|
||||
#include "GameDef.h"
|
||||
#include "Game.h"
|
||||
|
||||
|
||||
//
|
||||
@@ -199,7 +199,7 @@ ScreenNameEntry::ScreenNameEntry( CString sClassName ) : Screen( sClassName )
|
||||
/* Find out if this column is associated with the START menu button. */
|
||||
StyleInput si((PlayerNumber)p, t);
|
||||
GameInput gi=GAMESTATE->GetCurrentStyle()->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++;
|
||||
|
||||
@@ -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<const GameDef*> aGames;
|
||||
vector<const Game*> 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<const GameDef*> aGames;
|
||||
vector<const Game*> aGames;
|
||||
GAMEMAN->GetEnabledGames( aGames );
|
||||
ChangeCurrentGame( aGames[sel] );
|
||||
}
|
||||
|
||||
@@ -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()));
|
||||
|
||||
@@ -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() );
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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<const GameDef*> vGames;
|
||||
vector<const Game*> vGames;
|
||||
GAMEMAN->GetEnabledGames( vGames );
|
||||
ASSERT( !vGames.empty() );
|
||||
vector<const GameDef*>::iterator iter = find(vGames.begin(),vGames.end(),GAMESTATE->m_pCurGame);
|
||||
vector<const Game*>::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" );
|
||||
}
|
||||
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
+10
-10
@@ -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
|
||||
|
||||
@@ -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 ""
|
||||
|
||||
@@ -163,6 +163,9 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\
|
||||
<Filter
|
||||
Name="Screens"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="Game.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Screen.cpp">
|
||||
</File>
|
||||
@@ -647,12 +650,6 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\
|
||||
<File
|
||||
RelativePath="GameConstantsAndTypes.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="GameDef.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="GameDef.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="GameInput.cpp">
|
||||
</File>
|
||||
|
||||
@@ -760,6 +760,9 @@ cl
|
||||
<File
|
||||
RelativePath="FontCharmaps.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Game.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Game.h">
|
||||
</File>
|
||||
@@ -769,12 +772,6 @@ cl
|
||||
<File
|
||||
RelativePath="GameConstantsAndTypes.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="GameDef.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="GameDef.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="GameInput.cpp">
|
||||
</File>
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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?
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user