More warning cleanup - converted certain class functions to return bool instead of int where appropriate. Also fixed the sdl update() tickCount assignment that I just broke in my last checkin.

This commit is contained in:
wrenczes@gmail.com
2011-06-02 07:01:42 +00:00
parent 90b1058ad5
commit 5b8ecd0cf7
5 changed files with 45 additions and 37 deletions

View File

@@ -46,10 +46,14 @@ public:
TargetChooser * getCurrentTargetChooser();
void setCurrentWaitingAction(ActionElement * ae);
MTGAbility * getAbility(int type);
//Removes from game but does not move the element to garbage. The caller must take care of deleting the element.
int removeFromGame(ActionElement * e);
int moveToGarbage(ActionElement * e);
int cleanGarbage();
bool moveToGarbage(ActionElement * e);
void cleanGarbage();
protected:
ActionElement * currentWaitingAction;
int cantCancel;

View File

@@ -89,14 +89,18 @@ class MTGGameZone {
int countByType(const char * value);
int countByCanTarget(TargetChooser * tc);
MTGCardInstance * findByName(string name);
int hasAbility(int ability); //returns 1 if one of the cards in the zone has the ability, 0 otherwise
int hasType(const char * value); //returns 1 if one of the cards in the zone has the type, 0 otherwise
int hasSpecificType(const char * value,const char * secondvalue); //returns 1 if one of the cards in the zone has the type, 0 otherwise
int hasPrimaryType(const char * value,const char * secondvalue); //returns 1 if one of the cards in the zone has the type, 0 otherwise
int hasTypeButNotType(const char * value,const char * secondvalue); //returns 1 if one of the cards in the zone has the type, 0 otherwise
int hasName(string value);
int hasColor(int value); //returns 1 if one of the cards in the zone has the color, 0 otherwise
int hasX();
//returns true if one of the cards in the zone has the ability
bool hasAbility(int ability);
//returns true if one of the cards in the zone has the type
bool hasType(const char * value);
bool hasSpecificType(const char* value, const char* secondvalue);
bool hasPrimaryType(const char* value, const char* secondvalue);
bool hasTypeButNotType(const char* value, const char* secondvalue);
bool hasName(string value);
bool hasColor(int value);
bool hasX();
//How many cards matching a TargetChooser have been put in this zone during the turn
int seenThisTurn(TargetChooser * tc, int castFilter = Constants::CAST_DONT_CARE);