diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2008-04-17 23:34:36 +0000 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2008-04-17 23:34:36 +0000 |
commit | 6679f5cffa9d35a23b76605ddfbf3257f882b6ee (patch) | |
tree | c8e41854a60b64e8569939bca6b827807175ef9a /pokemod/Map.cpp | |
parent | 05980e883719b1c8ebde1bd2fcbf4f8c16df7ad6 (diff) | |
download | sigen-6679f5cffa9d35a23b76605ddfbf3257f882b6ee.tar.gz sigen-6679f5cffa9d35a23b76605ddfbf3257f882b6ee.tar.xz sigen-6679f5cffa9d35a23b76605ddfbf3257f882b6ee.zip |
[FIX] Frac -> Fraction
[FIX] ImageCache and Ini removed
[FIX] Fraction/Point widgets moved to pokemodr
[FIX] Copy ctors made for pokemod classes
[FIX] Ctors in pokemod fixed
[FIX] Copyright headers fixed in pokemodr
[FIX] PokeModr updated to new API and fixed in some places
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@99 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Map.cpp')
-rw-r--r-- | pokemod/Map.cpp | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/pokemod/Map.cpp b/pokemod/Map.cpp index 2aa64f3d..7b577e14 100644 --- a/pokemod/Map.cpp +++ b/pokemod/Map.cpp @@ -16,7 +16,6 @@ */ // Qt includes -#include <QDir> #include <QMap> // Pokemod includes @@ -31,6 +30,12 @@ const QStringList Map::TypeStr = QStringList() << "Outdoor" << "Dungeon" << "Building"; +Map::Map(const Map& map) : + Object("Map", map.pokemod(), map.id()) +{ + *this = map; +} + Map::Map(const Pokemod* pokemod, const int id) : Object("Map", pokemod, id), m_name(""), @@ -39,13 +44,13 @@ Map::Map(const Pokemod* pokemod, const int id) : { } -Map::Map(const Pokemod* pokemod, const Map& map, const int id) : +Map::Map(const Map& map, const Pokemod* pokemod, const int id) : Object("Map", pokemod, id) { *this = map; } -Map::Map(const Pokemod* pokemod, const QDomElement& xml, const int id) : +Map::Map(const QDomElement& xml, const Pokemod* pokemod, const int id) : Object("Map", pokemod, id) { load(xml, id); @@ -184,7 +189,7 @@ void Map::load(const QDomElement& xml, int id) LOAD(QString, name); LOAD(int, flyWarp); LOAD(int, type); - LOAD_MATRIX(setTile, Frac, tile); + LOAD_MATRIX(setTile, Fraction, tile); LOAD_SUB(newEffect, effects); LOAD_SUB(newTrainer, trainers); LOAD_SUB(newWarp, warps); @@ -348,13 +353,13 @@ MapEffect* Map::newEffect() MapEffect* Map::newEffect(const QDomElement& xml) { - m_effects.append(new MapEffect(pokemod(), xml, newEffectId())); + m_effects.append(new MapEffect(xml, pokemod(), newEffectId())); return m_effects[effectCount() - 1]; } MapEffect* Map::newEffect(const MapEffect& effect) { - m_effects.append(new MapEffect(pokemod(), effect, newEffectId())); + m_effects.append(new MapEffect(effect, pokemod(), newEffectId())); return m_effects[effectCount() - 1]; } @@ -426,13 +431,13 @@ MapTrainer* Map::newTrainer() MapTrainer* Map::newTrainer(const QDomElement& xml) { - m_trainers.append(new MapTrainer(pokemod(), xml, newTrainerId())); + m_trainers.append(new MapTrainer(xml, pokemod(), newTrainerId())); return m_trainers[trainerCount() - 1]; } MapTrainer* Map::newTrainer(const MapTrainer& trainer) { - m_trainers.append(new MapTrainer(pokemod(), trainer, newTrainerId())); + m_trainers.append(new MapTrainer(trainer, pokemod(), newTrainerId())); return m_trainers[trainerCount() - 1]; } @@ -504,13 +509,13 @@ MapWarp* Map::newWarp() MapWarp* Map::newWarp(const QDomElement& xml) { - m_warps.append(new MapWarp(pokemod(), xml, newWarpId())); + m_warps.append(new MapWarp(xml, pokemod(), newWarpId())); return m_warps[warpCount() - 1]; } MapWarp* Map::newWarp(const MapWarp& warp) { - m_warps.append(new MapWarp(pokemod(), warp, newWarpId())); + m_warps.append(new MapWarp(warp, pokemod(), newWarpId())); return m_warps[warpCount() - 1]; } @@ -582,13 +587,13 @@ MapWildList* Map::newWildList() MapWildList* Map::newWildList(const QDomElement& xml) { - m_wildLists.append(new MapWildList(pokemod(), xml, newWildListId())); + m_wildLists.append(new MapWildList(xml, pokemod(), newWildListId())); return m_wildLists[wildListCount() - 1]; } MapWildList* Map::newWildList(const MapWildList& wildList) { - m_wildLists.append(new MapWildList(pokemod(), wildList, newWildListId())); + m_wildLists.append(new MapWildList(wildList, pokemod(), newWildListId())); return m_wildLists[wildListCount() - 1]; } |