J :
* Fix a few warnings.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
TARGET = template
|
||||
OBJS = src/ActionElement.o src/ActionLayer.o src/ActionStack.o src/AIPlayer.o src/AIStats.o src/Blocker.o src/CardGui.o src/CardDescriptor.o src/CardDisplay.o src/ConstraintResolver.o src/Counters.o src/Damage.o src/DamagerDamaged.o src/DamageResolverLayer.o src/DeckDataWrapper.o src/DuelLayers.o src/GameApp.o src/GameLauncher.o src/GameObserver.o src/GameOptions.o src/GameStateDuel.o src/GameStateOptions.o src/GameStateShop.o src/GroupOfCards.o src/GuiCardsController.o src/GuiLayers.o src/Logger.o src/ManaCost.o src/ManaCostHybrid.o src/MenuItem.o src/MTGAbility.o src/MTGCardInstance.o src/MTGCard.o src/MTGDeck.o src/MTGGamePhase.o src/MTGGameZones.o src/MTGGuiHand.o src/MTGGuiPlay.o src/MTGRules.o src/OptionItem.o src/Player.o src/PlayerData.o src/PlayGuiObjectController.o src/PlayGuiObject.o src/PriceList.o src/ShopItem.o src/SimpleMenu.o src/SimpleMenuItem.o src/Subtypes.o src/TargetChooser.o src/TargetsList.o src/TexturesCache.o src/utils.o
|
||||
OBJS = src/ActionElement.o src/ActionLayer.o src/ActionStack.o src/AIPlayer.o src/AIStats.o src/Blocker.o src/CardGui.o src/CardDescriptor.o src/CardDisplay.o src/ConstraintResolver.o src/Counters.o src/Damage.o src/DamagerDamaged.o src/DamageResolverLayer.o src/DeckDataWrapper.o src/DuelLayers.o src/GameApp.o src/GameLauncher.o src/GameObserver.o src/GameOptions.o src/GameStateDuel.o src/GameStateOptions.o src/GameStateShop.o src/GroupOfCards.o src/GuiCardsController.o src/GuiLayers.o src/Logger.o src/ManaCost.o src/ManaCostHybrid.o src/MenuItem.o src/MTGAbility.o src/MTGCardInstance.o src/MTGCard.o src/MTGDeck.o src/MTGGamePhase.o src/MTGGameZones.o src/MTGGuiHand.o src/MTGGuiPlay.o src/MTGRules.o src/OptionItem.o src/PhaseRing.o src/Player.o src/PlayerData.o src/PlayGuiObjectController.o src/PlayGuiObject.o src/PriceList.o src/ShopItem.o src/SimpleMenu.o src/SimpleMenuItem.o src/Subtypes.o src/TargetChooser.o src/TargetsList.o src/TestSuiteAI.o src/TexturesCache.o src/utils.o
|
||||
|
||||
|
||||
INCDIR = -I ../../JGE/include -I ../../JGE/src
|
||||
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
virtual int displayStack(){return 0;}
|
||||
AIStats * stats;
|
||||
ManaCost * getPotentialMana();
|
||||
AIPlayer(MTGPlayerCards * _deck, char * deckFile);
|
||||
AIPlayer(MTGPlayerCards * _deck, string deckFile);
|
||||
virtual ~AIPlayer();
|
||||
virtual MTGCardInstance * chooseCard(TargetChooser * tc, MTGCardInstance * source, int random = 0);
|
||||
virtual int chooseTarget(TargetChooser * tc = NULL);
|
||||
|
||||
@@ -103,7 +103,7 @@ class ABasicAbilityModifierUntilEOT:public TargetAbility{
|
||||
int modifier;
|
||||
int stateBeforeActivation[50];
|
||||
int ability;
|
||||
ABasicAbilityModifierUntilEOT(int _id, MTGCardInstance * _source, int _ability, ManaCost * _cost, TargetChooser * _tc = NULL, int _modifier = 1): TargetAbility(_id,_source,_cost),ability(_ability), modifier(_modifier){
|
||||
ABasicAbilityModifierUntilEOT(int _id, MTGCardInstance * _source, int _ability, ManaCost * _cost, TargetChooser * _tc = NULL, int _modifier = 1): TargetAbility(_id,_source,_cost),modifier(_modifier), ability(_ability){
|
||||
nbTargets = 0;
|
||||
tc = _tc;
|
||||
if (!tc) tc = NEW CreatureTargetChooser(_source);
|
||||
|
||||
@@ -25,7 +25,7 @@ using std::map;
|
||||
|
||||
class AbilityFactory{
|
||||
private:
|
||||
int destroyAllFromTypeInPlay(char * type, MTGCardInstance * source, int bury = 0);
|
||||
int destroyAllFromTypeInPlay(const char * type, MTGCardInstance * source, int bury = 0);
|
||||
int destroyAllFromColorInPlay(int color, MTGCardInstance * source, int bury = 0);
|
||||
int putInPlayFromZone(MTGCardInstance * card, MTGGameZone * zone, Player * p);
|
||||
public:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _PLAYER_H_
|
||||
#define _PLAYER_H_
|
||||
|
||||
#include <JGE.h>
|
||||
#include "JGE.h"
|
||||
#include "ManaCost.h"
|
||||
#include "MTGGameZones.h"
|
||||
#include "Damage.h"
|
||||
@@ -23,7 +23,7 @@ class Player: public Damageable, public Targetable{
|
||||
MTGPlayerCards * game;
|
||||
int testLife();
|
||||
int afterDamage();
|
||||
Player(MTGPlayerCards * _deck, char * deckFile);
|
||||
Player(MTGPlayerCards * _deck, string deckFile);
|
||||
virtual ~Player();
|
||||
void unTapPhase();
|
||||
MTGInPlay * inPlay();
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#ifdef _DEBUG
|
||||
#define OutputDebugString(val) (std::cerr << val);
|
||||
#else
|
||||
#define OutputDebugString(val)
|
||||
#define OutputDebugString(val) {}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
const char * const MTG_LAND_TEXTS[] = {"artifact","forest","island","mountain","swamp","plains","other lands"};
|
||||
|
||||
AIPlayer::AIPlayer(MTGPlayerCards * _deck, char * file): Player(_deck, file){
|
||||
AIPlayer::AIPlayer(MTGPlayerCards * _deck, string file): Player(_deck, file){
|
||||
potentialMana = NEW ManaCost();
|
||||
nextCardToPlay = NULL;
|
||||
stats = NULL;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "../include/CardGui.h"
|
||||
#include "../include/MTGDeck.h"
|
||||
|
||||
int AbilityFactory::destroyAllFromTypeInPlay(char * type, MTGCardInstance * source, int bury){
|
||||
int AbilityFactory::destroyAllFromTypeInPlay(const char * type, MTGCardInstance * source, int bury){
|
||||
GameObserver * game = GameObserver::GetInstance();
|
||||
for (int i = 0; i < 2 ; i++){
|
||||
for (int j = 0; j < game->players[i]->game->inPlay->nb_cards; j++){
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
|
||||
|
||||
Player::Player(MTGPlayerCards * _deck, char * file): Damageable(20){
|
||||
Player::Player(MTGPlayerCards * _deck, string file): Damageable(20){
|
||||
deckFile = file;
|
||||
game = _deck;
|
||||
game->setOwner(this);
|
||||
@@ -82,4 +82,4 @@ int Player::afterDamage(){
|
||||
void Player::cleanupPhase(){
|
||||
game->inPlay->cleanupPhase();
|
||||
game->graveyard->cleanupPhase();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
||||
#endif
|
||||
cd = NEW CardDescriptor();
|
||||
while(attributes.size()){
|
||||
int found2 = attributes.find(";");
|
||||
unsigned int found2 = attributes.find(";");
|
||||
string attribute;
|
||||
if (found2 != string::npos){
|
||||
attribute = attributes.substr(0,found2);
|
||||
|
||||
@@ -33,7 +33,7 @@ MTGCardInstance * TestSuite::getCardByMTGId(int mtgid){
|
||||
Interruptible * TestSuite::getActionByMTGId(int mtgid){
|
||||
ActionStack * as= GameObserver::GetInstance()->mLayers->stackLayer();
|
||||
Interruptible * action = NULL;
|
||||
while (action = as->getNext(action,0,0,1)){
|
||||
while ((action = as->getNext(action,0,0,1))){
|
||||
if (action->source && action->source->getMTGId() == mtgid){
|
||||
return action;
|
||||
}
|
||||
@@ -128,7 +128,7 @@ TestSuiteState::TestSuiteState(){
|
||||
}
|
||||
|
||||
void TestSuiteState::parsePlayerState(int playerId, string s){
|
||||
int limiter = s.find(":");
|
||||
unsigned int limiter = s.find(":");
|
||||
string areaS;
|
||||
int area;
|
||||
if (limiter != string::npos){
|
||||
@@ -148,10 +148,12 @@ void TestSuiteState::parsePlayerState(int playerId, string s){
|
||||
SAFE_DELETE(playerData[playerId].manapool);
|
||||
playerData[playerId].manapool = ManaCost::parseManaCost(s.substr(limiter+1));
|
||||
return;
|
||||
}else{
|
||||
return; // ERROR
|
||||
}
|
||||
s = s.substr(limiter+1);
|
||||
while (s.size()){
|
||||
int value;
|
||||
unsigned int value;
|
||||
limiter = s.find(",");
|
||||
if (limiter != string::npos){
|
||||
value = atoi(s.substr(0,limiter).c_str());
|
||||
|
||||
Reference in New Issue
Block a user