X11 build fixups
- fixed -Werror=misleading-indentation warning - fixed -Werror=nonnull-compare warning on xll and QT builds - PNG_LIBPNG_VER backward compatibily changes - giflib backward compatibily changes - resolved some undefs for X11 build - silenced some small compile warnings in JGE Makefile - added -DTIXML_USE_STL to remaining build types (PSP had it added) - fixed x11 Boost incompatibility issue part of #548 - reworked PrecompiledHeader.h platforms used
This commit is contained in:
@@ -59,7 +59,6 @@ endif
|
||||
|
||||
ifeq ($(TARGET_ARCHITECTURE),psp)
|
||||
DEFAULT_RULE = 3xx
|
||||
TARGET_ARCHITECTURE = psp
|
||||
PSP_FW_VERSION=371
|
||||
BUILD_PRX = 1
|
||||
SIGN_PRX = 1
|
||||
@@ -74,19 +73,33 @@ PSP_EBOOT_PIC1 = pic1.png
|
||||
INCDIR = ../../JGE/include ../../JGE/src/zipFS ../../JGE/include/psp ../../JGE/include/psp/freetype2 ../../JGE/src ../../projects/mtg/include ../../Boost
|
||||
LIBDIR = ../../JGE/lib/psp
|
||||
CFLAGS = -O2 -G0 -DPSPFW3XX -DDEVHOOK -DUSE_PRECOMPILED_HEADERS=1 -DPSP -DTIXML_USE_STL
|
||||
endif
|
||||
ifeq ($(MAKECMDGOALS),x11)
|
||||
|
||||
OBJS += objs/TestSuiteAI.o
|
||||
INCDIR = -I../../JGE/include -I../../JGE/src -I/usr/X11/include -I../../projects/mtg/include -I/usr/include/boost -I../../JGE/src/zipFS
|
||||
LIBDIR = -L../../JGE/lib/linux -L../../JGE -L/usr/X11/lib
|
||||
LIBS = -ljge -lfreetype -ljpeg -lgif -lpng -lz -lm -lstdc++ -lhgetools -lGL -lGLU -lX11 -lpthread $(FMOD)
|
||||
CFLAGS = $(INCDIR) -DLINUX -DUSE_PRECOMPILED_HEADERS=1 -DTIXML_USE_STL
|
||||
|
||||
ASFLAGS = $(CXXFLAGS)
|
||||
|
||||
all: $(DEFAULT_RULE)
|
||||
else
|
||||
|
||||
OBJS += objs/TestSuiteAI.o
|
||||
INCDIR = -I../../JGE/include -I../../JGE/src -I/usr/X11/include -I../../projects/mtg/include -I../../Boost -I../../JGE/src/zipFS
|
||||
LIBDIR = -L../../JGE/lib/linux -L../../JGE -L/usr/X11/lib -L../../Boost/lib
|
||||
LIBS = -ljge -lfreetype -ljpeg -lgif -lpng -lz -lm -lstdc++ -lhgetools -lGL -lGLU -lX11 -lboost_thread $(FMOD)
|
||||
CFLAGS = $(INCDIR) -DLINUX -DUSE_PRECOMPILED_HEADERS=1
|
||||
|
||||
ASFLAGS = $(CXXFLAGS)
|
||||
|
||||
all: $(DEFAULT_RULE)
|
||||
|
||||
endif
|
||||
|
||||
CFLAGS := -Wall -W -Werror -Wno-unused $(CFLAGS)
|
||||
CFLAGS := -Wall -W -Werror -Wno-unused -Wno-deprecated-declarations -Wno-nonnull-compare $(CFLAGS)
|
||||
CXXFLAGS += $(CFLAGS)
|
||||
# -fno-exceptions
|
||||
|
||||
@@ -110,8 +123,6 @@ debug: all
|
||||
|
||||
else
|
||||
|
||||
|
||||
|
||||
$(TARGET): Makefile.$(TARGET_ARCHITECTURE) $(OBJS) ../../JGE/lib/linux/libjge.a
|
||||
$(CXX) -o $(TARGET) $(OBJS) $(LIBS) $(LIBDIR)
|
||||
|
||||
|
||||
@@ -6636,7 +6636,7 @@ public:
|
||||
else
|
||||
source->removeptbonus(PowerModifier * (nbOpponents - MaxOpponent),ToughnessModifier * (nbOpponents - MaxOpponent));
|
||||
|
||||
nbOpponents = 0;
|
||||
nbOpponents = 0;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
@@ -6659,8 +6659,8 @@ public:
|
||||
int receiveEvent(WEvent * event)
|
||||
{
|
||||
WEventZoneChange * enters = dynamic_cast<WEventZoneChange *> (event);
|
||||
if (enters && enters->to == enters->card->controller()->game->inPlay)
|
||||
if(enters->from != enters->card->controller()->game->inPlay && enters->from != enters->card->controller()->opponent()->game->inPlay) //cards changing from inplay to inplay don't re-enter battlefield
|
||||
if (enters && enters->to == enters->card->controller()->game->inPlay) {
|
||||
if(enters->from != enters->card->controller()->game->inPlay && enters->from != enters->card->controller()->opponent()->game->inPlay) { //cards changing from inplay to inplay don't re-enter battlefield
|
||||
if(enters->card->controller() == source->controller() && enters->card->isCreature())
|
||||
{
|
||||
if(enters->card != source && (enters->card->power > source->power || enters->card->toughness > source->toughness))
|
||||
@@ -6668,7 +6668,9 @@ public:
|
||||
source->counters->addCounter(1,1);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
AEvolveAbility * clone() const
|
||||
|
||||
@@ -7974,78 +7974,78 @@ int AACastCard::resolveSpell()
|
||||
if (_target->isLand())
|
||||
putinplay = true;
|
||||
|
||||
Spell * spell = NULL;
|
||||
MTGCardInstance * copy = NULL;
|
||||
if ((normal || asNormalMadness)||(!_target->hasType(Subtypes::TYPE_INSTANT) && !_target->hasType(Subtypes::TYPE_SORCERY)))
|
||||
Spell * spell = NULL;
|
||||
MTGCardInstance * copy = NULL;
|
||||
if ((normal || asNormalMadness)||(!_target->hasType(Subtypes::TYPE_INSTANT) && !_target->hasType(Subtypes::TYPE_SORCERY)))
|
||||
{
|
||||
if (putinplay && (_target->hasType(Subtypes::TYPE_ARTIFACT)||_target->hasType(Subtypes::TYPE_CREATURE)||_target->hasType(Subtypes::TYPE_ENCHANTMENT)||_target->hasType(Subtypes::TYPE_PLANESWALKER)))
|
||||
copy =_target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->battlefield,noEvent);
|
||||
else
|
||||
copy =_target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->stack,noEvent);
|
||||
copy->changeController(source->controller(),true);
|
||||
if(asNormalMadness)
|
||||
copy->MadnessPlay = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (putinplay && (_target->hasType(Subtypes::TYPE_ARTIFACT)||_target->hasType(Subtypes::TYPE_CREATURE)||_target->hasType(Subtypes::TYPE_ENCHANTMENT)||_target->hasType(Subtypes::TYPE_PLANESWALKER)))
|
||||
copy =_target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->battlefield,noEvent);
|
||||
else
|
||||
copy =_target->controller()->game->putInZone(_target, _target->currentZone, _target->controller()->game->stack,noEvent);
|
||||
copy->changeController(source->controller(),true);
|
||||
}
|
||||
if (game->targetChooser)
|
||||
{
|
||||
game->targetChooser->Owner = source->controller();
|
||||
if(putinplay)
|
||||
{
|
||||
if (putinplay && (_target->hasType(Subtypes::TYPE_ARTIFACT)||_target->hasType(Subtypes::TYPE_CREATURE)||_target->hasType(Subtypes::TYPE_ENCHANTMENT)||_target->hasType(Subtypes::TYPE_PLANESWALKER)))
|
||||
copy =_target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->battlefield,noEvent);
|
||||
else
|
||||
copy =_target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->stack,noEvent);
|
||||
copy->changeController(source->controller(),true);
|
||||
if(asNormalMadness)
|
||||
copy->MadnessPlay = true;
|
||||
spell = NEW Spell(game, 0,copy,game->targetChooser,NULL, 1);
|
||||
spell->resolve();
|
||||
}
|
||||
else
|
||||
spell = game->mLayers->stackLayer()->addSpell(copy, game->targetChooser, NULL, 1, 0);
|
||||
game->targetChooser = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(putinplay)
|
||||
{
|
||||
spell = NEW Spell(game, 0,copy,NULL,NULL, 1);
|
||||
spell->resolve();
|
||||
}
|
||||
else
|
||||
spell = game->mLayers->stackLayer()->addSpell(copy, NULL, NULL, 1, 0);
|
||||
}
|
||||
|
||||
if (copy->has(Constants::STORM))
|
||||
{
|
||||
int storm = _target->controller()->game->stack->seenThisTurn("*", Constants::CAST_ALL) + source->controller()->opponent()->game->stack->seenThisTurn("*", Constants::CAST_ALL);
|
||||
|
||||
for (int i = storm; i > 1; i--)
|
||||
{
|
||||
spell = game->mLayers->stackLayer()->addSpell(copy, NULL, 0, 1, 1);
|
||||
|
||||
}
|
||||
}
|
||||
if (!copy->has(Constants::STORM))
|
||||
{
|
||||
copy->X = _target->X;
|
||||
copy->castX = copy->X;
|
||||
}
|
||||
if(andAbility)
|
||||
{
|
||||
MTGAbility * andAbilityClone = andAbility->clone();
|
||||
andAbilityClone->target = copy;
|
||||
if(andAbility->oneShot)
|
||||
{
|
||||
andAbilityClone->resolve();
|
||||
SAFE_DELETE(andAbilityClone);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (putinplay && (_target->hasType(Subtypes::TYPE_ARTIFACT)||_target->hasType(Subtypes::TYPE_CREATURE)||_target->hasType(Subtypes::TYPE_ENCHANTMENT)||_target->hasType(Subtypes::TYPE_PLANESWALKER)))
|
||||
copy =_target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->battlefield,noEvent);
|
||||
else
|
||||
copy =_target->controller()->game->putInZone(_target, _target->currentZone, _target->controller()->game->stack,noEvent);
|
||||
copy->changeController(source->controller(),true);
|
||||
}
|
||||
if (game->targetChooser)
|
||||
{
|
||||
game->targetChooser->Owner = source->controller();
|
||||
if(putinplay)
|
||||
{
|
||||
spell = NEW Spell(game, 0,copy,game->targetChooser,NULL, 1);
|
||||
spell->resolve();
|
||||
}
|
||||
else
|
||||
spell = game->mLayers->stackLayer()->addSpell(copy, game->targetChooser, NULL, 1, 0);
|
||||
game->targetChooser = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(putinplay)
|
||||
{
|
||||
spell = NEW Spell(game, 0,copy,NULL,NULL, 1);
|
||||
spell->resolve();
|
||||
}
|
||||
else
|
||||
spell = game->mLayers->stackLayer()->addSpell(copy, NULL, NULL, 1, 0);
|
||||
}
|
||||
|
||||
if (copy->has(Constants::STORM))
|
||||
{
|
||||
int storm = _target->controller()->game->stack->seenThisTurn("*", Constants::CAST_ALL) + source->controller()->opponent()->game->stack->seenThisTurn("*", Constants::CAST_ALL);
|
||||
|
||||
for (int i = storm; i > 1; i--)
|
||||
{
|
||||
spell = game->mLayers->stackLayer()->addSpell(copy, NULL, 0, 1, 1);
|
||||
|
||||
}
|
||||
}
|
||||
if (!copy->has(Constants::STORM))
|
||||
{
|
||||
copy->X = _target->X;
|
||||
copy->castX = copy->X;
|
||||
}
|
||||
if(andAbility)
|
||||
{
|
||||
MTGAbility * andAbilityClone = andAbility->clone();
|
||||
andAbilityClone->target = copy;
|
||||
if(andAbility->oneShot)
|
||||
{
|
||||
andAbilityClone->resolve();
|
||||
SAFE_DELETE(andAbilityClone);
|
||||
}
|
||||
else
|
||||
{
|
||||
andAbilityClone->addToGame();
|
||||
}
|
||||
andAbilityClone->addToGame();
|
||||
}
|
||||
}
|
||||
|
||||
this->forceDestroy = true;
|
||||
processed = true;
|
||||
|
||||
@@ -45,7 +45,7 @@ CardPrimitive::CardPrimitive(CardPrimitive * source)
|
||||
|
||||
for (size_t i = 0; i < source->types.size(); ++i)
|
||||
types.push_back(source->types[i]);
|
||||
colors = source->colors;
|
||||
colors = source->colors;
|
||||
manaCost.copy(source->getManaCost());
|
||||
//reducedCost.copy(source->getReducedManaCost());
|
||||
//increasedCost.copy(source->getIncreasedManaCost());
|
||||
|
||||
@@ -305,8 +305,8 @@ void GuiMana::Render()
|
||||
for (vector<ManaIcon*>::iterator it = manas.begin(); it != manas.end(); ++it)
|
||||
(*it)->Render();
|
||||
|
||||
if (OptionManaDisplay::DYNAMIC != options[Options::MANADISPLAY].number && OptionManaDisplay::NOSTARSDYNAMIC != options[Options::MANADISPLAY].number )
|
||||
RenderStatic();
|
||||
if (OptionManaDisplay::DYNAMIC != options[Options::MANADISPLAY].number && OptionManaDisplay::NOSTARSDYNAMIC != options[Options::MANADISPLAY].number )
|
||||
RenderStatic();
|
||||
}
|
||||
|
||||
bool remove_dead(ManaIcon* m)
|
||||
|
||||
@@ -5371,7 +5371,7 @@ int ActivatedAbility::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
|
||||
case OPPONENT_TURN_ONLY:
|
||||
if (player == game->currentPlayer)
|
||||
return 0;
|
||||
break;
|
||||
break;
|
||||
case AS_SORCERY:
|
||||
if (player != game->currentPlayer)
|
||||
return 0;
|
||||
@@ -5543,7 +5543,7 @@ int ActivatedAbility::activateAbility()
|
||||
ExtraCost * tapper = dynamic_cast<TapCost*>(cost->extraCosts->costs[i]);
|
||||
if(tapper)
|
||||
needsTapping = 1;
|
||||
wasTappedForMana = true;
|
||||
wasTappedForMana = true;
|
||||
}
|
||||
}
|
||||
else if(amp||femp)
|
||||
|
||||
@@ -2316,7 +2316,7 @@ int MTGBlockRule::reactToClick(MTGCardInstance * card)
|
||||
|
||||
if(lured && currentOpponent && !currentOpponent->has(Constants::LURE))
|
||||
currentOpponent = game->currentPlayer->game->inPlay->getNextLurer(currentOpponent);
|
||||
canDefend = card->toggleDefenser(currentOpponent);
|
||||
canDefend = card->toggleDefenser(currentOpponent);
|
||||
|
||||
DebugTrace("Defenser Toggle: " << card->getName() << endl
|
||||
<< "- canDefend: " << (canDefend == 0) << endl
|
||||
|
||||
@@ -43,6 +43,10 @@ public:
|
||||
mCurrentCard(0)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~CardZone()
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
**
|
||||
|
||||
@@ -9,6 +9,7 @@ unix:!*macx*:QMAKE_CXXFLAGS += -Wno-unused-but-set-variable
|
||||
unix|*macx*:QMAKE_CXXFLAGS += -Wno-unused-value
|
||||
unix:!*macx*:QMAKE_CXXFLAGS += -Wno-unused-local-typedefs
|
||||
unix:!*macx*:!maemo5:!symbian:QMAKE_CXXFLAGS += -Werror
|
||||
unix|macx:QMAKE_CXXFLAGS += -Wno-nonnull-compare
|
||||
|
||||
windows:DEFINES += _CRT_SECURE_NO_WARNINGS
|
||||
windows|winrt:DEFINES += NOMINMAX
|
||||
|
||||
Reference in New Issue
Block a user