More effective fixes. Still no issues.

Note: you will most likely end up recompiling the whole thing.
This commit is contained in:
Jason Felds
2011-03-19 20:40:35 -04:00
parent 22b7b34897
commit 12872f0a50
21 changed files with 214 additions and 60 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ class XNode;
class AutoActor
{
public:
AutoActor() { m_pActor = NULL; }
AutoActor(): m_pActor(NULL) {}
~AutoActor() { Unload(); }
AutoActor( const AutoActor &cpy );
AutoActor &operator =( const AutoActor &cpy );
+1 -1
View File
@@ -51,7 +51,7 @@ public:
struct Attribute
{
Attribute() : length(-1) { }
Attribute() : length(-1), glow() { }
int length;
RageColor diffuse[4];
RageColor glow;
+3 -3
View File
@@ -11,7 +11,7 @@
class ThemeMetricDifficultiesToShow : public ThemeMetric<RString>
{
public:
ThemeMetricDifficultiesToShow() { }
ThemeMetricDifficultiesToShow(): m_v() { }
ThemeMetricDifficultiesToShow( const RString& sGroup, const RString& sName );
void Read();
const vector<Difficulty> &GetValue() const;
@@ -21,7 +21,7 @@ private:
class ThemeMetricCourseDifficultiesToShow : public ThemeMetric<RString>
{
public:
ThemeMetricCourseDifficultiesToShow() { }
ThemeMetricCourseDifficultiesToShow(): m_v() { }
ThemeMetricCourseDifficultiesToShow( const RString& sGroup, const RString& sName );
void Read();
const vector<CourseDifficulty> &GetValue() const;
@@ -31,7 +31,7 @@ private:
class ThemeMetricStepsTypesToShow : public ThemeMetric<RString>
{
public:
ThemeMetricStepsTypesToShow() { }
ThemeMetricStepsTypesToShow(): m_v() { }
ThemeMetricStepsTypesToShow( const RString& sGroup, const RString& sName );
void Read();
const vector<StepsType> &GetValue() const;
+3
View File
@@ -248,6 +248,9 @@ struct SortTrailEntry
{
TrailEntry entry;
int SortMeter;
SortTrailEntry(): entry(), SortMeter(0) {}
bool operator< ( const SortTrailEntry &rhs ) const { return SortMeter < rhs.SortMeter; }
};
+2
View File
@@ -189,6 +189,8 @@ public:
{
Trail trail;
bool null;
CacheData(): trail(), null(false) {}
};
typedef map<CacheEntry, CacheData> TrailCache_t;
mutable TrailCache_t m_TrailCache;
+21 -1
View File
@@ -22,7 +22,27 @@ struct lua_State;
class GameCommand
{
public:
GameCommand() { Init(); }
GameCommand(): m_Commands(), m_sName(""), m_sText(""),
m_bInvalid(true), m_sInvalidReason(""),
m_iIndex(-1), m_MultiPlayer(MultiPlayer_Invalid),
m_pStyle(NULL), m_pm(PlayMode_Invalid),
m_dc(Difficulty_Invalid),
m_CourseDifficulty(Difficulty_Invalid),
m_sAnnouncer(""), m_sPreferredModifiers(""),
m_sStageModifiers(""), m_sScreen(""), m_LuaFunction(),
m_pSong(NULL), m_pSteps(NULL), m_pCourse(NULL),
m_pTrail(NULL), m_pCharacter(NULL), m_SetEnv(),
m_sSongGroup(""), m_SortOrder(SortOrder_Invalid),
m_sSoundPath(""), m_vsScreensToPrepare(), m_iWeightPounds(-1),
m_iGoalCalories(-1), m_GoalType(GoalType_Invalid),
m_sProfileID(""), m_sUrl(""), m_bUrlExits(true),
m_bInsertCredit(false), m_bClearCredits(false),
m_bStopMusic(false), m_bApplyDefaultOptions(false),
m_bFadeMusic(false), m_fMusicFadeOutVolume(-1),
m_fMusicFadeOutSeconds(-1), m_bApplyCommitsScreens(true)
{
m_LuaFunction.Unset();
}
void Init();
void Load( int iIndex, const Commands& cmds );
+3 -4
View File
@@ -104,10 +104,9 @@ public:
* @brief Set up the HighScore List with default values.
*
* This used to call Init(), but it's better to be explicit here. */
HighScoreList(): HighGrade(Grade_NoData), iNumTimesPlayed(0)
{
vHighScores.clear();
}
HighScoreList(): vHighScores(), HighGrade(Grade_NoData),
iNumTimesPlayed(0), dtLastPlayed() {}
void Init();
int GetNumTimesPlayed() const
+2 -1
View File
@@ -9,10 +9,11 @@ class InputEventPlus
{
public:
InputEventPlus():
DeviceI(), GameI(),
type(IET_FIRST_PRESS),
MenuI(GameButton_Invalid),
pn(PLAYER_INVALID),
mp(MultiPlayer_Invalid) { }
mp(MultiPlayer_Invalid), InputList() { }
DeviceInput DeviceI;
GameInput GameI;
InputEventType type;
+1 -1
View File
@@ -78,7 +78,7 @@ struct AutoMappings
AutoMappingEntry im37 = AutoMappingEntry(),
AutoMappingEntry im38 = AutoMappingEntry(),
AutoMappingEntry im39 = AutoMappingEntry() )
: m_sGame(s1), m_sDriverRegex(s2), m_sControllerName(s3)
: m_sGame(s1), m_sDriverRegex(s2), m_sControllerName(s3), m_vMaps()
{
#define PUSH( im ) if(!im.IsEmpty()) m_vMaps.push_back(im);
PUSH(im0);PUSH(im1);PUSH(im2);PUSH(im3);PUSH(im4);PUSH(im5);PUSH(im6);PUSH(im7);PUSH(im8);PUSH(im9);PUSH(im10);PUSH(im11);PUSH(im12);PUSH(im13);PUSH(im14);PUSH(im15);PUSH(im16);PUSH(im17);PUSH(im18);PUSH(im19);
+9 -1
View File
@@ -27,11 +27,19 @@ struct InputQueueCode
public:
bool Load( RString sButtonsNames );
bool EnteredCode( GameController controller ) const;
InputQueueCode(): m_aPresses() {}
private:
struct ButtonPress
{
ButtonPress() { m_bAllowIntermediatePresses = false; memset( m_InputTypes, 0, sizeof(m_InputTypes) ); m_InputTypes[IET_FIRST_PRESS] = true; }
ButtonPress(): m_aButtonsToHold(), m_aButtonsToNotHold(),
m_aButtonsToPress(),
m_bAllowIntermediatePresses(false)
{
memset( m_InputTypes, 0, sizeof(m_InputTypes) );
m_InputTypes[IET_FIRST_PRESS] = true;
}
vector<GameButton> m_aButtonsToHold;
vector<GameButton> m_aButtonsToNotHold;
vector<GameButton> m_aButtonsToPress;
+2
View File
@@ -23,6 +23,8 @@ public:
*/
RString operator[]( unsigned i ) const { if( i >= params.size() ) return RString(); return params[i]; }
};
MsdFile(): values(), error("") {}
/** @brief Remove the MSDFile. */
virtual ~MsdFile() { }
+2
View File
@@ -32,6 +32,8 @@ public:
typedef map<int,TapNote>::const_iterator const_iterator;
typedef map<int,TapNote>::reverse_iterator reverse_iterator;
typedef map<int,TapNote>::const_reverse_iterator const_reverse_iterator;
NoteData(): m_TapNotes() {}
iterator begin( int iTrack ) { return m_TapNotes[iTrack].begin(); }
const_iterator begin( int iTrack ) const { return m_TapNotes[iTrack].begin(); }
+29 -10
View File
@@ -77,15 +77,14 @@ struct OptionRowDefinition
OptionRowDefinition(): m_sName(""), m_sExplanationName(""),
m_bOneChoiceForAllPlayers(false), m_selectType(SELECT_ONE),
m_layoutType(LAYOUT_SHOW_ALL_IN_ROW), m_iDefault(-1),
m_layoutType(LAYOUT_SHOW_ALL_IN_ROW), m_vsChoices(),
m_vEnabledForPlayers(), m_iDefault(-1),
m_bExportOnChange(false), m_bAllowThemeItems(true),
m_bAllowThemeTitle(true), m_bAllowExplanation(true),
m_bShowChoicesListOnSelect(false)
{
m_vsChoices.clear();
m_vEnabledForPlayers.clear();
FOREACH_PlayerNumber( pn )
m_vEnabledForPlayers.insert( pn );
m_vEnabledForPlayers.insert( pn );
}
void Init()
{
@@ -106,13 +105,33 @@ struct OptionRowDefinition
m_bShowChoicesListOnSelect = false;
}
OptionRowDefinition( const char *n, bool b, const char *c0=NULL, const char *c1=NULL, const char *c2=NULL, const char *c3=NULL, const char *c4=NULL, const char *c5=NULL, const char *c6=NULL, const char *c7=NULL, const char *c8=NULL, const char *c9=NULL, const char *c10=NULL, const char *c11=NULL, const char *c12=NULL, const char *c13=NULL, const char *c14=NULL, const char *c15=NULL, const char *c16=NULL, const char *c17=NULL, const char *c18=NULL, const char *c19=NULL )
OptionRowDefinition( const char *n, bool b, const char *c0=NULL,
const char *c1=NULL, const char *c2=NULL,
const char *c3=NULL, const char *c4=NULL,
const char *c5=NULL, const char *c6=NULL,
const char *c7=NULL, const char *c8=NULL,
const char *c9=NULL, const char *c10=NULL,
const char *c11=NULL, const char *c12=NULL,
const char *c13=NULL, const char *c14=NULL,
const char *c15=NULL, const char *c16=NULL,
const char *c17=NULL, const char *c18=NULL,
const char *c19=NULL ): m_sName(n),
m_sExplanationName(""), m_bOneChoiceForAllPlayers(b),
m_selectType(SELECT_ONE),
m_layoutType(LAYOUT_SHOW_ALL_IN_ROW), m_vsChoices(),
m_vEnabledForPlayers(), m_iDefault(-1),
m_bExportOnChange(false), m_bAllowThemeItems(true),
m_bAllowThemeTitle(true), m_bAllowExplanation(true),
m_bShowChoicesListOnSelect(false)
{
Init();
m_sName=n;
m_bOneChoiceForAllPlayers=b;
FOREACH_PlayerNumber( pn )
m_vEnabledForPlayers.insert( pn );
#define PUSH( c ) if(c) m_vsChoices.push_back(c);
PUSH(c0);PUSH(c1);PUSH(c2);PUSH(c3);PUSH(c4);PUSH(c5);PUSH(c6);PUSH(c7);PUSH(c8);PUSH(c9);PUSH(c10);PUSH(c11);PUSH(c12);PUSH(c13);PUSH(c14);PUSH(c15);PUSH(c16);PUSH(c17);PUSH(c18);PUSH(c19);
PUSH(c0);PUSH(c1);PUSH(c2);PUSH(c3);PUSH(c4);PUSH(c5);
PUSH(c6);PUSH(c7);PUSH(c8);PUSH(c9);PUSH(c10);PUSH(c11);
PUSH(c12);PUSH(c13);PUSH(c14);PUSH(c15);PUSH(c16);PUSH(c17);
PUSH(c18);PUSH(c19);
#undef PUSH
}
};
@@ -124,7 +143,7 @@ public:
OptionRowDefinition m_Def;
vector<RString> m_vsReloadRowMessages; // refresh this row on on these messages
OptionRowHandler() { Init(); }
OptionRowHandler(): m_Def(), m_vsReloadRowMessages() { }
virtual ~OptionRowHandler() { }
virtual void Init()
{
+47 -3
View File
@@ -67,9 +67,49 @@ class Game;
class Profile
{
public:
Profile()
/**
* @brief Set up the Profile with default values.
*
* Note: there are probably a lot of variables. */
Profile(): m_sDisplayName(""), m_sCharacterID(""),
m_sLastUsedHighScoreName(""), m_iWeightPounds(0),
m_sGuid(MakeGuid()), m_sDefaultModifiers(),
m_SortOrder(SortOrder_Invalid),
m_LastDifficulty(Difficulty_Invalid),
m_LastCourseDifficulty(Difficulty_Invalid),
m_LastStepsType(StepsType_Invalid), m_lastSong(),
m_lastCourse(), m_iTotalSessions(0),
m_iTotalSessionSeconds(0), m_iTotalGameplaySeconds(0),
m_fTotalCaloriesBurned(0), m_GoalType(GoalType_Calories),
m_iGoalCalories(0), m_iGoalSeconds(0), m_iTotalDancePoints(0),
m_iNumExtraStagesPassed(0), m_iNumExtraStagesFailed(0),
m_iNumToasties(0), m_iTotalTapsAndHolds(0), m_iTotalJumps(0),
m_iTotalHolds(0), m_iTotalRolls(0), m_iTotalMines(0),
m_iTotalHands(0), m_iTotalLifts(0), m_UnlockedEntryIDs(),
m_sLastPlayedMachineGuid(""), m_LastPlayedDate(),
m_iNumSongsPlayedByStyle(), m_iNumTotalSongsPlayed(0),
m_UserData(), m_SongHighScores(), m_CourseHighScores(),
m_vScreenshots(), m_mapDayToCaloriesBurned()
{
InitAll();
m_lastSong.Unset();
m_lastCourse.Unset();
m_LastPlayedDate.Init();
FOREACH_ENUM( PlayMode, i )
m_iNumSongsPlayedByPlayMode[i] = 0;
FOREACH_ENUM( Difficulty, i )
m_iNumSongsPlayedByDifficulty[i] = 0;
for( int i=0; i<MAX_METER+1; i++ )
m_iNumSongsPlayedByMeter[i] = 0;
ZERO( m_iNumStagesPassedByPlayMode );
ZERO( m_iNumStagesPassedByGrade );
m_UserData.Unset();
FOREACH_ENUM( StepsType,st )
FOREACH_ENUM( RankingCategory,rc )
m_CategoryHighScores[st][rc].Init();
}
// smart accessors
@@ -170,11 +210,13 @@ public:
struct HighScoresForASteps
{
HighScoreList hsl;
HighScoresForASteps(): hsl() {}
};
struct HighScoresForASong
{
std::map<StepsID,HighScoresForASteps> m_StepsHighScores;
int GetNumTimesPlayed() const;
HighScoresForASong(): m_StepsHighScores() {}
};
std::map<SongID,HighScoresForASong> m_SongHighScores;
@@ -196,11 +238,13 @@ public:
struct HighScoresForATrail
{
HighScoreList hsl;
HighScoresForATrail(): hsl() {}
};
struct HighScoresForACourse
{
std::map<TrailID,HighScoresForATrail> m_TrailHighScores;
int GetNumTimesPlayed() const;
HighScoresForACourse(): m_TrailHighScores() {}
};
std::map<CourseID,HighScoresForACourse> m_CourseHighScores;
@@ -240,7 +284,7 @@ public:
* insert some garbage entries into the map. */
struct Calories
{
Calories() { fCals = 0; }
Calories(): fCals(0) {}
float fCals;
};
map<DateTime,Calories> m_mapDayToCaloriesBurned;
+2 -1
View File
@@ -8,7 +8,8 @@ class RageTexturePreloader
{
public:
RageTexturePreloader(): m_apTextures() { }
RageTexturePreloader( const RageTexturePreloader &cpy ) { *this = cpy; }
RageTexturePreloader( const RageTexturePreloader &cpy ):
m_apTextures(cpy.m_apTextures) { }
RageTexturePreloader &operator=( const RageTexturePreloader &rhs );
~RageTexturePreloader();
void Load( const RageTextureID &ID );
+2 -3
View File
@@ -114,11 +114,10 @@ public:
Object::Register( this );
}
CachedObjectPointer( const CachedObjectPointer &cpy )
CachedObjectPointer( const CachedObjectPointer &cpy ):
m_pCache(cpy.m_pCache), m_bCacheIsSet(cpy.m_bCacheIsSet)
{
CachedObjectHelpers::Lock();
m_pCache = cpy.m_pCache;
m_bCacheIsSet = cpy.m_bCacheIsSet;
Object::Register( this );
CachedObjectHelpers::Unlock();
}
+74 -25
View File
@@ -20,33 +20,60 @@ struct MenuRowDef
bool bThemeTitle;
bool bThemeItems;
MenuRowDef() {}
MenuRowDef( int r, RString n, MenuRowUpdateEnabled pe, EditMode s, bool bTT, bool bTI, int d, const char *c0=NULL, const char *c1=NULL, const char *c2=NULL, const char *c3=NULL, const char *c4=NULL, const char *c5=NULL, const char *c6=NULL, const char *c7=NULL, const char *c8=NULL, const char *c9=NULL, const char *c10=NULL, const char *c11=NULL, const char *c12=NULL, const char *c13=NULL, const char *c14=NULL, const char *c15=NULL, const char *c16=NULL, const char *c17=NULL, const char *c18=NULL, const char *c19=NULL, const char *c20=NULL, const char *c21=NULL, const char *c22=NULL, const char *c23=NULL, const char *c24=NULL, const char *c25=NULL )
MenuRowDef(): iRowCode(0), sName(""), bEnabled(false),
pfnEnabled(), emShowIn(), iDefaultChoice(0),
choices(), bThemeTitle(false), bThemeItems(false) {}
MenuRowDef( int r, RString n, MenuRowUpdateEnabled pe, EditMode s,
bool bTT, bool bTI, int d, const char *c0=NULL,
const char *c1=NULL, const char *c2=NULL,
const char *c3=NULL, const char *c4=NULL,
const char *c5=NULL, const char *c6=NULL,
const char *c7=NULL, const char *c8=NULL,
const char *c9=NULL, const char *c10=NULL,
const char *c11=NULL, const char *c12=NULL,
const char *c13=NULL, const char *c14=NULL,
const char *c15=NULL, const char *c16=NULL,
const char *c17=NULL, const char *c18=NULL,
const char *c19=NULL, const char *c20=NULL,
const char *c21=NULL, const char *c22=NULL,
const char *c23=NULL, const char *c24=NULL,
const char *c25=NULL ): iRowCode(r), sName(n),
bEnabled(true), pfnEnabled(pe), emShowIn(s),
iDefaultChoice(d), choices(),
bThemeTitle(bTT), bThemeItems(bTI)
{
iRowCode = r;
sName = n;
bEnabled = true;
pfnEnabled = pe;
emShowIn = s;
bThemeTitle = bTT;
bThemeItems = bTI;
iDefaultChoice = d;
#define PUSH( c ) if(c) choices.push_back(c);
PUSH(c0);PUSH(c1);PUSH(c2);PUSH(c3);PUSH(c4);PUSH(c5);PUSH(c6);PUSH(c7);PUSH(c8);PUSH(c9);PUSH(c10);PUSH(c11);PUSH(c12);PUSH(c13);PUSH(c14);PUSH(c15);PUSH(c16);PUSH(c17);PUSH(c18);PUSH(c19);PUSH(c20);PUSH(c21);PUSH(c22);PUSH(c22);PUSH(c23);PUSH(c23);PUSH(c24);PUSH(c25);
PUSH(c0);PUSH(c1);PUSH(c2);PUSH(c3);PUSH(c4);PUSH(c5);
PUSH(c6);PUSH(c7);PUSH(c8);PUSH(c9);PUSH(c10);PUSH(c11);
PUSH(c12);PUSH(c13);PUSH(c14);PUSH(c15);PUSH(c16);PUSH(c17);
PUSH(c18);PUSH(c19);PUSH(c20);PUSH(c21);PUSH(c22);PUSH(c22);
PUSH(c23);PUSH(c23);PUSH(c24);PUSH(c25);
#undef PUSH
}
MenuRowDef( int r, RString n, bool e, EditMode s, bool bTT, bool bTI, int d, const char *c0=NULL, const char *c1=NULL, const char *c2=NULL, const char *c3=NULL, const char *c4=NULL, const char *c5=NULL, const char *c6=NULL, const char *c7=NULL, const char *c8=NULL, const char *c9=NULL, const char *c10=NULL, const char *c11=NULL, const char *c12=NULL, const char *c13=NULL, const char *c14=NULL, const char *c15=NULL, const char *c16=NULL, const char *c17=NULL, const char *c18=NULL, const char *c19=NULL, const char *c20=NULL, const char *c21=NULL, const char *c22=NULL, const char *c23=NULL, const char *c24=NULL, const char *c25=NULL )
MenuRowDef( int r, RString n, bool e, EditMode s, bool bTT, bool bTI,
int d, const char *c0=NULL, const char *c1=NULL,
const char *c2=NULL, const char *c3=NULL,
const char *c4=NULL, const char *c5=NULL,
const char *c6=NULL, const char *c7=NULL,
const char *c8=NULL, const char *c9=NULL,
const char *c10=NULL, const char *c11=NULL,
const char *c12=NULL, const char *c13=NULL,
const char *c14=NULL, const char *c15=NULL,
const char *c16=NULL, const char *c17=NULL,
const char *c18=NULL, const char *c19=NULL,
const char *c20=NULL, const char *c21=NULL,
const char *c22=NULL, const char *c23=NULL,
const char *c24=NULL, const char *c25=NULL ):
iRowCode(r), sName(n), bEnabled(e), pfnEnabled(NULL),
emShowIn(s), iDefaultChoice(d), choices(),
bThemeTitle(bTT), bThemeItems(bTI)
{
iRowCode = r;
sName = n;
bEnabled = e;
pfnEnabled = NULL;
emShowIn = s;
bThemeTitle = bTT;
bThemeItems = bTI;
iDefaultChoice = d;
#define PUSH( c ) if(c) choices.push_back(c);
PUSH(c0);PUSH(c1);PUSH(c2);PUSH(c3);PUSH(c4);PUSH(c5);PUSH(c6);PUSH(c7);PUSH(c8);PUSH(c9);PUSH(c10);PUSH(c11);PUSH(c12);PUSH(c13);PUSH(c14);PUSH(c15);PUSH(c16);PUSH(c17);PUSH(c18);PUSH(c19);PUSH(c20);PUSH(c21);PUSH(c22);PUSH(c22);PUSH(c23);PUSH(c23);PUSH(c24);PUSH(c25);
PUSH(c0);PUSH(c1);PUSH(c2);PUSH(c3);PUSH(c4);PUSH(c5);
PUSH(c6);PUSH(c7);PUSH(c8);PUSH(c9);PUSH(c10);PUSH(c11);
PUSH(c12);PUSH(c13);PUSH(c14);PUSH(c15);PUSH(c16);PUSH(c17);
PUSH(c18);PUSH(c19);PUSH(c20);PUSH(c21);PUSH(c22);PUSH(c22);
PUSH(c23);PUSH(c23);PUSH(c24);PUSH(c25);
#undef PUSH
}
@@ -76,11 +103,29 @@ struct MenuDef
RString sClassName;
vector<MenuRowDef> rows;
MenuDef( RString c, MenuRowDef r0=MenuRowDef(), MenuRowDef r1=MenuRowDef(), MenuRowDef r2=MenuRowDef(), MenuRowDef r3=MenuRowDef(), MenuRowDef r4=MenuRowDef(), MenuRowDef r5=MenuRowDef(), MenuRowDef r6=MenuRowDef(), MenuRowDef r7=MenuRowDef(), MenuRowDef r8=MenuRowDef(), MenuRowDef r9=MenuRowDef(), MenuRowDef r10=MenuRowDef(), MenuRowDef r11=MenuRowDef(), MenuRowDef r12=MenuRowDef(), MenuRowDef r13=MenuRowDef(), MenuRowDef r14=MenuRowDef(), MenuRowDef r15=MenuRowDef(), MenuRowDef r16=MenuRowDef(), MenuRowDef r17=MenuRowDef(), MenuRowDef r18=MenuRowDef(), MenuRowDef r19=MenuRowDef(), MenuRowDef r20=MenuRowDef(), MenuRowDef r21=MenuRowDef(), MenuRowDef r22=MenuRowDef(), MenuRowDef r23=MenuRowDef(), MenuRowDef r24=MenuRowDef(), MenuRowDef r25=MenuRowDef(), MenuRowDef r26=MenuRowDef(), MenuRowDef r27=MenuRowDef(), MenuRowDef r28=MenuRowDef(), MenuRowDef r29=MenuRowDef() )
MenuDef( RString c, MenuRowDef r0=MenuRowDef(),
MenuRowDef r1=MenuRowDef(), MenuRowDef r2=MenuRowDef(),
MenuRowDef r3=MenuRowDef(), MenuRowDef r4=MenuRowDef(),
MenuRowDef r5=MenuRowDef(), MenuRowDef r6=MenuRowDef(),
MenuRowDef r7=MenuRowDef(), MenuRowDef r8=MenuRowDef(),
MenuRowDef r9=MenuRowDef(), MenuRowDef r10=MenuRowDef(),
MenuRowDef r11=MenuRowDef(), MenuRowDef r12=MenuRowDef(),
MenuRowDef r13=MenuRowDef(), MenuRowDef r14=MenuRowDef(),
MenuRowDef r15=MenuRowDef(), MenuRowDef r16=MenuRowDef(),
MenuRowDef r17=MenuRowDef(), MenuRowDef r18=MenuRowDef(),
MenuRowDef r19=MenuRowDef(), MenuRowDef r20=MenuRowDef(),
MenuRowDef r21=MenuRowDef(), MenuRowDef r22=MenuRowDef(),
MenuRowDef r23=MenuRowDef(), MenuRowDef r24=MenuRowDef(),
MenuRowDef r25=MenuRowDef(), MenuRowDef r26=MenuRowDef(),
MenuRowDef r27=MenuRowDef(), MenuRowDef r28=MenuRowDef(),
MenuRowDef r29=MenuRowDef() ): sClassName(c), rows()
{
sClassName = c;
#define PUSH( r ) if(!r.sName.empty()) rows.push_back(r);
PUSH(r0);PUSH(r1);PUSH(r2);PUSH(r3);PUSH(r4);PUSH(r5);PUSH(r6);PUSH(r7);PUSH(r8);PUSH(r9);PUSH(r10);PUSH(r11);PUSH(r12);PUSH(r13);PUSH(r14);PUSH(r15);PUSH(r16);PUSH(r17);PUSH(r18);PUSH(r19);PUSH(r20);PUSH(r21);PUSH(r22);PUSH(r23);PUSH(r24);PUSH(r25);PUSH(r26);PUSH(r27);PUSH(r28);PUSH(r29);
PUSH(r0);PUSH(r1);PUSH(r2);PUSH(r3);PUSH(r4);PUSH(r5);PUSH(r6);
PUSH(r7);PUSH(r8);PUSH(r9);PUSH(r10);PUSH(r11);PUSH(r12);
PUSH(r13);PUSH(r14);PUSH(r15);PUSH(r16);PUSH(r17);PUSH(r18);
PUSH(r19);PUSH(r20);PUSH(r21);PUSH(r22);PUSH(r23);PUSH(r24);
PUSH(r25);PUSH(r26);PUSH(r27);PUSH(r28);PUSH(r29);
#undef PUSH
}
};
@@ -89,7 +134,9 @@ struct MenuDef
class ScreenMiniMenu : public ScreenOptions
{
public:
static void MiniMenu( const MenuDef* pDef, ScreenMessage smSendOnOK, ScreenMessage smSendOnCancel = SM_None, float fX = 0, float fY = 0 );
static void MiniMenu( const MenuDef* pDef, ScreenMessage smSendOnOK,
ScreenMessage smSendOnCancel = SM_None,
float fX = 0, float fY = 0 );
void Init();
void BeginScreen();
@@ -110,6 +157,8 @@ protected:
vector<MenuRowDef> m_vMenuRows;
public:
ScreenMiniMenu(): m_SMSendOnOK(), m_SMSendOnCancel(), m_vMenuRows() {}
static bool s_bCancelled;
static int s_iLastRowCode;
static vector<int> s_viLastAnswers;
+4 -1
View File
@@ -71,7 +71,10 @@ public:
}
struct TextEntrySettings {
TextEntrySettings() { }
TextEntrySettings(): smSendOnPop(), sQuestion(""),
sInitialAnswer(""), iMaxInputLength(0),
bPassword(false), Validate(), OnOK(), OnCancel(),
ValidateAppend(), FormatAnswerForDisplay() { }
ScreenMessage smSendOnPop;
RString sQuestion;
RString sInitialAnswer;
+1 -1
View File
@@ -11,7 +11,7 @@ class StyleID
RString sStyle;
public:
StyleID() { Unset(); }
StyleID(): sGame(""), sStyle("") { }
void Unset() { FromStyle(NULL); }
void FromStyle( const Style *p );
const Style *ToStyle() const;
+3 -2
View File
@@ -53,9 +53,9 @@ public:
* (everything except screens). */
ThemeMetric( const RString& sGroup = "", const RString& sName = "" ):
m_sGroup( sGroup ),
m_sName( sName )
m_sName( sName ),
m_Value(), m_currentValue(T()), m_bCallEachTime(false)
{
m_currentValue = T();
ThemeManager::Subscribe( this );
}
@@ -64,6 +64,7 @@ public:
m_sGroup( cpy.m_sGroup ),
m_sName( cpy.m_sName ),
m_Value( cpy.m_Value )
// do we transfer the current value or bCallEachTime?
{
ThemeManager::Subscribe( this );
}
+2 -1
View File
@@ -33,7 +33,8 @@ class TrailID
mutable CachedObjectPointer<Trail> m_Cache;
public:
TrailID() { Unset(); }
TrailID(): st(StepsType_Invalid), cd(Difficulty_Invalid),
m_Cache() { m_Cache.Unset(); }
void Unset() { FromTrail(NULL); }
void FromTrail( const Trail *p );
Trail *ToTrail( const Course *p, bool bAllowNull ) const;