diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-01-21 17:13:11 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-01-21 17:13:11 +0000 |
| commit | a1fff27395d1930820e6c007fdedd8e9dc58f0b3 (patch) | |
| tree | f61c6b86b4a415fdc2bd0f7d6ca9bfdbfd8e8b64 /pokemod/MapEffect.cpp | |
| parent | 342fa6879e9fd8a757ebabe0a30370137b8d83a7 (diff) | |
| download | sigen-a1fff27395d1930820e6c007fdedd8e9dc58f0b3.tar.gz sigen-a1fff27395d1930820e6c007fdedd8e9dc58f0b3.tar.xz sigen-a1fff27395d1930820e6c007fdedd8e9dc58f0b3.zip | |
[FIX] PokeMod namespace removed
[ADD] MoveEffect editing form for PokéModr
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@38 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/MapEffect.cpp')
| -rw-r--r-- | pokemod/MapEffect.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/pokemod/MapEffect.cpp b/pokemod/MapEffect.cpp index 28571fa0..df59f432 100644 --- a/pokemod/MapEffect.cpp +++ b/pokemod/MapEffect.cpp @@ -24,10 +24,10 @@ #include "Dialog.h" #include "MapEffect.h" -const QStringList PokeMod::MapEffect::MapEffectStr = QStringList() << "Item" << "PC" << "Strength Block" << "Button" << "Slot Machine" << "Card Flip Game"; -const QStringList PokeMod::MapEffect::PCTypeStr = QStringList() << "Item" << "Pokémon" << "PokéDex" << "Hall of Fame" << "All"; +const QStringList MapEffect::MapEffectStr = QStringList() << "Item" << "PC" << "Strength Block" << "Button" << "Slot Machine" << "Card Flip Game"; +const QStringList MapEffect::PCTypeStr = QStringList() << "Item" << "Pokémon" << "PokéDex" << "Hall of Fame" << "All"; -PokeMod::MapEffect::MapEffect(const Pokemod& par, const unsigned _id) : +MapEffect::MapEffect(const Pokemod& par, const unsigned _id) : Object(par, _id), name(""), coordinate(0, 0), @@ -43,19 +43,19 @@ PokeMod::MapEffect::MapEffect(const Pokemod& par, const unsigned _id) : { } -PokeMod::MapEffect::MapEffect(const Pokemod& par, const MapEffect& e, const unsigned _id) : +MapEffect::MapEffect(const Pokemod& par, const MapEffect& e, const unsigned _id) : Object(par, _id) { *this = e; } -PokeMod::MapEffect::MapEffect(const Pokemod& par, const QString& fname, const unsigned _id) : +MapEffect::MapEffect(const Pokemod& par, const QString& fname, const unsigned _id) : Object(par, _id) { load(fname, _id); } -bool PokeMod::MapEffect::validate() const +bool MapEffect::validate() const { bool valid = true; pokemod.validationMsg(QString("------Effect \"%1\" with id %2---").arg(name).arg(id), Pokemod::V_Msg); @@ -117,7 +117,7 @@ bool PokeMod::MapEffect::validate() const return valid; } -void PokeMod::MapEffect::load(const QString& fname, const unsigned _id) throw(Exception) +void MapEffect::load(const QString& fname, const unsigned _id) throw(Exception) { Ini ini(fname); if (_id == UINT_MAX) @@ -143,7 +143,7 @@ void PokeMod::MapEffect::load(const QString& fname, const unsigned _id) throw(Ex ini.getValue("dialog", dialog); } -void PokeMod::MapEffect::save(const QString& map) const throw(Exception) +void MapEffect::save(const QString& map) const throw(Exception) { Ini ini; ini.addField("id", id); @@ -163,49 +163,49 @@ void 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 PokeMod::MapEffect::setName(const QString& n) +void MapEffect::setName(const QString& n) { name = n; } -void PokeMod::MapEffect::setCoordinate(const unsigned x, const unsigned y) +void MapEffect::setCoordinate(const unsigned x, const unsigned y) { coordinate.set(x, y); } -void PokeMod::MapEffect::setCoordinateX(const unsigned x) +void MapEffect::setCoordinateX(const unsigned x) { coordinate.setX(x); } -void PokeMod::MapEffect::setCoordinateY(const unsigned y) +void MapEffect::setCoordinateY(const unsigned y) { coordinate.setY(y); } -void PokeMod::MapEffect::setExistFlag(const unsigned f, const unsigned s) +void MapEffect::setExistFlag(const unsigned f, const unsigned s) { existFlag.set(f, s); } -void PokeMod::MapEffect::setExistFlagFlag(const unsigned f) +void MapEffect::setExistFlagFlag(const unsigned f) { existFlag.setFlag(f); } -void PokeMod::MapEffect::setExistFlagStatus(const unsigned s) +void MapEffect::setExistFlagStatus(const unsigned s) { existFlag.setStatus(s); } -void PokeMod::MapEffect::setSkin(const QString& s) throw(Exception) +void 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 PokeMod::MapEffect::setEffect(const unsigned e) throw(BoundsException) +void MapEffect::setEffect(const unsigned e) throw(BoundsException) { if (E_End <= e) throw(BoundsException("MapEffect", "effect")); @@ -214,14 +214,14 @@ void PokeMod::MapEffect::setEffect(const unsigned e) throw(BoundsException) val2 = UINT_MAX; } -void PokeMod::MapEffect::setVal1(const unsigned v1) throw(UnusedException) +void MapEffect::setVal1(const unsigned v1) throw(UnusedException) { if ((effect != E_StrengthBlock) && (effect != E_Button)) throw(UnusedException("MapEffect", "val1")); val1 = v1; } -void PokeMod::MapEffect::setVal2(const unsigned v2) throw(Exception) +void MapEffect::setVal2(const unsigned v2) throw(Exception) { switch (effect) { @@ -245,86 +245,86 @@ void PokeMod::MapEffect::setVal2(const unsigned v2) throw(Exception) val2 = v2; } -void PokeMod::MapEffect::setDirection(const unsigned d) throw(BoundsException) +void MapEffect::setDirection(const unsigned d) throw(BoundsException) { if (D_End_None <= d) throw(BoundsException("MapEffect", "direction")); direction = d; } -void PokeMod::MapEffect::setIsGhost(const bool i) +void MapEffect::setIsGhost(const bool i) { isGhost = i; } -void PokeMod::MapEffect::setCanMove(const bool c) +void MapEffect::setCanMove(const bool c) { canMove = c; } -void PokeMod::MapEffect::setDialog(const unsigned d) throw(BoundsException) +void MapEffect::setDialog(const unsigned d) throw(BoundsException) { if (pokemod.getDialogIndex(d) == UINT_MAX) throw(BoundsException("MapEffect", "dialog")); dialog = d; } -QString PokeMod::MapEffect::getName() const +QString MapEffect::getName() const { return name; } -Point PokeMod::MapEffect::getCoordinate() const +Point MapEffect::getCoordinate() const { return coordinate; } -Flag PokeMod::MapEffect::getExistFlag() const +Flag MapEffect::getExistFlag() const { return existFlag; } -QString PokeMod::MapEffect::getSkin() const +QString MapEffect::getSkin() const { return skin; } -unsigned PokeMod::MapEffect::getEffect() const +unsigned MapEffect::getEffect() const { return effect; } -unsigned PokeMod::MapEffect::getVal1() const +unsigned MapEffect::getVal1() const { return val1; } -unsigned PokeMod::MapEffect::getVal2() const +unsigned MapEffect::getVal2() const { return val2; } -unsigned PokeMod::MapEffect::getDirection() const +unsigned MapEffect::getDirection() const { return direction; } -bool PokeMod::MapEffect::getIsGhost() const +bool MapEffect::getIsGhost() const { return isGhost; } -bool PokeMod::MapEffect::getCanMove() const +bool MapEffect::getCanMove() const { return canMove; } -unsigned PokeMod::MapEffect::getDialog() const +unsigned MapEffect::getDialog() const { return dialog; } -PokeMod::MapEffect& PokeMod::MapEffect::operator=(const MapEffect& rhs) +MapEffect& MapEffect::operator=(const MapEffect& rhs) { if (this == &rhs) return *this; |
