summaryrefslogtreecommitdiffstats
path: root/pokemod/Tile.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-04-17 23:34:36 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-04-17 23:34:36 +0000
commit6679f5cffa9d35a23b76605ddfbf3257f882b6ee (patch)
treec8e41854a60b64e8569939bca6b827807175ef9a /pokemod/Tile.cpp
parent05980e883719b1c8ebde1bd2fcbf4f8c16df7ad6 (diff)
[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
Diffstat (limited to 'pokemod/Tile.cpp')
-rw-r--r--pokemod/Tile.cpp18
1 files changed, 12 insertions, 6 deletions
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;
}