Added MNGuyen's improved and alphabatized deck handling(noticeable speed increase btween menus) and almosthumane's automated pass phase option.

This commit is contained in:
omegablast2002@yahoo.com
2010-09-08 11:44:11 +00:00
parent 1f01b10010
commit 79ea200d97
15 changed files with 301 additions and 13 deletions
+27
View File
@@ -0,0 +1,27 @@
#include <string>
#include <vector>
using namespace std;
class DeckManager
{
protected:
static DeckManager * mInstance;
public:
vector<int> playerDeckOrderList;
vector<int> aiDeckOrderList;
vector<int> * getPlayerDeckOrderList();
vector<int> * getAIDeckOrderList();
static DeckManager * GetInstance();
static void EndInstance();
DeckManager();
~DeckManager();
};
+11
View File
@@ -2,16 +2,25 @@
#define _DECKMETADATA_H_
#include <string>
#include <vector>
#include <map>
using namespace std;
class DeckMetaData {
public:
DeckMetaData();
DeckMetaData(string filename);
void load(string filename);
bool operator<(DeckMetaData b);
string desc;
string name;
int deckid;
string& trim(string &str);
string& ltrim(string &str);
string& rtrim(string &str);
};
class DeckMetaDataList {
@@ -20,6 +29,8 @@ public:
DeckMetaData * get(string filename);
~DeckMetaDataList();
static DeckMetaDataList * decksMetaData;
private:
map<string,DeckMetaData *>values;
};
+8 -1
View File
@@ -46,6 +46,7 @@ public:
REVERSETRIGGERS,
DISABLECARDS,
MAX_GRADE,
ASPHASES,
ECON_DIFFICULTY,
TRANSITIONS,
GUI_STYLE,
@@ -182,7 +183,13 @@ private:
OptionMaxGrade();
static OptionMaxGrade mDef;
};
class OptionASkipPhase: public EnumDefinition {
public:
static EnumDefinition * getInstance() {return &mDef;};
private:
OptionASkipPhase();
static OptionASkipPhase mDef;
};
class OptionEconDifficulty: public EnumDefinition {
public:
static EnumDefinition * getInstance() {return &mDef;};
+9 -1
View File
@@ -7,6 +7,8 @@ class JGE;
#include <JSoundSystem.h>
#include <string>
#include <vector>
#include <iostream>
using namespace std;
enum ENUM_GAME_STATE
@@ -53,7 +55,13 @@ class GameState
virtual void Update(float dt) = 0;
virtual void Render() = 0;
static int fillDeckMenu(SimpleMenu * _menu, string path, string smallDeckPrefix = "", Player * statsPlayer = NULL);
};
static int fillDeckMenu( vector<int> * deckIdList, SimpleMenu * _menu, string path, string smallDeckPrefix = "", Player * statsPlayer = NULL);
string& trim(string &str);
string& ltrim(string &str);
string& rtrim(string &str);
};
#endif
+4
View File
@@ -175,6 +175,10 @@ class Constants
GRADE_CRAPPY = 3,
GRADE_UNSUPPORTED = 4,
GRADE_DANGEROUS = 5,
ASKIP_NONE=0,
ASKIP_SAFE=1,
ASKIP_FULL=2,
};
static char MTGColorChars[];