From 7aad29572d4b618f6296b3af4102b7c7084c72b5 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 28 Sep 2011 14:10:09 +0300 Subject: PARALLACTION: Fixed bug #2969913 - "NIPPON: Katana graphics not shown (regression)" --- engines/parallaction/parser_ns.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'engines/parallaction') 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; -- cgit v1.2.3