GNAP: Remove some CHECKME's

This commit is contained in:
Strangerke 2016-05-20 07:00:50 +02:00
parent 8a112ec92d
commit 20b3d1814a
2 changed files with 10 additions and 5 deletions

View File

@ -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) {

View File

@ -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