Merge branch 'master' into wp8
This commit is contained in:
33
.travis.yml
33
.travis.yml
@@ -1,17 +1,24 @@
|
||||
language: cpp
|
||||
before_install:
|
||||
- export PSPDEV="$TRAVIS_BUILD_DIR/opt/pspsdk"
|
||||
- export PSPSDK="$PSPDEV/psp/sdk"
|
||||
- export PATH="$PATH:$PSPDEV/bin:$PSPSDK/bin"
|
||||
- export ANDROID="android-sdk-linux/tools/android"
|
||||
- export PSPDEV="$TRAVIS_BUILD_DIR/opt/pspsdk"
|
||||
- export PSPSDK="$PSPDEV/psp/sdk"
|
||||
- export PATH="$PATH:$PSPDEV/bin:$PSPSDK/bin"
|
||||
- export ANDROID="android-sdk-linux/tools/android"
|
||||
install:
|
||||
- sudo apt-get update -qq
|
||||
- if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch; fi
|
||||
- wget -O sdk.lzma http://sourceforge.net/projects/minpspw/files/SDK%20%2B%20devpak/pspsdk%200.11.2/minpspw_0.11.2-amd64.tar.lzma/download
|
||||
- tar -x --xz -f sdk.lzma
|
||||
- wget http://dl.google.com/android/ndk/android-ndk-r9-linux-x86_64.tar.bz2 -nv
|
||||
- wget http://dl.google.com/android/android-sdk_r22-linux.tgz -nv
|
||||
- tar --absolute-names -jxf android-ndk-r9-linux-x86_64.tar.bz2
|
||||
- tar -zxf android-sdk_r22-linux.tgz
|
||||
- echo yes | $ANDROID update sdk --filter 1,2,3,8 --no-ui --force > log.txt
|
||||
- sudo apt-get update -qq
|
||||
- if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch jq; fi
|
||||
- wget -O sdk.lzma http://sourceforge.net/projects/minpspw/files/SDK%20%2B%20devpak/pspsdk%200.11.2/minpspw_0.11.2-amd64.tar.lzma/download
|
||||
- tar -x --xz -f sdk.lzma
|
||||
- wget http://dl.google.com/android/ndk/android-ndk-r9-linux-x86_64.tar.bz2 -nv
|
||||
- wget http://dl.google.com/android/android-sdk_r22-linux.tgz -nv
|
||||
- tar --absolute-names -jxf android-ndk-r9-linux-x86_64.tar.bz2
|
||||
- tar -zxf android-sdk_r22-linux.tgz
|
||||
- $ANDROID list sdk -a
|
||||
- echo yes | $ANDROID update sdk -a --filter 1,2,4,18 --no-ui --force > log.txt
|
||||
- sudo pip install pyjavaproperties
|
||||
script: ./travis-script.sh
|
||||
env:
|
||||
global:
|
||||
secure: YocijVYZa1oDPviFubPIpmBmXyw0gQ7D0YA6tC01wExXvY+8tGUh1HQ5uXn8LotRZ+Ob5HLHDaCzkKWF8+57ILSMeHrnf6tcRyyeO7wjNY9P7WvSZyCjvqnWzsUN9tiMmsEzhTz2MaUgsY6ocB/4nbWZwfQvL7z+s7z41R4J1I4=
|
||||
script: "./travis-script.sh"
|
||||
after_success: ./upload-binaries.sh
|
||||
|
||||
@@ -126,7 +126,7 @@ JFileSystem::JFileSystem(const string & _userPath, const string & _systemPath)
|
||||
DebugTrace("User path " << userPath);
|
||||
#elif defined (QT_CONFIG)
|
||||
|
||||
QDir sysDir("projects/mtg/bin/Res");
|
||||
QDir sysDir(RESDIR);
|
||||
QDir dir(QDir::homePath());
|
||||
dir.mkdir(USERDIR);
|
||||
dir.cd(USERDIR);
|
||||
|
||||
@@ -96,9 +96,8 @@ int main(int argc, char* argv[])
|
||||
options.reloadProfile();
|
||||
TestSuite testSuite("test/_tests.txt");
|
||||
result = testSuite.run();
|
||||
int totalTests = testSuite.nbTests + testSuite.nbAITests;
|
||||
delete wagicCore;
|
||||
DebugTrace("TestSuite done: failed test: " << result << " out of " << totalTests << " total");
|
||||
DebugTrace("TestSuite done: failed test: " << result << " out of " << testSuite.nbTests + testSuite.nbAITests << " total");
|
||||
#ifdef CAPTURE_STDERR
|
||||
OutputCapturer::debugAndClear();
|
||||
#endif
|
||||
|
||||
@@ -2561,7 +2561,7 @@ void JRenderer::Enable2D()
|
||||
#if (defined GL_VERSION_ES_CM_1_1) || (defined GL_OES_VERSION_1_1)
|
||||
glOrthof(0.0f, SCREEN_WIDTH_F, 0.0f, SCREEN_HEIGHT_F-1.0f, -1.0f, 1.0f);
|
||||
#else
|
||||
gluOrtho2D(0.0f, SCREEN_WIDTH_F, 0.0f, SCREEN_HEIGHT_F-1.0f);
|
||||
glOrtho(0.0f, SCREEN_WIDTH_F, 0.0f, SCREEN_HEIGHT_F-1.0f, -1.0f, 1.0f);
|
||||
#endif
|
||||
|
||||
glMatrixMode (GL_MODELVIEW); // Select The Modelview Matrix
|
||||
|
||||
@@ -136,6 +136,9 @@ LOCAL_SRC_FILES := $(SDL_PATH)/src/main/android/SDL_android_main.cpp \
|
||||
$(MTG_PATH)/src/WFont.cpp \
|
||||
$(MTG_PATH)/src/WGui.cpp \
|
||||
$(MTG_PATH)/src/WResourceManager.cpp \
|
||||
$(MTG_PATH)/src/DeckView.cpp \
|
||||
$(MTG_PATH)/src/CarouselDeckView.cpp \
|
||||
$(MTG_PATH)/src/GridDeckView.cpp \
|
||||
$(JGE_PATH)/src/SDLmain.cpp \
|
||||
$(JGE_PATH)/src/corewrapper.cpp \
|
||||
$(JGE_PATH)/src/Encoding.cpp \
|
||||
|
||||
@@ -27,7 +27,7 @@ OBJS = objs/InteractiveButton.o objs/AbilityParser.o objs/ActionElement.o\
|
||||
objs/ThisDescriptor.o objs/Token.o objs/Translate.o objs/TranslateKeys.o\
|
||||
objs/Trash.o objs/utils.o objs/WEvent.o objs/WResourceManager.o\
|
||||
objs/WCachedResource.o objs/WDataSrc.o objs/WGui.o objs/WFilter.o objs/Tasks.o\
|
||||
objs/WFont.o
|
||||
objs/WFont.o objs/CarouselDeckView.o objs/GridDeckView.o objs/DeckView.o
|
||||
DEPS = $(patsubst objs/%.o, deps/%.d, $(OBJS))
|
||||
|
||||
RESULT = $(shell psp-config --psp-prefix 2> Makefile.cache)
|
||||
|
||||
@@ -7,10 +7,13 @@ from optparse import OptionParser
|
||||
def createResZipFile(filename):
|
||||
|
||||
utilities = ZipUtilities()
|
||||
rename = False
|
||||
if not os.path.isfile('settings/options.txt'):
|
||||
os.rename('settings/options.orig.txt', 'settings/options.txt')
|
||||
remame = True
|
||||
if not os.path.isfile('player/options.txt'):
|
||||
os.rename('player/options.orig.txt', 'player/options.txt')
|
||||
rename = True
|
||||
|
||||
zip_file = zipfile.ZipFile(filename, 'w', zipfile.ZIP_STORED)
|
||||
utilities.addFolderToZip(zip_file, 'themes')
|
||||
@@ -26,6 +29,10 @@ def createResZipFile(filename):
|
||||
utilities.addFolderToZip(zip_file, 'ai')
|
||||
zip_file.close()
|
||||
|
||||
if rename:
|
||||
os.rename('settings/options.txt', 'settings/options.orig.txt')
|
||||
os.rename('player/options.txt', 'player/options.orig.txt')
|
||||
|
||||
def getFilename():
|
||||
p = Properties();
|
||||
p.load(open('../../build.number.properties'));
|
||||
|
||||
@@ -16,6 +16,7 @@ auto=flashbackrule
|
||||
auto=retracerule
|
||||
auto=suspendrule
|
||||
auto=morphrule
|
||||
auto=playfromgraveyardrule
|
||||
auto=attackrule
|
||||
auto=blockrule
|
||||
auto=combattriggerrule
|
||||
|
||||
@@ -18104,6 +18104,13 @@ mana={3}{R}
|
||||
type=Enchantment
|
||||
[/card]
|
||||
[card]
|
||||
name=Crucible of Worlds
|
||||
auto=lord(land|mygraveyard) CanPlayFromGraveyard
|
||||
text=You may play land cards from your graveyard.
|
||||
mana={3}
|
||||
type=Artifact
|
||||
[/card]
|
||||
[card]
|
||||
name=Crude Rampart
|
||||
abilities=defender
|
||||
facedown={3}
|
||||
@@ -103468,6 +103475,15 @@ mana={1}{B}
|
||||
type=Enchantment
|
||||
[/card]
|
||||
[card]
|
||||
name=Yawgmoth's Will
|
||||
auto=lord(*|mygraveyard) canPlayFromGraveyard
|
||||
auto=emblem transforms((,newability[@movedTo(*|mygraveyard):all(trigger[to]) moveTo(exile)])) ueot
|
||||
auto=moveTo(exile)
|
||||
text=Until end of turn, you may play cards from your graveyard. -- If a card would be put into your graveyard from anywhere this turn, exile that card instead.
|
||||
mana={2}{B}
|
||||
type=Sorcery
|
||||
[/card]
|
||||
[card]
|
||||
name=Yawning Fissure
|
||||
auto=ability$!name(sacrifice land) notatarget(land|mybattlefield) sacrifice!$ opponent
|
||||
text=Each opponent sacrifices a land.
|
||||
|
||||
@@ -3187,19 +3187,6 @@ mana={2}
|
||||
type=Artifact
|
||||
[/card]
|
||||
[card]
|
||||
name=Crucible of Worlds
|
||||
auto={0}:may moveTo(myBattlefield) target(land|mygraveyard) limit:1 myTurnOnly
|
||||
# Above line does not work: "May moveto" from graveyards does
|
||||
# not work due to interface issues. The "limit:1" doesn't work
|
||||
# here either. Even if both worked, then the card would allow
|
||||
# you to play lands *in addition* to the 1 land you can play per
|
||||
# turn. Instead it should just give you the option to play this
|
||||
# 1 land from your hand or your graveyard.
|
||||
text=You may play land cards from your graveyard.
|
||||
mana={3}
|
||||
type=Artifact
|
||||
[/card]
|
||||
[card]
|
||||
name=Cruel Deceiver
|
||||
text={1}: Look at the top card of your library. -- {2}: Reveal the top card of your library. If it's a land card, Cruel Deceiver gains "Whenever Cruel Deceiver deals damage to a creature, destroy that creature" until end of turn. Activate this ability only once each turn.
|
||||
mana={1}{B}
|
||||
|
||||
@@ -249,6 +249,7 @@ curiosity2_i217.txt
|
||||
crimson_kobolds.txt
|
||||
crosis_s_catacombs_1.txt
|
||||
crosis_s_catacombs_2.txt
|
||||
crucible_of_worlds.txt
|
||||
crumble.txt
|
||||
crystal_rod_i172.txt
|
||||
cursed_land1_i188.txt
|
||||
|
||||
26
projects/mtg/bin/Res/test/crucible_of_worlds.txt
Normal file
26
projects/mtg/bin/Res/test/crucible_of_worlds.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
# Testing crucible of worlds (keyword: CANPLAYFROMGRAVEYARD)
|
||||
|
||||
# name=Crucible of Worlds
|
||||
# text=You may play land cards from your graveyard.
|
||||
|
||||
[INIT]
|
||||
FIRSTMAIN
|
||||
[PLAYER1]
|
||||
hand:island,plains
|
||||
inplay:crucible of worlds
|
||||
graveyard:forest,mountain
|
||||
[PLAYER2]
|
||||
[DO]
|
||||
forest
|
||||
# all next lands shouldn't be played
|
||||
island
|
||||
mountain
|
||||
plains
|
||||
[ASSERT]
|
||||
FIRSTMAIN
|
||||
[PLAYER1]
|
||||
inplay:crucible of worlds,forest
|
||||
hand:island,plains
|
||||
graveyard:mountain
|
||||
[PLAYER2]
|
||||
[END]
|
||||
@@ -2,6 +2,7 @@
|
||||
<!-- build.properties should contain the values for major, minor and point -->
|
||||
<property file="build.properties" />
|
||||
<property file="build.number.properties" />
|
||||
<property environment="env"/>
|
||||
|
||||
<path id="groovy.class.path" >
|
||||
<fileset dir="${groovy.dir}" />
|
||||
@@ -76,15 +77,16 @@ Author: Michael Nguyen
|
||||
#define WAGIC_VERSION_MAJOR ${build.major}
|
||||
#define WAGIC_VERSION_MEDIUM ${build.minor}
|
||||
#define WAGIC_VERSION_MINOR ${build.point}
|
||||
#define WAGIC_VERSION_REVISION ${env.TRAVIS_BUILD_NUMBER}
|
||||
|
||||
#define VERSION_DOT(a, b, c) a ##.## b ##.## c
|
||||
#define VERSION_DOT(a, b, c, d) a ##.## b ##.## c ##.## d
|
||||
#define VERSION_WITHOUT_DOT(a, b, c) a ## b ## c
|
||||
#define VERSION_GAME(a, b, c) VERSION_DOT(a, b, c)
|
||||
#define VERSION_GAME(a, b, c, d) VERSION_DOT(a, b, c, d)
|
||||
#define VERSION_FILE(a, b, c) VERSION_WITHOUT_DOT(a, b, c)
|
||||
#define VERSION_TOSTRING(a) #a
|
||||
#define VERSION_STRINGIFY(a) VERSION_TOSTRING(a)
|
||||
|
||||
#define WAGIC_VERSION VERSION_GAME(WAGIC_VERSION_MAJOR, WAGIC_VERSION_MEDIUM, WAGIC_VERSION_MINOR)
|
||||
#define WAGIC_VERSION VERSION_GAME(WAGIC_VERSION_MAJOR, WAGIC_VERSION_MEDIUM, WAGIC_VERSION_MINOR, WAGIC_VERSION_REVISION)
|
||||
#define WAGIC_RESOURCE_VERSION VERSION_FILE(WAGIC_VERSION_MAJOR, WAGIC_VERSION_MEDIUM, WAGIC_VERSION_MINOR)
|
||||
#define WAGIC_VERSION_STRING VERSION_STRINGIFY(WAGIC_VERSION)
|
||||
#define WAGIC_CORE_VERSION_STRING "core_" VERSION_STRINGIFY(WAGIC_RESOURCE_VERSION)
|
||||
|
||||
@@ -2608,7 +2608,8 @@ public:
|
||||
|
||||
int removed(MTGCardInstance * card)
|
||||
{
|
||||
if (abilities.find(card) != abilities.end() && !(forceDestroy == -1 && forcedAlive == 1))//only embelms have forcedestroy = -1 and forcedalive = 1
|
||||
if (abilities.find(card) != abilities.end()
|
||||
&& !(forceDestroy == -1 && forcedAlive == 1)) //only embelms have forcedestroy = -1 and forcedalive = 1
|
||||
{
|
||||
game->removeObserver(abilities[card]);
|
||||
abilities.erase(card);
|
||||
|
||||
@@ -33,7 +33,7 @@ protected:
|
||||
/*
|
||||
** Tries to render the Big version of a card picture, backups to text version in case of failure
|
||||
*/
|
||||
static void RenderBig(MTGCard * card, const Pos& pos);
|
||||
static void RenderBig(MTGCard * card, const Pos& pos, bool thumb = false);
|
||||
|
||||
static void RenderCountersBig(MTGCard * card, const Pos& pos, int drawMode = DrawMode::kNormal);
|
||||
static void AlternateRender(MTGCard * card, const Pos& pos);
|
||||
@@ -55,8 +55,8 @@ public:
|
||||
virtual void Render();
|
||||
virtual void Update(float dt);
|
||||
|
||||
void DrawCard(const Pos& inPosition, int inMode = DrawMode::kNormal);
|
||||
static void DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode = DrawMode::kNormal);
|
||||
void DrawCard(const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false);
|
||||
static void DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false);
|
||||
|
||||
static JQuadPtr AlternateThumbQuad(MTGCard * card);
|
||||
virtual ostream& toString(ostream&) const;
|
||||
|
||||
42
projects/mtg/include/CarouselDeckView.h
Normal file
42
projects/mtg/include/CarouselDeckView.h
Normal file
@@ -0,0 +1,42 @@
|
||||
#ifndef _CAROUSEL_DECK_VIEW_H_
|
||||
#define _CAROUSEL_DECK_VIEW_H_
|
||||
|
||||
#include "DeckView.h"
|
||||
#include "Easing.h"
|
||||
|
||||
class CarouselDeckView : public DeckView
|
||||
{
|
||||
private:
|
||||
static const float max_scale;
|
||||
static const float x_center;
|
||||
static const float right_border;
|
||||
static const float slide_animation_duration;
|
||||
|
||||
public:
|
||||
CarouselDeckView();
|
||||
virtual ~CarouselDeckView();
|
||||
void Reset();
|
||||
|
||||
void UpdateViewState(float dt);
|
||||
void UpdateCardPosition(CardRep &rep, int index);
|
||||
void renderCard(int index)
|
||||
{
|
||||
int alpha = (int) (255 * (getCardRep(index).scale + 1.0 - max_scale));
|
||||
DeckView::renderCard(index, alpha);
|
||||
}
|
||||
|
||||
void Render();
|
||||
|
||||
MTGCard * Click(int x, int y);
|
||||
|
||||
void changePosition(int offset);
|
||||
void changeFilter(int offset);
|
||||
|
||||
MTGCard *getActiveCard();
|
||||
private:
|
||||
float mScrollOffset, mSlideOffset;
|
||||
InOutQuadEasing mScrollEasing;
|
||||
InOutQuadEasing mSlideEasing;
|
||||
};
|
||||
|
||||
#endif //_CAROUSEL_DECK_VIEW_H_
|
||||
63
projects/mtg/include/DeckView.h
Normal file
63
projects/mtg/include/DeckView.h
Normal file
@@ -0,0 +1,63 @@
|
||||
#ifndef _DECK_VIEW_H_
|
||||
#define _DECK_VIEW_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "MTGCard.h"
|
||||
#include "DeckDataWrapper.h"
|
||||
#include "WFont.h"
|
||||
#include "WResourceManager.h"
|
||||
#include "Pos.h"
|
||||
|
||||
|
||||
class DeckView
|
||||
{
|
||||
protected:
|
||||
static const float no_user_activity_show_card_delay;
|
||||
|
||||
public:
|
||||
struct CardRep{
|
||||
float x;
|
||||
float y;
|
||||
float scale;
|
||||
MTGCard * card;
|
||||
};
|
||||
|
||||
bool dirtyFilters;
|
||||
bool dirtyCardPos;
|
||||
|
||||
DeckView(int numberOfCards);
|
||||
virtual ~DeckView();
|
||||
virtual void Reset();
|
||||
|
||||
//advances the view and card representations
|
||||
void Update(float dt);
|
||||
virtual void SetDeck(DeckDataWrapper *toShow);
|
||||
DeckDataWrapper *deck();
|
||||
void SwitchFilter(int delta);
|
||||
void SwitchPosition(int delta);
|
||||
int filter();
|
||||
void reloadIndexes();
|
||||
int getPosition();
|
||||
|
||||
virtual void Render() = 0;
|
||||
virtual MTGCard * Click(int x, int y) = 0;
|
||||
bool ButtonPressed(Buttons button);
|
||||
virtual MTGCard *getActiveCard() = 0;
|
||||
virtual void changePosition(int offset) = 0;
|
||||
virtual void changeFilter(int offset) = 0;
|
||||
protected:
|
||||
float last_user_activity;
|
||||
int mFilter;
|
||||
DeckDataWrapper *mCurrentDeck;
|
||||
vector<CardRep> mCards;
|
||||
|
||||
CardRep& getCardRep(unsigned int index);
|
||||
void renderCard(int index, int alpha, bool asThumbnail = false);
|
||||
int getCardIndexNextTo(int x, int y);
|
||||
private:
|
||||
virtual void UpdateViewState(float dt) = 0;
|
||||
virtual void UpdateCardPosition(CardRep& rep, int index) = 0;
|
||||
};
|
||||
|
||||
#endif // _DECK_VIEW_H_
|
||||
201
projects/mtg/include/Easing.h
Normal file
201
projects/mtg/include/Easing.h
Normal file
@@ -0,0 +1,201 @@
|
||||
#ifndef _EASING_H_
|
||||
#define _EASING_H_
|
||||
|
||||
/*! \brief A class for eased floats for use in animations
|
||||
*
|
||||
* Animations often defines values a floating point variable
|
||||
* should have at given times and interpolates between them to
|
||||
* calculate the value of that variable at any given intermediate
|
||||
* time step.
|
||||
*
|
||||
* The simplest case would be linear interpolation:
|
||||
* Suppose a float "position" should be a at time = 0 and
|
||||
* b at time = x. If the current time is y, the value of
|
||||
* "position" is then a + (b-a)*y/x.
|
||||
*
|
||||
* This class defines the interface needed to implement different
|
||||
* kind of interpolations with a common interface. See
|
||||
* http://www.gizma.com/easing/ for more information for a few
|
||||
* examples.
|
||||
*/
|
||||
class Easing
|
||||
{
|
||||
public:
|
||||
/*! \brief The value at the start of an animation.
|
||||
*
|
||||
* start_value is undefined if no animation is running.
|
||||
*/
|
||||
float start_value;
|
||||
|
||||
/*! \brief The amount the value should change during the animation.
|
||||
*
|
||||
* delta_value is undefined if no animation is running.
|
||||
*/
|
||||
float delta_value;
|
||||
|
||||
/*! \brief The current value.
|
||||
*
|
||||
* Use this member to read the value or to write the value without
|
||||
* to animate intermediate values and. Make sure that the easing
|
||||
* is not used once value is deleted.
|
||||
*/
|
||||
float& value;
|
||||
|
||||
/*! \brief The duration the animation should take
|
||||
*
|
||||
* It is not relevant which unit is used. This value is undefined
|
||||
* if no animation is running.
|
||||
*/
|
||||
float duration;
|
||||
|
||||
/*! \brief The accumulated time the animation did run until now.
|
||||
*
|
||||
* It is not relevant which unit is used. This values is undefined
|
||||
* if no animation is running.
|
||||
*/
|
||||
float time_acc;
|
||||
|
||||
/*! \brief Sets Easing::float to val and sets the animation as not running.
|
||||
*
|
||||
* Make sure that the easing is not used once value is deleted.
|
||||
*
|
||||
* \param val The value to ease
|
||||
*/
|
||||
Easing(float& val): start_value(val), delta_value(0), value(val), duration(0), time_acc(0)
|
||||
{
|
||||
}
|
||||
|
||||
/*! \brief Resets the animation to its initial value
|
||||
*
|
||||
* This method does set the value to the start value and sets the passed time to 0.
|
||||
* If there is no animation animation running, the resulting value is undefined.
|
||||
*/
|
||||
void reset()
|
||||
{
|
||||
value = start_value;
|
||||
time_acc = 0;
|
||||
}
|
||||
|
||||
/*! \brief Finishes the animation immediately
|
||||
*
|
||||
* Sets the value to the animations target value and the passed time to the
|
||||
* animations duration. If there is no animation running, the behaviour is undefined.
|
||||
*/
|
||||
void finish()
|
||||
{
|
||||
value = start_value + delta_value;
|
||||
time_acc = duration;
|
||||
}
|
||||
|
||||
/*! \brief Lets dt time pass
|
||||
*
|
||||
* Advances the animation by dt time units and updates the value accordingly.
|
||||
*
|
||||
* \val dt The amount of time to jump forward
|
||||
*/
|
||||
void update(float dt)
|
||||
{
|
||||
if(duration > 0)
|
||||
{
|
||||
time_acc += dt;
|
||||
|
||||
if(time_acc > duration)
|
||||
{
|
||||
time_acc = duration;
|
||||
value = start_value + delta_value;
|
||||
}
|
||||
else
|
||||
{
|
||||
updateValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*! \brief Calculates the value from all other members.
|
||||
*
|
||||
* This method gets implemented by all specific easing classes.
|
||||
*/
|
||||
virtual void updateValue() = 0;
|
||||
|
||||
/*! \brief Starts the animation.
|
||||
*
|
||||
* Starts the interpolation from the current value (now) to
|
||||
* targetValue (in now + _duration).
|
||||
*
|
||||
* If the animation is currently running, it gets replaced.
|
||||
*
|
||||
* \param targetValue The value to interpolate to
|
||||
* \param _duration The duration the interpolation should take
|
||||
*/
|
||||
void start(float targetValue, float _duration)
|
||||
{
|
||||
start_value = value;
|
||||
delta_value = targetValue - start_value;
|
||||
time_acc = 0;
|
||||
duration = _duration;
|
||||
}
|
||||
|
||||
/*! \brief Translates the current value and the target value by delta_value
|
||||
*
|
||||
* This method is mainly used for trickery. Suppose there is one object in the
|
||||
* middle of the screen that should move to the top until it is outside of the
|
||||
* screen and gets replaced by a second one entering the screen from the lower
|
||||
* side once the first one disappeared. This method can be used to simulate this
|
||||
* effect with one animation by translating (i.e. moving) the animation from the
|
||||
* top to the bottom:
|
||||
*
|
||||
* Object1 and object2 are the same object: object1 whose y position is bound to value
|
||||
* To start the transition, use start(SCREEN_HEIGHT, desired time); Once the first
|
||||
* object left the screen (i.e. object.y < 0), change objects appearance to object2
|
||||
* and translate the easing by (SCREEN_HEIGHT).
|
||||
*
|
||||
* \param delta_value The change in start_value and value
|
||||
*/
|
||||
void translate(float delta_value)
|
||||
{
|
||||
start_value += delta_value;
|
||||
value += delta_value;
|
||||
}
|
||||
|
||||
/*! \brief Returns if the passed time exceeds duration.
|
||||
*
|
||||
* If ther is no animation running, it is ensured that this is true.
|
||||
*/
|
||||
bool finished()
|
||||
{
|
||||
return time_acc >= duration;
|
||||
}
|
||||
};
|
||||
|
||||
/*! \brief This class defines an easing with quadratic acceleration and decceleration.
|
||||
*/
|
||||
class InOutQuadEasing : public Easing
|
||||
{
|
||||
public:
|
||||
/*! \brief Calls Easing::Easing(val).
|
||||
*
|
||||
* \see Easing::Easing(float& val)
|
||||
*/
|
||||
InOutQuadEasing(float& val): Easing(val) {}
|
||||
|
||||
/*! \brief Implements the value calculation.
|
||||
*
|
||||
* \see Easing::updateValue()
|
||||
*/
|
||||
void updateValue()
|
||||
{
|
||||
float time_tmp = (time_acc * 2) / duration;
|
||||
if (time_tmp < 1)
|
||||
{
|
||||
value = (float)(delta_value * 0.5 * time_tmp * time_tmp + start_value);
|
||||
}
|
||||
else
|
||||
{
|
||||
time_tmp -= 1;
|
||||
value = (float)(- delta_value * 0.5 * (time_tmp * (time_tmp - 2) - 1) + start_value);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif //_EASING_H_
|
||||
@@ -19,22 +19,7 @@
|
||||
#include "WGui.h"
|
||||
#include "InteractiveButton.h"
|
||||
|
||||
#define NO_USER_ACTIVITY_HELP_DELAY 10
|
||||
#define NO_USER_ACTIVITY_SHOWCARD_DELAY 0.1
|
||||
|
||||
enum
|
||||
{
|
||||
STAGE_TRANSITION_RIGHT = 0,
|
||||
STAGE_TRANSITION_LEFT = 1,
|
||||
STAGE_WAITING = 2,
|
||||
STAGE_TRANSITION_UP = 3,
|
||||
STAGE_TRANSITION_DOWN = 4,
|
||||
STAGE_ONSCREEN_MENU = 5,
|
||||
STAGE_WELCOME = 6,
|
||||
STAGE_MENU = 7,
|
||||
STAGE_FILTERS = 8,
|
||||
STAGE_TRANSITION_SELECTED = 9
|
||||
};
|
||||
class DeckView;
|
||||
|
||||
// TODO: need a better name for MENU_FIRST_MENU, this is reused for the 1st submenu of
|
||||
// available options in the duel menu
|
||||
@@ -44,7 +29,7 @@ enum
|
||||
MENU_DECK_SELECTION = 10,
|
||||
MENU_DECK_BUILDER = 11,
|
||||
MENU_FIRST_DUEL_SUBMENU = 102,
|
||||
MENU_LANGUAGE_SELECTION = 103,
|
||||
MENU_LANGUAGE_SELECTION = 103
|
||||
};
|
||||
|
||||
// enums for menu options
|
||||
@@ -64,79 +49,69 @@ enum DECK_VIEWER_MENU_ITEMS
|
||||
MENU_ITEM_NO = 21,
|
||||
MENU_ITEM_FILTER_BY = 22,
|
||||
MENUITEM_MORE_INFO = kInfoMenuID
|
||||
|
||||
};
|
||||
|
||||
#define ALL_COLORS -1
|
||||
|
||||
#define ROTATE_LEFT 1;
|
||||
#define ROTATE_RIGHT 0;
|
||||
|
||||
#define HIGH_SPEED 15.0
|
||||
#define MED_SPEED 5.0f
|
||||
#define LOW_SPEED 1.5
|
||||
|
||||
#define MAX_SAVED_FILTERS Constants::NB_Colors + 1
|
||||
#define CARDS_DISPLAYED 10
|
||||
|
||||
class GameStateDeckViewer: public GameState, public JGuiListener
|
||||
{
|
||||
private:
|
||||
enum DeckViewerStages
|
||||
{
|
||||
STAGE_WAITING = 0,
|
||||
STAGE_ONSCREEN_MENU,
|
||||
STAGE_WELCOME,
|
||||
STAGE_MENU,
|
||||
STAGE_FILTERS
|
||||
};
|
||||
|
||||
vector<JQuadPtr> mIcons;
|
||||
JQuadPtr pspIcons[8];
|
||||
JTexture * pspIconsTexture;
|
||||
float last_user_activity;
|
||||
float onScreenTransition;
|
||||
float mRotation;
|
||||
float mSlide;
|
||||
int mAlpha;
|
||||
int mStage;
|
||||
int useFilter;
|
||||
DeckViewerStages mStage;
|
||||
JMusic * bgMusic;
|
||||
int lastPos;
|
||||
int lastTotal;
|
||||
int mSelected;
|
||||
|
||||
InteractiveButton *toggleDeckButton, *sellCardButton, *statsPrevButton, *filterButton;
|
||||
InteractiveButton *toggleDeckButton, *sellCardButton, *statsPrevButton, *filterButton, *toggleViewButton;
|
||||
|
||||
WGuiFilters * filterMenu;
|
||||
WSrcDeckViewer * source;
|
||||
|
||||
DeckEditorMenu * welcome_menu;
|
||||
SimpleMenu * subMenu;
|
||||
DeckEditorMenu * menu;
|
||||
DeckEditorMenu * deckMenu;
|
||||
PriceList* pricelist;
|
||||
PlayerData * playerdata;
|
||||
int price;
|
||||
DeckDataWrapper * displayed_deck;
|
||||
DeckDataWrapper * myDeck;
|
||||
DeckDataWrapper * myCollection;
|
||||
MTGCard * cardIndex[CARDS_DISPLAYED];
|
||||
StatsWrapper *stw;
|
||||
StatsWrapper * mStatsWrapper;
|
||||
|
||||
int hudAlpha;
|
||||
string newDeckname;
|
||||
bool isAIDeckSave;
|
||||
bool mSwitching;
|
||||
|
||||
enum AvailableView{
|
||||
CAROUSEL_VIEW,
|
||||
GRID_VIEW
|
||||
};
|
||||
DeckView* mView;
|
||||
AvailableView mCurrentView;
|
||||
|
||||
void saveDeck(); //Saves the deck and additional necessary information
|
||||
void saveAsAIDeck(string deckName); // saves deck as an AI Deck
|
||||
int getCurrentPos();
|
||||
void sellCard();
|
||||
void setButtonState(bool state);
|
||||
bool userPressedButton();
|
||||
void RenderButtons();
|
||||
|
||||
pair<float, float> cardsCoordinates[CARDS_DISPLAYED];
|
||||
|
||||
void setupView(AvailableView view, DeckDataWrapper *deck);
|
||||
void toggleView();
|
||||
public:
|
||||
GameStateDeckViewer(GameApp* parent);
|
||||
virtual ~GameStateDeckViewer();
|
||||
void updateDecks();
|
||||
void rotateCards(int direction);
|
||||
void loadIndexes();
|
||||
void updateFilters();
|
||||
void rebuildFilters();
|
||||
void switchDisplay();
|
||||
void toggleCollection();
|
||||
void Start();
|
||||
virtual void End();
|
||||
void addRemove(MTGCard * card);
|
||||
@@ -145,11 +120,8 @@ public:
|
||||
void renderSlideBar();
|
||||
void renderDeckBackground();
|
||||
void renderOnScreenMenu();
|
||||
virtual void renderCard(int id, float rotation);
|
||||
virtual void renderCard(int id);
|
||||
virtual void Render();
|
||||
int loadDeck(int deckid);
|
||||
void LoadDeckStatistics(int deckId);
|
||||
|
||||
void OnScroll(int inXVelocity, int inYVelocity);
|
||||
|
||||
|
||||
38
projects/mtg/include/GridDeckView.h
Normal file
38
projects/mtg/include/GridDeckView.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#ifndef _GRID_DECK_VIEW_H
|
||||
#define _GRID_DECK_VIEW_H
|
||||
|
||||
#include "DeckView.h"
|
||||
#include "Easing.h"
|
||||
|
||||
class GridDeckView : public DeckView
|
||||
{
|
||||
private:
|
||||
static const float scroll_animation_duration;
|
||||
static const float slide_animation_duration;
|
||||
static const float card_scale_small;
|
||||
static const float card_scale_big;
|
||||
public:
|
||||
GridDeckView();
|
||||
virtual ~GridDeckView();
|
||||
void Reset();
|
||||
|
||||
void UpdateViewState(float dt);
|
||||
void UpdateCardPosition(CardRep &rep, int index);
|
||||
|
||||
void Render();
|
||||
MTGCard * Click(int x, int y);
|
||||
|
||||
void changePosition(int offset);
|
||||
void changeFilter(int offset);
|
||||
|
||||
MTGCard *getActiveCard();
|
||||
private:
|
||||
int mCols;
|
||||
int mRows;
|
||||
float mScrollOffset, mSlideOffset;
|
||||
InOutQuadEasing mScrollEasing;
|
||||
InOutQuadEasing mSlideEasing;
|
||||
int mCurrentSelection;
|
||||
};
|
||||
|
||||
#endif //_GRID_DECK_VIEW_H
|
||||
@@ -6,8 +6,9 @@
|
||||
#include <hge/hgeparticle.h>
|
||||
#include "JGE.h"
|
||||
#include "MTGDefinitions.h"
|
||||
#include "GameApp.h"
|
||||
#include "Pos.h"
|
||||
#include "GuiLayers.h"
|
||||
#include "WResource_Fwd.h"
|
||||
|
||||
class ManaIcon : public Pos
|
||||
{
|
||||
|
||||
@@ -28,6 +28,7 @@ const int kNextStatsButtonId = 10005;
|
||||
const int kPrevStatsButtonId = 10006;
|
||||
const int kCycleCardsButtonId = 10007;
|
||||
const int kShowCardListButtonId = 10008;
|
||||
const int kSwitchViewButton = 10009;
|
||||
|
||||
class InteractiveButton: public SimpleButton
|
||||
{
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#define MTG_ERROR -1
|
||||
|
||||
#include "MTGDefinitions.h"
|
||||
#include "GameApp.h"
|
||||
#include "WResourceManager.h"
|
||||
#include <dirent.h>
|
||||
#include <Threading.h>
|
||||
|
||||
@@ -218,7 +218,8 @@ class Constants
|
||||
soulbond = 100,
|
||||
LURE = 101,
|
||||
NOLEGEND = 102,
|
||||
NB_BASIC_ABILITIES = 103,
|
||||
CANPLAYFROMGRAVEYARD = 103,
|
||||
NB_BASIC_ABILITIES = 104,
|
||||
|
||||
|
||||
RARITY_S = 'S', //Special Rarity
|
||||
|
||||
@@ -66,6 +66,7 @@ public:
|
||||
MTGEventBonus(GameObserver* observer, int _id);
|
||||
virtual MTGEventBonus * clone() const;
|
||||
};
|
||||
|
||||
class MTGPutInPlayRule: public PermanentAbility
|
||||
{
|
||||
public:
|
||||
@@ -172,6 +173,21 @@ public:
|
||||
virtual MTGMorphCostRule * clone() const;
|
||||
};
|
||||
|
||||
class MTGPlayFromGraveyardRule: public MTGAlternativeCostRule
|
||||
{
|
||||
public:
|
||||
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
||||
int reactToClick(MTGCardInstance * card);
|
||||
virtual ostream& toString(ostream& out) const;
|
||||
MTGPlayFromGraveyardRule(GameObserver* observer, int _id);
|
||||
const string getMenuText()
|
||||
{
|
||||
return "cast card from graveyard";
|
||||
}
|
||||
virtual MTGPlayFromGraveyardRule * clone() const;
|
||||
};
|
||||
|
||||
|
||||
class MTGSuspendRule: public MTGAlternativeCostRule
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#ifndef OBJECTANALYTICS_H
|
||||
#define OBJECTANALYTICS_H
|
||||
|
||||
//#include <boost/cstdint.hpp>
|
||||
#include "JTypes.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define TRACK_OBJECT_USAGE
|
||||
#endif
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include <JGui.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include "GameApp.h"
|
||||
#include "GameStateOptions.h"
|
||||
#include "WFilter.h"
|
||||
#include "WDataSrc.h"
|
||||
|
||||
@@ -20,16 +20,18 @@ public:
|
||||
~PriceList();
|
||||
int save();
|
||||
int getSellPrice(int cardid);
|
||||
int getSellPrice(MTGCard* card);
|
||||
int getPurchasePrice(int cardid);
|
||||
int getPrice(MTGCard *card);
|
||||
int getPrice(int cardId);
|
||||
int setPrice(int cardId, int price);
|
||||
int setPrice(MTGCard *card, int price);
|
||||
int getOtherPrice(int amt);
|
||||
static float difficultyScalar(float price, int cardid = 0);
|
||||
static void updateKey()
|
||||
{
|
||||
randomKey = rand();
|
||||
}
|
||||
;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
class GameObserver;
|
||||
|
||||
// Task type constant
|
||||
|
||||
#define TASK_BASIC 'B'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "MTGDeck.h"
|
||||
|
||||
#ifndef _WFILTER_H_
|
||||
#define _WFILTER_H_
|
||||
/**
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
class hgeDistortionMesh;
|
||||
class GameStateOptions;
|
||||
class SimpleMenu;
|
||||
|
||||
/**
|
||||
@defgroup WGui Basic Gui
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <stdlib.h>
|
||||
#include <list>
|
||||
|
||||
#include "DebugRoutines.h"
|
||||
|
||||
|
||||
@@ -823,7 +823,7 @@ int GenericChooseTypeColor::resolve()
|
||||
for (size_t i = 0; i < values.size(); ++i)
|
||||
{
|
||||
string menu = values[i];
|
||||
if(!ANonWall || (menu != "wall" && menu != "Wall"))
|
||||
if (!ANonWall || (menu != "wall" && menu != "Wall"))
|
||||
{
|
||||
setType = NEW AASetTypeChosen(game, game->mLayers->actionLayer()->getMaxId(), source,(MTGCardInstance*)target, i,menu,baseAbility);
|
||||
MTGAbility * set = setType->clone();
|
||||
@@ -5419,8 +5419,8 @@ AACastCard::AACastCard(GameObserver* observer, int _id, MTGCardInstance * _sourc
|
||||
}
|
||||
|
||||
|
||||
void AACastCard::Update(float dt)
|
||||
{
|
||||
void AACastCard::Update(float dt)
|
||||
{
|
||||
MTGAbility::Update(dt);
|
||||
if (processed)
|
||||
return;
|
||||
@@ -5468,10 +5468,10 @@ AACastCard::AACastCard(GameObserver* observer, int _id, MTGCardInstance * _sourc
|
||||
resolveSpell();
|
||||
this->forceDestroy = 1;
|
||||
return;
|
||||
}
|
||||
int AACastCard::isReactingToTargetClick(Targetable * card){return 0;}
|
||||
int AACastCard::reactToTargetClick(Targetable * object)
|
||||
{
|
||||
}
|
||||
int AACastCard::isReactingToTargetClick(Targetable * card){return 0;}
|
||||
int AACastCard::reactToTargetClick(Targetable * object)
|
||||
{
|
||||
if (MTGCardInstance * cObject = dynamic_cast<MTGCardInstance *>(object))
|
||||
return reactToClick(cObject);
|
||||
|
||||
@@ -5486,16 +5486,16 @@ AACastCard::AACastCard(GameObserver* observer, int _id, MTGCardInstance * _sourc
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
MTGCardInstance * AACastCard::makeCard()
|
||||
{
|
||||
MTGCardInstance * AACastCard::makeCard()
|
||||
{
|
||||
MTGCardInstance * card = NULL;
|
||||
MTGCard * cardData = MTGCollection()->getCardByName(cardNamed);
|
||||
card = NEW MTGCardInstance(cardData, source->controller()->game);
|
||||
source->controller()->game->temp->addCard(card);
|
||||
return card;
|
||||
}
|
||||
}
|
||||
|
||||
int AACastCard::resolveSpell()
|
||||
{
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "Counters.h"
|
||||
#include "ModRules.h"
|
||||
#include "CardDescriptor.h"
|
||||
#include "GameApp.h"
|
||||
|
||||
const float CardGui::Width = 28.0;
|
||||
const float CardGui::Height = 40.0;
|
||||
@@ -110,17 +111,17 @@ void CardGui::Update(float dt)
|
||||
PlayGuiObject::Update(dt);
|
||||
}
|
||||
|
||||
void CardGui::DrawCard(const Pos& inPosition, int inMode)
|
||||
void CardGui::DrawCard(const Pos& inPosition, int inMode, bool thumb)
|
||||
{
|
||||
DrawCard(card, inPosition, inMode);
|
||||
DrawCard(card, inPosition, inMode, thumb);
|
||||
}
|
||||
|
||||
void CardGui::DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode)
|
||||
void CardGui::DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode, bool thumb)
|
||||
{
|
||||
switch (inMode)
|
||||
{
|
||||
case DrawMode::kNormal:
|
||||
RenderBig(inCard, inPosition);
|
||||
RenderBig(inCard, inPosition, thumb);
|
||||
break;
|
||||
case DrawMode::kText:
|
||||
AlternateRender(inCard, inPosition);
|
||||
@@ -957,7 +958,7 @@ void CardGui::TinyCropRender(MTGCard * card, const Pos& pos, JQuad * quad)
|
||||
}
|
||||
|
||||
//Renders a big card on screen. Defaults to the "alternate" rendering if no image is found
|
||||
void CardGui::RenderBig(MTGCard* card, const Pos& pos)
|
||||
void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb)
|
||||
{
|
||||
JRenderer * renderer = JRenderer::GetInstance();
|
||||
//GameObserver * game = GameObserver::GetInstance();
|
||||
@@ -966,7 +967,8 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos)
|
||||
//i want this but ai targets cards so quickly that it can crash the game.
|
||||
float x = pos.actX;
|
||||
|
||||
JQuadPtr quad = WResourceManager::Instance()->RetrieveCard(card);
|
||||
JQuadPtr quad = thumb ? WResourceManager::Instance()->RetrieveCard(card, RETRIEVE_THUMB)
|
||||
: WResourceManager::Instance()->RetrieveCard(card);
|
||||
MTGCardInstance * kcard = dynamic_cast<MTGCardInstance*>(card);
|
||||
if(kcard && !kcard->isToken && kcard->name != kcard->model->data->name)
|
||||
{
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "MTGDeck.h"
|
||||
#include "Subtypes.h"
|
||||
#include "Translate.h"
|
||||
#include "GameApp.h"
|
||||
|
||||
using std::string;
|
||||
|
||||
@@ -228,6 +229,9 @@ void CardPrimitive::setSubtype(const string& value)
|
||||
}
|
||||
}
|
||||
|
||||
// "Artifact Creature" should have "Creature" as parent type
|
||||
if (parentType == Subtypes::TYPE_ARTIFACT && isCreature())
|
||||
parentType = Subtypes::TYPE_CREATURE;
|
||||
|
||||
int id = MTGAllCards::add(value, parentType);
|
||||
addType(id);
|
||||
|
||||
166
projects/mtg/src/CarouselDeckView.cpp
Normal file
166
projects/mtg/src/CarouselDeckView.cpp
Normal file
@@ -0,0 +1,166 @@
|
||||
#include "CarouselDeckView.h"
|
||||
|
||||
const float CarouselDeckView::max_scale = 0.96f;
|
||||
const float CarouselDeckView::x_center = 180;
|
||||
const float CarouselDeckView::right_border = SCREEN_WIDTH + 180;
|
||||
const float CarouselDeckView::slide_animation_duration = 0.6f;
|
||||
|
||||
CarouselDeckView::CarouselDeckView() :
|
||||
DeckView(10), mScrollOffset(0), mSlideOffset(0), mScrollEasing(mScrollOffset), mSlideEasing(mSlideOffset)
|
||||
{
|
||||
}
|
||||
|
||||
CarouselDeckView::~CarouselDeckView()
|
||||
{}
|
||||
|
||||
void CarouselDeckView::UpdateViewState(float dt)
|
||||
{
|
||||
if(!mScrollEasing.finished())
|
||||
{
|
||||
mScrollEasing.update(dt);
|
||||
|
||||
if(mScrollOffset <= -1.0f)
|
||||
{
|
||||
SwitchPosition(-1);
|
||||
mScrollEasing.translate(1.0f);
|
||||
}
|
||||
else if(mScrollOffset >= 1.0f)
|
||||
{
|
||||
SwitchPosition(1);
|
||||
mScrollEasing.translate(-1.0f);
|
||||
}
|
||||
|
||||
dirtyCardPos = true;
|
||||
}
|
||||
|
||||
if(!mSlideEasing.finished())
|
||||
{
|
||||
mSlideEasing.update(dt);
|
||||
|
||||
if(mSlideOffset < mSlideEasing.start_value)
|
||||
{
|
||||
//going downwards
|
||||
if(mSlideOffset < -1.0f)
|
||||
{
|
||||
mSlideEasing.translate(2.0f);
|
||||
SwitchFilter(1);
|
||||
}
|
||||
}
|
||||
else if(mSlideOffset > mSlideEasing.start_value)
|
||||
{
|
||||
//upwards
|
||||
if(mSlideOffset > 1.0f)
|
||||
{
|
||||
mSlideEasing.translate(-2.0f);
|
||||
SwitchFilter(-1);
|
||||
}
|
||||
}
|
||||
|
||||
dirtyCardPos = true;
|
||||
}
|
||||
}
|
||||
|
||||
void CarouselDeckView::UpdateCardPosition(CardRep &rep, int index)
|
||||
{
|
||||
float rotation = mScrollOffset + 8 - index;
|
||||
|
||||
rep.x = x_center + cos((rotation) * M_PI / 12) * (right_border - x_center);
|
||||
rep.scale = max_scale / 1.12f * cos((rep.x - x_center) * 1.5f / (right_border - x_center)) + 0.2f * max_scale * cos(
|
||||
cos((rep.x - x_center) * 0.15f / (right_border - x_center)));
|
||||
rep.y = (SCREEN_HEIGHT_F) / 2.0f + SCREEN_HEIGHT_F * mSlideOffset * (rep.scale + 0.2f);
|
||||
}
|
||||
|
||||
void CarouselDeckView::Reset()
|
||||
{
|
||||
mSlideEasing.finish();
|
||||
mScrollEasing.finish();
|
||||
|
||||
DeckView::Reset();
|
||||
}
|
||||
|
||||
void CarouselDeckView::Render()
|
||||
{
|
||||
// even though we want to draw the cards in a particular z order for layering, we want to prefetch them
|
||||
// in a different order, ie the center card should appear first, then the adjacent ones
|
||||
if (WResourceManager::Instance()->IsThreaded())
|
||||
{
|
||||
WResourceManager::Instance()->RetrieveCard(getCardRep(0).card);
|
||||
WResourceManager::Instance()->RetrieveCard(getCardRep(3).card);
|
||||
WResourceManager::Instance()->RetrieveCard(getCardRep(4).card);
|
||||
WResourceManager::Instance()->RetrieveCard(getCardRep(2).card);
|
||||
WResourceManager::Instance()->RetrieveCard(getCardRep(5).card);
|
||||
WResourceManager::Instance()->RetrieveCard(getCardRep(1).card);
|
||||
WResourceManager::Instance()->RetrieveCard(getCardRep(6).card);
|
||||
}
|
||||
|
||||
renderCard(6);
|
||||
renderCard(5);
|
||||
renderCard(4);
|
||||
renderCard(0);
|
||||
|
||||
if (mScrollOffset < 0.5 && mScrollOffset > -0.5)
|
||||
{
|
||||
renderCard(1);
|
||||
renderCard(3);
|
||||
renderCard(2);
|
||||
}
|
||||
else if (mScrollOffset < -0.5)
|
||||
{
|
||||
renderCard(3);
|
||||
renderCard(2);
|
||||
renderCard(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
renderCard(1);
|
||||
renderCard(2);
|
||||
renderCard(3);
|
||||
}
|
||||
}
|
||||
|
||||
MTGCard * CarouselDeckView::Click(int x, int y)
|
||||
{
|
||||
int n = getCardIndexNextTo(x, y);
|
||||
last_user_activity = 0;
|
||||
|
||||
//clicked active card, and no animation is running
|
||||
if(mSlideEasing.finished() && mScrollEasing.finished())
|
||||
{
|
||||
if(n == 2)
|
||||
{
|
||||
return getActiveCard();
|
||||
}
|
||||
else
|
||||
{
|
||||
changePosition(n - 2);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CarouselDeckView::changePosition(int offset)
|
||||
{
|
||||
mScrollEasing.start((float)offset, (float)(0.3f*abs(offset)));
|
||||
|
||||
last_user_activity = 0;
|
||||
}
|
||||
|
||||
void CarouselDeckView::changeFilter(int offset)
|
||||
{
|
||||
if(offset < 0)
|
||||
{
|
||||
mSlideEasing.start(-2.0f, slide_animation_duration);
|
||||
}
|
||||
else if(offset > 0)
|
||||
{
|
||||
mSlideEasing.start(2.0f, slide_animation_duration);
|
||||
}
|
||||
last_user_activity = 0;
|
||||
}
|
||||
|
||||
MTGCard *CarouselDeckView::getActiveCard()
|
||||
{
|
||||
return getCardRep(2).card;
|
||||
}
|
||||
|
||||
244
projects/mtg/src/DeckView.cpp
Normal file
244
projects/mtg/src/DeckView.cpp
Normal file
@@ -0,0 +1,244 @@
|
||||
#include "DeckView.h"
|
||||
|
||||
#include "GameOptions.h"
|
||||
#include "CardGui.h"
|
||||
|
||||
const float DeckView::no_user_activity_show_card_delay = 0.1f;
|
||||
|
||||
DeckView::DeckView(int numberOfCards)
|
||||
: dirtyFilters(true), dirtyCardPos(true), last_user_activity(0.0f), mFilter(0), mCurrentDeck(NULL)
|
||||
{
|
||||
mCards.resize(numberOfCards);
|
||||
}
|
||||
|
||||
DeckView::~DeckView()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void DeckView::Reset()
|
||||
{
|
||||
dirtyFilters = true;
|
||||
dirtyCardPos = true;
|
||||
last_user_activity = 0;
|
||||
mFilter = 0;
|
||||
mCurrentDeck = NULL;
|
||||
}
|
||||
|
||||
void DeckView::Update(float dt)
|
||||
{
|
||||
last_user_activity += dt;
|
||||
|
||||
UpdateViewState(dt);
|
||||
|
||||
if(dirtyCardPos)
|
||||
{
|
||||
for(unsigned int i = 0; i < mCards.size(); ++i)
|
||||
{
|
||||
UpdateCardPosition(mCards[i], i);
|
||||
}
|
||||
dirtyCardPos = false;
|
||||
}
|
||||
}
|
||||
|
||||
bool DeckView::ButtonPressed(Buttons button)
|
||||
{
|
||||
switch(button)
|
||||
{
|
||||
case JGE_BTN_LEFT:
|
||||
changePosition(-1);
|
||||
last_user_activity = 0;
|
||||
break;
|
||||
case JGE_BTN_RIGHT:
|
||||
changePosition(1);
|
||||
last_user_activity = 0;
|
||||
break;
|
||||
case JGE_BTN_UP:
|
||||
changeFilter(1);
|
||||
last_user_activity = 0;
|
||||
break;
|
||||
case JGE_BTN_DOWN:
|
||||
changeFilter(-1);
|
||||
last_user_activity = 0;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void DeckView::SetDeck(DeckDataWrapper *toShow)
|
||||
{
|
||||
mCurrentDeck = toShow;
|
||||
dirtyCardPos = true;
|
||||
dirtyFilters = true;
|
||||
reloadIndexes();
|
||||
}
|
||||
|
||||
DeckDataWrapper* DeckView::deck()
|
||||
{
|
||||
return mCurrentDeck;
|
||||
}
|
||||
|
||||
void DeckView::SwitchFilter(int delta)
|
||||
{
|
||||
unsigned int FilterCount = Constants::NB_Colors + 1;
|
||||
mFilter = (FilterCount + mFilter + delta) % FilterCount;
|
||||
dirtyFilters = true;
|
||||
}
|
||||
|
||||
void DeckView::SwitchPosition(int delta)
|
||||
{
|
||||
for(int i = 0; i < delta; ++i)
|
||||
{
|
||||
mCurrentDeck->next();
|
||||
}
|
||||
|
||||
for(int i = 0; i > delta; --i)
|
||||
{
|
||||
mCurrentDeck->prev();
|
||||
}
|
||||
|
||||
reloadIndexes();
|
||||
}
|
||||
|
||||
int DeckView::filter()
|
||||
{
|
||||
return mFilter;
|
||||
}
|
||||
|
||||
void DeckView::reloadIndexes()
|
||||
{
|
||||
if(mCurrentDeck != NULL)
|
||||
{
|
||||
for (unsigned int i = 0; i < mCards.size(); i++)
|
||||
{
|
||||
mCards[i].card = deck()->getCard(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DeckView::CardRep& DeckView::getCardRep(unsigned int index)
|
||||
{
|
||||
return mCards[index];
|
||||
}
|
||||
|
||||
void DeckView::renderCard(int index, int alpha, bool asThumbnail)
|
||||
{
|
||||
WFont * mFont = WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT);
|
||||
|
||||
const CardRep& cardPosition = getCardRep(index);
|
||||
|
||||
if (!cardPosition.card) return;
|
||||
|
||||
if (!WResourceManager::Instance()->IsThreaded())
|
||||
{
|
||||
JQuadPtr backQuad = WResourceManager::Instance()->GetQuad(kGenericCardID);
|
||||
JQuadPtr quad;
|
||||
|
||||
int cacheError = CACHE_ERROR_NONE;
|
||||
|
||||
if (!options[Options::DISABLECARDS].number)
|
||||
{
|
||||
quad = WResourceManager::Instance()->RetrieveCard(cardPosition.card, RETRIEVE_EXISTING);
|
||||
cacheError = WResourceManager::Instance()->RetrieveError();
|
||||
if (!quad.get() && cacheError != CACHE_ERROR_404)
|
||||
{
|
||||
if (last_user_activity > (abs(2 - index) + 1) * no_user_activity_show_card_delay)
|
||||
quad = WResourceManager::Instance()->RetrieveCard(cardPosition.card);
|
||||
else
|
||||
{
|
||||
quad = backQuad;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (quad.get())
|
||||
{
|
||||
if (quad == backQuad)
|
||||
{
|
||||
quad->SetColor(ARGB(255,255,255,255));
|
||||
float _scale = cardPosition.scale * (285 / quad->mHeight);
|
||||
JRenderer::GetInstance()->RenderQuad(quad.get(), cardPosition.x, cardPosition.y, 0.0f, _scale, _scale);
|
||||
}
|
||||
else
|
||||
{
|
||||
Pos pos = Pos(cardPosition.x, cardPosition.y, cardPosition.scale * 285 / 250, 0.0, 255);
|
||||
CardGui::DrawCard(cardPosition.card, pos, asThumbnail);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Pos pos = Pos(cardPosition.x, cardPosition.y, cardPosition.scale * 285 / 250, 0.0, 255);
|
||||
CardGui::DrawCard(cardPosition.card, pos, DrawMode::kText, asThumbnail);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int mode = !options[Options::DISABLECARDS].number ? DrawMode::kNormal : DrawMode::kText;
|
||||
|
||||
Pos pos = Pos(cardPosition.x, cardPosition.y, cardPosition.scale * 285 / 250, 0.0, 255);
|
||||
CardGui::DrawCard(cardPosition.card, pos, mode, asThumbnail);
|
||||
}
|
||||
|
||||
int quadAlpha = alpha;
|
||||
if (!deck()->count(cardPosition.card)) quadAlpha /= 2;
|
||||
quadAlpha = 255 - quadAlpha;
|
||||
if (quadAlpha > 0)
|
||||
{
|
||||
JRenderer::GetInstance()->FillRect(cardPosition.x - cardPosition.scale * 100.0f, cardPosition.y - cardPosition.scale * 142.5f, cardPosition.scale * 200.0f, cardPosition.scale * 285.0f,
|
||||
ARGB(quadAlpha,0,0,0));
|
||||
}
|
||||
if (last_user_activity < 3)
|
||||
{
|
||||
int fontAlpha = alpha;
|
||||
float qtY = cardPosition.y - 135 * cardPosition.scale;
|
||||
float qtX = cardPosition.x + 40 * cardPosition.scale;
|
||||
char buffer[4096];
|
||||
sprintf(buffer, "x%i", deck()->count(cardPosition.card));
|
||||
WFont * font = mFont;
|
||||
font->SetColor(ARGB(fontAlpha/2,0,0,0));
|
||||
JRenderer::GetInstance()->FillRect(qtX, qtY, font->GetStringWidth(buffer) + 6, 16, ARGB(fontAlpha/2,0,0,0));
|
||||
font->DrawString(buffer, qtX + 4, qtY + 4);
|
||||
font->SetColor(ARGB(fontAlpha,255,255,255));
|
||||
font->DrawString(buffer, qtX + 2, qtY + 2);
|
||||
font->SetColor(ARGB(255,255,255,255));
|
||||
}
|
||||
}
|
||||
|
||||
int DeckView::getCardIndexNextTo(int x, int y)
|
||||
{
|
||||
int bestCardIndex = -1;
|
||||
float bestDistance = 0;
|
||||
|
||||
for(unsigned int i = 0; i < mCards.size(); i++)
|
||||
{
|
||||
const CardRep& cardPosition = getCardRep(i);
|
||||
|
||||
float dx = (x - cardPosition.x);
|
||||
float dy = (y - cardPosition.y);
|
||||
float dist = dx*dx + dy*dy;
|
||||
|
||||
if(dist < bestDistance || bestCardIndex == -1)
|
||||
{
|
||||
bestDistance = dist;
|
||||
bestCardIndex = i;
|
||||
}
|
||||
}
|
||||
|
||||
return bestCardIndex;
|
||||
}
|
||||
|
||||
int DeckView::getPosition()
|
||||
{
|
||||
if(!mCurrentDeck)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int total = mCurrentDeck->Size();
|
||||
int currentPos = (mCurrentDeck->getOffset() + 3) % total;
|
||||
|
||||
while (currentPos <= 0) currentPos += total;
|
||||
return currentPos;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,6 +14,7 @@
|
||||
#include "Translate.h"
|
||||
#include "Rules.h"
|
||||
#include "ModRules.h"
|
||||
#include "GameApp.h"
|
||||
|
||||
#ifdef TESTSUITE
|
||||
#include "TestSuiteAI.h"
|
||||
|
||||
@@ -259,8 +259,8 @@ void GameStateShop::cancelCard(int controlId)
|
||||
break;
|
||||
}
|
||||
price = price - (rnd * price) / 100;
|
||||
if (price < pricelist->getPrice(c->getMTGId())) //filters have a tendancy to increase the price instead of lowering it!
|
||||
pricelist->setPrice(c->getMTGId(), price);
|
||||
if (price < pricelist->getPrice(c)) //filters have a tendancy to increase the price instead of lowering it!
|
||||
pricelist->setPrice(c, price);
|
||||
//Prices do not immediately go down when you ignore something.
|
||||
return;
|
||||
}
|
||||
|
||||
199
projects/mtg/src/GridDeckView.cpp
Normal file
199
projects/mtg/src/GridDeckView.cpp
Normal file
@@ -0,0 +1,199 @@
|
||||
#include "GridDeckView.h"
|
||||
|
||||
const float GridDeckView::scroll_animation_duration = 0.3f;
|
||||
const float GridDeckView::slide_animation_duration = 0.6f;
|
||||
const float GridDeckView::card_scale_small = 0.48f;
|
||||
const float GridDeckView::card_scale_big = 0.7f;
|
||||
|
||||
GridDeckView::GridDeckView()
|
||||
: DeckView(16), mCols(8), mRows(2), mScrollOffset(0), mSlideOffset(0),
|
||||
mScrollEasing(mScrollOffset), mSlideEasing(mSlideOffset), mCurrentSelection(-1)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
GridDeckView::~GridDeckView()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void GridDeckView::Reset()
|
||||
{
|
||||
mSlideEasing.finish();
|
||||
mScrollEasing.finish();
|
||||
|
||||
mCurrentSelection = 0;
|
||||
|
||||
DeckView::Reset();
|
||||
}
|
||||
|
||||
void GridDeckView::UpdateViewState(float dt)
|
||||
{
|
||||
if(!mScrollEasing.finished())
|
||||
{
|
||||
mScrollEasing.update(dt);
|
||||
|
||||
if(mScrollOffset <= -1.0f)
|
||||
{
|
||||
SwitchPosition(2);
|
||||
mScrollEasing.translate(1.0f);
|
||||
mCurrentSelection = (mCurrentSelection >= 6) ? mCurrentSelection - 2 : -1;
|
||||
}
|
||||
else if(mScrollOffset >= 1.0f)
|
||||
{
|
||||
SwitchPosition(-2);
|
||||
mScrollEasing.translate(-1.0f);
|
||||
mCurrentSelection = (mCurrentSelection >= 0 && mCurrentSelection < 10) ? mCurrentSelection + 2 : -1;
|
||||
}
|
||||
|
||||
dirtyCardPos = true;
|
||||
}
|
||||
|
||||
if(!mSlideEasing.finished())
|
||||
{
|
||||
mSlideEasing.update(dt);
|
||||
|
||||
if(mSlideOffset < -1.0f)
|
||||
{
|
||||
mSlideEasing.translate(2.0f);
|
||||
SwitchFilter(1);
|
||||
}
|
||||
else if(mSlideOffset > 1.0f)
|
||||
{
|
||||
mSlideEasing.translate(-2.0f);
|
||||
SwitchFilter(-1);
|
||||
}
|
||||
|
||||
dirtyCardPos = true;
|
||||
}
|
||||
}
|
||||
|
||||
void GridDeckView::UpdateCardPosition(CardRep &rep, int index)
|
||||
{
|
||||
int col = index / mRows;
|
||||
int row = index % mRows;
|
||||
float colWidth = SCREEN_WIDTH_F / (mCols - 3);
|
||||
float rowHeight = SCREEN_HEIGHT_F / mRows;
|
||||
|
||||
rep.x = (col + mScrollOffset) * colWidth - colWidth;
|
||||
rep.y = row * rowHeight + mSlideOffset*SCREEN_HEIGHT + rowHeight/2;
|
||||
|
||||
if(mCurrentSelection == index)
|
||||
{
|
||||
rep.scale = card_scale_big;
|
||||
if(row == 0)
|
||||
{
|
||||
rep.y += rowHeight * (card_scale_big - card_scale_small);
|
||||
}
|
||||
else
|
||||
{
|
||||
rep.y -= rowHeight * (card_scale_big - card_scale_small);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rep.scale = card_scale_small;
|
||||
}
|
||||
}
|
||||
|
||||
void GridDeckView::Render()
|
||||
{
|
||||
int firstVisibleCard = 2;
|
||||
int lastVisibleCard = mCards.size() - 2;
|
||||
|
||||
if(!mScrollEasing.finished())
|
||||
{
|
||||
if(mScrollEasing.delta_value > 0){
|
||||
firstVisibleCard = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
lastVisibleCard = mCards.size();
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = firstVisibleCard; i < lastVisibleCard; ++i)
|
||||
{
|
||||
|
||||
if(mCurrentSelection != i)
|
||||
{
|
||||
if (WResourceManager::Instance()->IsThreaded())
|
||||
{
|
||||
WResourceManager::Instance()->RetrieveCard(getCardRep(i).card, RETRIEVE_THUMB);
|
||||
}
|
||||
renderCard(i, 255, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (WResourceManager::Instance()->IsThreaded())
|
||||
{
|
||||
WResourceManager::Instance()->RetrieveCard(getCardRep(i).card);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(2 <= mCurrentSelection && mCurrentSelection < 12)
|
||||
{
|
||||
renderCard(mCurrentSelection, 255, false);
|
||||
}
|
||||
}
|
||||
|
||||
MTGCard * GridDeckView::Click(int x, int y)
|
||||
{
|
||||
int n = getCardIndexNextTo(x, y);
|
||||
last_user_activity = 0;
|
||||
|
||||
if(mScrollEasing.finished() && mSlideEasing.finished())
|
||||
{ //clicked and no animations running
|
||||
if(n == mCurrentSelection)
|
||||
{
|
||||
return getActiveCard();
|
||||
}
|
||||
else if(n < 4)
|
||||
{
|
||||
changePosition(-1);
|
||||
}
|
||||
else if(n >= 12)
|
||||
{
|
||||
changePosition(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
mCurrentSelection = n;
|
||||
dirtyCardPos = true;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void GridDeckView::changePosition(int offset)
|
||||
{
|
||||
mScrollEasing.start(-1.0f * offset, scroll_animation_duration * abs(offset));
|
||||
last_user_activity = 0;
|
||||
}
|
||||
|
||||
void GridDeckView::changeFilter(int offset)
|
||||
{
|
||||
if(offset < 0)
|
||||
{
|
||||
mSlideEasing.start(-2.0f, slide_animation_duration);
|
||||
}
|
||||
else if(offset > 0)
|
||||
{
|
||||
mSlideEasing.start(2.0f, slide_animation_duration);
|
||||
}
|
||||
last_user_activity = 0;
|
||||
}
|
||||
|
||||
MTGCard* GridDeckView::getActiveCard()
|
||||
{
|
||||
if(mCurrentSelection >= 0 && mCurrentSelection < int(mCards.size()))
|
||||
{
|
||||
return mCards[mCurrentSelection].card;
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "GuiMana.h"
|
||||
#include "OptionItem.h"
|
||||
#include "Player.h"
|
||||
#include "GameApp.h"
|
||||
|
||||
//using std::cout;
|
||||
using std::endl;
|
||||
|
||||
@@ -1039,6 +1039,12 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
observer->addObserver(NEW MTGMorphCostRule(observer, -1));
|
||||
return NULL;
|
||||
}
|
||||
found = s.find("playfromgraveyardrule");
|
||||
if(found != string::npos)
|
||||
{
|
||||
observer->addObserver(NEW MTGPlayFromGraveyardRule(observer, -1));
|
||||
return NULL;
|
||||
}
|
||||
//this rule handles attacking ability during attacker phase
|
||||
found = s.find("attackrule");
|
||||
if(found != string::npos)
|
||||
@@ -1145,7 +1151,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
}
|
||||
|
||||
|
||||
if(s.compare(0, strlen("chooseacolor "), "chooseacolor ") == 0 || s.compare(0, strlen("chooseatype "), "chooseatype ") == 0)
|
||||
if (StartsWith(s, "chooseacolor ") || StartsWith(s, "chooseatype "))
|
||||
{
|
||||
MTGAbility * choose = parseChooseActionAbility(s,card,spell,target,0,id);
|
||||
choose = NEW GenericActivatedAbility(observer, "","",id, card,choose,NULL);
|
||||
|
||||
@@ -131,7 +131,8 @@ const char* Constants::MTGBasicAbilities[] = {
|
||||
"poisondamager",//deals damage to players as poison counters.
|
||||
"soulbond",
|
||||
"lure",
|
||||
"nolegend"
|
||||
"nolegend",
|
||||
"canplayfromgraveyard"
|
||||
};
|
||||
|
||||
map<string,int> Constants::MTGBasicAbilitiesMap;
|
||||
|
||||
@@ -273,6 +273,7 @@ MTGEventBonus * MTGEventBonus::clone() const
|
||||
{
|
||||
return NEW MTGEventBonus(*this);
|
||||
}
|
||||
|
||||
MTGPutInPlayRule::MTGPutInPlayRule(GameObserver* observer, int _id) :
|
||||
PermanentAbility(observer, _id)
|
||||
{
|
||||
@@ -716,7 +717,6 @@ int MTGAlternativeCostRule::reactToClick(MTGCardInstance * card, ManaCost *alter
|
||||
copy->alternateCostPaid[alternateCostType] = 1;
|
||||
spell->resolve();
|
||||
SAFE_DELETE(spell);
|
||||
game->mLayers->stackLayer()->addSpell(copy, NULL, NULL, alternateCostType, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1140,8 +1140,49 @@ MTGMorphCostRule * MTGMorphCostRule::clone() const
|
||||
//-------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
MTGPlayFromGraveyardRule::MTGPlayFromGraveyardRule(GameObserver* observer, int _id) :
|
||||
MTGAlternativeCostRule(observer, _id)
|
||||
{
|
||||
aType = MTGAbility::PUT_INTO_PLAY;
|
||||
}
|
||||
|
||||
int MTGPlayFromGraveyardRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
|
||||
{
|
||||
Player * player = game->currentlyActing();
|
||||
ManaCost * cost = card->getManaCost();
|
||||
|
||||
if (!player->game->graveyard->hasCard(card))
|
||||
return 0;
|
||||
if (!card->has(Constants::CANPLAYFROMGRAVEYARD))
|
||||
return 0;
|
||||
|
||||
return MTGAlternativeCostRule::isReactingToClick(card, mana, cost);
|
||||
}
|
||||
|
||||
int MTGPlayFromGraveyardRule::reactToClick(MTGCardInstance * card)
|
||||
{
|
||||
if (!isReactingToClick(card))
|
||||
return 0;
|
||||
|
||||
ManaCost * cost = card->getManaCost();
|
||||
|
||||
card->paymenttype = MTGAbility::PUT_INTO_PLAY;
|
||||
|
||||
return MTGAlternativeCostRule::reactToClick(card, cost, ManaCost::MANA_PAID);
|
||||
}
|
||||
|
||||
ostream& MTGPlayFromGraveyardRule::toString(ostream& out) const
|
||||
{
|
||||
out << "MTGPlayFromGraveyardRule ::: (";
|
||||
return MTGAbility::toString(out) << ")";
|
||||
}
|
||||
|
||||
MTGPlayFromGraveyardRule * MTGPlayFromGraveyardRule::clone() const
|
||||
{
|
||||
return NEW MTGPlayFromGraveyardRule(*this);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool MTGAttackRule::select(Target* t)
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "TranslateKeys.h"
|
||||
#include "StyleManager.h"
|
||||
#include <dirent.h>
|
||||
#include "SimpleMenu.h"
|
||||
|
||||
//OptionItem
|
||||
OptionItem::OptionItem(int _id, string _displayValue) :
|
||||
|
||||
@@ -47,12 +47,12 @@ int PriceList::save()
|
||||
|
||||
return 1;
|
||||
}
|
||||
int PriceList::getPrice(int cardId)
|
||||
int PriceList::getPrice(MTGCard * card)
|
||||
{
|
||||
map<int, int>::iterator it = prices.find(cardId);
|
||||
map<int, int>::iterator it = prices.find(card->getId());
|
||||
if (it != prices.end()) return (*it).second;
|
||||
|
||||
char rarity = collection->getCardById(cardId)->getRarity();
|
||||
char rarity = card->getRarity();
|
||||
switch (rarity)
|
||||
{
|
||||
case Constants::RARITY_M:
|
||||
@@ -77,7 +77,11 @@ int PriceList::getPrice(int cardId)
|
||||
return Constants::PRICE_1C;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int PriceList::getPrice(int cardId)
|
||||
{
|
||||
return getPrice(collection->getCardById(cardId));
|
||||
}
|
||||
|
||||
int PriceList::setPrice(int cardId, int price)
|
||||
@@ -85,10 +89,23 @@ int PriceList::setPrice(int cardId, int price)
|
||||
prices[cardId] = price;
|
||||
return price;
|
||||
}
|
||||
|
||||
int PriceList::setPrice(MTGCard * card, int price)
|
||||
{
|
||||
prices[card->getId()] = price;
|
||||
return price;
|
||||
}
|
||||
|
||||
int PriceList::getSellPrice(int cardid)
|
||||
{
|
||||
return getPrice(cardid);
|
||||
return getPrice(collection->getCardById(cardid));
|
||||
}
|
||||
|
||||
int PriceList::getSellPrice(MTGCard *card)
|
||||
{
|
||||
return getPrice(card);
|
||||
}
|
||||
|
||||
float PriceList::difficultyScalar(float price, int cardid)
|
||||
{
|
||||
float badluck = (float) (abs(cardid + randomKey) % 201) / 100; //Float between 0 and 2.
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "Player.h"
|
||||
#include "AIMomirPlayer.h"
|
||||
|
||||
#include "GameApp.h"
|
||||
#include "MTGGameZones.h"
|
||||
#include "MTGAbility.h"
|
||||
#include "AllAbilities.h"
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "PlayerData.h"
|
||||
#include "MTGDeck.h"
|
||||
#include "WFont.h"
|
||||
#include "GameApp.h"
|
||||
#include <JFileSystem.h>
|
||||
|
||||
#define LINE_SPACE 2
|
||||
|
||||
@@ -54,7 +54,9 @@ int Subtypes::add(string value, unsigned int parentType)
|
||||
}
|
||||
if (isSubType(subtype) && (parentType == TYPE_CREATURE))
|
||||
{
|
||||
if(value != "forest" && value != "Forest")//http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=136196 one creature with a land subtype exist, but the card has special ruling.
|
||||
if (value != "forest" && value != "Forest")
|
||||
//http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=136196
|
||||
//one creature with a land subtype exist, but the card has special ruling.
|
||||
subtypesCreature.push_back(value);
|
||||
}
|
||||
return subtype;
|
||||
@@ -115,8 +117,7 @@ void Subtypes::sortSubTypes()
|
||||
|
||||
const vector<string>& Subtypes::getCreatureValuesById()
|
||||
{
|
||||
sort(subtypesCreature.begin(),subtypesCreature.end());
|
||||
subtypesCreature.erase(unique(subtypesCreature.begin(),subtypesCreature.end()),subtypesCreature.end());
|
||||
sortSubTypes();
|
||||
return subtypesCreature;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
#include "Subtypes.h"
|
||||
#include "TranslateKeys.h"
|
||||
#include <hge/hgedistort.h>
|
||||
#include "SimpleMenu.h"
|
||||
#include "Pos.h"
|
||||
#include "CardGui.h"
|
||||
|
||||
/**
|
||||
Provides an interface to retrieve some standardized colors. The idea here is that a child of WGuiBase
|
||||
|
||||
@@ -318,6 +318,12 @@
|
||||
<ClCompile Include="src\CardPrimitive.cpp" />
|
||||
<ClCompile Include="src\CardSelector.cpp" />
|
||||
<ClCompile Include="src\CardSelectorSingleton.cpp" />
|
||||
<ClCompile Include="src\CarouselDeckView.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='HQ Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Counters.cpp" />
|
||||
<ClCompile Include="src\Credits.cpp" />
|
||||
<ClCompile Include="src\Damage.cpp" />
|
||||
@@ -329,6 +335,12 @@
|
||||
<ClCompile Include="src\DeckMenuItem.cpp" />
|
||||
<ClCompile Include="src\DeckMetaData.cpp" />
|
||||
<ClCompile Include="src\DeckStats.cpp" />
|
||||
<ClCompile Include="src\DeckView.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='HQ Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DuelLayers.cpp" />
|
||||
<ClCompile Include="src\ExtraCost.cpp" />
|
||||
<ClCompile Include="src\GameApp.cpp">
|
||||
@@ -362,6 +374,12 @@
|
||||
<ClCompile Include="src\GameStateShop.cpp" />
|
||||
<ClCompile Include="src\GameStateStory.cpp" />
|
||||
<ClCompile Include="src\GameStateTransitions.cpp" />
|
||||
<ClCompile Include="src\GridDeckView.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='HQ Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\GuiAvatars.cpp" />
|
||||
<ClCompile Include="src\GuiBackground.cpp" />
|
||||
<ClCompile Include="src\GuiCardsController.cpp" />
|
||||
@@ -459,6 +477,7 @@
|
||||
<ClInclude Include="include\CardPrimitive.h" />
|
||||
<ClInclude Include="include\CardSelector.h" />
|
||||
<ClInclude Include="include\CardSelectorSingleton.h" />
|
||||
<ClInclude Include="include\CarouselDeckView.h" />
|
||||
<ClInclude Include="include\config.h" />
|
||||
<ClInclude Include="include\Counters.h" />
|
||||
<ClInclude Include="include\Credits.h" />
|
||||
@@ -471,7 +490,9 @@
|
||||
<ClInclude Include="include\DeckMenuItem.h" />
|
||||
<ClInclude Include="include\DeckMetaData.h" />
|
||||
<ClInclude Include="include\DeckStats.h" />
|
||||
<ClInclude Include="include\DeckView.h" />
|
||||
<ClInclude Include="include\DuelLayers.h" />
|
||||
<ClInclude Include="include\Easing.h" />
|
||||
<ClInclude Include="include\Effects.h" />
|
||||
<ClInclude Include="include\ExtraCost.h" />
|
||||
<ClInclude Include="include\GameApp.h" />
|
||||
@@ -486,6 +507,7 @@
|
||||
<ClInclude Include="include\GameStateShop.h" />
|
||||
<ClInclude Include="include\GameStateStory.h" />
|
||||
<ClInclude Include="include\GameStateTransitions.h" />
|
||||
<ClInclude Include="include\GridDeckView.h" />
|
||||
<ClInclude Include="include\GuiAvatars.h" />
|
||||
<ClInclude Include="include\GuiBackground.h" />
|
||||
<ClInclude Include="include\GuiCardsController.h" />
|
||||
|
||||
@@ -331,6 +331,15 @@
|
||||
<ClCompile Include="src\NetworkPlayer.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\CarouselDeckView.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DeckView.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\GridDeckView.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\ActionElement.h">
|
||||
@@ -681,6 +690,18 @@
|
||||
<ClInclude Include="include\NetworkPlayer.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\CarouselDeckView.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\DeckView.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Easing.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\GridDeckView.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Makefile" />
|
||||
|
||||
@@ -1,39 +1,19 @@
|
||||
#-------------------------------------------------
|
||||
#-------------------------------------------------
|
||||
|
||||
include(wagic.pri)
|
||||
|
||||
DEFINES += SDL_CONFIG
|
||||
#
|
||||
# Project created by QtCreator 2010-06-30T19:48:30
|
||||
#
|
||||
#-------------------------------------------------
|
||||
QT -= core gui opengl network declarative
|
||||
|
||||
#QT += core gui opengl network
|
||||
macx:QT += phonon
|
||||
#CONFIG += warn_off precompile_header // causes some massives errors on mac.
|
||||
VERSION = 0.14.1
|
||||
TARGET = wagic
|
||||
TEMPLATE = app
|
||||
unix|macx:QMAKE_CXXFLAGS += -Wno-unused-parameter
|
||||
windows:DEFINES += WIN32
|
||||
windows:DEFINES += _CRT_SECURE_NO_WARNINGS
|
||||
unix|macx:DEFINES += LINUX
|
||||
CONFIG(debug, debug|release):DEFINES += _DEBUG
|
||||
#DEFINES += QT_CONFIG
|
||||
#DEFINES += NETWORK_SUPPORT
|
||||
DEFINES += SDL_CONFIG
|
||||
DEFINES += TIXML_USE_STL
|
||||
macx:DEFINES += USE_PHONON
|
||||
maemo5: {
|
||||
DEFINES += USE_PHONON
|
||||
QT += phonon dbus
|
||||
}
|
||||
windows:INCLUDEPATH += ../../JGE/Dependencies/include
|
||||
windows:INCLUDEPATH += ../../JGE/Dependencies/SDL/include
|
||||
windows:INCLUDEPATH += extra
|
||||
#unix|windows:QMAKE_CXXFLAGS += -std=c++11
|
||||
|
||||
INCLUDEPATH += ../../JGE/Dependencies/SDL/include
|
||||
unix:INCLUDEPATH += /usr/include/GL
|
||||
unix:INCLUDEPATH += /usr/local/include/SDL
|
||||
macx:INCLUDEPATH += /opt/include
|
||||
INCLUDEPATH += ../../JGE/include
|
||||
INCLUDEPATH += ../../JGE/src/zipFS
|
||||
INCLUDEPATH += ../../Boost
|
||||
INCLUDEPATH += include
|
||||
OBJECTS_DIR = objs
|
||||
MOC_DIR = objs
|
||||
DESTDIR = bin
|
||||
@@ -42,358 +22,246 @@ macx|unix:LIBS += -lz -lboost_thread-mt
|
||||
unix:LIBS += -ljpeg -lgif -lpng12 -L/usr/local/lib -lGL -lGLU -lSDL
|
||||
windows:LIBS += -L../../JGE/Dependencies/lib -L../../Boost/lib -llibjpeg-static-mt-debug -lgiflib -llibpng -lfmodvc
|
||||
|
||||
PRECOMPILED_HEADER = include/PrecompiledHeader.h
|
||||
|
||||
# MGT
|
||||
SOURCES += \
|
||||
src/AbilityParser.cpp\
|
||||
src/ActionElement.cpp\
|
||||
src/ActionLayer.cpp\
|
||||
src/ActionStack.cpp\
|
||||
src/AIHints.cpp\
|
||||
src/AIMomirPlayer.cpp\
|
||||
src/AIPlayer.cpp\
|
||||
src/AIPlayerBaka.cpp\
|
||||
src/AIStats.cpp\
|
||||
src/AllAbilities.cpp\
|
||||
src/CardDescriptor.cpp\
|
||||
src/CardDisplay.cpp\
|
||||
src/CardEffect.cpp\
|
||||
src/CardGui.cpp\
|
||||
src/CardPrimitive.cpp\
|
||||
src/CardSelector.cpp\
|
||||
src/CardSelectorSingleton.cpp\
|
||||
src/Closest.cpp\
|
||||
src/Counters.cpp\
|
||||
src/Credits.cpp\
|
||||
src/Damage.cpp\
|
||||
src/DamagerDamaged.cpp\
|
||||
src/DeckDataWrapper.cpp\
|
||||
src/DeckEditorMenu.cpp\
|
||||
src/DeckManager.cpp\
|
||||
src/DeckMenu.cpp\
|
||||
src/DeckMenuItem.cpp\
|
||||
src/DeckMetaData.cpp\
|
||||
src/DeckStats.cpp\
|
||||
src/DuelLayers.cpp\
|
||||
src/Effects.cpp\
|
||||
src/ExtraCost.cpp\
|
||||
src/GameApp.cpp\
|
||||
src/GameLauncher.cpp\
|
||||
src/GameObserver.cpp\
|
||||
src/GameOptions.cpp\
|
||||
src/GameStateAwards.cpp\
|
||||
src/GameState.cpp\
|
||||
src/GameStateDeckViewer.cpp\
|
||||
src/GameStateDuel.cpp\
|
||||
src/GameStateMenu.cpp\
|
||||
src/GameStateOptions.cpp\
|
||||
src/GameStateShop.cpp\
|
||||
src/GameStateStory.cpp\
|
||||
src/GameStateTransitions.cpp\
|
||||
src/GuiAvatars.cpp\
|
||||
src/GuiBackground.cpp\
|
||||
src/GuiCardsController.cpp\
|
||||
src/GuiCombat.cpp\
|
||||
src/GuiFrame.cpp\
|
||||
src/GuiHand.cpp\
|
||||
src/GuiLayers.cpp\
|
||||
src/GuiMana.cpp\
|
||||
src/GuiPhaseBar.cpp\
|
||||
src/GuiPlay.cpp\
|
||||
src/GuiStatic.cpp\
|
||||
src/IconButton.cpp\
|
||||
src/ManaCost.cpp\
|
||||
src/ManaCostHybrid.cpp\
|
||||
src/MenuItem.cpp\
|
||||
src/ModRules.cpp\
|
||||
src/MTGAbility.cpp\
|
||||
src/MTGCard.cpp\
|
||||
src/MTGCardInstance.cpp\
|
||||
src/MTGDeck.cpp\
|
||||
src/MTGDefinitions.cpp\
|
||||
src/MTGGamePhase.cpp\
|
||||
src/MTGGameZones.cpp\
|
||||
src/MTGPack.cpp\
|
||||
src/MTGRules.cpp\
|
||||
src/ObjectAnalytics.cpp\
|
||||
src/OptionItem.cpp\
|
||||
src/PhaseRing.cpp\
|
||||
src/Player.cpp\
|
||||
src/PlayerData.cpp\
|
||||
src/PlayGuiObject.cpp\
|
||||
src/PlayGuiObjectController.cpp\
|
||||
src/PlayRestrictions.cpp\
|
||||
src/Pos.cpp\
|
||||
src/PriceList.cpp\
|
||||
src/ReplacementEffects.cpp\
|
||||
src/Rules.cpp\
|
||||
src/SimpleMenu.cpp\
|
||||
src/SimpleMenuItem.cpp\
|
||||
src/SimplePad.cpp\
|
||||
src/SimplePopup.cpp\
|
||||
src/StoryFlow.cpp\
|
||||
src/Subtypes.cpp\
|
||||
src/StyleManager.cpp\
|
||||
src/TargetChooser.cpp\
|
||||
src/TargetsList.cpp\
|
||||
src/Tasks.cpp\
|
||||
src/TextScroller.cpp\
|
||||
src/ThisDescriptor.cpp\
|
||||
src/Token.cpp\
|
||||
src/Translate.cpp\
|
||||
src/TranslateKeys.cpp\
|
||||
src/Trash.cpp\
|
||||
src/utils.cpp\
|
||||
src/WCachedResource.cpp\
|
||||
src/WDataSrc.cpp\
|
||||
src/WEvent.cpp\
|
||||
src/WFilter.cpp\
|
||||
src/WFont.cpp\
|
||||
src/WGui.cpp\
|
||||
src/WResourceManager.cpp\
|
||||
src/NetworkPlayer.cpp
|
||||
|
||||
CONFIG(debug, debug|release):SOURCES += src/TestSuiteAI.cpp
|
||||
|
||||
HEADERS += \
|
||||
include/AllAbilities.h\
|
||||
include/DeckMenu.h\
|
||||
include/DeckMenuItem.h\
|
||||
include/ExtraCost.h\
|
||||
include/ManaCost.h\
|
||||
include/SimpleMenuItem.h\
|
||||
include/GameApp.h\
|
||||
include/ManaCostHybrid.h\
|
||||
include/SimplePad.h\
|
||||
include/ActionElement.h\
|
||||
include/GameObserver.h\
|
||||
include/MenuItem.h\
|
||||
include/StoryFlow.h\
|
||||
include/ActionLayer.h\
|
||||
include/GameOptions.h\
|
||||
include/MTGAbility.h\
|
||||
include/Subtypes.h\
|
||||
include/ActionStack.h\
|
||||
include/GameStateAwards.h\
|
||||
include/MTGCard.h\
|
||||
include/AIMomirPlayer.h\
|
||||
include/GameStateDeckViewer.h\
|
||||
include/MTGCardInstance.h\
|
||||
include/Targetable.h\
|
||||
include/AIPlayer.h\
|
||||
include/GameStateDuel.h\
|
||||
include/MTGDeck.h\
|
||||
include/TargetChooser.h\
|
||||
include/AIStats.h\
|
||||
include/GameState.h\
|
||||
include/MTGDefinitions.h\
|
||||
include/TargetsList.h\
|
||||
include/AllAbilities.h\
|
||||
include/GameStateMenu.h\
|
||||
include/MTGGamePhase.h\
|
||||
include/Tasks.h\
|
||||
include/CardDescriptor.h\
|
||||
include/GameStateOptions.h\
|
||||
include/MTGGameZones.h\
|
||||
include/TestSuiteAI.h\
|
||||
include/CardDisplay.h\
|
||||
include/GameStateShop.h\
|
||||
include/MTGPack.h\
|
||||
include/TextScroller.h\
|
||||
include/CardEffect.h\
|
||||
include/GameStateStory.h\
|
||||
include/MTGRules.h\
|
||||
include/ThisDescriptor.h\
|
||||
include/CardGui.h\
|
||||
include/GameStateTransitions.h\
|
||||
include/IconButton.h\
|
||||
include/OptionItem.h\
|
||||
include/Token.h\
|
||||
include/CardPrimitive.h\
|
||||
include/GuiAvatars.h\
|
||||
include/OSD.h\
|
||||
include/Translate.h\
|
||||
include/CardSelector.h\
|
||||
include/CardSelectorSingleton.h\
|
||||
include/GuiBackground.h\
|
||||
include/PhaseRing.h\
|
||||
include/TranslateKeys.h\
|
||||
include/config.h\
|
||||
include/GuiCardsController.h\
|
||||
include/PlayerData.h\
|
||||
include/Trash.h\
|
||||
include/Counters.h\
|
||||
include/GuiCombat.h\
|
||||
include/Player.h\
|
||||
include/utils.h\
|
||||
include/Credits.h\
|
||||
include/GuiFrame.h\
|
||||
include/PlayGuiObjectController.h\
|
||||
include/WCachedResource.h\
|
||||
include/Damage.h\
|
||||
include/GuiHand.h\
|
||||
include/PlayGuiObject.h\
|
||||
include/WDataSrc.h\
|
||||
include/DamagerDamaged.h\
|
||||
include/GuiLayers.h\
|
||||
include/Pos.h\
|
||||
include/WEvent.h\
|
||||
include/DeckDataWrapper.h\
|
||||
include/GuiMana.h\
|
||||
include/PriceList.h\
|
||||
include/WFilter.h\
|
||||
include/DeckMetaData.h\
|
||||
include/GuiPhaseBar.h\
|
||||
include/ReplacementEffects.h\
|
||||
include/WGui.h\
|
||||
include/DeckStats.h\
|
||||
include/GuiPlay.h\
|
||||
include/Rules.h\
|
||||
include/WResourceManager.h\
|
||||
include/DuelLayers.h\
|
||||
include/GuiStatic.h\
|
||||
include/Effects.h\
|
||||
include/StyleManager.h\
|
||||
include/WFont.h\
|
||||
include/DeckManager.h\
|
||||
include/SimplePopup.h\
|
||||
include/SimpleMenu.h\
|
||||
include/PrecompiledHeader.h\
|
||||
include/Navigator.h\
|
||||
include/DeckEditorMenu.h\
|
||||
include/PlayRestrictions.h\
|
||||
include/NetworkPlayer.h\
|
||||
include/ModRules.h\
|
||||
include/AIHints.h\
|
||||
|
||||
# JGE, could probably be moved outside
|
||||
SOURCES += \
|
||||
../../JGE/src/SDLmain.cpp\
|
||||
../../JGE/src/Encoding.cpp\
|
||||
../../JGE/src/JAnimator.cpp\
|
||||
../../JGE/src/JApp.cpp\
|
||||
../../JGE/src/JDistortionMesh.cpp\
|
||||
../../JGE/src/JFileSystem.cpp\
|
||||
../../JGE/src/JGameObject.cpp\
|
||||
../../JGE/src/JGE.cpp\
|
||||
../../JGE/src/JGui.cpp\
|
||||
../../JGE/src/JLogger.cpp\
|
||||
../../JGE/src/JLBFont.cpp\
|
||||
../../JGE/src/JMD2Model.cpp\
|
||||
../../JGE/src/JOBJModel.cpp\
|
||||
../../JGE/src/JParticle.cpp\
|
||||
../../JGE/src/JParticleEffect.cpp\
|
||||
../../JGE/src/JParticleEmitter.cpp\
|
||||
../../JGE/src/JParticleSystem.cpp\
|
||||
../../JGE/src/JResourceManager.cpp\
|
||||
../../JGE/src/JSpline.cpp\
|
||||
../../JGE/src/JSprite.cpp\
|
||||
../../JGE/src/Vector2D.cpp\
|
||||
../../JGE/src/tinyxml/tinystr.cpp\
|
||||
../../JGE/src/tinyxml/tinyxml.cpp\
|
||||
../../JGE/src/tinyxml/tinyxmlerror.cpp\
|
||||
../../JGE/src/tinyxml/tinyxmlparser.cpp\
|
||||
../../JGE/src/hge/hgecolor.cpp\
|
||||
../../JGE/src/hge/hgedistort.cpp\
|
||||
../../JGE/src/hge/hgefont.cpp\
|
||||
../../JGE/src/hge/hgeparticle.cpp\
|
||||
../../JGE/src/hge/hgerect.cpp\
|
||||
../../JGE/src/hge/hgevector.cpp\
|
||||
../../JGE/src/zipFS/zfsystem.cpp\
|
||||
../../JGE/src/zipFS/ziphdr.cpp\
|
||||
../../JGE/src/zipFS/zstream.cpp\
|
||||
../../JGE/src/pc/JSfx.cpp\
|
||||
../../JGE/src/pc/JGfx.cpp\
|
||||
../../JGE/src/JNetwork.cpp\
|
||||
../../JGE/src/pc/JSocket.cpp
|
||||
../../JGE/src/JMD2Model.cpp
|
||||
|
||||
HEADERS += \
|
||||
../../JGE/include/decoder_prx.h\
|
||||
../../JGE/include/DebugRoutines.h\
|
||||
../../JGE/include/Encoding.h\
|
||||
../../JGE/include/JAnimator.h\
|
||||
../../JGE/include/JApp.h\
|
||||
../../JGE/include/JAssert.h\
|
||||
../../JGE/include/JCooleyesMP3.h\
|
||||
../../JGE/include/JDistortionMesh.h\
|
||||
../../JGE/include/JFileSystem.h\
|
||||
../../JGE/include/JGameLauncher.h\
|
||||
../../JGE/include/JGameObject.h\
|
||||
../../JGE/include/JGE.h\
|
||||
../../JGE/include/JGui.h\
|
||||
../../JGE/include/JLBFont.h\
|
||||
../../JGE/include/JLogger.h\
|
||||
../../JGE/include/JMD2Model.h\
|
||||
../../JGE/include/JMP3.h\
|
||||
../../JGE/include/JNetwork.h\
|
||||
../../JGE/include/JOBJModel.h\
|
||||
../../JGE/include/JParticleEffect.h\
|
||||
../../JGE/include/JParticleEmitter.h\
|
||||
../../JGE/include/JParticle.h\
|
||||
../../JGE/include/JParticleSystem.h\
|
||||
../../JGE/include/JRenderer.h\
|
||||
../../JGE/include/JResourceManager.h\
|
||||
../../JGE/include/JSocket.h\
|
||||
../../JGE/include/JSoundSystem.h\
|
||||
../../JGE/include/JSpline.h\
|
||||
../../JGE/include/JSprite.h\
|
||||
../../JGE/include/JTypes.h\
|
||||
../../JGE/include/Vector2D.h\
|
||||
../../JGE/include/Vector3D.h\
|
||||
../../JGE/include/vram.h\
|
||||
../../JGE/include/Threading.h\
|
||||
../../JGE/src/tinyxml/tinystr.h\
|
||||
../../JGE/src/tinyxml/tinyxml.h\
|
||||
../../JGE/include/vram.h\
|
||||
../../JGE/include/hge/hgecolor.h\
|
||||
../../JGE/include/hge/hgedistort.h\
|
||||
../../JGE/include/hge/hgefont.h\
|
||||
../../JGE/include/hge/hgerect.h\
|
||||
../../JGE/include/hge/hgevector.h\
|
||||
../../JGE/include/hge/hgeparticle.h\
|
||||
../../JGE/include/unzip/ioapi.h\
|
||||
../../JGE/include/unzip/mztools.h\
|
||||
../../JGE/include/unzip/unzip.h\
|
||||
../../JGE/include/JNetwork.h\
|
||||
../../JGE/include/JSocket.h
|
||||
windows{
|
||||
|
||||
INSTALLS += target \
|
||||
res \
|
||||
SOURCES += \
|
||||
../../JGE/Dependencies/SDL/src/core/windows/SDL_windows.c\
|
||||
../../JGE/Dependencies/SDL/src/events/SDL_clipboardevents.c\
|
||||
../../JGE/Dependencies/SDL/src/events/SDL_gesture.c\
|
||||
../../JGE/Dependencies/SDL/src/events/SDL_touch.c\
|
||||
../../JGE/Dependencies/SDL/src/libm/e_atan2.c\
|
||||
../../JGE/Dependencies/SDL/src/libm/e_log.c\
|
||||
../../JGE/Dependencies/SDL/src/libm/e_pow.c\
|
||||
../../JGE/Dependencies/SDL/src/libm/e_rem_pio2.c\
|
||||
../../JGE/Dependencies/SDL/src/libm/e_sqrt.c\
|
||||
../../JGE/Dependencies/SDL/src/libm/k_cos.c\
|
||||
../../JGE/Dependencies/SDL/src/libm/k_rem_pio2.c\
|
||||
../../JGE/Dependencies/SDL/src/libm/k_sin.c\
|
||||
../../JGE/Dependencies/SDL/src/libm/s_atan.c\
|
||||
../../JGE/Dependencies/SDL/src/libm/s_copysign.c\
|
||||
../../JGE/Dependencies/SDL/src/libm/s_cos.c\
|
||||
../../JGE/Dependencies/SDL/src/libm/s_fabs.c\
|
||||
../../JGE/Dependencies/SDL/src/libm/s_floor.c\
|
||||
../../JGE/Dependencies/SDL/src/libm/s_scalbn.c\
|
||||
../../JGE/Dependencies/SDL/src/libm/s_sin.c\
|
||||
../../JGE/Dependencies/SDL/src/render/direct3d/SDL_render_d3d.c\
|
||||
../../JGE/Dependencies/SDL/src/render/opengl/SDL_render_gl.c\
|
||||
../../JGE/Dependencies/SDL/src/render/opengl/SDL_shaders_gl.c\
|
||||
../../JGE/Dependencies/SDL/src/render/SDL_render.c\
|
||||
../../JGE/Dependencies/SDL/src/render/SDL_yuv_mmx.c\
|
||||
../../JGE/Dependencies/SDL/src/render/SDL_yuv_sw.c\
|
||||
../../JGE/Dependencies/SDL/src/render/software/SDL_blendfillrect.c\
|
||||
../../JGE/Dependencies/SDL/src/render/software/SDL_blendline.c\
|
||||
../../JGE/Dependencies/SDL/src/render/software/SDL_blendpoint.c\
|
||||
../../JGE/Dependencies/SDL/src/render/software/SDL_drawline.c\
|
||||
../../JGE/Dependencies/SDL/src/render/software/SDL_drawpoint.c\
|
||||
../../JGE/Dependencies/SDL/src/render/software/SDL_render_sw.c\
|
||||
../../JGE/Dependencies/SDL/src/SDL.c\
|
||||
../../JGE/Dependencies/SDL/src/SDL_assert.c\
|
||||
../../JGE/Dependencies/SDL/src/atomic/SDL_atomic.c\
|
||||
../../JGE/Dependencies/SDL/src/atomic/SDL_spinlock.c\
|
||||
../../JGE/Dependencies/SDL/src/audio/SDL_audio.c\
|
||||
../../JGE/Dependencies/SDL/src/audio/SDL_audiocvt.c\
|
||||
../../JGE/Dependencies/SDL/src/audio/SDL_audiodev.c\
|
||||
../../JGE/Dependencies/SDL/src/audio/SDL_audiotypecvt.c\
|
||||
../../JGE/Dependencies/SDL/src/SDL_hints.c\
|
||||
../../JGE/Dependencies/SDL/src/SDL_log.c\
|
||||
../../JGE/Dependencies/SDL/src/video/dummy/SDL_nullframebuffer.c\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_blit.c\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_blit_0.c\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_blit_1.c\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_blit_A.c\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_blit_auto.c\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_blit_copy.c\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_blit_N.c\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_blit_slow.c\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_bmp.c\
|
||||
../../JGE/Dependencies/SDL/src/SDL_compat.c\
|
||||
../../JGE/Dependencies/SDL/src/cpuinfo/SDL_cpuinfo.c\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_clipboard.c\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_shape.c\
|
||||
../../JGE/Dependencies/SDL/src/audio/windib/SDL_dibaudio.c\
|
||||
../../JGE/Dependencies/SDL/src/audio/disk/SDL_diskaudio.c\
|
||||
../../JGE/Dependencies/SDL/src/audio/dummy/SDL_dummyaudio.c\
|
||||
../../JGE/Dependencies/SDL/src/audio/windx5/SDL_dx5audio.c\
|
||||
../../JGE/Dependencies/SDL/src/joystick/windows/SDL_dxjoystick.c\
|
||||
../../JGE/Dependencies/SDL/src/SDL_error.c\
|
||||
../../JGE/Dependencies/SDL/src/events/SDL_events.c\
|
||||
../../JGE/Dependencies/SDL/src/SDL_fatal.c\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_fillrect.c\
|
||||
../../JGE/Dependencies/SDL/src/stdlib/SDL_getenv.c\
|
||||
../../JGE/Dependencies/SDL/src/haptic/SDL_haptic.c\
|
||||
../../JGE/Dependencies/SDL/src/stdlib/SDL_iconv.c\
|
||||
../../JGE/Dependencies/SDL/src/joystick/SDL_joystick.c\
|
||||
../../JGE/Dependencies/SDL/src/events/SDL_keyboard.c\
|
||||
../../JGE/Dependencies/SDL/src/stdlib/SDL_malloc.c\
|
||||
../../JGE/Dependencies/SDL/src/audio/SDL_mixer.c\
|
||||
../../JGE/Dependencies/SDL/src/joystick/windows/SDL_mmjoystick.c\
|
||||
../../JGE/Dependencies/SDL/src/events/SDL_mouse.c\
|
||||
../../JGE/Dependencies/SDL/src/video/dummy/SDL_nullevents.c\
|
||||
../../JGE/Dependencies/SDL/src/video/dummy/SDL_nullvideo.c\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_pixels.c\
|
||||
../../JGE/Dependencies/SDL/src/power/SDL_power.c\
|
||||
../../JGE/Dependencies/SDL/src/stdlib/SDL_qsort.c\
|
||||
../../JGE/Dependencies/SDL/src/events/SDL_quit.c\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_rect.c\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_RLEaccel.c\
|
||||
../../JGE/Dependencies/SDL/src/file/SDL_rwops.c\
|
||||
../../JGE/Dependencies/SDL/src/stdlib/SDL_stdlib.c\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_stretch.c\
|
||||
../../JGE/Dependencies/SDL/src/stdlib/SDL_string.c\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_surface.c\
|
||||
../../JGE/Dependencies/SDL/src/haptic/windows/SDL_syshaptic.c\
|
||||
../../JGE/Dependencies/SDL/src/loadso/windows/SDL_sysloadso.c\
|
||||
../../JGE/Dependencies/SDL/src/thread/windows/SDL_sysmutex.c\
|
||||
../../JGE/Dependencies/SDL/src/power/windows/SDL_syspower.c\
|
||||
../../JGE/Dependencies/SDL/src/thread/windows/SDL_syssem.c\
|
||||
../../JGE/Dependencies/SDL/src/thread/windows/SDL_systhread.c\
|
||||
../../JGE/Dependencies/SDL/src/timer/windows/SDL_systimer.c\
|
||||
../../JGE/Dependencies/SDL/src/thread/SDL_thread.c\
|
||||
../../JGE/Dependencies/SDL/src/timer/SDL_timer.c\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_video.c\
|
||||
../../JGE/Dependencies/SDL/src/audio/SDL_wave.c\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/SDL_windowsclipboard.c\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/SDL_windowsevents.c\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/SDL_windowsframebuffer.c\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/SDL_windowskeyboard.c\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/SDL_windowsmodes.c\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/SDL_windowsmouse.c\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/SDL_windowsopengl.c\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/SDL_windowsshape.c\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/SDL_windowsvideo.c\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/SDL_windowswindow.c\
|
||||
../../JGE/Dependencies/SDL/src/events/SDL_windowevents.c
|
||||
|
||||
res.path = /usr/local/bin/Res
|
||||
res.files += bin/Res/*
|
||||
target.path = /usr/local/bin
|
||||
|
||||
maemo5: {
|
||||
# Variables
|
||||
BINDIR = /opt/wagic
|
||||
RESDIR = /home/user/wagic/Res
|
||||
ICONDIR = /usr/share
|
||||
DEFINES += RESDIR=\\\"$$RESDIR\\\"
|
||||
HEADERS += \
|
||||
../../JGE/Dependencies/SDL/include/SDL.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_assert.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_atomic.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_audio.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_blendmode.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_clipboard.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_compat.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_config.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_config_windows.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_copying.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_cpuinfo.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_endian.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_error.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_events.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_gesture.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_haptic.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_hints.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_input.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_joystick.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_keyboard.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_keycode.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_loadso.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_log.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_main.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_mouse.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_mutex.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_name.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_opengl.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_opengles.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_pixels.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_platform.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_power.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_quit.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_rect.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_render.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_revision.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_rwops.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_scancode.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_shape.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_stdinc.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_surface.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_syswm.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_thread.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_timer.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_touch.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_types.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_version.h\
|
||||
../../JGE/Dependencies/SDL/include/SDL_video.h\
|
||||
../../JGE/Dependencies/SDL/src/core/windows/SDL_windows.h\
|
||||
../../JGE/Dependencies/SDL/src/events/blank_cursor.h\
|
||||
../../JGE/Dependencies/SDL/src/events/default_cursor.h\
|
||||
../../JGE/Dependencies/SDL/src/audio/windx5\directx.h\
|
||||
../../JGE/Dependencies/SDL/src/events/SDL_clipboardevents_c.h\
|
||||
../../JGE/Dependencies/SDL/src/events/SDL_gesture_c.h\
|
||||
../../JGE/Dependencies/SDL/src/events/SDL_touch_c.h\
|
||||
../../JGE/Dependencies/SDL/src/libm/math.h\
|
||||
../../JGE/Dependencies/SDL/src/libm/math_private.h\
|
||||
../../JGE/Dependencies/SDL/src/render/mmx.h\
|
||||
../../JGE/Dependencies/SDL/src/render/opengl\SDL_shaders_gl.h\
|
||||
../../JGE/Dependencies/SDL/src/render/SDL_sysrender.h\
|
||||
../../JGE/Dependencies/SDL/src/render/SDL_yuv_sw_c.h\
|
||||
../../JGE/Dependencies/SDL/src/audio/SDL_audio_c.h\
|
||||
../../JGE/Dependencies/SDL/src/audio/SDL_audiodev_c.h\
|
||||
../../JGE/Dependencies/SDL/src/audio/SDL_audiomem.h\
|
||||
../../JGE/Dependencies/SDL/src/render/software/SDL_blendfillrect.h\
|
||||
../../JGE/Dependencies/SDL/src/render/software/SDL_blendline.h\
|
||||
../../JGE/Dependencies/SDL/src/render/software/SDL_blendpoint.h\
|
||||
../../JGE/Dependencies/SDL/src/render/software/SDL_draw.h\
|
||||
../../JGE/Dependencies/SDL/src/render/software/SDL_drawline.h\
|
||||
../../JGE/Dependencies/SDL/src/render/software/SDL_drawpoint.h\
|
||||
../../JGE/Dependencies/SDL/src/render/software/SDL_render_sw_c.h\
|
||||
../../JGE/Dependencies/SDL/src/video/dummy/SDL_nullframebuffer_c.h\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_blit.h\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_blit_auto.h\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_blit_copy.h\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_blit_slow.h\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_shape_internals.h\
|
||||
../../JGE/Dependencies/SDL/src/audio/windib/SDL_dibaudio.h\
|
||||
../../JGE/Dependencies/SDL/src/audio/disk/SDL_diskaudio.h\
|
||||
../../JGE/Dependencies/SDL/src/audio/dummy/SDL_dummyaudio.h\
|
||||
../../JGE/Dependencies/SDL/src/audio/windx5/SDL_dx5audio.h\
|
||||
../../JGE/Dependencies/SDL/src/SDL_error_c.h\
|
||||
../../JGE/Dependencies/SDL/src/events/SDL_events_c.h\
|
||||
../../JGE/Dependencies/SDL/src/SDL_fatal.h\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_glesfuncs.h\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_glfuncs.h\
|
||||
../../JGE/Dependencies/SDL/src/joystick/SDL_joystick_c.h\
|
||||
../../JGE/Dependencies/SDL/src/events/SDL_keyboard_c.h\
|
||||
../../JGE/Dependencies/SDL/src/events/SDL_mouse_c.h\
|
||||
../../JGE/Dependencies/SDL/src/video/dummy/SDL_nullevents_c.h\
|
||||
../../JGE/Dependencies/SDL/src/video/dummy/SDL_nullvideo.h\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_pixels_c.h\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_rect_c.h\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_RLEaccel_c.h\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_stretch_c.h\
|
||||
../../JGE/Dependencies/SDL/src/audio/SDL_sysaudio.h\
|
||||
../../JGE/Dependencies/SDL/src/events/SDL_sysevents.h\
|
||||
../../JGE/Dependencies/SDL/src/haptic/SDL_syshaptic.h\
|
||||
../../JGE/Dependencies/SDL/src/joystick/SDL_sysjoystick.h\
|
||||
../../JGE/Dependencies/SDL/src/thread/SDL_systhread.h\
|
||||
../../JGE/Dependencies/SDL/src/thread/windows\SDL_systhread_c.h\
|
||||
../../JGE/Dependencies/SDL/src/timer/SDL_systimer.h\
|
||||
../../JGE/Dependencies/SDL/src/video/SDL_sysvideo.h\
|
||||
../../JGE/Dependencies/SDL/src/thread/SDL_thread_c.h\
|
||||
../../JGE/Dependencies/SDL/src/timer/SDL_timer_c.h\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/SDL_vkeys.h\
|
||||
../../JGE/Dependencies/SDL/src/audio/SDL_wave.h\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/SDL_windowsclipboard.h\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/SDL_windowsevents.h\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/SDL_windowsframebuffer.h\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/SDL_windowskeyboard.h\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/SDL_windowsmodes.h\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/SDL_windowsmouse.h\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/SDL_windowsopengl.h\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/SDL_windowsshape.h\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/SDL_windowsvideo.h\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/SDL_windowswindow.h\
|
||||
../../JGE/Dependencies/SDL/src/events/SDL_windowevents_c.h\
|
||||
../../JGE/Dependencies/SDL/src/video/windows/wmmsg.h\
|
||||
../../JGE/Dependencies/SDL/VisualC/SDL/resource.h
|
||||
|
||||
INSTALLS += target \
|
||||
desktop \
|
||||
icon \
|
||||
res \
|
||||
restxt \
|
||||
launcher \
|
||||
|
||||
target.path = $$BINDIR
|
||||
|
||||
desktop.path = $$ICONDIR/applications/hildon
|
||||
desktop.files += wagic.desktop
|
||||
|
||||
icon.path = $$ICONDIR/icons/hicolor/64x64/apps
|
||||
icon.files += wagic-64x64.png
|
||||
|
||||
res.path = $$RESDIR
|
||||
res.files += bin/Res/*
|
||||
# res.extra = tar -C ../../../../src/projects/mtg/bin -czf Res.tgz Res
|
||||
|
||||
restxt.path = $$BINDIR
|
||||
restxt.files += debian/Res.txt
|
||||
|
||||
launcher.path = $$BINDIR
|
||||
launcher.files += debian/launcher
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
include(wagic.pri)
|
||||
|
||||
# Add more folders to ship with the application, here
|
||||
addExclusiveBuilds(graphics, Graphics, console, Console)
|
||||
|
||||
INCLUDEPATH += ../../JGE/include/qt
|
||||
CONFIG(console, graphics|console){
|
||||
QT += core network
|
||||
QT -= gui
|
||||
@@ -14,335 +18,29 @@ else:CONFIG(graphics, graphics|console){
|
||||
folder_01.target = /usr/share
|
||||
DEPLOYMENTFOLDERS = folder_01
|
||||
QT += core gui opengl network
|
||||
QT -= declarative quick qml
|
||||
#maemo5:DEFINES += QT_WIDGET
|
||||
DEFINES += QT_WIDGET
|
||||
unix:!symbian:INCLUDEPATH += /usr/include/GL
|
||||
|
||||
# Please do not modify the following two lines. Required for deployment.
|
||||
!maemo5:include(qml/qmlapplicationviewer/qmlapplicationviewer.pri)
|
||||
!maemo5:qtcAddDeployment()
|
||||
# !maemo5:include(qml/qmlapplicationviewer/qmlapplicationviewer.pri)
|
||||
# !maemo5:qtcAddDeployment()
|
||||
}
|
||||
|
||||
#!android:!symbian:QT += phonon
|
||||
maemo5:QT += dbus
|
||||
|
||||
TARGET = wagic
|
||||
TEMPLATE = app
|
||||
|
||||
#!macx:CONFIG += precompile_header
|
||||
unix|macx:QMAKE_CXXFLAGS += -Wno-unused-parameter
|
||||
unix:!macx:QMAKE_CXXFLAGS += -Wno-unused-but-set-parameter
|
||||
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
|
||||
|
||||
windows:DEFINES += _CRT_SECURE_NO_WARNINGS
|
||||
unix|macx:DEFINES += LINUX
|
||||
CONFIG(debug, debug|release) {
|
||||
DEFINES += _DEBUG
|
||||
}
|
||||
|
||||
DEFINES += QT_CONFIG
|
||||
#!android:!symbian:DEFINES += USE_PHONON
|
||||
android:INCLUDEPATH += $$ANDROID_NDK_ROOT/platforms/android-9/arch-arm/usr/include
|
||||
#DEFINES += QT_NO_DEBUG_OUTPUT
|
||||
DEFINES += NETWORK_SUPPORT
|
||||
|
||||
DEFINES += TIXML_USE_STL
|
||||
|
||||
windows:INCLUDEPATH += ../../JGE/Dependencies/include
|
||||
windows{
|
||||
*-g++* {
|
||||
DEFINES += LINUX
|
||||
}
|
||||
*-msvc* {
|
||||
INCLUDEPATH += extra
|
||||
DEFINES += WIN32
|
||||
}
|
||||
}
|
||||
macx:INCLUDEPATH += /opt/include
|
||||
INCLUDEPATH += ../../JGE/include/qt
|
||||
INCLUDEPATH += ../../JGE/include
|
||||
INCLUDEPATH += ../../JGE/src/zipFS
|
||||
INCLUDEPATH += ../../Boost
|
||||
INCLUDEPATH += include
|
||||
#!symbian:DESTDIR = bin
|
||||
|
||||
unix:!symbian:LIBS += -lz
|
||||
win32:LIBS += ../../JGE/Dependencies/lib/fmodvc.lib
|
||||
win32:LIBS += ../../JGE/Dependencies/lib/zlibd.lib
|
||||
PRECOMPILED_HEADER = include/PrecompiledHeader.h
|
||||
|
||||
#DEFINES += TRACK_OBJECT_USAGE
|
||||
#DEFINES += AI_CHANGE_TESTING
|
||||
#DEFINES += ACTION_LOGGING_TESTING
|
||||
|
||||
SOURCES += \
|
||||
src/AbilityParser.cpp\
|
||||
src/ActionElement.cpp\
|
||||
src/ActionLayer.cpp\
|
||||
src/ActionStack.cpp\
|
||||
src/AIHints.cpp\
|
||||
src/AIMomirPlayer.cpp\
|
||||
src/AIPlayer.cpp\
|
||||
src/AIPlayerBaka.cpp\
|
||||
src/AIStats.cpp\
|
||||
src/AllAbilities.cpp\
|
||||
src/CardDescriptor.cpp\
|
||||
src/CardDisplay.cpp\
|
||||
src/CardGui.cpp\
|
||||
src/CardPrimitive.cpp\
|
||||
src/CardSelector.cpp\
|
||||
src/Closest.cpp\
|
||||
src/Counters.cpp\
|
||||
src/Credits.cpp\
|
||||
src/Damage.cpp\
|
||||
src/DamagerDamaged.cpp\
|
||||
src/DeckDataWrapper.cpp\
|
||||
src/DeckEditorMenu.cpp\
|
||||
src/DeckManager.cpp\
|
||||
src/DeckMenu.cpp\
|
||||
src/DeckMenuItem.cpp\
|
||||
src/DeckMetaData.cpp\
|
||||
src/DeckStats.cpp\
|
||||
src/DuelLayers.cpp\
|
||||
src/Effects.cpp\
|
||||
src/ExtraCost.cpp\
|
||||
src/GameApp.cpp\
|
||||
src/GameLauncher.cpp\
|
||||
src/GameObserver.cpp\
|
||||
src/GameOptions.cpp\
|
||||
src/GameStateAwards.cpp\
|
||||
src/GameState.cpp\
|
||||
src/GameStateDeckViewer.cpp\
|
||||
src/GameStateDuel.cpp\
|
||||
src/GameStateMenu.cpp\
|
||||
src/GameStateOptions.cpp\
|
||||
src/GameStateShop.cpp\
|
||||
src/GameStateStory.cpp\
|
||||
src/GameStateTransitions.cpp\
|
||||
src/GuiAvatars.cpp\
|
||||
src/GuiBackground.cpp\
|
||||
src/GuiCardsController.cpp\
|
||||
src/GuiCombat.cpp\
|
||||
src/GuiFrame.cpp\
|
||||
src/GuiHand.cpp\
|
||||
src/GuiLayers.cpp\
|
||||
src/GuiMana.cpp\
|
||||
src/GuiPhaseBar.cpp\
|
||||
src/GuiPlay.cpp\
|
||||
src/GuiStatic.cpp\
|
||||
src/IconButton.cpp\
|
||||
src/InteractiveButton.cpp\
|
||||
src/ManaCost.cpp\
|
||||
src/ManaCostHybrid.cpp\
|
||||
src/MenuItem.cpp\
|
||||
src/ModRules.cpp\
|
||||
src/MTGAbility.cpp\
|
||||
src/MTGCard.cpp\
|
||||
src/MTGCardInstance.cpp\
|
||||
src/MTGDeck.cpp\
|
||||
src/MTGDefinitions.cpp\
|
||||
src/MTGGamePhase.cpp\
|
||||
src/MTGGameZones.cpp\
|
||||
src/MTGPack.cpp\
|
||||
src/MTGRules.cpp\
|
||||
src/ObjectAnalytics.cpp\
|
||||
src/OptionItem.cpp\
|
||||
src/PhaseRing.cpp\
|
||||
src/Player.cpp\
|
||||
src/PlayerData.cpp\
|
||||
src/PlayGuiObject.cpp\
|
||||
src/PlayGuiObjectController.cpp\
|
||||
src/PlayRestrictions.cpp\
|
||||
src/Pos.cpp\
|
||||
src/PriceList.cpp\
|
||||
src/ReplacementEffects.cpp\
|
||||
src/Rules.cpp\
|
||||
src/SimpleButton.cpp\
|
||||
src/SimpleMenu.cpp\
|
||||
src/SimpleMenuItem.cpp\
|
||||
src/SimplePad.cpp\
|
||||
src/SimplePopup.cpp\
|
||||
src/StoryFlow.cpp\
|
||||
src/Subtypes.cpp\
|
||||
src/StyleManager.cpp\
|
||||
src/TargetChooser.cpp\
|
||||
src/TargetsList.cpp\
|
||||
src/Tasks.cpp\
|
||||
src/TextScroller.cpp\
|
||||
src/ThisDescriptor.cpp\
|
||||
src/Token.cpp\
|
||||
src/Translate.cpp\
|
||||
src/TranslateKeys.cpp\
|
||||
src/Trash.cpp\
|
||||
src/utils.cpp\
|
||||
src/WCachedResource.cpp\
|
||||
src/WDataSrc.cpp\
|
||||
src/WEvent.cpp\
|
||||
src/WFilter.cpp\
|
||||
src/WFont.cpp\
|
||||
src/WGui.cpp\
|
||||
src/WResourceManager.cpp \
|
||||
src/AIPlayerBakaB.cpp \
|
||||
src/TestSuiteAI.cpp
|
||||
|
||||
HEADERS += \
|
||||
include/CacheEngine.h\
|
||||
include/AllAbilities.h\
|
||||
include/AbilityParser.h\
|
||||
include/PrecompiledHeader.h\
|
||||
include/WResource_Fwd.h\
|
||||
include/PlayRestrictions.h\
|
||||
include/ModRules.h\
|
||||
include/AIHints.h\
|
||||
include/AIPlayerBaka.h\
|
||||
include/AIPlayerBakaB.h\
|
||||
include/DeckEditorMenu.h\
|
||||
include/WResourceManagerImpl.h\
|
||||
include/DeckMenu.h\
|
||||
include/DeckMenuItem.h\
|
||||
include/ExtraCost.h\
|
||||
include/ManaCost.h\
|
||||
include/SimpleMenuItem.h\
|
||||
include/GameApp.h\
|
||||
include/ManaCostHybrid.h\
|
||||
include/SimplePad.h\
|
||||
include/ActionElement.h\
|
||||
include/GameObserver.h\
|
||||
include/MenuItem.h\
|
||||
include/StoryFlow.h\
|
||||
include/ActionLayer.h\
|
||||
include/GameOptions.h\
|
||||
include/MTGAbility.h\
|
||||
include/Subtypes.h\
|
||||
include/ActionStack.h\
|
||||
include/GameStateAwards.h\
|
||||
include/MTGCard.h\
|
||||
include/AIMomirPlayer.h\
|
||||
include/GameStateDeckViewer.h\
|
||||
include/MTGCardInstance.h\
|
||||
include/Targetable.h\
|
||||
include/AIPlayer.h\
|
||||
include/GameStateDuel.h\
|
||||
include/MTGDeck.h\
|
||||
include/TargetChooser.h\
|
||||
include/AIStats.h\
|
||||
include/GameState.h\
|
||||
include/MTGDefinitions.h\
|
||||
include/TargetsList.h\
|
||||
include/AllAbilities.h\
|
||||
include/GameStateMenu.h\
|
||||
include/MTGGamePhase.h\
|
||||
include/Tasks.h\
|
||||
include/CardDescriptor.h\
|
||||
include/GameStateOptions.h\
|
||||
include/MTGGameZones.h\
|
||||
include/TestSuiteAI.h\
|
||||
include/CardDisplay.h\
|
||||
include/GameStateShop.h\
|
||||
include/MTGPack.h\
|
||||
include/TextScroller.h\
|
||||
include/GameStateStory.h\
|
||||
include/MTGRules.h\
|
||||
include/ThisDescriptor.h\
|
||||
include/CardGui.h\
|
||||
include/GameStateTransitions.h\
|
||||
include/IconButton.h\
|
||||
include/OptionItem.h\
|
||||
include/Token.h\
|
||||
include/CardPrimitive.h\
|
||||
include/GuiAvatars.h\
|
||||
include/Translate.h\
|
||||
include/CardSelector.h\
|
||||
include/GuiBackground.h\
|
||||
include/PhaseRing.h\
|
||||
include/TranslateKeys.h\
|
||||
include/config.h\
|
||||
include/GuiCardsController.h\
|
||||
include/PlayerData.h\
|
||||
include/Trash.h\
|
||||
include/Counters.h\
|
||||
include/GuiCombat.h\
|
||||
include/Player.h\
|
||||
include/utils.h\
|
||||
include/Credits.h\
|
||||
include/GuiFrame.h\
|
||||
include/PlayGuiObjectController.h\
|
||||
include/WCachedResource.h\
|
||||
include/Damage.h\
|
||||
include/GuiHand.h\
|
||||
include/PlayGuiObject.h\
|
||||
include/WDataSrc.h\
|
||||
include/DamagerDamaged.h\
|
||||
include/GuiLayers.h\
|
||||
include/Pos.h\
|
||||
include/WEvent.h\
|
||||
include/DeckDataWrapper.h\
|
||||
include/GuiMana.h\
|
||||
include/PriceList.h\
|
||||
include/WFilter.h\
|
||||
include/DeckMetaData.h\
|
||||
include/GuiPhaseBar.h\
|
||||
include/ReplacementEffects.h\
|
||||
include/WGui.h\
|
||||
include/DeckStats.h\
|
||||
include/GuiPlay.h\
|
||||
include/Rules.h\
|
||||
include/WResourceManager.h\
|
||||
include/DuelLayers.h\
|
||||
include/GuiStatic.h\
|
||||
include/Effects.h\
|
||||
include/StyleManager.h\
|
||||
include/WFont.h\
|
||||
include/DeckManager.h\
|
||||
include/SimplePopup.h\
|
||||
include/SimpleMenu.h\
|
||||
include/SimpleButton.h\
|
||||
include/InteractiveButton.h\
|
||||
include/ObjectAnalytics.h
|
||||
|
||||
# JGE, could probably be moved outside
|
||||
SOURCES += \
|
||||
../../JGE/src/Encoding.cpp\
|
||||
../../JGE/src/JAnimator.cpp\
|
||||
../../JGE/src/JApp.cpp\
|
||||
../../JGE/src/JDistortionMesh.cpp\
|
||||
../../JGE/src/JFileSystem.cpp\
|
||||
../../JGE/src/JGameObject.cpp\
|
||||
../../JGE/src/JGE.cpp\
|
||||
../../JGE/src/JGui.cpp\
|
||||
../../JGE/src/JLogger.cpp\
|
||||
../../JGE/src/JLBFont.cpp\
|
||||
../../JGE/src/JOBJModel.cpp\
|
||||
../../JGE/src/JParticle.cpp\
|
||||
../../JGE/src/JParticleEffect.cpp\
|
||||
../../JGE/src/JParticleEmitter.cpp\
|
||||
../../JGE/src/JParticleSystem.cpp\
|
||||
../../JGE/src/JResourceManager.cpp\
|
||||
../../JGE/src/JSpline.cpp\
|
||||
../../JGE/src/pc/JSfx.cpp\
|
||||
../../JGE/src/pc/JSocket.cpp\
|
||||
../../JGE/src/JNetwork.cpp\
|
||||
../../JGE/src/JSprite.cpp\
|
||||
../../JGE/src/OutputCapturer.cpp\
|
||||
../../JGE/src/Vector2D.cpp\
|
||||
../../JGE/src/tinyxml/tinystr.cpp\
|
||||
../../JGE/src/tinyxml/tinyxml.cpp\
|
||||
../../JGE/src/tinyxml/tinyxmlerror.cpp\
|
||||
../../JGE/src/tinyxml/tinyxmlparser.cpp\
|
||||
../../JGE/src/hge/hgecolor.cpp\
|
||||
../../JGE/src/hge/hgedistort.cpp\
|
||||
../../JGE/src/hge/hgefont.cpp\
|
||||
../../JGE/src/hge/hgeparticle.cpp\
|
||||
../../JGE/src/hge/hgerect.cpp\
|
||||
../../JGE/src/hge/hgevector.cpp\
|
||||
../../JGE/src/zipFS/zfsystem.cpp\
|
||||
../../JGE/src/zipFS/ziphdr.cpp\
|
||||
../../JGE/src/zipFS/zstream.cpp
|
||||
|
||||
CONFIG(graphics, graphics|console){
|
||||
HEADERS += \
|
||||
../../JGE/include/qt/filedownloader.h\
|
||||
../../JGE/include/qt/corewrapper.h
|
||||
|
||||
SOURCES += \
|
||||
../../JGE/src/corewrapper.cpp\
|
||||
../../JGE/src/qt/filedownloader.cpp\
|
||||
@@ -350,73 +48,17 @@ CONFIG(graphics, graphics|console){
|
||||
../../JGE/src/Qtmain.cpp\
|
||||
../../JGE/src/JMD2Model.cpp\
|
||||
../../JGE/src/pc/JGfx.cpp
|
||||
|
||||
HEADERS += \
|
||||
../../JGE/include/corewrapper.h\
|
||||
../../JGE/include/qt/filedownloader.h\
|
||||
../../JGE/include/qt/qtcorewrapper.h
|
||||
}
|
||||
else:CONFIG(console, graphics|console){
|
||||
HEADERS += \
|
||||
../../JGE/include/OutputCapturer.h
|
||||
|
||||
SOURCES += \
|
||||
../../JGE/src/OutputCapturer.cpp\
|
||||
../../JGE/src/JGfx-fake.cpp\
|
||||
../../JGE/src/Qtconsole.cpp
|
||||
../../JGE/src/Qtconsole.cpp\
|
||||
}
|
||||
|
||||
|
||||
HEADERS += \
|
||||
../../JGE/include/Threading.h\
|
||||
../../JGE/include/decoder_prx.h\
|
||||
../../JGE/include/DebugRoutines.h\
|
||||
../../JGE/include/Encoding.h\
|
||||
../../JGE/include/JAnimator.h\
|
||||
../../JGE/include/JApp.h\
|
||||
../../JGE/include/JAssert.h\
|
||||
../../JGE/include/JCooleyesMP3.h\
|
||||
../../JGE/include/JDistortionMesh.h\
|
||||
../../JGE/include/JFileSystem.h\
|
||||
../../JGE/include/JGameLauncher.h\
|
||||
../../JGE/include/JGameObject.h\
|
||||
../../JGE/include/JGE.h\
|
||||
../../JGE/include/JGui.h\
|
||||
../../JGE/include/JLBFont.h\
|
||||
../../JGE/include/JLogger.h\
|
||||
../../JGE/include/JMD2Model.h\
|
||||
../../JGE/include/JMP3.h\
|
||||
../../JGE/include/JNetwork.h\
|
||||
../../JGE/include/JOBJModel.h\
|
||||
../../JGE/include/JParticleEffect.h\
|
||||
../../JGE/include/JParticleEmitter.h\
|
||||
../../JGE/include/JParticle.h\
|
||||
../../JGE/include/JParticleSystem.h\
|
||||
../../JGE/include/JRenderer.h\
|
||||
../../JGE/include/JResourceManager.h\
|
||||
../../JGE/include/JSocket.h\
|
||||
../../JGE/include/JSoundSystem.h\
|
||||
../../JGE/include/JSpline.h\
|
||||
../../JGE/include/JSprite.h\
|
||||
../../JGE/include/JTypes.h\
|
||||
../../JGE/include/OutputCapturer.h\
|
||||
../../JGE/include/Vector2D.h\
|
||||
../../JGE/include/Vector3D.h\
|
||||
../../JGE/include/vram.h\
|
||||
../../JGE/include/hge/hgecolor.h\
|
||||
../../JGE/include/hge/hgedistort.h\
|
||||
../../JGE/include/hge/hgefont.h\
|
||||
../../JGE/include/hge/hgeparticle.h\
|
||||
../../JGE/include/hge/hgerect.h\
|
||||
../../JGE/include/hge/hgevector.h\
|
||||
../../JGE/src/unzip/unzip.h\
|
||||
../../JGE/src/unzip/ioapi.h\
|
||||
../../JGE/src/zipFS/zstream_zlib.h\
|
||||
../../JGE/src/zipFS/zfsystem.h\
|
||||
../../JGE/src/zipFS/zstream.h\
|
||||
../../JGE/src/zipFS/ziphdr.h\
|
||||
../../JGE/src/zipFS/stdafx.h\
|
||||
../../JGE/src/zipFS/fileio.h\
|
||||
../../JGE/src/tinyxml/tinystr.h\
|
||||
../../JGE/src/tinyxml/tinyxml.h\
|
||||
../../JGE/include/vram.h
|
||||
|
||||
# maemo 5 packaging
|
||||
maemo5: {
|
||||
# Variables
|
||||
|
||||
479
projects/mtg/wagic.pri
Normal file
479
projects/mtg/wagic.pri
Normal file
@@ -0,0 +1,479 @@
|
||||
# Add more folders to ship with the application, here
|
||||
TARGET = wagic
|
||||
TEMPLATE = app
|
||||
|
||||
#!macx:CONFIG += precompile_header
|
||||
unix|macx:QMAKE_CXXFLAGS += -Wno-unused-parameter
|
||||
unix:!macx:QMAKE_CXXFLAGS += -Wno-unused-but-set-parameter
|
||||
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
|
||||
|
||||
windows:DEFINES += _CRT_SECURE_NO_WARNINGS
|
||||
unix|macx:DEFINES += LINUX
|
||||
CONFIG(debug, debug|release) {
|
||||
DEFINES += _DEBUG
|
||||
}
|
||||
|
||||
DEFINES += NETWORK_SUPPORT
|
||||
DEFINES += TIXML_USE_STL
|
||||
|
||||
windows:INCLUDEPATH += ../../JGE/Dependencies/include
|
||||
windows{
|
||||
*-g++* {
|
||||
DEFINES += LINUX
|
||||
INCLUDEPATH += /usr/i686-w64-mingw32/sys-root/mingw/include/Qt
|
||||
# INCLUDEPATH += /usr/i686-w64-mingw32/sys-root/mingw/include/c++
|
||||
LIBS += -L/usr/i686-w64-mingw32/sys-root/mingw/lib
|
||||
LIBS += -lwsock32
|
||||
}
|
||||
*-msvc* {
|
||||
INCLUDEPATH += extra
|
||||
DEFINES += WIN32
|
||||
}
|
||||
}
|
||||
macx:INCLUDEPATH += /opt/include
|
||||
INCLUDEPATH += ../../JGE/include
|
||||
INCLUDEPATH += ../../JGE/src/zipFS
|
||||
INCLUDEPATH += ../../Boost
|
||||
INCLUDEPATH += include
|
||||
|
||||
unix:!symbian:LIBS += -lz
|
||||
win32:LIBS += ../../JGE/Dependencies/lib/fmodvc.lib
|
||||
win32:LIBS += ../../JGE/Dependencies/lib/zlibd.lib
|
||||
PRECOMPILED_HEADER = include/PrecompiledHeader.h
|
||||
|
||||
#DEFINES += TRACK_OBJECT_USAGE
|
||||
#DEFINES += AI_CHANGE_TESTING
|
||||
#DEFINES += ACTION_LOGGING_TESTING
|
||||
|
||||
SOURCES += \
|
||||
src/AbilityParser.cpp\
|
||||
src/ActionElement.cpp\
|
||||
src/ActionLayer.cpp\
|
||||
src/ActionStack.cpp\
|
||||
src/AIHints.cpp\
|
||||
src/AIMomirPlayer.cpp\
|
||||
src/AIPlayer.cpp\
|
||||
src/AIPlayerBaka.cpp\
|
||||
src/AIStats.cpp\
|
||||
src/AllAbilities.cpp\
|
||||
src/CardDescriptor.cpp\
|
||||
src/CardDisplay.cpp\
|
||||
src/CardGui.cpp\
|
||||
src/CardPrimitive.cpp\
|
||||
src/CardSelector.cpp\
|
||||
src/CarouselDeckView.cpp\
|
||||
src/Closest.cpp\
|
||||
src/Counters.cpp\
|
||||
src/Credits.cpp\
|
||||
src/Damage.cpp\
|
||||
src/DamagerDamaged.cpp\
|
||||
src/DeckDataWrapper.cpp\
|
||||
src/DeckEditorMenu.cpp\
|
||||
src/DeckManager.cpp\
|
||||
src/DeckMenu.cpp\
|
||||
src/DeckMenuItem.cpp\
|
||||
src/DeckMetaData.cpp\
|
||||
src/DeckStats.cpp\
|
||||
src/DeckView.cpp\
|
||||
src/DuelLayers.cpp\
|
||||
src/Effects.cpp\
|
||||
src/ExtraCost.cpp\
|
||||
src/GameApp.cpp\
|
||||
src/GameLauncher.cpp\
|
||||
src/GameObserver.cpp\
|
||||
src/GameOptions.cpp\
|
||||
src/GameStateAwards.cpp\
|
||||
src/GameState.cpp\
|
||||
src/GameStateDeckViewer.cpp\
|
||||
src/GameStateDuel.cpp\
|
||||
src/GameStateMenu.cpp\
|
||||
src/GameStateOptions.cpp\
|
||||
src/GameStateShop.cpp\
|
||||
src/GameStateStory.cpp\
|
||||
src/GameStateTransitions.cpp\
|
||||
src/GridDeckView.cpp\
|
||||
src/GuiAvatars.cpp\
|
||||
src/GuiBackground.cpp\
|
||||
src/GuiCardsController.cpp\
|
||||
src/GuiCombat.cpp\
|
||||
src/GuiFrame.cpp\
|
||||
src/GuiHand.cpp\
|
||||
src/GuiLayers.cpp\
|
||||
src/GuiMana.cpp\
|
||||
src/GuiPhaseBar.cpp\
|
||||
src/GuiPlay.cpp\
|
||||
src/GuiStatic.cpp\
|
||||
src/IconButton.cpp\
|
||||
src/InteractiveButton.cpp\
|
||||
src/ManaCost.cpp\
|
||||
src/ManaCostHybrid.cpp\
|
||||
src/MenuItem.cpp\
|
||||
src/ModRules.cpp\
|
||||
src/MTGAbility.cpp\
|
||||
src/MTGCard.cpp\
|
||||
src/MTGCardInstance.cpp\
|
||||
src/MTGDeck.cpp\
|
||||
src/MTGDefinitions.cpp\
|
||||
src/MTGGamePhase.cpp\
|
||||
src/MTGGameZones.cpp\
|
||||
src/MTGPack.cpp\
|
||||
src/MTGRules.cpp\
|
||||
src/ObjectAnalytics.cpp\
|
||||
src/OptionItem.cpp\
|
||||
src/PhaseRing.cpp\
|
||||
src/Player.cpp\
|
||||
src/PlayerData.cpp\
|
||||
src/PlayGuiObject.cpp\
|
||||
src/PlayGuiObjectController.cpp\
|
||||
src/PlayRestrictions.cpp\
|
||||
src/Pos.cpp\
|
||||
src/PriceList.cpp\
|
||||
src/ReplacementEffects.cpp\
|
||||
src/Rules.cpp\
|
||||
src/SimpleButton.cpp\
|
||||
src/SimpleMenu.cpp\
|
||||
src/SimpleMenuItem.cpp\
|
||||
src/SimplePad.cpp\
|
||||
src/SimplePopup.cpp\
|
||||
src/StoryFlow.cpp\
|
||||
src/Subtypes.cpp\
|
||||
src/StyleManager.cpp\
|
||||
src/TargetChooser.cpp\
|
||||
src/TargetsList.cpp\
|
||||
src/Tasks.cpp\
|
||||
src/TextScroller.cpp\
|
||||
src/ThisDescriptor.cpp\
|
||||
src/Token.cpp\
|
||||
src/Translate.cpp\
|
||||
src/TranslateKeys.cpp\
|
||||
src/Trash.cpp\
|
||||
src/utils.cpp\
|
||||
src/WCachedResource.cpp\
|
||||
src/WDataSrc.cpp\
|
||||
src/WEvent.cpp\
|
||||
src/WFilter.cpp\
|
||||
src/WFont.cpp\
|
||||
src/WGui.cpp\
|
||||
src/WResourceManager.cpp \
|
||||
src/AIPlayerBakaB.cpp \
|
||||
src/TestSuiteAI.cpp
|
||||
|
||||
HEADERS += \
|
||||
include/CarouselDeckView.h\
|
||||
include/DeckView.h\
|
||||
include/Easing.h\
|
||||
include/GridDeckView.h\
|
||||
include/CacheEngine.h\
|
||||
include/AllAbilities.h\
|
||||
include/AbilityParser.h\
|
||||
include/PrecompiledHeader.h\
|
||||
include/WResource_Fwd.h\
|
||||
include/PlayRestrictions.h\
|
||||
include/ModRules.h\
|
||||
include/AIHints.h\
|
||||
include/AIPlayerBaka.h\
|
||||
include/AIPlayerBakaB.h\
|
||||
include/DeckEditorMenu.h\
|
||||
include/WResourceManagerImpl.h\
|
||||
include/DeckMenu.h\
|
||||
include/DeckMenuItem.h\
|
||||
include/ExtraCost.h\
|
||||
include/ManaCost.h\
|
||||
include/SimpleMenuItem.h\
|
||||
include/GameApp.h\
|
||||
include/ManaCostHybrid.h\
|
||||
include/SimplePad.h\
|
||||
include/ActionElement.h\
|
||||
include/GameObserver.h\
|
||||
include/MenuItem.h\
|
||||
include/StoryFlow.h\
|
||||
include/ActionLayer.h\
|
||||
include/GameOptions.h\
|
||||
include/MTGAbility.h\
|
||||
include/Subtypes.h\
|
||||
include/ActionStack.h\
|
||||
include/GameStateAwards.h\
|
||||
include/MTGCard.h\
|
||||
include/AIMomirPlayer.h\
|
||||
include/GameStateDeckViewer.h\
|
||||
include/MTGCardInstance.h\
|
||||
include/Targetable.h\
|
||||
include/AIPlayer.h\
|
||||
include/GameStateDuel.h\
|
||||
include/MTGDeck.h\
|
||||
include/TargetChooser.h\
|
||||
include/AIStats.h\
|
||||
include/GameState.h\
|
||||
include/MTGDefinitions.h\
|
||||
include/TargetsList.h\
|
||||
include/AllAbilities.h\
|
||||
include/GameStateMenu.h\
|
||||
include/MTGGamePhase.h\
|
||||
include/Tasks.h\
|
||||
include/CardDescriptor.h\
|
||||
include/GameStateOptions.h\
|
||||
include/MTGGameZones.h\
|
||||
include/TestSuiteAI.h\
|
||||
include/CardDisplay.h\
|
||||
include/GameStateShop.h\
|
||||
include/MTGPack.h\
|
||||
include/TextScroller.h\
|
||||
include/GameStateStory.h\
|
||||
include/MTGRules.h\
|
||||
include/ThisDescriptor.h\
|
||||
include/CardGui.h\
|
||||
include/GameStateTransitions.h\
|
||||
include/IconButton.h\
|
||||
include/OptionItem.h\
|
||||
include/Token.h\
|
||||
include/CardPrimitive.h\
|
||||
include/GuiAvatars.h\
|
||||
include/Translate.h\
|
||||
include/CardSelector.h\
|
||||
include/GuiBackground.h\
|
||||
include/PhaseRing.h\
|
||||
include/TranslateKeys.h\
|
||||
include/config.h\
|
||||
include/GuiCardsController.h\
|
||||
include/PlayerData.h\
|
||||
include/Trash.h\
|
||||
include/Counters.h\
|
||||
include/GuiCombat.h\
|
||||
include/Player.h\
|
||||
include/utils.h\
|
||||
include/Credits.h\
|
||||
include/GuiFrame.h\
|
||||
include/PlayGuiObjectController.h\
|
||||
include/WCachedResource.h\
|
||||
include/Damage.h\
|
||||
include/GuiHand.h\
|
||||
include/PlayGuiObject.h\
|
||||
include/WDataSrc.h\
|
||||
include/DamagerDamaged.h\
|
||||
include/GuiLayers.h\
|
||||
include/Pos.h\
|
||||
include/WEvent.h\
|
||||
include/DeckDataWrapper.h\
|
||||
include/GuiMana.h\
|
||||
include/PriceList.h\
|
||||
include/WFilter.h\
|
||||
include/DeckMetaData.h\
|
||||
include/GuiPhaseBar.h\
|
||||
include/ReplacementEffects.h\
|
||||
include/WGui.h\
|
||||
include/DeckStats.h\
|
||||
include/GuiPlay.h\
|
||||
include/Rules.h\
|
||||
include/WResourceManager.h\
|
||||
include/DuelLayers.h\
|
||||
include/GuiStatic.h\
|
||||
include/Effects.h\
|
||||
include/StyleManager.h\
|
||||
include/WFont.h\
|
||||
include/DeckManager.h\
|
||||
include/SimplePopup.h\
|
||||
include/SimpleMenu.h\
|
||||
include/SimpleButton.h\
|
||||
include/InteractiveButton.h\
|
||||
include/ObjectAnalytics.h
|
||||
|
||||
# JGE, could probably be moved outside
|
||||
SOURCES += \
|
||||
../../JGE/src/Encoding.cpp\
|
||||
../../JGE/src/JAnimator.cpp\
|
||||
../../JGE/src/JApp.cpp\
|
||||
../../JGE/src/JDistortionMesh.cpp\
|
||||
../../JGE/src/JFileSystem.cpp\
|
||||
../../JGE/src/JGameObject.cpp\
|
||||
../../JGE/src/JGE.cpp\
|
||||
../../JGE/src/JGui.cpp\
|
||||
../../JGE/src/JLogger.cpp\
|
||||
../../JGE/src/JLBFont.cpp\
|
||||
../../JGE/src/JOBJModel.cpp\
|
||||
../../JGE/src/JParticle.cpp\
|
||||
../../JGE/src/JParticleEffect.cpp\
|
||||
../../JGE/src/JParticleEmitter.cpp\
|
||||
../../JGE/src/JParticleSystem.cpp\
|
||||
../../JGE/src/JResourceManager.cpp\
|
||||
../../JGE/src/JSpline.cpp\
|
||||
../../JGE/src/JNetwork.cpp\
|
||||
../../JGE/src/pc/JSocket.cpp\
|
||||
../../JGE/src/pc/JSfx.cpp\
|
||||
../../JGE/src/JSprite.cpp\
|
||||
../../JGE/src/Vector2D.cpp\
|
||||
../../JGE/src/tinyxml/tinystr.cpp\
|
||||
../../JGE/src/tinyxml/tinyxml.cpp\
|
||||
../../JGE/src/tinyxml/tinyxmlerror.cpp\
|
||||
../../JGE/src/tinyxml/tinyxmlparser.cpp\
|
||||
../../JGE/src/hge/hgecolor.cpp\
|
||||
../../JGE/src/hge/hgedistort.cpp\
|
||||
../../JGE/src/hge/hgefont.cpp\
|
||||
../../JGE/src/hge/hgeparticle.cpp\
|
||||
../../JGE/src/hge/hgerect.cpp\
|
||||
../../JGE/src/hge/hgevector.cpp\
|
||||
../../JGE/src/zipFS/zfsystem.cpp\
|
||||
../../JGE/src/zipFS/ziphdr.cpp\
|
||||
../../JGE/src/zipFS/zstream.cpp
|
||||
|
||||
HEADERS += \
|
||||
../../JGE/include/Threading.h\
|
||||
../../JGE/include/decoder_prx.h\
|
||||
../../JGE/include/DebugRoutines.h\
|
||||
../../JGE/include/Encoding.h\
|
||||
../../JGE/include/JAnimator.h\
|
||||
../../JGE/include/JApp.h\
|
||||
../../JGE/include/JAssert.h\
|
||||
../../JGE/include/JCooleyesMP3.h\
|
||||
../../JGE/include/JDistortionMesh.h\
|
||||
../../JGE/include/JFileSystem.h\
|
||||
../../JGE/include/JGameLauncher.h\
|
||||
../../JGE/include/JGameObject.h\
|
||||
../../JGE/include/JGE.h\
|
||||
../../JGE/include/JGui.h\
|
||||
../../JGE/include/JLBFont.h\
|
||||
../../JGE/include/JLogger.h\
|
||||
../../JGE/include/JMD2Model.h\
|
||||
../../JGE/include/JMP3.h\
|
||||
../../JGE/include/JNetwork.h\
|
||||
../../JGE/include/JOBJModel.h\
|
||||
../../JGE/include/JParticleEffect.h\
|
||||
../../JGE/include/JParticleEmitter.h\
|
||||
../../JGE/include/JParticle.h\
|
||||
../../JGE/include/JParticleSystem.h\
|
||||
../../JGE/include/JRenderer.h\
|
||||
../../JGE/include/JResourceManager.h\
|
||||
../../JGE/include/JSocket.h\
|
||||
../../JGE/include/JSoundSystem.h\
|
||||
../../JGE/include/JSpline.h\
|
||||
../../JGE/include/JSprite.h\
|
||||
../../JGE/include/JTypes.h\
|
||||
../../JGE/include/Vector2D.h\
|
||||
../../JGE/include/Vector3D.h\
|
||||
../../JGE/include/vram.h\
|
||||
../../JGE/include/hge/hgecolor.h\
|
||||
../../JGE/include/hge/hgedistort.h\
|
||||
../../JGE/include/hge/hgefont.h\
|
||||
../../JGE/include/hge/hgeparticle.h\
|
||||
../../JGE/include/hge/hgerect.h\
|
||||
../../JGE/include/hge/hgevector.h\
|
||||
../../JGE/src/unzip/unzip.h\
|
||||
../../JGE/src/unzip/ioapi.h\
|
||||
../../JGE/src/zipFS/zstream_zlib.h\
|
||||
../../JGE/src/zipFS/zfsystem.h\
|
||||
../../JGE/src/zipFS/zstream.h\
|
||||
../../JGE/src/zipFS/ziphdr.h\
|
||||
../../JGE/src/zipFS/stdafx.h\
|
||||
../../JGE/src/zipFS/fileio.h\
|
||||
../../JGE/src/tinyxml/tinystr.h\
|
||||
../../JGE/src/tinyxml/tinyxml.h\
|
||||
../../JGE/include/vram.h
|
||||
|
||||
# maemo 5 packaging
|
||||
maemo5: {
|
||||
# Variables
|
||||
BINDIR = /opt/wagic/bin
|
||||
RESDIR = /home/user/wagic/Res
|
||||
USERDIR = MyDocs/.Wagic
|
||||
ICONDIR = /usr/share
|
||||
|
||||
DEFINES += RESDIR=\\\"$$RESDIR\\\"
|
||||
DEFINES += USERDIR=\\\"$$USERDIR\\\"
|
||||
|
||||
INSTALLS += target \
|
||||
desktop \
|
||||
icon
|
||||
|
||||
target.path = $$BINDIR
|
||||
|
||||
desktop.path = $$ICONDIR/applications/hildon
|
||||
desktop.files += wagic.desktop
|
||||
|
||||
icon.path = $$ICONDIR/icons/hicolor/64x64/apps
|
||||
icon.files += wagic-64x64.png
|
||||
|
||||
# Meego/maemo 6 packaging (no launcher)
|
||||
} else:contains(MEEGO_EDITION,harmattan): {
|
||||
# Variables
|
||||
BINDIR = /opt/wagic/bin
|
||||
RESDIR = /opt/wagic/Res
|
||||
USERDIR = MyDocs/.Wagic
|
||||
ICONDIR = /usr/share
|
||||
|
||||
DEFINES += RESDIR=\\\"$$RESDIR\\\"
|
||||
DEFINES += USERDIR=\\\"$$USERDIR\\\"
|
||||
|
||||
INSTALLS += target \
|
||||
desktop \
|
||||
icon \
|
||||
policy
|
||||
|
||||
target.path = $$BINDIR
|
||||
|
||||
desktop.path = /usr/share/applications
|
||||
desktop.files += debian_harmattan/wagic.desktop
|
||||
|
||||
icon.files = wagic-80x80.png
|
||||
icon.path = /usr/share/icons/hicolor/64x64/apps
|
||||
|
||||
policy.files = debian_harmattan/wagic.conf
|
||||
policy.path = /usr/share/policy/etc/syspart.conf.d
|
||||
|
||||
} else:symbian {
|
||||
TARGET.UID3 = 0xE1D807D3
|
||||
|
||||
# Smart Installer package's UID
|
||||
# This UID is from the protected range
|
||||
# and therefore the package will fail to install if self-signed
|
||||
# By default qmake uses the unprotected range value if unprotected UID is defined for the application
|
||||
# and 0x2002CCCF value if protected UID is given to the application
|
||||
#symbian:DEPLOYMENT.installer_header = 0x2002CCCF
|
||||
|
||||
# Allow network access on Symbian... that's probably pointless
|
||||
TARGET.CAPABILITY += NetworkServices
|
||||
|
||||
RESDIR = some/res/dir
|
||||
USERDIR = .Wagic
|
||||
DEFINES += RESDIR=\"$$RESDIR\"
|
||||
DEFINES += USERDIR=\"$$USERDIR\"
|
||||
ICON = wagic.svg
|
||||
} else:android {
|
||||
DEFINES += Q_WS_ANDROID
|
||||
RESDIR = Res
|
||||
USERDIR = /sdcard/Wagic/Res
|
||||
DEFINES += RESDIR=\\\"$$RESDIR\\\"
|
||||
DEFINES += USERDIR=\\\"$$USERDIR\\\"
|
||||
} else:unix {
|
||||
# Variables
|
||||
BINDIR = /usr/bin
|
||||
ICONDIR = /usr/share
|
||||
RESDIR = Res
|
||||
USERDIR = .Wagic
|
||||
|
||||
DEFINES += RESDIR=\\\"$$RESDIR\\\"
|
||||
DEFINES += USERDIR=\\\"$$USERDIR\\\"
|
||||
|
||||
target.path = $$BINDIR
|
||||
|
||||
desktop.path = $$ICONDIR/applications
|
||||
desktop.files += wagic.desktop
|
||||
|
||||
icon.path = $$ICONDIR/icons/hicolor/64x64/apps
|
||||
icon.files += wagic-64x64.png
|
||||
|
||||
INSTALLS += target \
|
||||
desktop \
|
||||
icon
|
||||
|
||||
} else:windows {
|
||||
RESDIR = ./Res
|
||||
USERDIR = .Wagic
|
||||
DEFINES += RESDIR=\\\"$$RESDIR\\\"
|
||||
DEFINES += USERDIR=\\\"$$USERDIR\\\"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
# updating versions with the TRAVIS build numbers
|
||||
cd projects/mtg/
|
||||
ant update > error.txt
|
||||
cd ../..
|
||||
|
||||
# we're building a PSP binary here
|
||||
cd JGE
|
||||
make -j 8
|
||||
@@ -7,6 +12,11 @@ cd ..
|
||||
cd projects/mtg
|
||||
mkdir objs
|
||||
make -j 8
|
||||
mkdir psprelease
|
||||
mv EBOOT.PBP psprelease/
|
||||
mv wagic.elf psprelease/
|
||||
mv wagic.prx psprelease/
|
||||
zip psprelease.zip -r psprelease/
|
||||
cd ../..
|
||||
|
||||
# we're building an Android binary here
|
||||
@@ -18,13 +28,24 @@ ant debug -f projects/mtg/Android/build.xml
|
||||
# we're building a Qt version with GUI here
|
||||
mkdir qt-gui-build
|
||||
cd qt-gui-build
|
||||
qmake ../projects/mtg/wagic-qt.pro CONFIG+=debug CONFIG+=graphics
|
||||
qmake ../projects/mtg/wagic-qt.pro CONFIG+=release CONFIG+=graphics
|
||||
make -j 8
|
||||
cd ..
|
||||
|
||||
# let's try an Intel linux binary
|
||||
# let's try an Intel linux binary in debug text-mode-only
|
||||
qmake projects/mtg/wagic-qt.pro CONFIG+=console CONFIG+=debug DEFINES+=CAPTURE_STDERR
|
||||
make -j 8
|
||||
|
||||
# and finish by running the testsuite
|
||||
./wagic
|
||||
# we create resource package
|
||||
cd projects/mtg/bin/Res
|
||||
python createResourceZip.py
|
||||
# if we let the zip here, Wagic will use it in the testsuite
|
||||
# and we'll get 51 failed test cases
|
||||
mv core_*.zip ../../../../core.zip
|
||||
cd ../../../..
|
||||
|
||||
# Now we run the testsuite (Res needs to be in the working directory)
|
||||
cd projects/mtg
|
||||
../../wagic
|
||||
cd ../..
|
||||
|
||||
|
||||
31
upload-binaries.sh
Executable file
31
upload-binaries.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
||||
if [ "$TRAVIS_BRANCH" == "alphas" ]; then
|
||||
echo -e "Creating a release\n"
|
||||
curl -X POST -H "Authorization: token ${GH_TOKEN}" \
|
||||
-d '{"tag_name": "alpha-'${TRAVIS_BUILD_NUMBER}'", "target_commitish": "master", "name": "Alpha release number '${TRAVIS_BUILD_NUMBER}'", "body": "Automatic alpha release generated by Travis CI", "draft": false, "prerelease": true}' "https://api.github.com/repos/WagicProject/wagic/releases" > json.txt
|
||||
IDDI=`cat json.txt | jq '.id'`
|
||||
|
||||
echo -e "Uploading Core resources\n"
|
||||
curl -X POST -H "Authorization: token ${GH_TOKEN}" \
|
||||
-H "Accept: application/vnd.github.manifold-preview" \
|
||||
-H "Content-Type: application/zip" \
|
||||
--data-binary @core.zip \
|
||||
"https://uploads.github.com/repos/WagicProject/wagic/releases/${IDDI}/assets?name=Wagic-core-${TRAVIS_BUILD_NUMBER}.zip"
|
||||
|
||||
echo -e "Uploading android package\n"
|
||||
curl -X POST -H "Authorization: token ${GH_TOKEN}" \
|
||||
-H "Accept: application/vnd.github.manifold-preview" \
|
||||
-H "Content-Type: application/zip" \
|
||||
--data-binary @projects/mtg/Android/bin/Wagic-debug.apk \
|
||||
"https://uploads.github.com/repos/WagicProject/wagic/releases/${IDDI}/assets?name=Wagic-android-${TRAVIS_BUILD_NUMBER}.apk"
|
||||
|
||||
echo -e "Uploading PSP package\n"
|
||||
curl -X POST -H "Authorization: token ${GH_TOKEN}" \
|
||||
-H "Accept: application/vnd.github.manifold-preview" \
|
||||
-H "Content-Type: application/zip" \
|
||||
--data-binary @projects/mtg/psprelease.zip \
|
||||
"https://uploads.github.com/repos/WagicProject/wagic/releases/${IDDI}/assets?name=Wagic-psp-${TRAVIS_BUILD_NUMBER}.zip"
|
||||
|
||||
echo -e "Done uploading\n"
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user