- some performance improvements
- "daily build". The daily build was compiled in "profile" mode. If you have problems running the exe, or problems with Visual Studio please let me know
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-10-08 12:17:07 +00:00
parent e4a277f9ff
commit 46ef86b9d8
10 changed files with 348 additions and 35 deletions
+4 -1
View File
@@ -186,6 +186,7 @@ MTGGameZone::~MTGGameZone(){
void MTGGameZone::setOwner(Player * player){
for (int i=0; i<nb_cards; i++) {
cards[i]->owner = player;
cards[i]->lastController = player;
}
owner = player;
}
@@ -195,6 +196,7 @@ MTGCardInstance * MTGGameZone::removeCard(MTGCardInstance * card, int createCopy
cardsMap.erase(card);
for (i=0; i<(nb_cards); i++) {
if (cards[i] == card){
card->currentZone = NULL;
nb_cards--;
cards.erase(cards.begin()+i);
MTGCardInstance * copy = card;
@@ -216,7 +218,7 @@ MTGCardInstance * MTGGameZone::removeCard(MTGCardInstance * card, int createCopy
}
MTGCardInstance * MTGGameZone::hasCard(MTGCardInstance * card){
if (cardsMap.find(card) != cardsMap.end()) return card;
if (card->currentZone == this) return card;
return NULL;
}
@@ -273,6 +275,7 @@ void MTGGameZone::addCard(MTGCardInstance * card){
nb_cards++;
cardsMap[card] = 1;
card->lastController = this->owner;
card->currentZone = this;
}