From 80648431d93dbbeb8707f64e334c31c2e7ec8587 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Sat, 9 Aug 2008 15:17:32 +0000 Subject: Added updating of global variable var5 to Operation Stealth's renderOverlay function's type 20 overlay case (Previously var5 wasn't updated anywhere!). Also added a lower bound for var5's value into a comparison (Previously only the upper bound was tested for). svn-id: r33712 --- engines/cine/gfx.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/cine/gfx.cpp') diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index be65b2f9dc..524610eece 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -1098,10 +1098,11 @@ void OSRenderer::renderOverlay(const Common::List::iterator &it) { // masked background case 20: assert(it->objIdx < NUM_MAX_OBJECT); + var5 = it->x; // A global variable updated here! obj = objectTable + it->objIdx; sprite = animDataTable + obj->frame; - if (obj->frame < 0 || it->x > 8 || !_bgTable[it->x].bg || sprite->_bpp != 1) { + if (obj->frame < 0 || it->x < 0 || it->x > 8 || !_bgTable[it->x].bg || sprite->_bpp != 1) { break; } -- cgit v1.2.3