- Replaced the BasicAbilities Array with a map. This reduces the size of MTGCard from >500 bytes to 392. Should be cool for people who have memory issues
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-06-25 11:09:51 +00:00
parent f643f87b83
commit 71cc79b949
9 changed files with 23 additions and 14 deletions

View File

@@ -24,6 +24,7 @@ class TexturesCache;
#include <string>
#include <vector>
#include <map>
using namespace std;
class MTGCard {
@@ -40,6 +41,7 @@ class MTGCard {
char image_name[MTGCARD_NAME_SIZE];
int init();
public:
TexturesCache * mCache;
@@ -47,7 +49,7 @@ class MTGCard {
string name;
int colors[Constants::MTG_NB_COLORS];
int basicAbilities[Constants::NB_BASIC_ABILITIES];
map<int,int> basicAbilities;
vector<string> formattedText;
string magicText;
int alias;