From fe31331e2807634ae659e372358bac5781de9130 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 19 Apr 2008 18:12:17 +0000 Subject: [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 --- pokemod/MapWarp.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'pokemod/MapWarp.cpp') 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("direction"); m_from[direction] = can; } void MapWarp::setDirectionOut(const int directionOut) throw(BoundsException) { if (Pokemod::D_End <= directionOut) - throw(BoundsException(className(), "direction")); + error("direction"); m_directionOut = directionOut; } void MapWarp::setWarpType(const int warpType) throw(BoundsException) { if (End <= warpType) - throw(BoundsException(className(), "warpType")); + error("warpType"); m_warpType = warpType; } void MapWarp::setIsBiking(const int isBiking) throw(BoundsException) { if (Flag::End <= isBiking) - throw(BoundsException(className(), "isBiking")); + error("isBiking"); m_isBiking = isBiking; } void MapWarp::setIsFlash(const int isFlash) throw(BoundsException) { if (Flag::End <= isFlash) - throw(BoundsException(className(), "isFlash")); + error("isFlash"); m_isFlash = isFlash; } void MapWarp::setIsFoggy(const int isFoggy) throw(BoundsException) { if (Flag::End <= isFoggy) - throw(BoundsException(className(), "isFoggy")); + error("isFoggy"); m_isFoggy = isFoggy; } void MapWarp::setToMap(const int toMap) throw(BoundsException) { if (pokemod()->mapIndex(toMap) == INT_MAX) - throw(BoundsException(className(), "toMap")); + error("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("toMap"); if (pokemod()->mapById(m_toMap)->warpIndex(toWarp) == INT_MAX) - throw(BoundsException(className(), "toWarp")); + error("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("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("direction"); return m_from[direction]; } -- cgit