From e74d01a59a17894a85723db3b9af4dacac659336 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Mon, 7 Jul 2008 22:02:01 +0000 Subject: Fix for bathroom door opening crash in Operation Stealth's start. svn-id: r32951 --- engines/cine/gfx.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'engines/cine') diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index 47446f2410..2b7f3b8890 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -969,6 +969,7 @@ void OSRenderer::drawBackground() { /*! \brief Draw one overlay * \param it Overlay info + * \todo Add handling of type 22 overlays */ void OSRenderer::renderOverlay(const Common::List::iterator &it) { int len; @@ -979,6 +980,9 @@ void OSRenderer::renderOverlay(const Common::List::iterator &it) { switch (it->type) { // color sprite case 0: + if (objectTable[it->objIdx].frame < 0) { + break; + } sprite = animDataTable + objectTable[it->objIdx].frame; len = sprite->_realWidth * sprite->_height; mask = new byte[len]; @@ -988,6 +992,13 @@ void OSRenderer::renderOverlay(const Common::List::iterator &it) { delete[] mask; break; + // bitmap + case 4: + if (objectTable[it->objIdx].frame >= 0) { + FWRenderer::renderOverlay(it); + } + break; + // masked background case 20: assert(it->objIdx < NUM_MAX_OBJECT); -- cgit v1.2.3