Erwan
- Minor tweaks in the hope to fix some Valgrind error logs
This commit is contained in:
@@ -20,7 +20,7 @@
|
|||||||
#define STATE_FIRST_TIME 4
|
#define STATE_FIRST_TIME 4
|
||||||
#define STATE_WARNING 5
|
#define STATE_WARNING 5
|
||||||
|
|
||||||
#define GAME_VERSION "WTH?! 0.2.2 - by WilLoW"
|
#define GAME_VERSION "WTH?! 0.3.0 - by WilLoW"
|
||||||
#define ALPHA_WARNING 0
|
#define ALPHA_WARNING 0
|
||||||
|
|
||||||
#define DEFAULT_ANGLE_MULTIPLIER 0.4
|
#define DEFAULT_ANGLE_MULTIPLIER 0.4
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ CardDescriptor::CardDescriptor(): MTGCardInstance(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
int CardDescriptor::init(){
|
int CardDescriptor::init(){
|
||||||
return MTGCardInstance::init();
|
int result = MTGCardInstance::init();
|
||||||
|
initAttackersDefensers();
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
MTGCardInstance * CardDescriptor::match_or(MTGCardInstance * card){
|
MTGCardInstance * CardDescriptor::match_or(MTGCardInstance * card){
|
||||||
|
|||||||
@@ -185,6 +185,7 @@ int ManaCost::add(int color, int value){
|
|||||||
}
|
}
|
||||||
|
|
||||||
int ManaCost::add(ManaCost * _cost){
|
int ManaCost::add(ManaCost * _cost){
|
||||||
|
if(!_cost) return 0;
|
||||||
for (int i=0; i< MTG_NB_COLORS; i++){
|
for (int i=0; i< MTG_NB_COLORS; i++){
|
||||||
cost[i]+= _cost->getCost(i);
|
cost[i]+= _cost->getCost(i);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user