diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2008-08-02 18:49:43 +0000 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2008-08-02 18:49:43 +0000 |
commit | 63417b1c5057d22bd853e92cd3a25aa812b8d917 (patch) | |
tree | af1651766457c28d90b7b710be61048c0b0b034b /pokemod | |
parent | 9fea55f75252462c1efbc90372ace45092fe6aca (diff) | |
download | sigen-63417b1c5057d22bd853e92cd3a25aa812b8d917.tar.gz sigen-63417b1c5057d22bd853e92cd3a25aa812b8d917.tar.xz sigen-63417b1c5057d22bd853e92cd3a25aa812b8d917.zip |
[ADD] Added XMLGUI file for pokemodr
[FIX] Pokemodr is now a KXmlGuiWindow (working on KatePart fixes)
[FIX] Started Doxygen stuff
[FIX] Object names of Pokemod classes are now determined using metaObject
[FIX] Updated to use KDE 4.1
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@232 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod')
36 files changed, 188 insertions, 145 deletions
diff --git a/pokemod/Ability.cpp b/pokemod/Ability.cpp index 13519af8..35788369 100644 --- a/pokemod/Ability.cpp +++ b/pokemod/Ability.cpp @@ -23,13 +23,13 @@ #include "Pokemod.h" Pokemod::Ability::Ability(const Ability& ability) : - Object("Ability", ability.parent(), ability.id()) + Object(ability.parent(), ability.id()) { *this = ability; } Pokemod::Ability::Ability(const Pokemod* parent, const int id) : - Object("Ability", parent, id), + Object(parent, id), m_name(""), m_priority(0), m_description(""), @@ -39,22 +39,18 @@ Pokemod::Ability::Ability(const Pokemod* parent, const int id) : } Pokemod::Ability::Ability(const Ability& ability, const Pokemod* parent, const int id) : - Object("Ability", parent, id) + Object(parent, id) { *this = ability; } Pokemod::Ability::Ability(const QDomElement& xml, const Pokemod* parent, const int id) : - Object("Ability", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); } -Pokemod::Ability::~Ability() -{ -} - void Pokemod::Ability::validate() { TEST_BEGIN(); diff --git a/pokemod/Ability.h b/pokemod/Ability.h index 10c2dd56..dd5f52f9 100644 --- a/pokemod/Ability.h +++ b/pokemod/Ability.h @@ -27,20 +27,70 @@ namespace Pokemod // Forward declarations class Pokemod; +/** + * @brief Abilities add another layer of strategy to the battle. + * + * Abilities add another layer of strategy to the battle. They + * add effects to the battle that take place out-of-turn and + * usually play a supportive role rather than a proactive role. + * + * @author Ben Boeckel <MathStuf@gmail.com> + */ class POKEMOD_EXPORT Ability : public Object { Q_OBJECT public: + /** + * Construct an exact copy of another \c ability. + * + * @param ability The ability to copy. + */ Ability(const Ability& ability); + /** + * Create a new ability with the \c parent and \c id. + * + * @param parent The parent of the ability. + * @param id The id of the ability. + */ Ability(const Pokemod* parent, const int id); + /** + * Construct an ability from a preexisting \c ability's data, but reparent it. + * + * @warning The scripts are not guaranteed to work in the new \c parent. + * + * @param ability The ability to copy. + * @param parent The parent of the ability. + * @param id The id of the ability. + */ Ability(const Ability& ability, const Pokemod* parent, const int id); + /** + * Construct an ability from XML data with the given parents. + * + * @param xml The XML data to load. + * @param parent The parent of the ability. + * @param id The id of the ability. If it is -1, it will be loaded from the XML. + */ Ability(const QDomElement& xml, const Pokemod* parent, const int id = -1); - ~Ability(); + /** + * Validate the ability. + * + * \sa Pokemod::Object::validate + */ void validate(); + /** + * Load data from XML. + * + * @param xml The XML data to load. + */ void load(const QDomElement& xml); + /** + * Saves the ability to XML format. + * + * @return An XML representation of the ability. + */ QDomElement save() const; void setName(const QString& name); diff --git a/pokemod/Author.cpp b/pokemod/Author.cpp index 4f3bdf9d..a040381e 100644 --- a/pokemod/Author.cpp +++ b/pokemod/Author.cpp @@ -26,13 +26,13 @@ #include <QtCore/QRegExp> Pokemod::Author::Author(const Author& author) : - Object("Author", author.parent(), author.id()) + Object(author.parent(), author.id()) { *this = author; } Pokemod::Author::Author(const Pokemod* parent, const int id) : - Object("Author", parent, id), + Object(parent, id), m_name(""), m_email(""), m_role("") @@ -40,13 +40,13 @@ Pokemod::Author::Author(const Pokemod* parent, const int id) : } Pokemod::Author::Author(const Author& author, const Pokemod* parent, const int id) : - Object("Author", parent, id) + Object(parent, id) { *this = author; } Pokemod::Author::Author(const QDomElement& xml, const Pokemod* parent, const int id) : - Object("Author", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/Badge.cpp b/pokemod/Badge.cpp index 6e57eb57..7973fc60 100644 --- a/pokemod/Badge.cpp +++ b/pokemod/Badge.cpp @@ -24,13 +24,13 @@ #include "Rules.h" Pokemod::Badge::Badge(const Badge& badge) : - Object("Badge", badge.parent(), badge.id()) + Object(badge.parent(), badge.id()) { *this = badge; } Pokemod::Badge::Badge(const Pokemod* parent, const int id) : - Object("Badge", parent, id), + Object(parent, id), m_name(""), m_face(64, 64), m_badge(64, 64), @@ -41,13 +41,13 @@ Pokemod::Badge::Badge(const Pokemod* parent, const int id) : } Pokemod::Badge::Badge(const Badge& badge, const Pokemod* parent, const int id) : - Object("Badge", parent, id) + Object(parent, id) { *this = badge; } Pokemod::Badge::Badge(const QDomElement& xml, const Pokemod* parent, const int id) : - Object("Badge", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/CoinList.cpp b/pokemod/CoinList.cpp index a342862d..e986654a 100644 --- a/pokemod/CoinList.cpp +++ b/pokemod/CoinList.cpp @@ -27,26 +27,26 @@ #include <QtCore/QSet> Pokemod::CoinList::CoinList(const CoinList& coinList) : - Object("CoinList", coinList.parent(), coinList.id()) + Object(coinList.parent(), coinList.id()) { *this = coinList; } Pokemod::CoinList::CoinList(const Pokemod* parent, const int id) : - Object("CoinList", parent, id), + Object(parent, id), m_name(""), m_script("", "") { } Pokemod::CoinList::CoinList(const CoinList& coinList, const Pokemod* parent, const int id) : - Object("CoinList", parent, id) + Object(parent, id) { *this = coinList; } Pokemod::CoinList::CoinList(const QDomElement& xml, const Pokemod* parent, const int id) : - Object("CoinList", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/CoinListObject.cpp b/pokemod/CoinListObject.cpp index 059657fd..533b37d5 100644 --- a/pokemod/CoinListObject.cpp +++ b/pokemod/CoinListObject.cpp @@ -26,13 +26,13 @@ const QStringList Pokemod::CoinListObject::TypeStr = QStringList() << "Item" << "Team Member"; Pokemod::CoinListObject::CoinListObject(const CoinListObject& object) : - Object("CoinListObject", object.parent(), object.id()) + Object(object.parent(), object.id()) { *this = object; } Pokemod::CoinListObject::CoinListObject(const CoinList* parent, const int id) : - Object("CoinListObject", parent, id), + Object(parent, id), m_type(Item), m_object(INT_MAX), m_amount(1), @@ -41,13 +41,13 @@ Pokemod::CoinListObject::CoinListObject(const CoinList* parent, const int id) : } Pokemod::CoinListObject::CoinListObject(const CoinListObject& object, const CoinList* parent, const int id) : - Object("CoinListObject", parent, id) + Object(parent, id) { *this = object; } Pokemod::CoinListObject::CoinListObject(const QDomElement& xml, const CoinList* parent, const int id) : - Object("CoinListObject", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/EggGroup.cpp b/pokemod/EggGroup.cpp index 450467fc..fc5b37de 100644 --- a/pokemod/EggGroup.cpp +++ b/pokemod/EggGroup.cpp @@ -23,25 +23,25 @@ #include "Pokemod.h" Pokemod::EggGroup::EggGroup(const EggGroup& eggGroup) : - Object("EggGroup", eggGroup.parent(), eggGroup.id()) + Object(eggGroup.parent(), eggGroup.id()) { *this = eggGroup; } Pokemod::EggGroup::EggGroup(const Pokemod* parent, const int id) : - Object("EggGroup", parent, id), + Object(parent, id), m_name("") { } Pokemod::EggGroup::EggGroup(const EggGroup& eggGroup, const Pokemod* parent, const int id) : - Object("EggGroup", parent, id) + Object(parent, id) { *this = eggGroup; } Pokemod::EggGroup::EggGroup(const QDomElement& xml, const Pokemod* parent, const int id) : - Object("EggGroup", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/GlobalScript.cpp b/pokemod/GlobalScript.cpp index cafd6835..05d3bddf 100644 --- a/pokemod/GlobalScript.cpp +++ b/pokemod/GlobalScript.cpp @@ -23,26 +23,26 @@ #include "Pokemod.h" Pokemod::GlobalScript::GlobalScript(const GlobalScript& globalScript) : - Object("GlobalScript", globalScript.parent(), globalScript.id()) + Object(globalScript.parent(), globalScript.id()) { *this = globalScript; } Pokemod::GlobalScript::GlobalScript(const Pokemod* parent, const int id) : - Object("GlobalScript", parent, id), + Object(parent, id), m_name(""), m_script("", "") { } Pokemod::GlobalScript::GlobalScript(const GlobalScript& globalScript, const Pokemod* parent, const int id) : - Object("GlobalScript", parent, id) + Object(parent, id) { *this = globalScript; } Pokemod::GlobalScript::GlobalScript(const QDomElement& xml, const Pokemod* parent, const int id) : - Object("GlobalScript", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/Item.cpp b/pokemod/Item.cpp index b06e3e48..4a2c62d2 100644 --- a/pokemod/Item.cpp +++ b/pokemod/Item.cpp @@ -27,13 +27,13 @@ #include <QtCore/QSet> Pokemod::Item::Item(const Item& item) : - Object("Item", item.parent(), item.id()) + Object(item.parent(), item.id()) { *this = item; } Pokemod::Item::Item(const Pokemod* parent, const int id) : - Object("Item", parent, id), + Object(parent, id), m_name(""), m_sellable(false), m_type(INT_MAX), @@ -44,13 +44,13 @@ Pokemod::Item::Item(const Pokemod* parent, const int id) : } Pokemod::Item::Item(const Item& item, const Pokemod* parent, const int id) : - Object("Item", parent, id) + Object(parent, id) { *this = item; } Pokemod::Item::Item(const QDomElement& xml, const Pokemod* parent, const int id) : - Object("Item", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/ItemType.cpp b/pokemod/ItemType.cpp index 55e20d72..0f81fb58 100644 --- a/pokemod/ItemType.cpp +++ b/pokemod/ItemType.cpp @@ -25,13 +25,13 @@ QStringList Pokemod::ItemType::CountStr = QStringList() << "Distinct" << "Total"; Pokemod::ItemType::ItemType(const ItemType& itemType) : - Object("ItemType", itemType.parent(), itemType.id()) + Object(itemType.parent(), itemType.id()) { *this = itemType; } Pokemod::ItemType::ItemType(const Pokemod* parent, const int id) : - Object("ItemType", parent, id), + Object(parent, id), m_name(""), m_computer(0), m_player(1), @@ -40,13 +40,13 @@ Pokemod::ItemType::ItemType(const Pokemod* parent, const int id) : } Pokemod::ItemType::ItemType(const ItemType& itemType, const Pokemod* parent, const int id) : - Object("ItemType", parent, id) + Object(parent, id) { *this = itemType; } Pokemod::ItemType::ItemType(const QDomElement& xml, const Pokemod* parent, const int id) : - Object("ItemType", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/Map.cpp b/pokemod/Map.cpp index 32aafaff..aa3d4307 100644 --- a/pokemod/Map.cpp +++ b/pokemod/Map.cpp @@ -32,13 +32,13 @@ const QStringList Pokemod::Map::TypeStr = QStringList() << "Outdoor" << "Dungeon" << "Building"; Pokemod::Map::Map(const Map& map) : - Object("Map", map.parent(), map.id()) + Object(map.parent(), map.id()) { *this = map; } Pokemod::Map::Map(const Pokemod* parent, const int id) : - Object("Map", parent, id), + Object(parent, id), m_name(""), m_flyWarp(-1), m_type(INT_MAX) @@ -46,13 +46,13 @@ Pokemod::Map::Map(const Pokemod* parent, const int id) : } Pokemod::Map::Map(const Map& map, const Pokemod* parent, const int id) : - Object("Map", parent, id) + Object(parent, id) { *this = map; } Pokemod::Map::Map(const QDomElement& xml, const Pokemod* parent, const int id) : - Object("Map", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/MapEffect.cpp b/pokemod/MapEffect.cpp index d75fcaee..f187b090 100644 --- a/pokemod/MapEffect.cpp +++ b/pokemod/MapEffect.cpp @@ -24,13 +24,13 @@ #include "Pokemod.h" Pokemod::MapEffect::MapEffect(const MapEffect& effect) : - Object("MapEffect", effect.parent(), effect.id()) + Object(effect.parent(), effect.id()) { *this = effect; } Pokemod::MapEffect::MapEffect(const Map* parent, const int id) : - Object("MapEffect", parent, id), + Object(parent, id), m_name(""), m_coordinate(0, 0), m_skin(192, 128), @@ -40,13 +40,13 @@ Pokemod::MapEffect::MapEffect(const Map* parent, const int id) : } Pokemod::MapEffect::MapEffect(const MapEffect& effect, const Map* parent, const int id) : - Object("MapEffect", parent, id) + Object(parent, id) { *this = effect; } Pokemod::MapEffect::MapEffect(const QDomElement& xml, const Map* parent, const int id) : - Object("MapEffect", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/MapTrainer.cpp b/pokemod/MapTrainer.cpp index 9fad3586..a8718a36 100644 --- a/pokemod/MapTrainer.cpp +++ b/pokemod/MapTrainer.cpp @@ -29,13 +29,13 @@ #include <QtCore/QSet> Pokemod::MapTrainer::MapTrainer(const MapTrainer& trainer) : - Object("MapTrainer", trainer.parent(), trainer.id()) + Object(trainer.parent(), trainer.id()) { *this = trainer; } Pokemod::MapTrainer::MapTrainer(const Map* parent, const int id) : - Object("MapTrainer", parent, id), + Object(parent, id), m_name(""), m_trainerClass(INT_MAX), m_coordinate(0, 0), @@ -46,13 +46,13 @@ Pokemod::MapTrainer::MapTrainer(const Map* parent, const int id) : } Pokemod::MapTrainer::MapTrainer(const MapTrainer& trainer, const Map* parent, const int id) : - Object("MapTrainer", parent, id) + Object(parent, id) { *this = trainer; } Pokemod::MapTrainer::MapTrainer(const QDomElement& xml, const Map* parent, const int id) : - Object("MapTrainer", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/MapTrainerTeamMember.cpp b/pokemod/MapTrainerTeamMember.cpp index 65e6ef61..762d0208 100644 --- a/pokemod/MapTrainerTeamMember.cpp +++ b/pokemod/MapTrainerTeamMember.cpp @@ -31,26 +31,26 @@ #include <QtCore/QSet> Pokemod::MapTrainerTeamMember::MapTrainerTeamMember(const MapTrainerTeamMember& teamMember) : - Object("MapTrainerTeamMember", teamMember.parent(), teamMember.id()) + Object(teamMember.parent(), teamMember.id()) { *this = teamMember; } Pokemod::MapTrainerTeamMember::MapTrainerTeamMember(const MapTrainer* parent, const int id) : - Object("MapTrainerTeamMember", parent, id), + Object(parent, id), m_species(INT_MAX), m_level(INT_MAX) { } Pokemod::MapTrainerTeamMember::MapTrainerTeamMember(const MapTrainerTeamMember& teamMember, const MapTrainer* parent, const int id) : - Object("MapTrainerTeamMember", parent, id) + Object(parent, id) { *this = teamMember; } Pokemod::MapTrainerTeamMember::MapTrainerTeamMember(const QDomElement& xml, const MapTrainer* parent, const int id) : - Object("MapTrainerTeamMember", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/MapWarp.cpp b/pokemod/MapWarp.cpp index 3b58b5ed..9a587d29 100644 --- a/pokemod/MapWarp.cpp +++ b/pokemod/MapWarp.cpp @@ -26,13 +26,13 @@ const QStringList Pokemod::MapWarp::TypeStr = QStringList() << "Door/Stair" << "Warp Pad" << "Hole" << "Boundary"; Pokemod::MapWarp::MapWarp(const MapWarp& warp) : - Object("MapWarp", warp.parent(), warp.id()) + Object(warp.parent(), warp.id()) { *this = warp; } Pokemod::MapWarp::MapWarp(const Map* parent, const int id) : - Object("MapWarp", parent, id), + Object(parent, id), m_name(""), m_coordinate(0, 0), m_type(INT_MAX), @@ -43,13 +43,13 @@ Pokemod::MapWarp::MapWarp(const Map* parent, const int id) : } Pokemod::MapWarp::MapWarp(const MapWarp& warp, const Map* parent, const int id) : - Object("MapWarp", parent, id) + Object(parent, id) { *this = warp; } Pokemod::MapWarp::MapWarp(const QDomElement& xml, const Map* parent, const int id) : - Object("MapWarp", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/MapWildList.cpp b/pokemod/MapWildList.cpp index c4b519e4..63625549 100644 --- a/pokemod/MapWildList.cpp +++ b/pokemod/MapWildList.cpp @@ -27,25 +27,25 @@ #include <QtCore/QSet> Pokemod::MapWildList::MapWildList(const MapWildList& wildList) : - Object("MapWildList", wildList.parent(), wildList.id()) + Object(wildList.parent(), wildList.id()) { *this = wildList; } Pokemod::MapWildList::MapWildList(const Map* parent, const int id) : - Object("MapWildList", parent, id), + Object(parent, id), m_name("") { } Pokemod::MapWildList::MapWildList(const MapWildList& wildList, const Map* parent, const int id) : - Object("MapWildList", parent, id) + Object(parent, id) { *this = wildList; } Pokemod::MapWildList::MapWildList(const QDomElement& xml, const Map* parent, const int id) : - Object("MapWildList", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/MapWildListEncounter.cpp b/pokemod/MapWildListEncounter.cpp index 91f945cb..46248dc4 100644 --- a/pokemod/MapWildListEncounter.cpp +++ b/pokemod/MapWildListEncounter.cpp @@ -26,13 +26,13 @@ #include "Species.h" Pokemod::MapWildListEncounter::MapWildListEncounter(const MapWildListEncounter& encounter) : - Object("MapWildListEncounter", encounter.parent(), encounter.id()) + Object(encounter.parent(), encounter.id()) { *this = encounter; } Pokemod::MapWildListEncounter::MapWildListEncounter(const MapWildList* parent, const int id) : - Object("MapWildListEncounter", parent, id), + Object(parent, id), m_species(INT_MAX), m_level(1), m_weight(1) @@ -40,13 +40,13 @@ Pokemod::MapWildListEncounter::MapWildListEncounter(const MapWildList* parent, c } Pokemod::MapWildListEncounter::MapWildListEncounter(const MapWildListEncounter& encounter, const MapWildList* parent, const int id) : - Object("MapWildListEncounter", parent, id) + Object(parent, id) { *this = encounter; } Pokemod::MapWildListEncounter::MapWildListEncounter(const QDomElement& xml, const MapWildList* parent, const int id) : - Object("MapWildListEncounter", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/Move.cpp b/pokemod/Move.cpp index 11387f62..28f99dad 100644 --- a/pokemod/Move.cpp +++ b/pokemod/Move.cpp @@ -26,13 +26,13 @@ #include <QtCore/QSet> Pokemod::Move::Move(const Move& move) : - Object("Move", move.parent(), move.id()) + Object(move.parent(), move.id()) { *this = move; } Pokemod::Move::Move(const Pokemod* parent, const int id) : - Object("Move", parent, id), + Object(parent, id), m_name(""), m_accuracy(1, 1), m_power(0), @@ -48,13 +48,13 @@ Pokemod::Move::Move(const Pokemod* parent, const int id) : } Pokemod::Move::Move(const Move& move, const Pokemod* parent, const int id) : - Object("Move", parent, id) + Object(parent, id) { *this = move; } Pokemod::Move::Move(const QDomElement& xml, const Pokemod* parent, const int id) : - Object("Move", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/Nature.cpp b/pokemod/Nature.cpp index 3c1e8d17..b8799086 100644 --- a/pokemod/Nature.cpp +++ b/pokemod/Nature.cpp @@ -24,13 +24,13 @@ #include "Rules.h" Pokemod::Nature::Nature(const Nature& nature) : - Object("Nature", nature.parent(), nature.id()) + Object(nature.parent(), nature.id()) { *this = nature; } Pokemod::Nature::Nature(const Pokemod* parent, const int id) : - Object("Nature", parent, id), + Object(parent, id), m_name(""), m_weight(1) { @@ -39,13 +39,13 @@ Pokemod::Nature::Nature(const Pokemod* parent, const int id) : } Pokemod::Nature::Nature(const Nature& nature, const Pokemod* parent, const int id) : - Object("Nature", parent, id) + Object(parent, id) { *this = nature; } Pokemod::Nature::Nature(const QDomElement& xml, const Pokemod* parent, const int id) : - Object("Nature", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/Object.cpp b/pokemod/Object.cpp index 6cd96e19..7568d540 100644 --- a/pokemod/Object.cpp +++ b/pokemod/Object.cpp @@ -24,15 +24,13 @@ Pokemod::Object::Object(const Object& object) : QObject(NULL), m_id(object.id()), - m_className(object.className()), m_parent(object.parent()) { } -Pokemod::Object::Object(const QString& className, const Object* parent, const int id) : +Pokemod::Object::Object(const Object* parent, const int id) : QObject(NULL), m_id(id), - m_className(className), m_parent(parent) { } @@ -54,14 +52,14 @@ int Pokemod::Object::id() const return m_id; } -QString Pokemod::Object::className() const +void Pokemod::Object::setId(const int id) { - return m_className; + CHECK(id); } -void Pokemod::Object::setId(const int id) +QString Pokemod::Object::className() const { - CHECK(id); + return QString(metaObject()->className()).section(':', -1); } QString Pokemod::Object::unused(const QString& variable) diff --git a/pokemod/Object.h b/pokemod/Object.h index 9203f1e1..8d8184d8 100644 --- a/pokemod/Object.h +++ b/pokemod/Object.h @@ -36,7 +36,7 @@ class POKEMOD_EXPORT Object : public QObject public: Object(const Object& object); - Object(const QString& className, const Object* parent, const int id); + Object(const Object* parent, const int id); virtual ~Object(); const Object* parent() const; @@ -76,7 +76,6 @@ class POKEMOD_EXPORT Object : public QObject virtual void clear(); private: int m_id; - const QString m_className; const Object* m_parent; }; diff --git a/pokemod/Pokemod.cpp b/pokemod/Pokemod.cpp index aec463ee..04a6086e 100644 --- a/pokemod/Pokemod.cpp +++ b/pokemod/Pokemod.cpp @@ -47,7 +47,7 @@ #include <QtCore/QSet> Pokemod::Pokemod::Pokemod() : - Object("Pokemod", NULL, 0), + Object(NULL, 0), m_title(""), m_version(""), m_description(""), @@ -59,14 +59,14 @@ Pokemod::Pokemod::Pokemod() : } Pokemod::Pokemod::Pokemod(const Pokemod& pokemod) : - Object("Pokemod", NULL, 0), + Object(NULL, 0), m_rules(new Rules(this)) { *this = pokemod; } Pokemod::Pokemod::Pokemod(const QDomElement& xml) : - Object("Pokemod", NULL, 0), + Object(NULL, 0), m_rules(new Rules(this)) { load(xml); diff --git a/pokemod/Rules.cpp b/pokemod/Rules.cpp index bdfbc243..5da527ee 100644 --- a/pokemod/Rules.cpp +++ b/pokemod/Rules.cpp @@ -25,13 +25,13 @@ const QStringList Pokemod::Rules::DVStr = QStringList() << "16" << "32"; Pokemod::Rules::Rules(const Rules& rules) : - Object("Rules", rules.parent(), 0) + Object(rules.parent(), 0) { *this = rules; } Pokemod::Rules::Rules(const Pokemod* parent) : - Object("Rules", parent, 0), + Object(parent, 0), m_genderAllowed(false), m_breedingAllowed(false), m_criticalDomains(false), @@ -59,13 +59,13 @@ Pokemod::Rules::Rules(const Pokemod* parent) : } Pokemod::Rules::Rules(const Rules& rules, const Pokemod* parent) : - Object("Rules", parent, 0) + Object(parent, 0) { *this = rules; } Pokemod::Rules::Rules(const QDomElement& xml, const Pokemod* parent) : - Object("Rules", parent, 0) + Object(parent, 0) { load(xml); } diff --git a/pokemod/Sound.cpp b/pokemod/Sound.cpp index 21ce2a2e..d23f9fbe 100644 --- a/pokemod/Sound.cpp +++ b/pokemod/Sound.cpp @@ -23,26 +23,26 @@ #include "Pokemod.h" Pokemod::Sound::Sound(const Sound& sound) : - Object("Sound", sound.parent(), sound.id()) + Object(sound.parent(), sound.id()) { *this = sound; } Pokemod::Sound::Sound(const Pokemod* parent, const int id) : - Object("Sound", parent, id), + Object(parent, id), m_name(""), m_data() { } Pokemod::Sound::Sound(const Sound& sound, const Pokemod* parent, const int id) : - Object("Sound", parent, id) + Object(parent, id) { *this = sound; } Pokemod::Sound::Sound(const QDomElement& xml, const Pokemod* parent, const int id) : - Object("Sound", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/Species.cpp b/pokemod/Species.cpp index 509d6e84..48383dfb 100644 --- a/pokemod/Species.cpp +++ b/pokemod/Species.cpp @@ -32,13 +32,13 @@ const QStringList Pokemod::Species::StyleStr = QStringList() << "Fluctuating" << "Fading" << "Slow" << "Normal" << "Fast" << "Erratic"; Pokemod::Species::Species(const Species& species) : - Object("Species", species.parent(), species.id()) + Object(species.parent(), species.id()) { *this = species; } Pokemod::Species::Species(const Pokemod* parent, const int id) : - Object("Species", parent, id), + Object(parent, id), m_name(""), m_growth(INT_MAX), m_catchValue(0), @@ -66,13 +66,13 @@ Pokemod::Species::Species(const Pokemod* parent, const int id) : } Pokemod::Species::Species(const Species& species, const Pokemod* parent, const int id) : - Object("Species", parent, id) + Object(parent, id) { *this = species; } Pokemod::Species::Species(const QDomElement& xml, const Pokemod* parent, const int id) : - Object("Species", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/SpeciesAbility.cpp b/pokemod/SpeciesAbility.cpp index f0b7f31a..2df66c1b 100644 --- a/pokemod/SpeciesAbility.cpp +++ b/pokemod/SpeciesAbility.cpp @@ -24,26 +24,26 @@ #include "Species.h" Pokemod::SpeciesAbility::SpeciesAbility(const SpeciesAbility& ability) : - Object("SpeciesAbility", ability.parent(), ability.id()) + Object(ability.parent(), ability.id()) { *this = ability; } Pokemod::SpeciesAbility::SpeciesAbility(const Species* parent, const int id) : - Object("SpeciesAbility", parent, id), + Object(parent, id), m_ability(INT_MAX), m_weight(1) { } Pokemod::SpeciesAbility::SpeciesAbility(const SpeciesAbility& ability, const Species* parent, const int id) : - Object("SpeciesAbility", parent, id) + Object(parent, id) { *this = ability; } Pokemod::SpeciesAbility::SpeciesAbility(const QDomElement& xml, const Species* parent, const int id) : - Object("SpeciesAbility", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/SpeciesItem.cpp b/pokemod/SpeciesItem.cpp index 05b783f8..59bd511f 100644 --- a/pokemod/SpeciesItem.cpp +++ b/pokemod/SpeciesItem.cpp @@ -24,26 +24,26 @@ #include "Species.h" Pokemod::SpeciesItem::SpeciesItem(const SpeciesItem& item) : - Object("SpeciesItem", item.parent(), item.id()) + Object(item.parent(), item.id()) { *this = item; } Pokemod::SpeciesItem::SpeciesItem(const Species* parent, const int id) : - Object("SpeciesItem", parent, id), + Object(parent, id), m_item(INT_MAX), m_weight(1) { } Pokemod::SpeciesItem::SpeciesItem(const SpeciesItem& item, const Species* parent, const int id) : - Object("SpeciesItem", parent, id) + Object(parent, id) { *this = item; } Pokemod::SpeciesItem::SpeciesItem(const QDomElement& xml, const Species* parent, const int id) : - Object("SpeciesItem", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/SpeciesMove.cpp b/pokemod/SpeciesMove.cpp index 0ae8401b..1b9f1733 100644 --- a/pokemod/SpeciesMove.cpp +++ b/pokemod/SpeciesMove.cpp @@ -25,13 +25,13 @@ #include "Species.h" Pokemod::SpeciesMove::SpeciesMove(const SpeciesMove& move) : - Object("SpeciesMove", move.parent(), move.id()) + Object(move.parent(), move.id()) { *this = move; } Pokemod::SpeciesMove::SpeciesMove(const Species* parent, const int id) : - Object("SpeciesMove", parent, id), + Object(parent, id), m_move(INT_MAX), m_level(0), m_wild(0) @@ -39,13 +39,13 @@ Pokemod::SpeciesMove::SpeciesMove(const Species* parent, const int id) : } Pokemod::SpeciesMove::SpeciesMove(const SpeciesMove& move, const Species* parent, const int id) : - Object("SpeciesMove", parent, id) + Object(parent, id) { *this = move; } Pokemod::SpeciesMove::SpeciesMove(const QDomElement& xml, const Species* parent, const int id) : - Object("SpeciesMove", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/Sprite.cpp b/pokemod/Sprite.cpp index 4b2802bb..8c5258fa 100644 --- a/pokemod/Sprite.cpp +++ b/pokemod/Sprite.cpp @@ -23,26 +23,26 @@ #include "Pokemod.h" Pokemod::Sprite::Sprite(const Sprite& sprite) : - Object("Sprite", sprite.parent(), sprite.id()) + Object(sprite.parent(), sprite.id()) { *this = sprite; } Pokemod::Sprite::Sprite(const Pokemod* parent, const int id) : - Object("Sprite", parent, id), + Object(parent, id), m_name(""), m_sprite() { } Pokemod::Sprite::Sprite(const Sprite& sprite, const Pokemod* parent, const int id) : - Object("Sprite", parent, id) + Object(parent, id) { *this = sprite; } Pokemod::Sprite::Sprite(const QDomElement& xml, const Pokemod* parent, const int id) : - Object("Sprite", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/Status.cpp b/pokemod/Status.cpp index 6eb1d781..c1c57111 100644 --- a/pokemod/Status.cpp +++ b/pokemod/Status.cpp @@ -24,26 +24,26 @@ #include "Script.h" Pokemod::Status::Status(const Status& status) : - Object("Status", status.parent(), status.id()) + Object(status.parent(), status.id()) { *this = status; } Pokemod::Status::Status(const Pokemod* parent, const int id) : - Object("Status", parent, id), + Object(parent, id), m_name(""), m_script("", "") { } Pokemod::Status::Status(const Status& status, const Pokemod* parent, const int id) : - Object("Status", parent, id) + Object(parent, id) { *this = status; } Pokemod::Status::Status(const QDomElement& xml, const Pokemod* parent, const int id) : - Object("Status", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/Store.cpp b/pokemod/Store.cpp index 5e03231e..3acffcac 100644 --- a/pokemod/Store.cpp +++ b/pokemod/Store.cpp @@ -23,25 +23,25 @@ #include "Pokemod.h" Pokemod::Store::Store(const Store& store) : - Object("Store", store.parent(), store.id()) + Object(store.parent(), store.id()) { *this = store; } Pokemod::Store::Store(const Pokemod* parent, const int id) : - Object("Store", parent, id), + Object(parent, id), m_name("") { } Pokemod::Store::Store(const Store& store, const Pokemod* parent, const int id) : - Object("Store", parent, id) + Object(parent, id) { *this = store; } Pokemod::Store::Store(const QDomElement& xml, const Pokemod* parent, const int id) : - Object("Store", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/Tile.cpp b/pokemod/Tile.cpp index d5864058..fb0d328e 100644 --- a/pokemod/Tile.cpp +++ b/pokemod/Tile.cpp @@ -23,13 +23,13 @@ #include "Pokemod.h" Pokemod::Tile::Tile(const Tile& tile) : - Object("Tile", tile.parent(), tile.id()) + Object(tile.parent(), tile.id()) { *this = tile; } Pokemod::Tile::Tile(const Pokemod* parent, const int id) : - Object("Tile", parent, id), + Object(parent, id), m_name(""), m_sprite(64, 64), m_script("", "") @@ -39,13 +39,13 @@ Pokemod::Tile::Tile(const Pokemod* parent, const int id) : } Pokemod::Tile::Tile(const Tile& tile, const Pokemod* parent, const int id) : - Object("Tile", parent, id) + Object(parent, id) { *this = tile; } Pokemod::Tile::Tile(const QDomElement& xml, const Pokemod* parent, const int id) : - Object("Tile", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/Time.cpp b/pokemod/Time.cpp index 1a829000..43ba3be2 100644 --- a/pokemod/Time.cpp +++ b/pokemod/Time.cpp @@ -23,13 +23,13 @@ #include "Pokemod.h" Pokemod::Time::Time(const Time& time) : - Object("Time", time.parent(), time.id()) + Object(time.parent(), time.id()) { *this = time; } Pokemod::Time::Time(const Pokemod* parent, const int id) : - Object("Time", parent, id), + Object(parent, id), m_name(""), m_hour(0), m_minute(0) @@ -37,13 +37,13 @@ Pokemod::Time::Time(const Pokemod* parent, const int id) : } Pokemod::Time::Time(const Time& time, const Pokemod* parent, const int id) : - Object("Time", parent, id) + Object(parent, id) { *this = time; } Pokemod::Time::Time(const QDomElement& xml, const Pokemod* parent, const int id) : - Object("Time", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/Trainer.cpp b/pokemod/Trainer.cpp index c24315a0..303dfac3 100644 --- a/pokemod/Trainer.cpp +++ b/pokemod/Trainer.cpp @@ -25,13 +25,13 @@ const QStringList Pokemod::Trainer::IntelligenceStr = QStringList() << "Ignorant" << "Remember" << "Cheating"; Pokemod::Trainer::Trainer(const Trainer& trainer) : - Object("Trainer", trainer.parent(), trainer.id()) + Object(trainer.parent(), trainer.id()) { *this = trainer; } Pokemod::Trainer::Trainer(const Pokemod* parent, const int id) : - Object("Trainer", parent, id), + Object(parent, id), m_name(""), m_moneyFactor(0), m_skin(192, 128), @@ -45,13 +45,13 @@ Pokemod::Trainer::Trainer(const Pokemod* parent, const int id) : } Pokemod::Trainer::Trainer(const Trainer& trainer, const Pokemod* parent, const int id) : - Object("Trainer", parent, id) + Object(parent, id) { *this = trainer; } Pokemod::Trainer::Trainer(const QDomElement& xml, const Pokemod* parent, const int id) : - Object("Trainer", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/Type.cpp b/pokemod/Type.cpp index 26760478..235673a2 100644 --- a/pokemod/Type.cpp +++ b/pokemod/Type.cpp @@ -23,26 +23,26 @@ #include "Pokemod.h" Pokemod::Type::Type(const Type& type) : - Object("Type", type.parent(), type.id()) + Object(type.parent(), type.id()) { *this = type; } Pokemod::Type::Type(const Pokemod* parent, const int id) : - Object("Type", parent, id), + Object(parent, id), m_name(""), m_stab(1, 1) { } Pokemod::Type::Type(const Type& type, const Pokemod* parent, const int id) : - Object("Type", parent, id) + Object(parent, id) { *this = type; } Pokemod::Type::Type(const QDomElement& xml, const Pokemod* parent, const int id) : - Object("Type", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); diff --git a/pokemod/Weather.cpp b/pokemod/Weather.cpp index 1f336bb1..2636849e 100644 --- a/pokemod/Weather.cpp +++ b/pokemod/Weather.cpp @@ -24,26 +24,26 @@ #include "Script.h" Pokemod::Weather::Weather(const Weather& weather) : - Object("Weather", weather.parent(), weather.id()) + Object(weather.parent(), weather.id()) { *this = weather; } Pokemod::Weather::Weather(const Pokemod* parent, const int id) : - Object("Weather", parent, id), + Object(parent, id), m_name(""), m_script("", "") { } Pokemod::Weather::Weather(const Weather& weather, const Pokemod* parent, const int id) : - Object("Weather", parent, id) + Object(parent, id) { *this = weather; } Pokemod::Weather::Weather(const QDomElement& xml, const Pokemod* parent, const int id) : - Object("Weather", parent, id) + Object(parent, id) { LOAD_ID(); load(xml); |