From 4b402e4cd8369bda59c3b374eb8c9948257c2801 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Thu, 8 Jan 2009 14:12:46 +0000 Subject: Fixed points 2 and 3 of bug #2438549, spotlight wasn't displayed correctly. svn-id: r35785 --- engines/parallaction/graphics.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'engines/parallaction') diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index 8dd8a04219..118b4f5c93 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -272,7 +272,6 @@ void Gfx::setHalfbriteMode(bool enable) { if (enable == _halfbrite) return; _halfbrite = !_halfbrite; - _hbCircleRadius = 0; } #define HALFBRITE_CIRCLE_RADIUS 48 @@ -283,7 +282,9 @@ void Gfx::setProjectorPos(int x, int y) { } void Gfx::setProjectorProgram(int16 *data) { - _nextProjectorPos = data; + if (_nextProjectorPos == 0) { + _nextProjectorPos = data; + } } void Gfx::drawInventory() { @@ -427,11 +428,10 @@ void Gfx::applyHalfbriteEffect_NS(Graphics::Surface &surf) { } if (_nextProjectorPos) { - int16 x = *_nextProjectorPos++; - int16 y = *_nextProjectorPos++; - if (x == -1 && y == -1) { - _nextProjectorPos = 0; - } else { + int16 x = *_nextProjectorPos; + int16 y = *(_nextProjectorPos + 1); + if (x != -1 && y != -1) { + _nextProjectorPos += 2; setProjectorPos(x, y); } } @@ -783,6 +783,9 @@ void Gfx::setBackground(uint type, BackgroundInfo *info) { return; } + _hbCircleRadius = 0; + _nextProjectorPos = 0; + delete _backgroundInfo; _backgroundInfo = info; -- cgit v1.2.3