aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/graphics.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2008-02-06 15:38:33 +0000
committerNicola Mettifogo2008-02-06 15:38:33 +0000
commit509f2f6659de65f63aa85e8cb07840e02c4f84c2 (patch)
tree36fcbc325ed140998235e978a9979da58ed4d3de /engines/parallaction/graphics.cpp
parentc03cb964c0a7c2fac7e39cc0035ab9aa030cf3e5 (diff)
downloadscummvm-rg350-509f2f6659de65f63aa85e8cb07840e02c4f84c2.tar.gz
scummvm-rg350-509f2f6659de65f63aa85e8cb07840e02c4f84c2.tar.bz2
scummvm-rg350-509f2f6659de65f63aa85e8cb07840e02c4f84c2.zip
Enabled moving projector in Nippon Safes. This should fix long standing bug #1729309.
svn-id: r30811
Diffstat (limited to 'engines/parallaction/graphics.cpp')
-rw-r--r--engines/parallaction/graphics.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp
index 26da266611..3248113a5e 100644
--- a/engines/parallaction/graphics.cpp
+++ b/engines/parallaction/graphics.cpp
@@ -325,10 +325,7 @@ void Gfx::setHalfbriteMode(bool enable) {
if (enable == _halfbrite) return;
_halfbrite = !_halfbrite;
-
- if (!enable) {
- _hbCircleRadius = 0;
- }
+ _hbCircleRadius = 0;
}
#define HALFBRITE_CIRCLE_RADIUS 48
@@ -338,6 +335,9 @@ void Gfx::setProjectorPos(int x, int y) {
_hbCirclePos.y = y + _hbCircleRadius;
}
+void Gfx::setProjectorProgram(int16 *data) {
+ _nextProjectorPos = data;
+}
void Gfx::drawInventory() {
@@ -439,6 +439,15 @@ void Gfx::updateScreen() {
for (int i = 0; i < surf->w*surf->h; i++) {
*buf++ |= 0x20;
}
+ if (_nextProjectorPos) {
+ int16 x = *_nextProjectorPos++;
+ int16 y = *_nextProjectorPos++;
+ if (x == -1 && y == -1) {
+ _nextProjectorPos = 0;
+ } else {
+ setProjectorPos(x, y);
+ }
+ }
if (_hbCircleRadius > 0) {
drawCircle(_hbCirclePos.x, _hbCirclePos.y, _hbCircleRadius, 0, &halfbritePixel, surf->pixels);
}