From e965d4f6d7cd33c3901a61d9b798dcc5593534c7 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sun, 9 Nov 2008 18:53:21 +0000 Subject: [FIX] Starting the sigworld library [FIX] Tile has walkable flag on it git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@310 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- sigmod/Tile.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'sigmod/Tile.cpp') diff --git a/sigmod/Tile.cpp b/sigmod/Tile.cpp index 3646dbd3..d4468056 100644 --- a/sigmod/Tile.cpp +++ b/sigmod/Tile.cpp @@ -31,6 +31,7 @@ Sigmod::Tile::Tile(const Tile& tile) : Sigmod::Tile::Tile(const Sigmod* parent, const int id) : Object(parent, id), m_name(""), + m_walkable(true), m_script("", "") { } @@ -60,6 +61,7 @@ void Sigmod::Tile::load(const QDomElement& xml) { LOAD_BEGIN(); LOAD(name); + LOAD(walkable); LOAD(script); } @@ -67,6 +69,7 @@ QDomElement Sigmod::Tile::save() const { SAVE_CREATE(); SAVE(name); + SAVE(walkable); SAVE(script); return xml; } @@ -76,6 +79,11 @@ void Sigmod::Tile::setName(const QString& name) CHECK(name); } +void Sigmod::Tile::setWalkable(const bool walkable) +{ + CHECK(walkable); +} + void Sigmod::Tile::setScript(const Sigcore::Script& script) { CHECK(script); @@ -86,6 +94,11 @@ QString Sigmod::Tile::name() const return m_name; } +bool Sigmod::Tile::walkable() const +{ + return m_walkable; +} + Sigcore::Script Sigmod::Tile::script() const { return m_script; @@ -96,6 +109,7 @@ Sigmod::Tile& Sigmod::Tile::operator=(const Tile& rhs) if (this == &rhs) return *this; COPY(name); + COPY(walkable); COPY(script); return *this; } -- cgit