diff options
Diffstat (limited to 'pokemod/Tile.cpp')
| -rw-r--r-- | pokemod/Tile.cpp | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/pokemod/Tile.cpp b/pokemod/Tile.cpp index 46363a27..91dd59d6 100644 --- a/pokemod/Tile.cpp +++ b/pokemod/Tile.cpp @@ -37,8 +37,6 @@ Tile::Tile(const Pokemod* parent, const int id) : m_name(""), m_sprite(64, 64), m_wildChance(1, 1), - m_hmType(INT_MAX), - m_under(INT_MAX), m_forceType(INT_MAX), m_forceDirection(INT_MAX) { @@ -64,8 +62,6 @@ void Tile::validate() emit(error("Name is empty")); TEST(setSprite, sprite); TEST(setWildChance, wildChance); - TEST(setHmType, hmType); - TEST(setUnder, under); TEST(setForceType, forceType); TEST(setForceDirection, forceDirection); } @@ -77,8 +73,6 @@ void Tile::load(const QDomElement& xml, int id) LOAD(QPixmap, sprite); LOAD_ARRAY(bool, from, Pokemod::D_End); LOAD(Fraction, wildChance); - LOAD(int, hmType); - LOAD(int, under); LOAD(int, forceType); LOAD(int, forceDirection); } @@ -90,8 +84,6 @@ QDomElement Tile::save() const SAVE(QPixmap, sprite); SAVE_ARRAY(bool, from, Pokemod::D_End); SAVE(Fraction, wildChance); - SAVE(int, hmType); - SAVE(int, under); SAVE(int, forceType); SAVE(int, forceDirection); return xml; @@ -133,39 +125,6 @@ void Tile::setWildChance(const Fraction& wildChance) CHECK(wildChance); } -void Tile::setHmType(const int hmType) -{ - if (Pokemod::HM_End <= hmType) - { - emit(error(bounds("hmType"))); - return; - } - if (((hmType == Pokemod::HM_Waterfall) || (hmType == Pokemod::HM_RockClimb)) && (!m_from[Pokemod::D_Up] || !m_from[Pokemod::D_Down])) - { - emit(error("Accessibility for HM type")); - return; - } - CHECK(hmType); -} - -void Tile::setUnder(const int under) -{ - if (m_hmType != INT_MAX) - { - if ((m_hmType != Pokemod::HM_Whirlpool) || (m_hmType != Pokemod::HM_Cut) || (m_hmType != Pokemod::HM_RockSmash)) - { - emit(warning(unused("under"))); - return; - } - if ((under == id()) || (static_cast<const Pokemod*>(pokemod())->tileIndex(under) == INT_MAX)) - { - emit(error(bounds("under"))); - return; - } - } - CHECK(under); -} - void Tile::setForceType(const int forceType) { if (End <= forceType) @@ -219,16 +178,6 @@ Fraction Tile::wildChance() const return m_wildChance; } -int Tile::hmType() const -{ - return m_hmType; -} - -int Tile::under() const -{ - return m_under; -} - int Tile::forceType() const { return m_forceType; @@ -246,8 +195,6 @@ Tile& Tile::operator=(const Tile& rhs) COPY(name); COPY_ARRAY(from, Pokemod::D_End); COPY(wildChance); - COPY(hmType); - COPY(under); COPY(forceType); COPY(forceDirection); return *this; |
