aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/parser_ns.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2011-09-28 14:10:09 +0300
committerFilippos Karapetis2011-09-28 14:10:52 +0300
commit7aad29572d4b618f6296b3af4102b7c7084c72b5 (patch)
treef0f6bb066066b68f0f39f0d17155ccf400e2bf37 /engines/parallaction/parser_ns.cpp
parentf444a2544d8eada5886e6ed478ed40bb3e9841cf (diff)
downloadscummvm-rg350-7aad29572d4b618f6296b3af4102b7c7084c72b5.tar.gz
scummvm-rg350-7aad29572d4b618f6296b3af4102b7c7084c72b5.tar.bz2
scummvm-rg350-7aad29572d4b618f6296b3af4102b7c7084c72b5.zip
PARALLACTION: Fixed bug #2969913 - "NIPPON: Katana graphics not shown (regression)"
Diffstat (limited to 'engines/parallaction/parser_ns.cpp')
-rw-r--r--engines/parallaction/parser_ns.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp
index 100b608172..0ee59a07cb 100644
--- a/engines/parallaction/parser_ns.cpp
+++ b/engines/parallaction/parser_ns.cpp
@@ -1334,6 +1334,21 @@ void LocationParser_ns::parseGetData(ZonePtr z) {
obj->x = z->getX();
obj->y = z->getY();
obj->_prog = _zoneProg;
+
+ // HACK for bug #2969913
+ // The katana object has the same default z index (kGfxObjGetZ or -100)
+ // as the cripta object (the safe).
+ // Game scripts do not set an explicit z for the katana (as it isn't an
+ // animation), but rather rely on the draw order to draw it over the
+ // safe. In this particular case, the safe is added to the scene after
+ // the katana, thus it is drawn over the katana. We explicitly set the
+ // z index of the katana to be higher than the safe, so that the katana
+ // is drawn correctly over it.
+ // This is a regression from the graphics rewrite (commits be2c5d3,
+ // 3c2c16c and 44906f5).
+ if (!scumm_stricmp(obj->getName(), "katana"))
+ obj->z = 0;
+
bool visible = (z->_flags & kFlagsRemove) == 0;
_vm->_gfx->showGfxObj(obj, visible);
data->_gfxobj = obj;