summaryrefslogtreecommitdiffstats
path: root/pokemod/Tile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokemod/Tile.cpp')
-rw-r--r--pokemod/Tile.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/pokemod/Tile.cpp b/pokemod/Tile.cpp
index a4ab5b2d..6c4b98d2 100644
--- a/pokemod/Tile.cpp
+++ b/pokemod/Tile.cpp
@@ -22,11 +22,11 @@
#include "Tile.h"
-const char* PokeGen::PokeMod::Tile::HMTypeStr[PokeGen::PokeMod::Tile::H_End] =
+const char* PokeMod::Tile::HMTypeStr[PokeMod::Tile::H_End] =
{"None", "Surf", "Dive", "Waterfall", "Whirlpool", "Cut", "Headbutt", "Rock Climb", "Rock Smash"};
-const char* PokeGen::PokeMod::Tile::ForceStr[PokeGen::PokeMod::Tile::F_End] = {"None", "Slip", "Stop", "Force", "Push"};
+const char* PokeMod::Tile::ForceStr[PokeMod::Tile::F_End] = {"None", "Slip", "Stop", "Force", "Push"};
-PokeGen::PokeMod::Tile::Tile(const Pokemod& par, const unsigned _id) :
+PokeMod::Tile::Tile(const Pokemod& par, const unsigned _id) :
Object(par, _id),
name(""),
pic(""),
@@ -41,20 +41,20 @@ PokeGen::PokeMod::Tile::Tile(const Pokemod& par, const unsigned _id) :
from[i] = false;
}
-PokeGen::PokeMod::Tile::Tile(const Pokemod& par, const Tile& t, const unsigned _id) :
+PokeMod::Tile::Tile(const Pokemod& par, const Tile& t, const unsigned _id) :
Object(par, _id)
{
*this = t;
}
-PokeGen::PokeMod::Tile::Tile(const Pokemod& par, const QString& fname, const unsigned _id) :
+PokeMod::Tile::Tile(const Pokemod& par, const QString& fname, const unsigned _id) :
Object(par, _id),
pic("")
{
load(fname, _id);
}
-bool PokeGen::PokeMod::Tile::validate() const
+bool PokeMod::Tile::validate() const
{
bool valid = true;
pokemod.validationMsg(QString("---Tile \"%1\" with id %2---").arg(name).arg(id), Pokemod::V_Msg);
@@ -104,7 +104,7 @@ bool PokeGen::PokeMod::Tile::validate() const
return valid;
}
-void PokeGen::PokeMod::Tile::load(const QString& fname, const unsigned _id) throw(Exception)
+void PokeMod::Tile::load(const QString& fname, const unsigned _id) throw(Exception)
{
Ini ini(fname);
if (_id == UINT_MAX)
@@ -129,7 +129,7 @@ void PokeGen::PokeMod::Tile::load(const QString& fname, const unsigned _id) thro
ini.getValue("forceDirection", forceDirection);
}
-void PokeGen::PokeMod::Tile::save() const throw(Exception)
+void PokeMod::Tile::save() const throw(Exception)
{
Ini ini;
ini.addField("id", id);
@@ -149,46 +149,46 @@ void PokeGen::PokeMod::Tile::save() const throw(Exception)
ini.save(QString("%1/tile/%2.pini").arg(pokemod.getPath()).arg(name));
}
-void PokeGen::PokeMod::Tile::setName(const QString& n)
+void PokeMod::Tile::setName(const QString& n)
{
name = n;
}
-void PokeGen::PokeMod::Tile::setPic(const QString& p) throw(OpenException)
+void PokeMod::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 PokeGen::PokeMod::Tile::setFrom(const unsigned d, const bool f) throw(BoundsException)
+void PokeMod::Tile::setFrom(const unsigned d, const bool f) throw(BoundsException)
{
if (D_End <= d)
throw(BoundsException("Tile", "direction"));
from[d] = f;
}
-void PokeGen::PokeMod::Tile::setIsWild(const bool i)
+void PokeMod::Tile::setIsWild(const bool i)
{
isWild = i;
}
-void PokeGen::PokeMod::Tile::setWildChance(const unsigned n, const unsigned d) throw(Exception)
+void PokeMod::Tile::setWildChance(const unsigned n, const unsigned d) throw(Exception)
{
wildChance.set(n, d);
}
-void PokeGen::PokeMod::Tile::setWildChanceNumerator(const unsigned n) throw(Exception)
+void PokeMod::Tile::setWildChanceNumerator(const unsigned n) throw(Exception)
{
wildChance.setNum(n);
}
-void PokeGen::PokeMod::Tile::setWildChanceDenominator(const unsigned d) throw(Exception)
+void PokeMod::Tile::setWildChanceDenominator(const unsigned d) throw(Exception)
{
wildChance.setDenom(d);
}
-void PokeGen::PokeMod::Tile::setHMType(const unsigned h) throw(BoundsException)
+void PokeMod::Tile::setHMType(const unsigned h) throw(BoundsException)
{
if (H_End <= h)
throw(BoundsException("Tile", "hmType"));
@@ -196,7 +196,7 @@ void PokeGen::PokeMod::Tile::setHMType(const unsigned h) throw(BoundsException)
under = UINT_MAX;
}
-void PokeGen::PokeMod::Tile::setUnder(const unsigned u) throw(Exception)
+void PokeMod::Tile::setUnder(const unsigned u) throw(Exception)
{
if ((hmType != H_Whirlpool) || (hmType != H_Cut) || (hmType != H_RockSmash))
throw(UnusedException("Tile", "under"));
@@ -205,78 +205,78 @@ void PokeGen::PokeMod::Tile::setUnder(const unsigned u) throw(Exception)
under = u;
}
-void PokeGen::PokeMod::Tile::setForceType(const unsigned f) throw(BoundsException)
+void PokeMod::Tile::setForceType(const unsigned f) throw(BoundsException)
{
if (F_End <= f)
throw(BoundsException("Tile", "forceType"));
forceType = f;
}
-void PokeGen::PokeMod::Tile::setForceDirection(const unsigned f) throw(BoundsException)
+void PokeMod::Tile::setForceDirection(const unsigned f) throw(BoundsException)
{
if (D_End <= f)
throw(BoundsException("Tile", "forceDirection"));
forceDirection = f;
}
-QString PokeGen::PokeMod::Tile::getName() const
+QString PokeMod::Tile::getName() const
{
return name;
}
-QString PokeGen::PokeMod::Tile::getPic() const
+QString PokeMod::Tile::getPic() const
{
return pic;
}
-bool PokeGen::PokeMod::Tile::getFrom(const unsigned d) const throw(BoundsException)
+bool PokeMod::Tile::getFrom(const unsigned d) const throw(BoundsException)
{
if (D_End <= d)
throw(BoundsException("Tile", "direction"));
return from[d];
}
-bool PokeGen::PokeMod::Tile::getIsWild() const
+bool PokeMod::Tile::getIsWild() const
{
return isWild;
}
-PokeGen::Frac PokeGen::PokeMod::Tile::getWildChance() const
+Frac PokeMod::Tile::getWildChance() const
{
return wildChance;
}
-unsigned PokeGen::PokeMod::Tile::getWildChanceNumerator() const
+unsigned PokeMod::Tile::getWildChanceNumerator() const
{
return wildChance.getNum();
}
-unsigned PokeGen::PokeMod::Tile::getWildChanceDenominator() const
+unsigned PokeMod::Tile::getWildChanceDenominator() const
{
return wildChance.getDenom();
}
-unsigned PokeGen::PokeMod::Tile::getHMType() const
+unsigned PokeMod::Tile::getHMType() const
{
return hmType;
}
-unsigned PokeGen::PokeMod::Tile::getUnder() const
+unsigned PokeMod::Tile::getUnder() const
{
return under;
}
-unsigned PokeGen::PokeMod::Tile::getForceType() const
+unsigned PokeMod::Tile::getForceType() const
{
return forceType;
}
-unsigned PokeGen::PokeMod::Tile::getForceDirection() const
+unsigned PokeMod::Tile::getForceDirection() const
{
return forceDirection;
}
-PokeGen::PokeMod::Tile& PokeGen::PokeMod::Tile::operator=(const Tile& rhs)
+PokeMod::Tile& PokeMod::Tile::operator=(const Tile& rhs)
{
if (this == &rhs)
return *this;