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:
@@ -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();
|
||||
};
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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;};
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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[];
|
||||
|
||||
Reference in New Issue
Block a user