From 20b3d1814a54c5f82e29e141ebf61f572767840c Mon Sep 17 00:00:00 2001 From: Strangerke Date: Fri, 20 May 2016 07:00:50 +0200 Subject: GNAP: Remove some CHECKME's --- engines/gnap/character.cpp | 14 ++++++++++---- engines/gnap/gnap.cpp | 1 - 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'engines/gnap') 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 -- cgit v1.2.3