From b69b09ef5a756700b6fb071f53ea19131182e527 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 13 Jun 2015 22:04:41 +0300 Subject: SHERLOCK: Clean up ADJUST_COORD slightly --- engines/sherlock/tattoo/tattoo_scene.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'engines/sherlock') diff --git a/engines/sherlock/tattoo/tattoo_scene.cpp b/engines/sherlock/tattoo/tattoo_scene.cpp index 3d4053f2b4..68d93c0767 100644 --- a/engines/sherlock/tattoo/tattoo_scene.cpp +++ b/engines/sherlock/tattoo/tattoo_scene.cpp @@ -808,7 +808,11 @@ void TattooScene::setupBGArea(const byte cMap[PALETTE_SIZE]) { } } -#define ADJUST_COORD(COORD) if (COORD != -1) COORD *= FIXED_INT_MULTIPLIER +#define ADJUST_COORD(COORD) \ + if (COORD.x != -1) \ + COORD.x *= FIXED_INT_MULTIPLIER; \ + if (COORD.y != -1) \ + COORD.y *= FIXED_INT_MULTIPLIER int TattooScene::startCAnim(int cAnimNum, int playRate) { TattooEngine &vm = *(TattooEngine *)_vm; @@ -831,14 +835,10 @@ int TattooScene::startCAnim(int cAnimNum, int playRate) { PositionFacing teleport2 = cAnim._teleport[1]; // If the co-ordinates are valid (not -1), adjust them by the fixed int multiplier - ADJUST_COORD(goto1.x); - ADJUST_COORD(goto1.y); - ADJUST_COORD(goto2.x); - ADJUST_COORD(goto2.y); - ADJUST_COORD(teleport1.x); - ADJUST_COORD(teleport1.y); - ADJUST_COORD(teleport2.x); - ADJUST_COORD(teleport2.y); + ADJUST_COORD(goto1); + ADJUST_COORD(goto2); + ADJUST_COORD(teleport1); + ADJUST_COORD(teleport2); // See if the Player must walk to a position before the animation starts SpriteType savedPlayerType = people[HOLMES]._type; -- cgit v1.2.3