diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-04-19 18:12:17 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-04-19 18:12:17 +0000 |
| commit | fe31331e2807634ae659e372358bac5781de9130 (patch) | |
| tree | 6b208974e3f141e9b22152526e2d42e967bfd4ec /pokemod/MapWarp.cpp | |
| parent | 6679f5cffa9d35a23b76605ddfbf3257f882b6ee (diff) | |
[FIX] IndexException is more explicit
[FIX] Added SizeException for image validation
[FIX] QPixmaps are now verified
[FIX] Classes now use error and warning rather than throwing
[FIX] Deleted Object.cpp
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@100 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/MapWarp.cpp')
| -rw-r--r-- | pokemod/MapWarp.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/pokemod/MapWarp.cpp b/pokemod/MapWarp.cpp index 546984ff..0dc045e9 100644 --- a/pokemod/MapWarp.cpp +++ b/pokemod/MapWarp.cpp @@ -154,49 +154,49 @@ void MapWarp::setCoordinate(const Point& coordinate) void MapWarp::setFrom(const int direction, const bool can) throw(BoundsException) { if (Pokemod::D_End <= direction) - throw(BoundsException(className(), "direction")); + error<BoundsException>("direction"); m_from[direction] = can; } void MapWarp::setDirectionOut(const int directionOut) throw(BoundsException) { if (Pokemod::D_End <= directionOut) - throw(BoundsException(className(), "direction")); + error<BoundsException>("direction"); m_directionOut = directionOut; } void MapWarp::setWarpType(const int warpType) throw(BoundsException) { if (End <= warpType) - throw(BoundsException(className(), "warpType")); + error<BoundsException>("warpType"); m_warpType = warpType; } void MapWarp::setIsBiking(const int isBiking) throw(BoundsException) { if (Flag::End <= isBiking) - throw(BoundsException(className(), "isBiking")); + error<BoundsException>("isBiking"); m_isBiking = isBiking; } void MapWarp::setIsFlash(const int isFlash) throw(BoundsException) { if (Flag::End <= isFlash) - throw(BoundsException(className(), "isFlash")); + error<BoundsException>("isFlash"); m_isFlash = isFlash; } void MapWarp::setIsFoggy(const int isFoggy) throw(BoundsException) { if (Flag::End <= isFoggy) - throw(BoundsException(className(), "isFoggy")); + error<BoundsException>("isFoggy"); m_isFoggy = isFoggy; } void MapWarp::setToMap(const int toMap) throw(BoundsException) { if (pokemod()->mapIndex(toMap) == INT_MAX) - throw(BoundsException(className(), "toMap")); + error<BoundsException>("toMap"); m_toMap = toMap; m_toWarp = INT_MAX; } @@ -204,9 +204,9 @@ void MapWarp::setToMap(const int toMap) throw(BoundsException) void MapWarp::setToWarp(const int toWarp) throw(BoundsException) { if (pokemod()->mapIndex(m_toMap) == INT_MAX) - throw(BoundsException(className(), "toMap")); + error<BoundsException>("toMap"); if (pokemod()->mapById(m_toMap)->warpIndex(toWarp) == INT_MAX) - throw(BoundsException(className(), "toWarp")); + error<BoundsException>("toWarp"); m_toWarp = toWarp; } @@ -218,7 +218,7 @@ void MapWarp::setWorkingFlag(const Flag& workingFlag) void MapWarp::setDialog(const int dialog) throw(BoundsException) { if (pokemod()->dialogIndex(dialog) == INT_MAX) - throw(BoundsException(className(), "dialog")); + error<BoundsException>("dialog"); m_dialog = dialog; } @@ -235,7 +235,7 @@ Point MapWarp::coordinate() const bool MapWarp::from(const int direction) const throw(BoundsException) { if (Pokemod::D_End <= direction) - throw(BoundsException(className(), "direction")); + warning<BoundsException>("direction"); return m_from[direction]; } |
