J :
* Fix a few warnings.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
TARGET = template
|
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
|
INCDIR = -I ../../JGE/include -I ../../JGE/src
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public:
|
|||||||
virtual int displayStack(){return 0;}
|
virtual int displayStack(){return 0;}
|
||||||
AIStats * stats;
|
AIStats * stats;
|
||||||
ManaCost * getPotentialMana();
|
ManaCost * getPotentialMana();
|
||||||
AIPlayer(MTGPlayerCards * _deck, char * deckFile);
|
AIPlayer(MTGPlayerCards * _deck, string deckFile);
|
||||||
virtual ~AIPlayer();
|
virtual ~AIPlayer();
|
||||||
virtual MTGCardInstance * chooseCard(TargetChooser * tc, MTGCardInstance * source, int random = 0);
|
virtual MTGCardInstance * chooseCard(TargetChooser * tc, MTGCardInstance * source, int random = 0);
|
||||||
virtual int chooseTarget(TargetChooser * tc = NULL);
|
virtual int chooseTarget(TargetChooser * tc = NULL);
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ class ABasicAbilityModifierUntilEOT:public TargetAbility{
|
|||||||
int modifier;
|
int modifier;
|
||||||
int stateBeforeActivation[50];
|
int stateBeforeActivation[50];
|
||||||
int ability;
|
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;
|
nbTargets = 0;
|
||||||
tc = _tc;
|
tc = _tc;
|
||||||
if (!tc) tc = NEW CreatureTargetChooser(_source);
|
if (!tc) tc = NEW CreatureTargetChooser(_source);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ using std::map;
|
|||||||
|
|
||||||
class AbilityFactory{
|
class AbilityFactory{
|
||||||
private:
|
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 destroyAllFromColorInPlay(int color, MTGCardInstance * source, int bury = 0);
|
||||||
int putInPlayFromZone(MTGCardInstance * card, MTGGameZone * zone, Player * p);
|
int putInPlayFromZone(MTGCardInstance * card, MTGGameZone * zone, Player * p);
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef _PLAYER_H_
|
#ifndef _PLAYER_H_
|
||||||
#define _PLAYER_H_
|
#define _PLAYER_H_
|
||||||
|
|
||||||
#include <JGE.h>
|
#include "JGE.h"
|
||||||
#include "ManaCost.h"
|
#include "ManaCost.h"
|
||||||
#include "MTGGameZones.h"
|
#include "MTGGameZones.h"
|
||||||
#include "Damage.h"
|
#include "Damage.h"
|
||||||
@@ -23,7 +23,7 @@ class Player: public Damageable, public Targetable{
|
|||||||
MTGPlayerCards * game;
|
MTGPlayerCards * game;
|
||||||
int testLife();
|
int testLife();
|
||||||
int afterDamage();
|
int afterDamage();
|
||||||
Player(MTGPlayerCards * _deck, char * deckFile);
|
Player(MTGPlayerCards * _deck, string deckFile);
|
||||||
virtual ~Player();
|
virtual ~Player();
|
||||||
void unTapPhase();
|
void unTapPhase();
|
||||||
MTGInPlay * inPlay();
|
MTGInPlay * inPlay();
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#define OutputDebugString(val) (std::cerr << val);
|
#define OutputDebugString(val) (std::cerr << val);
|
||||||
#else
|
#else
|
||||||
#define OutputDebugString(val)
|
#define OutputDebugString(val) {}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
const char * const MTG_LAND_TEXTS[] = {"artifact","forest","island","mountain","swamp","plains","other lands"};
|
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();
|
potentialMana = NEW ManaCost();
|
||||||
nextCardToPlay = NULL;
|
nextCardToPlay = NULL;
|
||||||
stats = NULL;
|
stats = NULL;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#include "../include/CardGui.h"
|
#include "../include/CardGui.h"
|
||||||
#include "../include/MTGDeck.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();
|
GameObserver * game = GameObserver::GetInstance();
|
||||||
for (int i = 0; i < 2 ; i++){
|
for (int i = 0; i < 2 ; i++){
|
||||||
for (int j = 0; j < game->players[i]->game->inPlay->nb_cards; j++){
|
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;
|
deckFile = file;
|
||||||
game = _deck;
|
game = _deck;
|
||||||
game->setOwner(this);
|
game->setOwner(this);
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
|||||||
#endif
|
#endif
|
||||||
cd = NEW CardDescriptor();
|
cd = NEW CardDescriptor();
|
||||||
while(attributes.size()){
|
while(attributes.size()){
|
||||||
int found2 = attributes.find(";");
|
unsigned int found2 = attributes.find(";");
|
||||||
string attribute;
|
string attribute;
|
||||||
if (found2 != string::npos){
|
if (found2 != string::npos){
|
||||||
attribute = attributes.substr(0,found2);
|
attribute = attributes.substr(0,found2);
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ MTGCardInstance * TestSuite::getCardByMTGId(int mtgid){
|
|||||||
Interruptible * TestSuite::getActionByMTGId(int mtgid){
|
Interruptible * TestSuite::getActionByMTGId(int mtgid){
|
||||||
ActionStack * as= GameObserver::GetInstance()->mLayers->stackLayer();
|
ActionStack * as= GameObserver::GetInstance()->mLayers->stackLayer();
|
||||||
Interruptible * action = NULL;
|
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){
|
if (action->source && action->source->getMTGId() == mtgid){
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
@@ -128,7 +128,7 @@ TestSuiteState::TestSuiteState(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TestSuiteState::parsePlayerState(int playerId, string s){
|
void TestSuiteState::parsePlayerState(int playerId, string s){
|
||||||
int limiter = s.find(":");
|
unsigned int limiter = s.find(":");
|
||||||
string areaS;
|
string areaS;
|
||||||
int area;
|
int area;
|
||||||
if (limiter != string::npos){
|
if (limiter != string::npos){
|
||||||
@@ -148,10 +148,12 @@ void TestSuiteState::parsePlayerState(int playerId, string s){
|
|||||||
SAFE_DELETE(playerData[playerId].manapool);
|
SAFE_DELETE(playerData[playerId].manapool);
|
||||||
playerData[playerId].manapool = ManaCost::parseManaCost(s.substr(limiter+1));
|
playerData[playerId].manapool = ManaCost::parseManaCost(s.substr(limiter+1));
|
||||||
return;
|
return;
|
||||||
|
}else{
|
||||||
|
return; // ERROR
|
||||||
}
|
}
|
||||||
s = s.substr(limiter+1);
|
s = s.substr(limiter+1);
|
||||||
while (s.size()){
|
while (s.size()){
|
||||||
int value;
|
unsigned int value;
|
||||||
limiter = s.find(",");
|
limiter = s.find(",");
|
||||||
if (limiter != string::npos){
|
if (limiter != string::npos){
|
||||||
value = atoi(s.substr(0,limiter).c_str());
|
value = atoi(s.substr(0,limiter).c_str());
|
||||||
|
|||||||
Reference in New Issue
Block a user