J :
* Fix a number of warnings
This commit is contained in:
@@ -62,7 +62,7 @@ void CardGui::alternateRender(MTGCard * card, JLBFont * mFont, JQuad ** manaIcon
|
||||
ManaCostHybrid * h;
|
||||
|
||||
unsigned int j = 0;
|
||||
while (h = manacost->getHybridCost(j)){
|
||||
while ((h = manacost->getHybridCost(j))){
|
||||
OutputDebugString("Hybrid\n");
|
||||
for (int i = 0; i < 2; i++){
|
||||
int color = h->color1;
|
||||
|
||||
@@ -411,9 +411,9 @@ void GameStateMenu::ButtonPressed(int controllerId, int controlId)
|
||||
{
|
||||
case MENUITEM_PLAY:
|
||||
#ifdef TESTSUITE
|
||||
subMenuController = NEW SimpleMenu(102, this, mFont, 180,110);
|
||||
subMenuController = NEW SimpleMenu(102, this, mFont, 150,60);
|
||||
#else
|
||||
subMenuController = NEW SimpleMenu(102, this, mFont, 180,110);
|
||||
subMenuController = NEW SimpleMenu(102, this, mFont, 150,60);
|
||||
#endif
|
||||
if (subMenuController){
|
||||
subMenuController->Add(SUBMENUITEM_1PLAYER,"1 Player");
|
||||
|
||||
@@ -145,7 +145,7 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
|
||||
|
||||
|
||||
MultiAbility * multi = NULL;
|
||||
int delimiter = line.find("}:");
|
||||
unsigned int delimiter = line.find("}:");
|
||||
ManaCost * cost = NULL;
|
||||
if (delimiter!= string::npos){
|
||||
cost = ManaCost::parseManaCost(line.substr(0,delimiter+1));
|
||||
|
||||
@@ -113,7 +113,7 @@ ManaCost::ManaCost(ManaCost * _manaCost){
|
||||
|
||||
ManaCost::~ManaCost(){
|
||||
LOG("==Deleting ManaCost==");
|
||||
for (int i = 0; i < nbhybrids ; i++){
|
||||
for (unsigned int i = 0; i < nbhybrids ; i++){
|
||||
SAFE_DELETE(hybrids[i]);
|
||||
}
|
||||
}
|
||||
@@ -132,10 +132,10 @@ void ManaCost::init(){
|
||||
|
||||
|
||||
void ManaCost::copy(ManaCost * _manaCost){
|
||||
for (int i=0; i<= Constants::MTG_NB_COLORS; i++){
|
||||
for (unsigned int i = 0; i <= Constants::MTG_NB_COLORS; i++){
|
||||
cost[i] = _manaCost->getCost(i);
|
||||
}
|
||||
for (int i=0; i< _manaCost->nbhybrids; i++){
|
||||
for (unsigned int i = 0; i < _manaCost->nbhybrids; i++){
|
||||
hybrids[i] = NEW ManaCostHybrid((*_manaCost->hybrids[i]));
|
||||
}
|
||||
nbhybrids = _manaCost->nbhybrids;
|
||||
@@ -159,7 +159,7 @@ int ManaCost::getMainColor(){
|
||||
|
||||
int ManaCost::hasColor(int color){
|
||||
if (cost[color]) return 1;
|
||||
for (int i = 0; i < nbhybrids; i++){
|
||||
for (unsigned int i = 0; i < nbhybrids; i++){
|
||||
if (hybrids[i]->hasColor(color)) return 1;
|
||||
}
|
||||
return 0;
|
||||
@@ -167,10 +167,10 @@ int ManaCost::hasColor(int color){
|
||||
|
||||
int ManaCost::getConvertedCost(){
|
||||
int result = 0;
|
||||
for (int i=0; i< Constants::MTG_NB_COLORS; i++){
|
||||
for (unsigned int i = 0; i < Constants::MTG_NB_COLORS; i++){
|
||||
result += cost[i];
|
||||
}
|
||||
for (int i = 0; i < nbhybrids; i++){
|
||||
for (unsigned int i = 0; i < nbhybrids; i++){
|
||||
result+= hybrids[i]->getConvertedCost();
|
||||
}
|
||||
return result;
|
||||
@@ -188,10 +188,10 @@ int ManaCost::add(int color, int value){
|
||||
|
||||
int ManaCost::add(ManaCost * _cost){
|
||||
if(!_cost) return 0;
|
||||
for (int i=0; i< Constants::MTG_NB_COLORS; i++){
|
||||
for (unsigned int i = 0; i < Constants::MTG_NB_COLORS; i++){
|
||||
cost[i]+= _cost->getCost(i);
|
||||
}
|
||||
for (int i=0; i< _cost->nbhybrids; i++){
|
||||
for (unsigned int i = 0; i < _cost->nbhybrids; i++){
|
||||
hybrids[nbhybrids] = NEW ManaCostHybrid((*_cost->hybrids[i]));
|
||||
nbhybrids++;
|
||||
}
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
#include "../include/GameApp.h"
|
||||
|
||||
const unsigned SimpleMenu::SIDE_SIZE = 7;
|
||||
const unsigned SimpleMenu::VMARGIN = 12;
|
||||
const unsigned SimpleMenu::HMARGIN = 27;
|
||||
const signed SimpleMenu::LINE_HEIGHT = 16;
|
||||
const unsigned SimpleMenu::VMARGIN = 16;
|
||||
const unsigned SimpleMenu::HMARGIN = 30;
|
||||
const signed SimpleMenu::LINE_HEIGHT = 28;
|
||||
const char* SimpleMenu::spadeLPath = "graphics/spade_ul.png";
|
||||
const char* SimpleMenu::spadeRPath = "graphics/spade_ur.png";
|
||||
const char* SimpleMenu::jewelPath = "graphics/jewel.png";
|
||||
|
||||
Reference in New Issue
Block a user