aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/graphics.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2009-01-08 14:12:46 +0000
committerNicola Mettifogo2009-01-08 14:12:46 +0000
commit4b402e4cd8369bda59c3b374eb8c9948257c2801 (patch)
tree464e645c7c7fa8e15a708cedbf02802184c261be /engines/parallaction/graphics.cpp
parentbeacae5efda12366b04c7c53f4e063b254253de5 (diff)
downloadscummvm-rg350-4b402e4cd8369bda59c3b374eb8c9948257c2801.tar.gz
scummvm-rg350-4b402e4cd8369bda59c3b374eb8c9948257c2801.tar.bz2
scummvm-rg350-4b402e4cd8369bda59c3b374eb8c9948257c2801.zip
Fixed points 2 and 3 of bug #2438549, spotlight wasn't displayed correctly.
svn-id: r35785
Diffstat (limited to 'engines/parallaction/graphics.cpp')
-rw-r--r--engines/parallaction/graphics.cpp17
1 files changed, 10 insertions, 7 deletions
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;