aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2016-05-20 07:00:50 +0200
committerStrangerke2016-05-20 07:00:50 +0200
commit20b3d1814a54c5f82e29e141ebf61f572767840c (patch)
tree014142722c6e105cb356f3b82cdebf283a2ae470 /engines
parent8a112ec92d57f7c05739e7681930289d9f9da431 (diff)
downloadscummvm-rg350-20b3d1814a54c5f82e29e141ebf61f572767840c.tar.gz
scummvm-rg350-20b3d1814a54c5f82e29e141ebf61f572767840c.tar.bz2
scummvm-rg350-20b3d1814a54c5f82e29e141ebf61f572767840c.zip
GNAP: Remove some CHECKME's
Diffstat (limited to 'engines')
-rw-r--r--engines/gnap/character.cpp14
-rw-r--r--engines/gnap/gnap.cpp1
2 files changed, 10 insertions, 5 deletions
diff --git a/engines/gnap/character.cpp b/engines/gnap/character.cpp
index 706cb987fb..575e3f3dd9 100644
--- a/engines/gnap/character.cpp
+++ b/engines/gnap/character.cpp
@@ -676,8 +676,11 @@ int PlayerGnap::getWalkSequenceId(int deltaX, int deltaY) {
0x7AD, 0x000, 0x7AE,
0x7B1, 0x000, 0x7B3
};
- // CHECKME This is a little weird
- return walkSequenceIds[3 * deltaX + 3 + 1 + deltaY];
+
+ int id = 3 * (deltaX + 1) + deltaY + 1;
+ assert(id >= 0 && id < 9);
+
+ return walkSequenceIds[id];
}
bool PlayerGnap::walkTo(Common::Point gridPos, int animationIndex, int sequenceId, int flags) {
@@ -1275,8 +1278,11 @@ int PlayerPlat::getWalkSequenceId(int deltaX, int deltaY) {
0x7C4, 0x000, 0x7C7,
0x7C3, 0x000, 0x7C6
};
- // CHECKME This is a little weird
- return walkSequenceIds[3 * deltaX + 3 + 1 + deltaY];
+
+ int id = 3 * (deltaX + 1) + deltaY + 1;
+ assert(id >= 0 && id < 9);
+
+ return walkSequenceIds[id];
}
bool PlayerPlat::walkTo(Common::Point gridPos, int animationIndex, int sequenceId, int flags) {
diff --git a/engines/gnap/gnap.cpp b/engines/gnap/gnap.cpp
index 541d062efb..d6ec44cfc5 100644
--- a/engines/gnap/gnap.cpp
+++ b/engines/gnap/gnap.cpp
@@ -1049,7 +1049,6 @@ void GnapEngine::toyUfoFlyTo(int destX, int destY, int minX, int maxX, int minY,
if (destY == -1)
destY = _leftClickMouseY;
- //CHECKME
int clippedDestX = CLIP(destX, minX, maxX);
int clippedDestY = CLIP(destY, minY, maxY);
int dirX = 0, dirY = 0; // 0, -1 or 1