diff options
Diffstat (limited to 'pokemod/MapWarp.cpp')
-rw-r--r-- | pokemod/MapWarp.cpp | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/pokemod/MapWarp.cpp b/pokemod/MapWarp.cpp index dea20d92..33a85a2b 100644 --- a/pokemod/MapWarp.cpp +++ b/pokemod/MapWarp.cpp @@ -22,9 +22,9 @@ #include "MapWarp.h" -const char* PokeGen::PokeMod::MapWarp::TypeStr[PokeGen::PokeMod::MapWarp::End] = {"Door/Stair", "Warp Pad", "Hole", "Boundary"}; +const char* PokeMod::MapWarp::TypeStr[PokeMod::MapWarp::End] = {"Door/Stair", "Warp Pad", "Hole", "Boundary"}; -PokeGen::PokeMod::MapWarp::MapWarp(const Pokemod& par, const unsigned _id) : +PokeMod::MapWarp::MapWarp(const Pokemod& par, const unsigned _id) : Object(par, _id), name(""), coordinate(0, 0), @@ -42,19 +42,19 @@ PokeGen::PokeMod::MapWarp::MapWarp(const Pokemod& par, const unsigned _id) : from[i] = false; } -PokeGen::PokeMod::MapWarp::MapWarp(const Pokemod& par, const MapWarp& w, const unsigned _id) : +PokeMod::MapWarp::MapWarp(const Pokemod& par, const MapWarp& w, const unsigned _id) : Object(par, _id) { *this = w; } -PokeGen::PokeMod::MapWarp::MapWarp(const Pokemod& par, const QString& fname, const unsigned _id) : +PokeMod::MapWarp::MapWarp(const Pokemod& par, const QString& fname, const unsigned _id) : Object(par, _id) { load(fname, _id); } -bool PokeGen::PokeMod::MapWarp::validate() const +bool PokeMod::MapWarp::validate() const { bool valid = true; pokemod.validationMsg(QString("------Warp \"%1\" with id %2---").arg(name).arg(id), Pokemod::V_Msg); @@ -99,7 +99,7 @@ bool PokeGen::PokeMod::MapWarp::validate() const return valid; } -void PokeGen::PokeMod::MapWarp::load(const QString& fname, const unsigned _id) throw(Exception) +void PokeMod::MapWarp::load(const QString& fname, const unsigned _id) throw(Exception) { Ini ini(fname); if (_id == UINT_MAX) @@ -129,7 +129,7 @@ void PokeGen::PokeMod::MapWarp::load(const QString& fname, const unsigned _id) t ini.getValue("dialog", dialog); } -void PokeGen::PokeMod::MapWarp::save(const QString& map) const throw(Exception) +void PokeMod::MapWarp::save(const QString& map) const throw(Exception) { Ini ini; ini.addField("id", id); @@ -152,63 +152,63 @@ void PokeGen::PokeMod::MapWarp::save(const QString& map) const throw(Exception) ini.save(QString("%1/map/%2/warp/%3.pini").arg(pokemod.getPath()).arg(map).arg(name)); } -void PokeGen::PokeMod::MapWarp::setName(const QString& n) +void PokeMod::MapWarp::setName(const QString& n) { name = n; } -void PokeGen::PokeMod::MapWarp::setCoordinate(const unsigned x, const unsigned y) +void PokeMod::MapWarp::setCoordinate(const unsigned x, const unsigned y) { coordinate.set(x, y); } -void PokeGen::PokeMod::MapWarp::setCoordinateX(const unsigned x) +void PokeMod::MapWarp::setCoordinateX(const unsigned x) { coordinate.setX(x); } -void PokeGen::PokeMod::MapWarp::setCoordinateY(const unsigned y) +void PokeMod::MapWarp::setCoordinateY(const unsigned y) { coordinate.setY(y); } -void PokeGen::PokeMod::MapWarp::setFrom(const unsigned d, const bool f) throw(BoundsException) +void PokeMod::MapWarp::setFrom(const unsigned d, const bool f) throw(BoundsException) { if (D_End <= d) throw(BoundsException("MapWarp", "direction")); from[d] = f; } -void PokeGen::PokeMod::MapWarp::setDirectionOut(const unsigned d) throw(BoundsException) +void PokeMod::MapWarp::setDirectionOut(const unsigned d) throw(BoundsException) { if (D_End <= d) throw(BoundsException("MapWarp", "direction")); directionOut = d; } -void PokeGen::PokeMod::MapWarp::setWarpType(const unsigned w) throw(BoundsException) +void PokeMod::MapWarp::setWarpType(const unsigned w) throw(BoundsException) { if (End <= w) throw(BoundsException("MapWarp", "warpType")); warpType = w; } -void PokeGen::PokeMod::MapWarp::setIsBiking(const bool i) +void PokeMod::MapWarp::setIsBiking(const bool i) { isBiking = i; } -void PokeGen::PokeMod::MapWarp::setIsFlash(const bool i) +void PokeMod::MapWarp::setIsFlash(const bool i) { isFlash = i; } -void PokeGen::PokeMod::MapWarp::setIsFoggy(const bool i) +void PokeMod::MapWarp::setIsFoggy(const bool i) { isFoggy = i; } -void PokeGen::PokeMod::MapWarp::setToMap(const unsigned t) throw(BoundsException) +void PokeMod::MapWarp::setToMap(const unsigned t) throw(BoundsException) { if (pokemod.getMapByID(t) == UINT_MAX) throw(BoundsException("MapWarp", "toMap")); @@ -216,7 +216,7 @@ void PokeGen::PokeMod::MapWarp::setToMap(const unsigned t) throw(BoundsException toWarp = UINT_MAX; } -void PokeGen::PokeMod::MapWarp::setToWarp(const unsigned t) throw(BoundsException) +void PokeMod::MapWarp::setToWarp(const unsigned t) throw(BoundsException) { if (pokemod.getMapByID(toMap) == UINT_MAX) throw(BoundsException("MapWarp", "toMap")); @@ -224,111 +224,111 @@ void PokeGen::PokeMod::MapWarp::setToWarp(const unsigned t) throw(BoundsExceptio throw(BoundsException("MapWarp", "toWarp")); } -void PokeGen::PokeMod::MapWarp::setWorkingFlag(const unsigned f, const unsigned s) +void PokeMod::MapWarp::setWorkingFlag(const unsigned f, const unsigned s) { workingFlag.set(f, s); } -void PokeGen::PokeMod::MapWarp::setWorkingFlagFlag(const unsigned f) +void PokeMod::MapWarp::setWorkingFlagFlag(const unsigned f) { workingFlag.setFlag(f); } -void PokeGen::PokeMod::MapWarp::setWorkingFlagStatus(const unsigned s) +void PokeMod::MapWarp::setWorkingFlagStatus(const unsigned s) { workingFlag.setStatus(s); } -void PokeGen::PokeMod::MapWarp::setDialog(const unsigned d) throw(BoundsException) +void PokeMod::MapWarp::setDialog(const unsigned d) throw(BoundsException) { if (pokemod.getDialogByID(d) == UINT_MAX) throw(BoundsException("MapWarp", "dialog")); dialog = d; } -QString PokeGen::PokeMod::MapWarp::getName() const +QString PokeMod::MapWarp::getName() const { return name; } -PokeGen::Point PokeGen::PokeMod::MapWarp::getCoordinate() const +Point PokeMod::MapWarp::getCoordinate() const { return coordinate; } -unsigned PokeGen::PokeMod::MapWarp::getCoordinateX() const +unsigned PokeMod::MapWarp::getCoordinateX() const { return coordinate.getX(); } -unsigned PokeGen::PokeMod::MapWarp::getCoordinateY() const +unsigned PokeMod::MapWarp::getCoordinateY() const { return coordinate.getY(); } -bool PokeGen::PokeMod::MapWarp::getFrom(const unsigned d) const throw(BoundsException) +bool PokeMod::MapWarp::getFrom(const unsigned d) const throw(BoundsException) { if (D_End <= d) throw(BoundsException("MapWarp", "direction")); return from[d]; } -unsigned PokeGen::PokeMod::MapWarp::getDirectionOut() const +unsigned PokeMod::MapWarp::getDirectionOut() const { return directionOut; } -unsigned PokeGen::PokeMod::MapWarp::getWarpType() const +unsigned PokeMod::MapWarp::getWarpType() const { return warpType; } -bool PokeGen::PokeMod::MapWarp::getIsBiking() const +bool PokeMod::MapWarp::getIsBiking() const { return isBiking; } -bool PokeGen::PokeMod::MapWarp::getIsFlash() const +bool PokeMod::MapWarp::getIsFlash() const { return isFlash; } -bool PokeGen::PokeMod::MapWarp::getIsFoggy() const +bool PokeMod::MapWarp::getIsFoggy() const { return isFoggy; } -unsigned PokeGen::PokeMod::MapWarp::getToMap() const +unsigned PokeMod::MapWarp::getToMap() const { return toMap; } -unsigned PokeGen::PokeMod::MapWarp::getToWarp() const +unsigned PokeMod::MapWarp::getToWarp() const { return toWarp; } -PokeGen::Flag PokeGen::PokeMod::MapWarp::getWorkingFlag() const +Flag PokeMod::MapWarp::getWorkingFlag() const { return workingFlag; } -unsigned PokeGen::PokeMod::MapWarp::getWorkingFlagFlag() const +unsigned PokeMod::MapWarp::getWorkingFlagFlag() const { return workingFlag.getFlag(); } -unsigned PokeGen::PokeMod::MapWarp::getWorkingFlagStatus() const +unsigned PokeMod::MapWarp::getWorkingFlagStatus() const { return workingFlag.getStatus(); } -unsigned PokeGen::PokeMod::MapWarp::getDialog() const +unsigned PokeMod::MapWarp::getDialog() const { return dialog; } -PokeGen::PokeMod::MapWarp& PokeGen::PokeMod::MapWarp::operator=(const MapWarp& rhs) +PokeMod::MapWarp& PokeMod::MapWarp::operator=(const MapWarp& rhs) { if (this == &rhs) return *this; |