aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/tattoo/tattoo_scene.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2015-06-13 22:04:41 +0300
committerFilippos Karapetis2015-06-13 22:04:41 +0300
commitb69b09ef5a756700b6fb071f53ea19131182e527 (patch)
tree92f4fa5383669189ae8ab9921868a850a680e135 /engines/sherlock/tattoo/tattoo_scene.cpp
parent559478defccf0f1e9e7a30a13aff4e2b035d9184 (diff)
downloadscummvm-rg350-b69b09ef5a756700b6fb071f53ea19131182e527.tar.gz
scummvm-rg350-b69b09ef5a756700b6fb071f53ea19131182e527.tar.bz2
scummvm-rg350-b69b09ef5a756700b6fb071f53ea19131182e527.zip
SHERLOCK: Clean up ADJUST_COORD slightly
Diffstat (limited to 'engines/sherlock/tattoo/tattoo_scene.cpp')
-rw-r--r--engines/sherlock/tattoo/tattoo_scene.cpp18
1 files changed, 9 insertions, 9 deletions
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;