summaryrefslogtreecommitdiffstats
path: root/pokemod/Tile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokemod/Tile.cpp')
-rw-r--r--pokemod/Tile.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/pokemod/Tile.cpp b/pokemod/Tile.cpp
index d6d46440..b2c6487e 100644
--- a/pokemod/Tile.cpp
+++ b/pokemod/Tile.cpp
@@ -24,9 +24,9 @@
#include "Pokemod.h"
#include "Tile.h"
-const QStringList PokeMod::Tile::ForceStr = QStringList() << "None" << "Slip" << "Stop" << "Force" << "Push";
+const QStringList Tile::ForceStr = QStringList() << "None" << "Slip" << "Stop" << "Force" << "Push";
-PokeMod::Tile::Tile(const Pokemod& par, const unsigned _id) :
+Tile::Tile(const Pokemod& par, const unsigned _id) :
Object(par, _id),
name(""),
pic(""),
@@ -40,20 +40,20 @@ PokeMod::Tile::Tile(const Pokemod& par, const unsigned _id) :
from[i] = false;
}
-PokeMod::Tile::Tile(const Pokemod& par, const Tile& t, const unsigned _id) :
+Tile::Tile(const Pokemod& par, const Tile& t, const unsigned _id) :
Object(par, _id)
{
*this = t;
}
-PokeMod::Tile::Tile(const Pokemod& par, const QString& fname, const unsigned _id) :
+Tile::Tile(const Pokemod& par, const QString& fname, const unsigned _id) :
Object(par, _id),
pic("")
{
load(fname, _id);
}
-bool PokeMod::Tile::validate() const
+bool Tile::validate() const
{
bool valid = true;
pokemod.validationMsg(QString("---Tile \"%1\" with id %2---").arg(name).arg(id), Pokemod::V_Msg);
@@ -103,7 +103,7 @@ bool PokeMod::Tile::validate() const
return valid;
}
-void PokeMod::Tile::load(const QString& fname, const unsigned _id) throw(Exception)
+void Tile::load(const QString& fname, const unsigned _id) throw(Exception)
{
Ini ini(fname);
if (_id == UINT_MAX)
@@ -127,7 +127,7 @@ void PokeMod::Tile::load(const QString& fname, const unsigned _id) throw(Excepti
ini.getValue("forceDirection", forceDirection);
}
-void PokeMod::Tile::save() const throw(Exception)
+void Tile::save() const throw(Exception)
{
Ini ini;
ini.addField("id", id);
@@ -146,41 +146,41 @@ void PokeMod::Tile::save() const throw(Exception)
ini.save(QString("%1/tile/%2.pini").arg(pokemod.getPath()).arg(name));
}
-void PokeMod::Tile::setName(const QString& n)
+void Tile::setName(const QString& n)
{
name = n;
}
-void PokeMod::Tile::setPic(const QString& p) throw(OpenException)
+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)));
pic = p;
}
-void PokeMod::Tile::setFrom(const unsigned d, const bool f) throw(BoundsException)
+void Tile::setFrom(const unsigned d, const bool f) throw(BoundsException)
{
if (D_End <= d)
throw(BoundsException("Tile", "direction"));
from[d] = f;
}
-void PokeMod::Tile::setWildChance(const unsigned n, const unsigned d) throw(Exception)
+void Tile::setWildChance(const unsigned n, const unsigned d) throw(Exception)
{
wildChance.set(n, d);
}
-void PokeMod::Tile::setWildChanceNumerator(const unsigned n) throw(Exception)
+void Tile::setWildChanceNumerator(const unsigned n) throw(Exception)
{
wildChance.setNum(n);
}
-void PokeMod::Tile::setWildChanceDenominator(const unsigned d) throw(Exception)
+void Tile::setWildChanceDenominator(const unsigned d) throw(Exception)
{
wildChance.setDenom(d);
}
-void PokeMod::Tile::setHMType(const unsigned h) throw(BoundsException)
+void Tile::setHMType(const unsigned h) throw(BoundsException)
{
if (HM_End <= h)
throw(BoundsException("Tile", "hmType"));
@@ -188,7 +188,7 @@ void PokeMod::Tile::setHMType(const unsigned h) throw(BoundsException)
under = UINT_MAX;
}
-void PokeMod::Tile::setUnder(const unsigned u) throw(Exception)
+void Tile::setUnder(const unsigned u) throw(Exception)
{
if ((hmType != HM_Whirlpool) || (hmType != HM_Cut) || (hmType != HM_RockSmash))
throw(UnusedException("Tile", "under"));
@@ -197,14 +197,14 @@ void PokeMod::Tile::setUnder(const unsigned u) throw(Exception)
under = u;
}
-void PokeMod::Tile::setForceType(const unsigned f) throw(BoundsException)
+void Tile::setForceType(const unsigned f) throw(BoundsException)
{
if (End <= f)
throw(BoundsException("Tile", "forceType"));
forceType = f;
}
-void PokeMod::Tile::setForceDirection(const unsigned f) throw(Exception)
+void Tile::setForceDirection(const unsigned f) throw(Exception)
{
if ((forceType == None) || (forceType == Stop))
throw(UnusedException("Tile", "forceDirection"));
@@ -213,49 +213,49 @@ void PokeMod::Tile::setForceDirection(const unsigned f) throw(Exception)
forceDirection = f;
}
-QString PokeMod::Tile::getName() const
+QString Tile::getName() const
{
return name;
}
-QString PokeMod::Tile::getPic() const
+QString Tile::getPic() const
{
return pic;
}
-bool PokeMod::Tile::getFrom(const unsigned d) const throw(BoundsException)
+bool Tile::getFrom(const unsigned d) const throw(BoundsException)
{
if (D_End <= d)
throw(BoundsException("Tile", "direction"));
return from[d];
}
-Frac PokeMod::Tile::getWildChance() const
+Frac Tile::getWildChance() const
{
return wildChance;
}
-unsigned PokeMod::Tile::getHMType() const
+unsigned Tile::getHMType() const
{
return hmType;
}
-unsigned PokeMod::Tile::getUnder() const
+unsigned Tile::getUnder() const
{
return under;
}
-unsigned PokeMod::Tile::getForceType() const
+unsigned Tile::getForceType() const
{
return forceType;
}
-unsigned PokeMod::Tile::getForceDirection() const
+unsigned Tile::getForceDirection() const
{
return forceDirection;
}
-PokeMod::Tile& PokeMod::Tile::operator=(const Tile& rhs)
+Tile& Tile::operator=(const Tile& rhs)
{
if (this == &rhs)
return *this;