summaryrefslogtreecommitdiffstats
path: root/pokemod/Tile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokemod/Tile.cpp')
-rw-r--r--pokemod/Tile.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/pokemod/Tile.cpp b/pokemod/Tile.cpp
index b2c6487e..5cc74075 100644
--- a/pokemod/Tile.cpp
+++ b/pokemod/Tile.cpp
@@ -27,7 +27,7 @@
const QStringList Tile::ForceStr = QStringList() << "None" << "Slip" << "Stop" << "Force" << "Push";
Tile::Tile(const Pokemod& par, const unsigned _id) :
- Object(par, _id),
+ Object("Tile", par, _id),
name(""),
pic(""),
wildChance(1, 1),
@@ -41,13 +41,13 @@ Tile::Tile(const Pokemod& par, const unsigned _id) :
}
Tile::Tile(const Pokemod& par, const Tile& t, const unsigned _id) :
- Object(par, _id)
+ Object("Tile", par, _id)
{
*this = t;
}
Tile::Tile(const Pokemod& par, const QString& fname, const unsigned _id) :
- Object(par, _id),
+ Object("Tile", par, _id),
pic("")
{
load(fname, _id);
@@ -154,14 +154,14 @@ void Tile::setName(const QString& n)
void Tile::setPic(const QString& p) throw(OpenException)
{
if (!QFile::exists(QString("%1/image/tile/%2.png").arg(pokemod.getPath()).arg(p)))
- throw(OpenException("Tile", QString("%1/image/tile/%2.png").arg(pokemod.getPath()).arg(p)));
+ throw(OpenException(className, QString("%1/image/tile/%2.png").arg(pokemod.getPath()).arg(p)));
pic = p;
}
void Tile::setFrom(const unsigned d, const bool f) throw(BoundsException)
{
if (D_End <= d)
- throw(BoundsException("Tile", "direction"));
+ throw(BoundsException(className, "direction"));
from[d] = f;
}
@@ -183,7 +183,7 @@ void Tile::setWildChanceDenominator(const unsigned d) throw(Exception)
void Tile::setHMType(const unsigned h) throw(BoundsException)
{
if (HM_End <= h)
- throw(BoundsException("Tile", "hmType"));
+ throw(BoundsException(className, "hmType"));
hmType = h;
under = UINT_MAX;
}
@@ -191,25 +191,25 @@ void Tile::setHMType(const unsigned h) throw(BoundsException)
void Tile::setUnder(const unsigned u) throw(Exception)
{
if ((hmType != HM_Whirlpool) || (hmType != HM_Cut) || (hmType != HM_RockSmash))
- throw(UnusedException("Tile", "under"));
+ throw(UnusedException(className, "under"));
if ((u == id) || (pokemod.getTileIndex(u) == UINT_MAX))
- throw(BoundsException("Tile", "under"));
+ throw(BoundsException(className, "under"));
under = u;
}
void Tile::setForceType(const unsigned f) throw(BoundsException)
{
if (End <= f)
- throw(BoundsException("Tile", "forceType"));
+ throw(BoundsException(className, "forceType"));
forceType = f;
}
void Tile::setForceDirection(const unsigned f) throw(Exception)
{
if ((forceType == None) || (forceType == Stop))
- throw(UnusedException("Tile", "forceDirection"));
+ throw(UnusedException(className, "forceDirection"));
if (D_End <= f)
- throw(BoundsException("Tile", "forceDirection"));
+ throw(BoundsException(className, "forceDirection"));
forceDirection = f;
}
@@ -226,7 +226,7 @@ QString Tile::getPic() const
bool Tile::getFrom(const unsigned d) const throw(BoundsException)
{
if (D_End <= d)
- throw(BoundsException("Tile", "direction"));
+ throw(BoundsException(className, "direction"));
return from[d];
}