summaryrefslogtreecommitdiffstats
path: root/pokemod/MapWarp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokemod/MapWarp.cpp')
-rw-r--r--pokemod/MapWarp.cpp22
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];
}