summaryrefslogtreecommitdiffstats
path: root/pokemod
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-02-25 16:26:07 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-02-25 16:26:07 +0000
commit86b07a87ceb0154a254f104b3135a51787c57f30 (patch)
tree1c6b5e3460029e97c69df0a99868400cbe11e482 /pokemod
parent1e02a507f0b481465f5b47441479b98a81aee079 (diff)
downloadsigen-86b07a87ceb0154a254f104b3135a51787c57f30.tar.gz
sigen-86b07a87ceb0154a254f104b3135a51787c57f30.tar.xz
sigen-86b07a87ceb0154a254f104b3135a51787c57f30.zip
[ADD] Pokemod tree will reflect PokéMod heirarchy and load panels
[FIX] PokemodUI panel now loads [FIX] Includes fixed [FIX] newAuthor had + instead of - (QList assertions) [FIX] Pokemod copying works now [FIX] Debug rather than release used git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@83 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod')
-rw-r--r--pokemod/MapWarp.h3
-rw-r--r--pokemod/Move.h1
-rw-r--r--pokemod/Nature.h3
-rw-r--r--pokemod/Pokemod.cpp34
-rw-r--r--pokemod/Species.h2
-rw-r--r--pokemod/Tile.h3
-rw-r--r--pokemod/pokemod.pro5
7 files changed, 26 insertions, 25 deletions
diff --git a/pokemod/MapWarp.h b/pokemod/MapWarp.h
index 0a70f695..a89421a1 100644
--- a/pokemod/MapWarp.h
+++ b/pokemod/MapWarp.h
@@ -31,8 +31,7 @@
#include <Point.h>
#include "Object.h"
-
-class Pokemod;
+#include "Pokemod.h"
class MapWarp : public Object
{
diff --git a/pokemod/Move.h b/pokemod/Move.h
index b56fbc0e..044f1b71 100644
--- a/pokemod/Move.h
+++ b/pokemod/Move.h
@@ -28,6 +28,7 @@
#include <QStringList>
#include <Exception.h>
+#include <Frac.h>
#include "Object.h"
diff --git a/pokemod/Nature.h b/pokemod/Nature.h
index 59322536..53732a57 100644
--- a/pokemod/Nature.h
+++ b/pokemod/Nature.h
@@ -29,8 +29,7 @@
#include <Frac.h>
#include "Object.h"
-
-class Pokemod;
+#include "Pokemod.h"
class Nature : public Object
{
diff --git a/pokemod/Pokemod.cpp b/pokemod/Pokemod.cpp
index b4b94b9c..7e5109e4 100644
--- a/pokemod/Pokemod.cpp
+++ b/pokemod/Pokemod.cpp
@@ -1348,19 +1348,19 @@ int Pokemod::getAuthorCount() const
Author* Pokemod::newAuthor()
{
authors.append(new Author(this, getNewAuthorId()));
- return authors[getAuthorCount() + 1];
+ return authors[getAuthorCount() - 1];
}
Author* Pokemod::newAuthor(const QString& fname)
{
authors.append(new Author(this, fname, getNewAuthorId()));
- return authors[getAuthorCount() + 1];
+ return authors[getAuthorCount() - 1];
}
Author* Pokemod::newAuthor(const Author& a)
{
authors.append(new Author(this, a, getNewAuthorId()));
- return authors[getAuthorCount() + 1];
+ return authors[getAuthorCount() - 1];
}
void Pokemod::deleteAuthor(const int i) throw(IndexException)
@@ -2312,46 +2312,46 @@ Pokemod& Pokemod::operator=(const Pokemod& rhs)
for (int i = 0; i < rhs.getAuthorCount(); ++i)
authors.append(new Author(this, *rhs.getAuthor(i), rhs.getAuthor(i)->getId()));
badges.clear();
- for (int i = 0; i < rhs.getAbilityCount(); ++i)
+ for (int i = 0; i < rhs.getBadgeCount(); ++i)
badges.append(new Badge(this, *rhs.getBadge(i), rhs.getBadge(i)->getId()));
coinLists.clear();
- for (int i = 0; i < rhs.getAbilityCount(); ++i)
+ for (int i = 0; i < rhs.getCoinListCount(); ++i)
coinLists.append(new CoinList(this, *rhs.getCoinList(i), rhs.getCoinList(i)->getId()));
dialogs.clear();
- for (int i = 0; i < rhs.getAbilityCount(); ++i)
+ for (int i = 0; i < rhs.getDialogCount(); ++i)
dialogs.append(new Dialog(this, *rhs.getDialog(i), rhs.getDialog(i)->getId()));
eggGroups.clear();
- for (int i = 0; i < rhs.getAbilityCount(); ++i)
+ for (int i = 0; i < rhs.getEggGroupCount(); ++i)
eggGroups.append(new EggGroup(this, *rhs.getEggGroup(i), rhs.getEggGroup(i)->getId()));
items.clear();
- for (int i = 0; i < rhs.getAbilityCount(); ++i)
+ for (int i = 0; i < rhs.getItemCount(); ++i)
items.append(new Item(this, *rhs.getItem(i), rhs.getItem(i)->getId()));
itemTypes.clear();
- for (int i = 0; i < rhs.getAbilityCount(); ++i)
+ for (int i = 0; i < rhs.getItemTypeCount(); ++i)
itemTypes.append(new ItemType(this, *rhs.getItemType(i), rhs.getItemType(i)->getId()));
maps.clear();
- for (int i = 0; i < rhs.getAbilityCount(); ++i)
+ for (int i = 0; i < rhs.getMapCount(); ++i)
maps.append(new Map(this, *rhs.getMap(i), rhs.getMap(i)->getId()));
moves.clear();
- for (int i = 0; i < rhs.getAbilityCount(); ++i)
+ for (int i = 0; i < rhs.getMoveCount(); ++i)
moves.append(new Move(this, *rhs.getMove(i), rhs.getMove(i)->getId()));
natures.clear();
- for (int i = 0; i < rhs.getAbilityCount(); ++i)
+ for (int i = 0; i < rhs.getNatureCount(); ++i)
natures.append(new Nature(this, *rhs.getNature(i), rhs.getNature(i)->getId()));
species.clear();
- for (int i = 0; i < rhs.getAbilityCount(); ++i)
+ for (int i = 0; i < rhs.getSpeciesCount(); ++i)
species.append(new Species(this, *rhs.getSpecies(i), rhs.getSpecies(i)->getId()));
stores.clear();
- for (int i = 0; i < rhs.getAbilityCount(); ++i)
+ for (int i = 0; i < rhs.getStoreCount(); ++i)
stores.append(new Store(this, *rhs.getStore(i), rhs.getStore(i)->getId()));
tiles.clear();
- for (int i = 0; i < rhs.getAbilityCount(); ++i)
+ for (int i = 0; i < rhs.getTileCount(); ++i)
tiles.append(new Tile(this, *rhs.getTile(i), rhs.getTile(i)->getId()));
times.clear();
- for (int i = 0; i < rhs.getAbilityCount(); ++i)
+ for (int i = 0; i < rhs.getTimeCount(); ++i)
times.append(new Time(this, *rhs.getTime(i), rhs.getTime(i)->getId()));
types.clear();
- for (int i = 0; i < rhs.getAbilityCount(); ++i)
+ for (int i = 0; i < rhs.getTypeCount(); ++i)
types.append(new Type(this, *rhs.getType(i), rhs.getType(i)->getId()));
return *this;
}
diff --git a/pokemod/Species.h b/pokemod/Species.h
index 5cb1d98d..8dde354d 100644
--- a/pokemod/Species.h
+++ b/pokemod/Species.h
@@ -31,12 +31,12 @@
#include <Frac.h>
#include "Object.h"
+#include "Pokemod.h"
class SpeciesAbility;
class SpeciesEvolution;
class SpeciesItem;
class SpeciesMove;
-class Pokemod;
class Species : public Object
{
diff --git a/pokemod/Tile.h b/pokemod/Tile.h
index d8d52fa1..f335a4ee 100644
--- a/pokemod/Tile.h
+++ b/pokemod/Tile.h
@@ -30,8 +30,7 @@
#include <Frac.h>
#include "Object.h"
-
-class Pokemod;
+#include "Pokemod.h"
class Tile : public Object
{
diff --git a/pokemod/pokemod.pro b/pokemod/pokemod.pro
index 43b24d36..2dc1e897 100644
--- a/pokemod/pokemod.pro
+++ b/pokemod/pokemod.pro
@@ -3,7 +3,8 @@ DESTDIR = ../../lib
TEMPLATE = lib
LIBS += -L../../lib -lgeneral
-CONFIG += qt warn_on dll exceptions
+CONFIG += qt warn_on dll exceptions \
+ debug
INCLUDEPATH += ../general
@@ -75,3 +76,5 @@ HEADERS += AbilityEffect.h \
Tile.h \
Time.h \
Type.h
+CONFIG -= release
+