[Scummvm-git-logs] scummvm master -> a3f1285dc9fc1306256537720e1e6c98f556f231
AndywinXp
noreply at scummvm.org
Fri Jun 3 17:27:26 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a3f1285dc9 SCUMM: COMI: Implement o8_cameraOps
Commit: a3f1285dc9fc1306256537720e1e6c98f556f231
https://github.com/scummvm/scummvm/commit/a3f1285dc9fc1306256537720e1e6c98f556f231
Author: AndywinXp (andywinxp at gmail.com)
Date: 2022-06-03T19:27:18+02:00
Commit Message:
SCUMM: COMI: Implement o8_cameraOps
It had remained stubbed for who knows how long :) This fixes a class of bugs in which
the game requested the camera to be frozen, like for example while the inventory box is shown.
Changed paths:
engines/scumm/camera.cpp
engines/scumm/script_v8.cpp
engines/scumm/scumm.h
diff --git a/engines/scumm/camera.cpp b/engines/scumm/camera.cpp
index 63883ee089d..753db06129a 100644
--- a/engines/scumm/camera.cpp
+++ b/engines/scumm/camera.cpp
@@ -269,6 +269,11 @@ void ScummEngine_v7::moveCamera() {
Common::Point old = camera._cur;
Actor *a = NULL;
+ if (_game.version == 8 && _cameraIsFrozen) {
+ cameraMoved();
+ return;
+ }
+
if (camera._follows) {
a = derefActor(camera._follows, "moveCamera");
if (ABS(camera._cur.x - a->getPos().x) > VAR(VAR_CAMERA_THRESHOLD_X) ||
diff --git a/engines/scumm/script_v8.cpp b/engines/scumm/script_v8.cpp
index 2325ba54d64..a46b40dcf2b 100644
--- a/engines/scumm/script_v8.cpp
+++ b/engines/scumm/script_v8.cpp
@@ -913,10 +913,10 @@ void ScummEngine_v8::o8_cameraOps() {
switch (subOp) {
case 0x32: // SO_CAMERA_PAUSE
- //debug(0, "freezeCamera NYI");
+ _cameraIsFrozen = true;
break;
case 0x33: // SO_CAMERA_RESUME
- //debug(0, "unfreezeCamera NYI");
+ _cameraIsFrozen = false;
break;
default:
error("o8_cameraOps: default case 0x%x", subOp);
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index 5b4f6c5603f..8cd77b0b12d 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -943,6 +943,7 @@ public:
int _screenHeight = 0, _screenWidth = 0;
VirtScreen _virtscr[4]; // Virtual screen areas
CameraData camera; // 'Camera' - viewport
+ bool _cameraIsFrozen = false;
int _screenStartStrip = 0, _screenEndStrip = 0;
int _screenTop = 0;
More information about the Scummvm-git-logs
mailing list