* Fix a number of warnings.
This commit is contained in:
jean.chalard
2009-04-29 12:06:28 +00:00
parent 789ad60723
commit e0e21fa2a3
4 changed files with 90 additions and 89 deletions

View File

@@ -27,10 +27,10 @@
Credits::~Credits(){
SAFE_DELETE(unlockedTex);
SAFE_DELETE(unlockedQuad);
for (int i=0;i<bonus.size();i++)
for (unsigned int i = 0; i<bonus.size(); ++i)
if (bonus[i])
delete bonus[i];
bonus.clear();
bonus.clear();
}
void Credits::compute(Player * _p1, Player * _p2, GameApp * _app){

View File

@@ -112,14 +112,15 @@ void GameStateDuel::Start()
void GameStateDuel::loadPlayerMomir(int playerId, int isAI){
char * deckFile = RESPATH"/player/momir.txt";
char * deckFileSmall = "momir";
char deckFile[] = RESPATH"/player/momir.txt";
char deckFileSmall[] = "momir";
char empty[] = "";
MTGDeck * tempDeck = NEW MTGDeck(deckFile, NULL, mParent->collection);
deck[playerId] = NEW MTGPlayerCards(mParent->collection,tempDeck);
if (!isAI){ //Human Player
mPlayers[playerId] = NEW HumanPlayer(deck[playerId],deckFileSmall);
}else{
mPlayers[playerId] = NEW AIMomirPlayer(deck[playerId],deckFile,"");
mPlayers[playerId] = NEW AIMomirPlayer(deck[playerId],deckFile,empty);
}
delete tempDeck;
}

View File

@@ -171,9 +171,9 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
//Tap in the cost ?
if (line.find("{t}") != string::npos) doTap = 1;
TargetChooser * tc;
TargetChooser * lordTargets;
Trigger * trigger;
TargetChooser * tc = NULL;
TargetChooser * lordTargets = NULL;
Trigger * trigger = NULL;
while (line.size()){
string s;
found = line.find("&&");

View File

@@ -120,7 +120,7 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone
GameObserver *g = GameObserver::GetInstance();
if (!from || !to) return card; //Error check
if (copy = from->removeCard(card)){
if ((copy = from->removeCard(card))){
if (GameOptions::GetInstance()->values[OPTIONS_SFXVOLUME].getIntValue() > 0){
if (to == graveyard){