From 6679f5cffa9d35a23b76605ddfbf3257f882b6ee Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 17 Apr 2008 23:34:36 +0000 Subject: [FIX] Frac -> Fraction [FIX] ImageCache and Ini removed [FIX] Fraction/Point widgets moved to pokemodr [FIX] Copy ctors made for pokemod classes [FIX] Ctors in pokemod fixed [FIX] Copyright headers fixed in pokemodr [FIX] PokeModr updated to new API and fixed in some places git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@99 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokemod/Tile.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'pokemod/Tile.cpp') diff --git a/pokemod/Tile.cpp b/pokemod/Tile.cpp index 2eb80173..ba6bb9ab 100644 --- a/pokemod/Tile.cpp +++ b/pokemod/Tile.cpp @@ -26,6 +26,12 @@ const QStringList Tile::ForceStr = QStringList() << "Slip" << "Stop" << "Force" << "Push"; +Tile::Tile(const Tile& tile) : + Object("Tile", tile.pokemod(), tile.id()) +{ + *this = tile; +} + Tile::Tile(const Pokemod* pokemod, const int id) : Object("Tile", pokemod, id), m_name(""), @@ -39,13 +45,13 @@ Tile::Tile(const Pokemod* pokemod, const int id) : m_from[i] = false; } -Tile::Tile(const Pokemod* pokemod, const Tile& tile, const int id) : +Tile::Tile(const Tile& tile, const Pokemod* pokemod, const int id) : Object("Tile", pokemod, id) { *this = tile; } -Tile::Tile(const Pokemod* pokemod, const QDomElement& xml, const int id) : +Tile::Tile(const QDomElement& xml, const Pokemod* pokemod, const int id) : Object("Tile", pokemod, id) { load(xml, id); @@ -102,7 +108,7 @@ void Tile::load(const QDomElement& xml, int id) LOAD(QString, name); LOAD(QPixmap, sprite); LOAD_ARRAY(bool, from, Pokemod::D_End); - LOAD(Frac, wildChance); + LOAD(Fraction, wildChance); LOAD(int, hmType); LOAD(int, under); LOAD(int, forceType); @@ -115,7 +121,7 @@ QDomElement Tile::save() const SAVE(QString, name); SAVE(QPixmap, sprite); SAVE_ARRAY(bool, from, Pokemod::D_End); - SAVE(Frac, wildChance); + SAVE(Fraction, wildChance); SAVE(int, hmType); SAVE(int, under); SAVE(int, forceType); @@ -141,7 +147,7 @@ void Tile::setFrom(const int direction, const bool state) throw(BoundsException) m_from[direction] = state; } -void Tile::setWildChance(const Frac& wildChance) throw(Exception) +void Tile::setWildChance(const Fraction& wildChance) throw(Exception) { m_wildChance = wildChance; } @@ -202,7 +208,7 @@ bool Tile::from(const int direction) const throw(BoundsException) return m_from[direction]; } -Frac Tile::wildChance() const +Fraction Tile::wildChance() const { return m_wildChance; } -- cgit