diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-04-19 23:38:51 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-04-19 23:38:51 +0000 |
| commit | f4f3176a6dcdaf5e463f39a657dd4ca04386a6ad (patch) | |
| tree | 9807262b48268eecf6ae7967aa64f30666091f2a | |
| parent | fe31331e2807634ae659e372358bac5781de9130 (diff) | |
[FIX] Loading of submodules
[FIX] Loading the id now defaults to INT_MAX
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@101 6ecfd1a5-f3ed-3746-8530-beee90d26b22
| -rw-r--r-- | Changelog | 8 | ||||
| -rw-r--r-- | pokemod/Item.cpp | 2 | ||||
| -rw-r--r-- | pokemod/Map.cpp | 8 | ||||
| -rw-r--r-- | pokemod/MapWildList.cpp | 2 | ||||
| -rw-r--r-- | pokemod/Move.cpp | 2 | ||||
| -rw-r--r-- | pokemod/Object.h | 2 | ||||
| -rw-r--r-- | pokemod/Pokemod.cpp | 36 | ||||
| -rw-r--r-- | pokemod/Species.cpp | 8 |
8 files changed, 38 insertions, 30 deletions
@@ -1,4 +1,12 @@ ----------------- +Rev: 101 +Date: 19 April 2008 +User: MathStuf +----------------- +[FIX] Loading of submodules +[FIX] Loading the id now defaults to INT_MAX + +----------------- Rev: 100 Date: 19 April 2008 User: MathStuf diff --git a/pokemod/Item.cpp b/pokemod/Item.cpp index e49e9b17..a33d3012 100644 --- a/pokemod/Item.cpp +++ b/pokemod/Item.cpp @@ -105,7 +105,7 @@ void Item::load(const QDomElement& xml, int id) LOAD(int, type); LOAD(int, price); LOAD(QString, description); - LOAD_SUB(newEffect, effects); + LOAD_SUB(newEffect, ItemEffect); } QDomElement Item::save() const diff --git a/pokemod/Map.cpp b/pokemod/Map.cpp index 5f1a0fd0..6e00dc6b 100644 --- a/pokemod/Map.cpp +++ b/pokemod/Map.cpp @@ -190,10 +190,10 @@ void Map::load(const QDomElement& xml, int id) LOAD(int, flyWarp); LOAD(int, type); LOAD_MATRIX(setTile, Fraction, tile); - LOAD_SUB(newEffect, effects); - LOAD_SUB(newTrainer, trainers); - LOAD_SUB(newWarp, warps); - LOAD_SUB(newWildList, wildLists); + LOAD_SUB(newEffect, MapEffect); + LOAD_SUB(newTrainer, MapTrainer); + LOAD_SUB(newWarp, MapWarp); + LOAD_SUB(newWildList, MapWildList); } QDomElement Map::save() const diff --git a/pokemod/MapWildList.cpp b/pokemod/MapWildList.cpp index 8679410f..1b239e8b 100644 --- a/pokemod/MapWildList.cpp +++ b/pokemod/MapWildList.cpp @@ -144,7 +144,7 @@ void MapWildList::load(const QDomElement& xml, int id) LOAD(int, value); LOAD_LIST(int, times); LOAD(int, scope); - LOAD_SUB(newEncounter, encounters); + LOAD_SUB(newEncounter, MapWildListEncounter); } QDomElement MapWildList::save() const diff --git a/pokemod/Move.cpp b/pokemod/Move.cpp index 0ea33bc3..9555ac25 100644 --- a/pokemod/Move.cpp +++ b/pokemod/Move.cpp @@ -142,7 +142,7 @@ void Move::load(const QDomElement& xml, int id) LOAD(bool, canSnatch); LOAD(bool, sound); LOAD(QString, description); - LOAD_SUB(newEffect, effects); + LOAD_SUB(newEffect, MoveEffect); } QDomElement Move::save() const diff --git a/pokemod/Object.h b/pokemod/Object.h index c3234dc8..29b7c99a 100644 --- a/pokemod/Object.h +++ b/pokemod/Object.h @@ -100,7 +100,7 @@ class Object #define LOAD_DATA(node) node.firstChild().toText().data() #define LOAD_ID() \ if (id == INT_MAX) \ - id = xml.attribute("id", "-1").toInt(); \ + id = xml.attribute("id", "2147483647").toInt(); \ setId(id); \ clear() #define LOAD(type, variable) m_##variable = LOAD_##type(LOAD_NODE(#variable)) diff --git a/pokemod/Pokemod.cpp b/pokemod/Pokemod.cpp index bed4f017..8756ebde 100644 --- a/pokemod/Pokemod.cpp +++ b/pokemod/Pokemod.cpp @@ -66,7 +66,7 @@ Pokemod::Pokemod() : m_surfSkin(192, 128), m_flySkin(192, 128), m_fishSkin(192, 128), - m_surfFishSkin(), + m_surfFishSkin(192, 128), m_superPCUname(""), m_superPCPasswd(""), m_typeChart(0, 0),//, Fraction(1, 1, Fraction::Improper)), @@ -393,23 +393,23 @@ void Pokemod::load(const QDomElement& xml, const int) throw(Exception) LOAD(QString, superPCUname); LOAD(QString, superPCPasswd); LOAD(Rules, rules); - LOAD_SUB(newAbility, abilities); - LOAD_SUB(newAuthor, authors); - LOAD_SUB(newBadge, badges); - LOAD_SUB(newCoinList, coinLists); - LOAD_SUB(newDialog, dialogs); - LOAD_SUB(newEggGroup, eggGroups); - LOAD_SUB(newItem, items); - LOAD_SUB(newItemType, itemTypes); - LOAD_SUB(newMap, maps); - LOAD_SUB(newMove, moves); - LOAD_SUB(newNature, natures); - LOAD_SUB(newSpecies, species); - LOAD_SUB(newStore, stores); - LOAD_SUB(newTile, tiles); - LOAD_SUB(newTime, times); - LOAD_SUB(newTrainer, trainers); - LOAD_SUB(newType, types); + LOAD_SUB(newAbility, Ability); + LOAD_SUB(newAuthor, Author); + LOAD_SUB(newBadge, Badge); + LOAD_SUB(newCoinList, CoinList); + LOAD_SUB(newDialog, Dialog); + LOAD_SUB(newEggGroup, EggGroup); + LOAD_SUB(newItem, Item); + LOAD_SUB(newItemType, ItemType); + LOAD_SUB(newMap, Map); + LOAD_SUB(newMove, Move); + LOAD_SUB(newNature, Nature); + LOAD_SUB(newSpecies, Species); + LOAD_SUB(newStore, Store); + LOAD_SUB(newTile, Tile); + LOAD_SUB(newTime, Time); + LOAD_SUB(newTrainer, Trainer); + LOAD_SUB(newType, Type); LOAD_MATRIX(setTypeChart, Fraction, typeChart); } diff --git a/pokemod/Species.cpp b/pokemod/Species.cpp index 6156148b..c6a9543e 100644 --- a/pokemod/Species.cpp +++ b/pokemod/Species.cpp @@ -250,10 +250,10 @@ void Species::load(const QDomElement& xml, int id) LOAD(int, nidoranGroup); LOAD_LIST(int, types); LOAD_LIST(int, eggGroups); - LOAD_SUB(newAbility, abilities); - LOAD_SUB(newEvolution, evolutions); - LOAD_SUB(newItem, items); - LOAD_SUB(newMove, moves); + LOAD_SUB(newAbility, SpeciesAbility); + LOAD_SUB(newEvolution, SpeciesEvolution); + LOAD_SUB(newItem, SpeciesItem); + LOAD_SUB(newMove, SpeciesMove); } QDomElement Species::save() const |
