diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2009-02-24 12:56:24 -0500 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2009-02-24 12:56:24 -0500 |
commit | 97fac7d7b30058574dc15d7c18382f104bafd833 (patch) | |
tree | 2e7f5e612c34c82a70f454069a2e9868ca261b7d /sigmod/MapWarp.cpp | |
parent | 21a57c920ffd9038053650a403fc6271a0d4e243 (diff) | |
download | sigen-97fac7d7b30058574dc15d7c18382f104bafd833.tar.gz sigen-97fac7d7b30058574dc15d7c18382f104bafd833.tar.xz sigen-97fac7d7b30058574dc15d7c18382f104bafd833.zip |
Add using namespace Sigmod and Sigcore to sigmod sources for cleaner code
Diffstat (limited to 'sigmod/MapWarp.cpp')
-rw-r--r-- | sigmod/MapWarp.cpp | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/sigmod/MapWarp.cpp b/sigmod/MapWarp.cpp index 7db29554..a251e834 100644 --- a/sigmod/MapWarp.cpp +++ b/sigmod/MapWarp.cpp @@ -27,15 +27,18 @@ #include "Map.h" #include "Sigmod.h" -const QStringList Sigmod::MapWarp::TypeStr = QStringList() << "Door" << "Warp" << "Hole" << "Boundary"; +using namespace Sigcore; +using namespace Sigmod; -Sigmod::MapWarp::MapWarp(const MapWarp& warp) : +const QStringList MapWarp::TypeStr = QStringList() << "Door" << "Warp" << "Hole" << "Boundary"; + +MapWarp::MapWarp(const MapWarp& warp) : Object(warp.parent(), warp.id()) { *this = warp; } -Sigmod::MapWarp::MapWarp(const Map* parent, const int id) : +MapWarp::MapWarp(const Map* parent, const int id) : Object(parent, id), m_name(""), m_area(0, 0, 32, 32), @@ -46,20 +49,20 @@ Sigmod::MapWarp::MapWarp(const Map* parent, const int id) : { } -Sigmod::MapWarp::MapWarp(const MapWarp& warp, const Map* parent, const int id) : +MapWarp::MapWarp(const MapWarp& warp, const Map* parent, const int id) : Object(parent, id) { *this = warp; } -Sigmod::MapWarp::MapWarp(const QDomElement& xml, const Map* parent, const int id) : +MapWarp::MapWarp(const QDomElement& xml, const Map* parent, const int id) : Object(parent, id) { LOAD_ID(); load(xml); } -void Sigmod::MapWarp::validate() +void MapWarp::validate() { TEST_BEGIN(); if (m_name.isEmpty()) @@ -70,7 +73,7 @@ void Sigmod::MapWarp::validate() TEST_END(); } -void Sigmod::MapWarp::load(const QDomElement& xml) +void MapWarp::load(const QDomElement& xml) { LOAD_BEGIN(); LOAD(name); @@ -81,7 +84,7 @@ void Sigmod::MapWarp::load(const QDomElement& xml) LOAD(script); } -QDomElement Sigmod::MapWarp::save() const +QDomElement MapWarp::save() const { SAVE_CREATE(); SAVE(name); @@ -98,14 +101,14 @@ SETTER(MapWarp, QRect&, Area, area) SETTER(MapWarp, Type, Type, type) SETTER(MapWarp, int, ToMap, toMap) SETTER(MapWarp, int, ToWarp, toWarp) -SETTER(MapWarp, Sigcore::Script&, Script, script) +SETTER(MapWarp, Script&, Script, script) GETTER(MapWarp, QString, name) GETTER(MapWarp, QRect, area) -GETTER(MapWarp, Sigmod::MapWarp::Type, type) +GETTER(MapWarp, MapWarp::Type, type) GETTER(MapWarp, int, toMap) GETTER(MapWarp, int, toWarp) -GETTER(MapWarp, Sigcore::Script, script) +GETTER(MapWarp, Script, script) CHECK(MapWarp, QString&, name) CHECK_BEGIN(MapWarp, QRect&, area) @@ -126,9 +129,9 @@ CHECK_BEGIN(MapWarp, int, toWarp) } IBOUNDS(toWarp, map, warp); CHECK_END() -CHECK(MapWarp, Sigcore::Script&, script) +CHECK(MapWarp, Script&, script) -Sigmod::MapWarp& Sigmod::MapWarp::operator=(const MapWarp& rhs) +MapWarp& MapWarp::operator=(const MapWarp& rhs) { if (this == &rhs) return *this; |