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/Map.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/Map.cpp')
| -rw-r--r-- | pokemod/Map.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pokemod/Map.cpp b/pokemod/Map.cpp index 7b577e14..5f1a0fd0 100644 --- a/pokemod/Map.cpp +++ b/pokemod/Map.cpp @@ -218,14 +218,14 @@ void Map::setName(const QString& name) void Map::setFlyWarp(const int warp) throw(BoundsException) { if ((warp != INT_MAX) && (warpIndex(warp) == INT_MAX)) - throw(BoundsException(className(), "warp")); + error<BoundsException>("warp"); m_flyWarp = warp; } void Map::setType(const int type) throw(BoundsException) { if (End <= type) - throw(BoundsException(className(), "type")); + error<BoundsException>("type"); m_type = type; } @@ -247,7 +247,7 @@ int Map::type() const void Map::setTile(int x, int y, int id) throw(BoundsException) { if (pokemod()->tileIndex(id) == INT_MAX) - throw(BoundsException(className(), "tile")); + error<BoundsException>("tile"); m_tile(x, y) = id; } @@ -309,7 +309,7 @@ int Map::height() const const MapEffect* Map::effect(const int index) const throw(IndexException) { if (effectCount() <= index) - error<IndexException>("effect"); + warning<IndexException>("effect"); return m_effects.at(index); } @@ -387,7 +387,7 @@ int Map::newEffectId() const const MapTrainer* Map::trainer(const int index) const throw(IndexException) { if (trainerCount() <= index) - error<IndexException>("trainer"); + warning<IndexException>("trainer"); return m_trainers.at(index); } @@ -465,7 +465,7 @@ int Map::newTrainerId() const const MapWarp* Map::warp(const int index) const throw(IndexException) { if (warpCount() <= index) - error<IndexException>("warp"); + warning<IndexException>("warp"); return m_warps.at(index); } @@ -543,7 +543,7 @@ int Map::newWarpId() const const MapWildList* Map::wildList(const int index) const throw(IndexException) { if (wildListCount() <= index) - error<IndexException>("wild list"); + warning<IndexException>("wild list"); return m_wildLists.at(index); } |
