diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2009-05-28 22:03:42 -0400 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2009-05-28 22:03:42 -0400 |
commit | 3fb49947b429e5f6dd7e6e0684d9b545d9442917 (patch) | |
tree | df7c322d136f893674d54b09495e273d523b59d9 /sigmod | |
parent | 33e7c40bb4b6cdcf5b9f1de29249a1f95b3cb9ab (diff) | |
download | sigen-3fb49947b429e5f6dd7e6e0684d9b545d9442917.tar.gz sigen-3fb49947b429e5f6dd7e6e0684d9b545d9442917.tar.xz sigen-3fb49947b429e5f6dd7e6e0684d9b545d9442917.zip |
Add a flag to Map to mark it as a world map
Diffstat (limited to 'sigmod')
-rw-r--r-- | sigmod/Map.cpp | 6 | ||||
-rw-r--r-- | sigmod/Map.h | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sigmod/Map.cpp b/sigmod/Map.cpp index ff078c2c..df6ae0fb 100644 --- a/sigmod/Map.cpp +++ b/sigmod/Map.cpp @@ -116,6 +116,7 @@ void Map::load(const QDomElement& xml) LOAD(name); LOAD(width); LOAD(height); + LOAD(isWorld); LOAD_SUB(newEffect, MapEffect); LOAD_SUB(newTile, MapTile); LOAD_SUB(newTrainer, MapTrainer); @@ -129,6 +130,7 @@ QDomElement Map::save() const SAVE(name); SAVE(width); SAVE(height); + SAVE(isWorld); SAVE_SUB(MapEffect, effects); SAVE_SUB(MapTile, tiles); SAVE_SUB(MapTrainer, trainers); @@ -140,14 +142,17 @@ QDomElement Map::save() const SETTER(Map, QString&, Name, name) SETTER(Map, int, Width, width) SETTER(Map, int, Height, height) +SETTER(Map, bool, IsWorld, isWorld) GETTER(Map, QString, name) GETTER(Map, int, width) GETTER(Map, int, height) +GETTER(Map, bool, isWorld) CHECK(Map, QString&, name) CHECK_BOUNDS(Map, int, width, 1, INT_MAX) CHECK_BOUNDS(Map, int, height, 1, INT_MAX) +CHECK(Map, bool, isWorld) SUBCLASS(Map, Effect, effect, effects) SUBCLASS(Map, Tile, tile, tiles) @@ -163,6 +168,7 @@ Map& Map::operator=(const Map& rhs) COPY(name); COPY(width); COPY(height); + COPY(isWorld); COPY_SUB(MapEffect, effects); COPY_SUB(MapTile, tiles); COPY_SUB(MapTrainer, trainers); diff --git a/sigmod/Map.h b/sigmod/Map.h index 70607a54..eb9bad12 100644 --- a/sigmod/Map.h +++ b/sigmod/Map.h @@ -57,14 +57,17 @@ class SIGMOD_EXPORT Map : public Object void setName(const QString& name); void setWidth(const int width); void setHeight(const int height); + void setIsWorld(const bool isWorld); QString name() const; int width() const; int height() const; + bool isWorld() const; bool nameCheck(const QString& name) const; bool widthCheck(const int width) const; bool heightCheck(const int height) const; + bool isWorldCheck(const bool isWorld) const; const MapEffect* effect(const int index) const; MapEffect* effect(const int index); @@ -148,6 +151,7 @@ class SIGMOD_EXPORT Map : public Object QString m_name; int m_width; int m_height; + bool m_isWorld; QList<MapEffect*> m_effects; QList<MapTile*> m_tiles; QList<MapTrainer*> m_trainers; |