- Moved "game mode" types of awards outside of a code, and inside of a configuration file (rules/awards.dat). No code is required anymore to create such an award (momir, hermit basic, etc...)

- fixed compilation errors in GameObserver (windows)
This commit is contained in:
wagic.the.homebrew
2011-10-02 01:03:45 +00:00
parent 483c767492
commit 9e572ee416
15 changed files with 281 additions and 127 deletions
+16 -3
View File
@@ -13,6 +13,22 @@ class DeckStats;
using namespace std;
class Unlockable
{
private:
map <string, string>mValues;
public:
Unlockable();
void setValue(string, string);
string getValue(string);
bool isUnlocked();
bool tryToUnlock(GameObserver * game);
static void load();
static map <string, Unlockable *> unlockables;
static void Unlockable::Destroy();
};
class CreditBonus
{
public:
@@ -27,9 +43,6 @@ class Credits
private:
time_t gameLength;
int isDifficultyUnlocked(DeckStats * stats);
int isMomirUnlocked();
int isStoneHewerUnlocked();
int isHermitUnlocked();
int isEvilTwinUnlocked();
int isRandomDeckUnlocked();
int IsMoreAIDecksUnlocked(DeckStats * stats);
+1 -3
View File
@@ -81,9 +81,6 @@ public:
INTERRUPT_AFTEREND,
BEGIN_AWARDS, //Options after this use the GameOptionAward struct, which includes a timestamp.
DIFFICULTY_MODE_UNLOCKED = BEGIN_AWARDS,
MOMIR_MODE_UNLOCKED,
STONEHEWER_MODE_UNLOCKED,
HERMIT_MODE_UNLOCKED,
EVILTWIN_MODE_UNLOCKED,
RANDOMDECK_MODE_UNLOCKED,
AWARD_COLLECTOR,
@@ -361,6 +358,7 @@ public:
private:
vector<GameOption*> values;
map<string,GameOption*> unknownMap;
GameOption * factorNewGameOption(string optionName, string value = "");
};
class GameSettings
+1
View File
@@ -61,6 +61,7 @@ public:
bool hidden;
string displayName;
int unlockOption;
string mUnlockOptionString;
static vector<Rules *> RulesList;
Rules(string bg = "");
+2
View File
@@ -595,6 +595,7 @@ class WGuiAward: public WGuiItem
{
public:
WGuiAward(int _id, string name, string _text, string _details = "");
WGuiAward(string _id, string name, string _text, string _details = "");
virtual ~WGuiAward();
virtual void Render();
virtual bool Selectable()
@@ -614,6 +615,7 @@ public:
protected:
string details;
int id;
string textId;
string text;
};