summaryrefslogtreecommitdiffstats
path: root/pokemod/MapEffect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokemod/MapEffect.cpp')
-rw-r--r--pokemod/MapEffect.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/pokemod/MapEffect.cpp b/pokemod/MapEffect.cpp
index db65dd69..7c835e78 100644
--- a/pokemod/MapEffect.cpp
+++ b/pokemod/MapEffect.cpp
@@ -22,10 +22,10 @@
#include "MapEffect.h"
-const char* PokeGen::PokeMod::MapEffect::MapEffectStr[PokeGen::PokeMod::MapEffect::E_End] = {"Item", "PC", "Strength Block", "Button", "Slot Machine", "Card Flip Game"};
-const char* PokeGen::PokeMod::MapEffect::PCTypeStr[PokeGen::PokeMod::MapEffect::PC_End] = {"Item", "Pokémon", "PokéDex", "Hall of Fame", "All"};
+const char* PokeMod::MapEffect::MapEffectStr[PokeMod::MapEffect::E_End] = {"Item", "PC", "Strength Block", "Button", "Slot Machine", "Card Flip Game"};
+const char* PokeMod::MapEffect::PCTypeStr[PokeMod::MapEffect::PC_End] = {"Item", "Pokémon", "PokéDex", "Hall of Fame", "All"};
-PokeGen::PokeMod::MapEffect::MapEffect(const Pokemod& par, const unsigned _id) :
+PokeMod::MapEffect::MapEffect(const Pokemod& par, const unsigned _id) :
Object(par, _id),
name(""),
coordinate(0, 0),
@@ -41,19 +41,19 @@ PokeGen::PokeMod::MapEffect::MapEffect(const Pokemod& par, const unsigned _id) :
{
}
-PokeGen::PokeMod::MapEffect::MapEffect(const Pokemod& par, const MapEffect& e, const unsigned _id) :
+PokeMod::MapEffect::MapEffect(const Pokemod& par, const MapEffect& e, const unsigned _id) :
Object(par, _id)
{
*this = e;
}
-PokeGen::PokeMod::MapEffect::MapEffect(const Pokemod& par, const QString& fname, const unsigned _id) :
+PokeMod::MapEffect::MapEffect(const Pokemod& par, const QString& fname, const unsigned _id) :
Object(par, _id)
{
load(fname, _id);
}
-bool PokeGen::PokeMod::MapEffect::validate() const
+bool PokeMod::MapEffect::validate() const
{
bool valid = true;
pokemod.validationMsg(QString("------Effect \"%1\" with id %2---").arg(name).arg(id), Pokemod::V_Msg);
@@ -115,7 +115,7 @@ bool PokeGen::PokeMod::MapEffect::validate() const
return valid;
}
-void PokeGen::PokeMod::MapEffect::load(const QString& fname, const unsigned _id) throw(Exception)
+void PokeMod::MapEffect::load(const QString& fname, const unsigned _id) throw(Exception)
{
Ini ini(fname);
if (_id == UINT_MAX)
@@ -141,7 +141,7 @@ void PokeGen::PokeMod::MapEffect::load(const QString& fname, const unsigned _id)
ini.getValue("dialog", dialog);
}
-void PokeGen::PokeMod::MapEffect::save(const QString& map) const throw(Exception)
+void PokeMod::MapEffect::save(const QString& map) const throw(Exception)
{
Ini ini;
ini.addField("id", id);
@@ -161,49 +161,49 @@ void PokeGen::PokeMod::MapEffect::save(const QString& map) const throw(Exception
ini.save(QString("%1/map/%2/effect/%3.pini").arg(pokemod.getPath()).arg(map).arg(name));
}
-void PokeGen::PokeMod::MapEffect::setName(const QString& n)
+void PokeMod::MapEffect::setName(const QString& n)
{
name = n;
}
-void PokeGen::PokeMod::MapEffect::setCoordinate(const unsigned x, const unsigned y)
+void PokeMod::MapEffect::setCoordinate(const unsigned x, const unsigned y)
{
coordinate.set(x, y);
}
-void PokeGen::PokeMod::MapEffect::setCoordinateX(const unsigned x)
+void PokeMod::MapEffect::setCoordinateX(const unsigned x)
{
coordinate.setX(x);
}
-void PokeGen::PokeMod::MapEffect::setCoordinateY(const unsigned y)
+void PokeMod::MapEffect::setCoordinateY(const unsigned y)
{
coordinate.setY(y);
}
-void PokeGen::PokeMod::MapEffect::setExistFlag(const unsigned f, const unsigned s)
+void PokeMod::MapEffect::setExistFlag(const unsigned f, const unsigned s)
{
existFlag.set(f, s);
}
-void PokeGen::PokeMod::MapEffect::setExistFlagFlag(const unsigned f)
+void PokeMod::MapEffect::setExistFlagFlag(const unsigned f)
{
existFlag.setFlag(f);
}
-void PokeGen::PokeMod::MapEffect::setExistFlagStatus(const unsigned s)
+void PokeMod::MapEffect::setExistFlagStatus(const unsigned s)
{
existFlag.setStatus(s);
}
-void PokeGen::PokeMod::MapEffect::setSkin(const QString& s) throw(Exception)
+void PokeMod::MapEffect::setSkin(const QString& s) throw(Exception)
{
if (!QFile::exists(QString("%1/image/skin/%2.png").arg(pokemod.getPath()).arg(s)))
throw(Exception("MapEffect", "skin does not exist"));
skin = s;
}
-void PokeGen::PokeMod::MapEffect::setEffect(const unsigned e) throw(BoundsException)
+void PokeMod::MapEffect::setEffect(const unsigned e) throw(BoundsException)
{
if (E_End <= e)
throw(BoundsException("MapEffect", "effect"));
@@ -212,14 +212,14 @@ void PokeGen::PokeMod::MapEffect::setEffect(const unsigned e) throw(BoundsExcept
val2 = UINT_MAX;
}
-void PokeGen::PokeMod::MapEffect::setVal1(const unsigned v1) throw(UnusedException)
+void PokeMod::MapEffect::setVal1(const unsigned v1) throw(UnusedException)
{
if ((effect != E_StrengthBlock) && (effect != E_Button))
throw(UnusedException("MapEffect", "val1"));
val1 = v1;
}
-void PokeGen::PokeMod::MapEffect::setVal2(const unsigned v2) throw(Exception)
+void PokeMod::MapEffect::setVal2(const unsigned v2) throw(Exception)
{
switch (effect)
{
@@ -243,106 +243,106 @@ void PokeGen::PokeMod::MapEffect::setVal2(const unsigned v2) throw(Exception)
val2 = v2;
}
-void PokeGen::PokeMod::MapEffect::setDirection(const unsigned d) throw(BoundsException)
+void PokeMod::MapEffect::setDirection(const unsigned d) throw(BoundsException)
{
if (D_End_None <= d)
throw(BoundsException("MapEffect", "direction"));
direction = d;
}
-void PokeGen::PokeMod::MapEffect::setIsTransparent(const bool i)
+void PokeMod::MapEffect::setIsTransparent(const bool i)
{
isTransparent = i;
}
-void PokeGen::PokeMod::MapEffect::setCanMove(const bool c)
+void PokeMod::MapEffect::setCanMove(const bool c)
{
canMove = c;
}
-void PokeGen::PokeMod::MapEffect::setDialog(const unsigned d) throw(BoundsException)
+void PokeMod::MapEffect::setDialog(const unsigned d) throw(BoundsException)
{
if (pokemod.getDialogByID(d) == UINT_MAX)
throw(BoundsException("MapEffect", "dialog"));
dialog = d;
}
-QString PokeGen::PokeMod::MapEffect::getName() const
+QString PokeMod::MapEffect::getName() const
{
return name;
}
-PokeGen::Point PokeGen::PokeMod::MapEffect::getCoordinate() const
+Point PokeMod::MapEffect::getCoordinate() const
{
return coordinate;
}
-unsigned PokeGen::PokeMod::MapEffect::getCoordinateX() const
+unsigned PokeMod::MapEffect::getCoordinateX() const
{
return coordinate.getX();
}
-unsigned PokeGen::PokeMod::MapEffect::getCoordinateY() const
+unsigned PokeMod::MapEffect::getCoordinateY() const
{
return coordinate.getY();
}
-PokeGen::Flag PokeGen::PokeMod::MapEffect::getExistFlag() const
+Flag PokeMod::MapEffect::getExistFlag() const
{
return existFlag;
}
-unsigned PokeGen::PokeMod::MapEffect::getExistFlagFlag() const
+unsigned PokeMod::MapEffect::getExistFlagFlag() const
{
return existFlag.getFlag();
}
-unsigned PokeGen::PokeMod::MapEffect::getExistFlagStatus() const
+unsigned PokeMod::MapEffect::getExistFlagStatus() const
{
return existFlag.getStatus();
}
-QString PokeGen::PokeMod::MapEffect::getSkin() const
+QString PokeMod::MapEffect::getSkin() const
{
return skin;
}
-unsigned PokeGen::PokeMod::MapEffect::getEffect() const
+unsigned PokeMod::MapEffect::getEffect() const
{
return effect;
}
-unsigned PokeGen::PokeMod::MapEffect::getVal1() const
+unsigned PokeMod::MapEffect::getVal1() const
{
return val1;
}
-unsigned PokeGen::PokeMod::MapEffect::getVal2() const
+unsigned PokeMod::MapEffect::getVal2() const
{
return val2;
}
-unsigned PokeGen::PokeMod::MapEffect::getDirection() const
+unsigned PokeMod::MapEffect::getDirection() const
{
return direction;
}
-bool PokeGen::PokeMod::MapEffect::getIsTransparent() const
+bool PokeMod::MapEffect::getIsTransparent() const
{
return isTransparent;
}
-bool PokeGen::PokeMod::MapEffect::getCanMove() const
+bool PokeMod::MapEffect::getCanMove() const
{
return canMove;
}
-unsigned PokeGen::PokeMod::MapEffect::getDialog() const
+unsigned PokeMod::MapEffect::getDialog() const
{
return dialog;
}
-PokeGen::PokeMod::MapEffect& PokeGen::PokeMod::MapEffect::operator=(const MapEffect& rhs)
+PokeMod::MapEffect& PokeMod::MapEffect::operator=(const MapEffect& rhs)
{
if (this == &rhs)
return *this;