wololo
- Adding DJardin's port to N900
This commit is contained in:
@@ -69,7 +69,7 @@ protected:
|
||||
|
||||
int price; //Base price.
|
||||
int minCards, maxCards;
|
||||
vector<MTGPackSlot*> slots;
|
||||
vector<MTGPackSlot*> slotss;
|
||||
};
|
||||
|
||||
class MTGPacks{
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
#define NEW new
|
||||
#endif
|
||||
|
||||
#ifdef QT_CONFIG
|
||||
#include <QtGlobal>
|
||||
#define OutputDebugString(val) qDebug(val)
|
||||
#else
|
||||
#ifdef LINUX
|
||||
#ifdef _DEBUG
|
||||
#define OutputDebugString(val) (std::cerr << val);
|
||||
@@ -30,6 +34,8 @@
|
||||
#define OutputDebugString(val) {}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef RESPATH
|
||||
#define RESPATH "Res"
|
||||
|
||||
@@ -819,12 +819,15 @@ bool ShopBooster::unitTest(){
|
||||
u+=ddw->count(c);
|
||||
card++;
|
||||
}
|
||||
int count = ddw->getCount();
|
||||
SAFE_DELETE(ddw);
|
||||
SAFE_DELETE(d);
|
||||
if(r != 1 || u != 3 ){
|
||||
sprintf(result, "<span class=\"error\">==Unexpected rarity count==</span><br />");
|
||||
TestSuite::Log(result);
|
||||
res = false;
|
||||
}
|
||||
if(ddw->getCount() < 14) {
|
||||
if(count < 14) {
|
||||
sprintf(result, "<span class=\"error\">==Unexpected card count==</span><br />");
|
||||
TestSuite::Log(result);
|
||||
res = false;
|
||||
|
||||
@@ -1095,16 +1095,21 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
ab = NEW ABecomes(id,card,target,stypes,pt,sabilities);
|
||||
}return ab;
|
||||
}
|
||||
|
||||
//bloodthirst
|
||||
found = s.find("bloodthirst:");
|
||||
if (found != string::npos){
|
||||
size_t start = s.find(":",found);
|
||||
size_t end = s.find(" ",start);
|
||||
int amount;
|
||||
if (end != string::npos){amount = atoi(s.substr(start+1,end-start-1).c_str());}
|
||||
else{amount = atoi(s.substr(start+1).c_str());}
|
||||
if (end != string::npos){
|
||||
amount = atoi(s.substr(start+1,end-start-1).c_str());
|
||||
} else {
|
||||
amount = atoi(s.substr(start+1).c_str());
|
||||
}
|
||||
MTGAbility * a = NEW ABloodThirst(id,card,target,amount);
|
||||
return a;}
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -93,8 +93,8 @@ int MTGPack::assemblePack(MTGDeck *to){
|
||||
if(!p) return -1;
|
||||
p->Shuffle();
|
||||
|
||||
for(size_t i=0;i<slots.size();i++){
|
||||
carryover = slots[i]->add(p,to,carryover);
|
||||
for(size_t i=0;i<slotss.size();i++){
|
||||
carryover = slotss[i]->add(p,to,carryover);
|
||||
if(carryover > 0)
|
||||
carryover = carryover; //This means we're failing.
|
||||
}
|
||||
@@ -104,8 +104,8 @@ int MTGPack::assemblePack(MTGDeck *to){
|
||||
void MTGPack::countCards(){
|
||||
minCards = 0;
|
||||
maxCards = 0;
|
||||
for(size_t i=0;i<slots.size();i++){
|
||||
MTGPackSlot * ps = slots[i];
|
||||
for(size_t i=0;i<slotss.size();i++){
|
||||
MTGPackSlot * ps = slotss[i];
|
||||
int top = 0;
|
||||
int bot = 999999999;
|
||||
for(size_t y=0;y<ps->entries.size();y++){
|
||||
@@ -160,7 +160,7 @@ void MTGPack::load(string filename){
|
||||
std::transform(tag.begin(),tag.end(),tag.begin(),::tolower);
|
||||
if(tag != "slot") continue;
|
||||
MTGPackSlot * s = NEW MTGPackSlot();
|
||||
slots.push_back(s);
|
||||
slotss.push_back(s);
|
||||
holder = pSlot->Attribute("copies");
|
||||
if(holder) s->copies = atoi(holder);
|
||||
else s->copies = 1;
|
||||
@@ -202,10 +202,10 @@ MTGPackSlot::~MTGPackSlot(){
|
||||
entries.clear();
|
||||
}
|
||||
MTGPack::~MTGPack(){
|
||||
for(size_t t=0;t<slots.size();t++){
|
||||
SAFE_DELETE(slots[t]);
|
||||
for(size_t t=0;t<slotss.size();t++){
|
||||
SAFE_DELETE(slotss[t]);
|
||||
}
|
||||
slots.clear();
|
||||
slotss.clear();
|
||||
}
|
||||
MTGPacks::~MTGPacks(){
|
||||
for(size_t t=0;t<packs.size();t++){
|
||||
@@ -283,16 +283,16 @@ MTGPack * MTGPacks::getDefault(){
|
||||
ps->addEntry(NEW MTGPackEntryRandom("rarity:mythic;"));
|
||||
for(int i=0;i<7;i++)
|
||||
ps->addEntry(NEW MTGPackEntryRandom("rarity:rare;"));
|
||||
defaultBooster.slots.push_back(ps);
|
||||
defaultBooster.slotss.push_back(ps);
|
||||
ps = NEW MTGPackSlot(); ps->copies = 3;
|
||||
ps->addEntry(NEW MTGPackEntryRandom("rarity:uncommon;"));
|
||||
defaultBooster.slots.push_back(ps);
|
||||
defaultBooster.slotss.push_back(ps);
|
||||
ps = NEW MTGPackSlot(); ps->copies = 1;
|
||||
ps->addEntry(NEW MTGPackEntryRandom("rarity:land;&type:basic;"));
|
||||
defaultBooster.slots.push_back(ps);
|
||||
defaultBooster.slotss.push_back(ps);
|
||||
ps = NEW MTGPackSlot(); ps->copies = 10;
|
||||
ps->addEntry(NEW MTGPackEntryRandom("rarity:common;"));
|
||||
defaultBooster.slots.push_back(ps);
|
||||
defaultBooster.slotss.push_back(ps);
|
||||
defaultBooster.bValid = true;
|
||||
defaultBooster.unlockStatus = 1;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,321 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2010-06-30T19:48:30
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui opengl
|
||||
VERSION = 1.2.3
|
||||
TARGET = wagic
|
||||
TEMPLATE = app
|
||||
windows:DEFINES += WIN32
|
||||
windows:DEFINES += _CRT_SECURE_NO_WARNINGS
|
||||
windows:DEFINES += FORCE_GL2
|
||||
unix:DEFINES += LINUX
|
||||
DEFINES += QT_CONFIG
|
||||
maemo5 {
|
||||
DEFINES += USE_PHONON
|
||||
QT += phonon
|
||||
}
|
||||
windows:INCLUDEPATH += ../../JGE/Dependencies/include
|
||||
unix:INCLUDEPATH += /usr/include/GL
|
||||
unix:INCLUDEPATH += /usr/include/freetype2
|
||||
INCLUDEPATH += ../../JGE/include
|
||||
INCLUDEPATH += include
|
||||
|
||||
unix:LIBS += -ljpeg -lgif -lpng12
|
||||
windows:LIBS += -LD:\Projects\Wagic\JGE\Dependencies\lib -llibjpeg-static-mt-debug -lgiflib -llibpng -lfmodvc
|
||||
|
||||
# MGT
|
||||
SOURCES += \
|
||||
src/ActionElement.cpp\
|
||||
src/ActionLayer.cpp\
|
||||
src/ActionStack.cpp\
|
||||
src/AIMomirPlayer.cpp\
|
||||
src/AIPlayer.cpp\
|
||||
src/AIStats.cpp\
|
||||
src/CardDescriptor.cpp\
|
||||
src/CardDisplay.cpp\
|
||||
src/CardEffect.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/DeckMetaData.cpp\
|
||||
src/DeckManager.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/Logger.cpp\
|
||||
src/ManaCost.cpp\
|
||||
src/ManaCostHybrid.cpp\
|
||||
src/MenuItem.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/OptionItem.cpp\
|
||||
src/PhaseRing.cpp\
|
||||
src/Player.cpp\
|
||||
src/PlayerData.cpp\
|
||||
src/PlayGuiObject.cpp\
|
||||
src/PlayGuiObjectController.cpp\
|
||||
src/Pos.cpp\
|
||||
src/PriceList.cpp\
|
||||
src/ReplacementEffects.cpp\
|
||||
src/Rules.cpp\
|
||||
src/SimpleMenu.cpp\
|
||||
src/SimpleMenuItem.cpp\
|
||||
src/SimplePad.cpp\
|
||||
src/StoryFlow.cpp\
|
||||
src/Subtypes.cpp\
|
||||
src/StyleManager.cpp\
|
||||
src/TargetChooser.cpp\
|
||||
src/TargetsList.cpp\
|
||||
src/Tasks.cpp\
|
||||
src/TestSuiteAI.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
|
||||
|
||||
HEADERS += \
|
||||
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/OptionItem.h\
|
||||
include/Token.h\
|
||||
include/CardPrimitive.h\
|
||||
include/GuiAvatars.h\
|
||||
include/OSD.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/ShopItem.h\
|
||||
include/Effects.h\
|
||||
include/Logger.h\
|
||||
include/StyleManager.h\
|
||||
include/WFont.h\
|
||||
include/DeckManager.h\
|
||||
include/SimpleMenu.h
|
||||
|
||||
# JGE, could probably be moved outside
|
||||
SOURCES += \
|
||||
../../JGE/src/Qtmain.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/JGBKFont.cpp\
|
||||
../../JGE/src/JGE.cpp\
|
||||
../../JGE/src/JGui.cpp\
|
||||
../../JGE/src/JLBFont.cpp\
|
||||
../../JGE/src/JLogger.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/JTTFont.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/unzip/ioapi.c\
|
||||
../../JGE/src/unzip/mztools.c\
|
||||
../../JGE/src/unzip/unzip.c\
|
||||
../../JGE/src/pc/JSfx.cpp\
|
||||
../../JGE/src/pc/JGfx.cpp
|
||||
|
||||
HEADERS += \
|
||||
../../JGE/include/decoder_prx.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/JGBKFont.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/JTTFont.h\
|
||||
../../JGE/include/JTypes.h\
|
||||
../../JGE/include/Vector2D.h\
|
||||
../../JGE/include/Vector3D.h\
|
||||
../../JGE/include/vram.h\
|
||||
../../JGE/src/tinyxml\tinystr.h\
|
||||
../../JGE/src/tinyxml\tinyxml.h\
|
||||
../../JGE/include/vram.h
|
||||
|
||||
FORMS +=
|
||||
|
||||
CONFIG += mobility
|
||||
MOBILITY =
|
||||
|
||||
symbian {
|
||||
TARGET.UID3 = 0xe3fa5a9c
|
||||
# TARGET.CAPABILITY +=
|
||||
TARGET.EPOCSTACKSIZE = 0x14000
|
||||
TARGET.EPOCHEAPSIZE = 0x020000 0x800000
|
||||
}
|
||||
|
||||
OTHER_FILES +=
|
||||
|
||||
RESOURCES +=
|
||||
Reference in New Issue
Block a user