rearrange: games point to styles, not vice versa

This commit is contained in:
Glenn Maynard
2007-04-09 22:26:11 +00:00
parent 31174bded7
commit 2158a90bca
5 changed files with 1819 additions and 1659 deletions
+2
View File
@@ -7,6 +7,7 @@
#include "GameConstantsAndTypes.h" #include "GameConstantsAndTypes.h"
struct lua_State; struct lua_State;
class Style;
// //
// PrimaryMenuButton and SecondaryMenuButton are used to support using DeviceInputs that only // PrimaryMenuButton and SecondaryMenuButton are used to support using DeviceInputs that only
@@ -31,6 +32,7 @@ class Game
{ {
public: public:
const char * m_szName; const char * m_szName;
const Style * const* m_apStyles;
bool m_bCountNotesSeparately; // Count multiple notes in a row as separate notes or as one note bool m_bCountNotesSeparately; // Count multiple notes in a row as separate notes or as one note
bool m_bAllowHopos; // allow Hammer-ons and Pull-offs? Only useful for guitar type input. bool m_bAllowHopos; // allow Hammer-ons and Pull-offs? Only useful for guitar type input.
File diff suppressed because it is too large Load Diff
+1
View File
@@ -17,6 +17,7 @@ public:
~GameManager(); ~GameManager();
void GetStylesForGame( const Game* pGame, vector<const Style*>& aStylesAddTo, bool editor=false ) const; void GetStylesForGame( const Game* pGame, vector<const Style*>& aStylesAddTo, bool editor=false ) const;
const Game *GetGameForStyle( const Style *pStyle ) const;
void GetStepsTypesForGame( const Game* pGame, vector<StepsType>& aStepsTypeAddTo ) const; void GetStepsTypesForGame( const Game* pGame, vector<StepsType>& aStepsTypeAddTo ) const;
const Style *GetEditorStyleForStepsType( StepsType st ) const; const Style *GetEditorStyleForStepsType( StepsType st ) const;
void GetDemonstrationStylesForGame( const Game *pGame, vector<const Style*> &vpStylesOut ) const; void GetDemonstrationStylesForGame( const Game *pGame, vector<const Style*> &vpStylesOut ) const;
-1
View File
@@ -19,7 +19,6 @@ struct lua_State;
class Style class Style
{ {
public: public:
const Game * m_pGame; // Which Game is this Style used with?
bool m_bUsedForGameplay; // Can be used only for gameplay? bool m_bUsedForGameplay; // Can be used only for gameplay?
bool m_bUsedForEdit; // Can be used for editing? bool m_bUsedForEdit; // Can be used for editing?
bool m_bUsedForDemonstration; // Can be used for demonstration? bool m_bUsedForDemonstration; // Can be used for demonstration?
+1 -1
View File
@@ -10,7 +10,7 @@ void StyleID::FromStyle( const Style *p )
{ {
if( p ) if( p )
{ {
sGame = p->m_pGame->m_szName; sGame = GAMEMAN->GetGameForStyle(p)->m_szName;
sStyle = p->m_szName; sStyle = p->m_szName;
} }
else else