diff options
-rw-r--r-- | scumm/gfx.cpp | 10 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 64ad0fb8eb..3cb08329b0 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -2050,7 +2050,10 @@ void Scumm::setCameraAt(int pos_x, int pos_y) { camera._cur.x = (short) VAR(VAR_CAMERA_MAX_X); if (VAR_SCROLL_SCRIPT != 0xFF && VAR(VAR_SCROLL_SCRIPT)) { - VAR(VAR_CAMERA_POS_X) = camera._cur.x; + if (_features & GF_AFTER_V2) + VAR(VAR_CAMERA_POS_X) = camera._cur.x / 8; + else + VAR(VAR_CAMERA_POS_X) = camera._cur.x; runScript(VAR(VAR_SCROLL_SCRIPT), 0, 0, 0); } @@ -2274,7 +2277,10 @@ void Scumm::moveCamera() { cameraMoved(); if (VAR_SCROLL_SCRIPT != 0xFF && VAR(VAR_SCROLL_SCRIPT) && pos != camera._cur.x) { - VAR(VAR_CAMERA_POS_X) = camera._cur.x; + if (_features & GF_AFTER_V2) + VAR(VAR_CAMERA_POS_X) = camera._cur.x / 8; + else + VAR(VAR_CAMERA_POS_X) = camera._cur.x; runScript(VAR(VAR_SCROLL_SCRIPT), 0, 0, 0); } } diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index f988ed0f89..15a007b24b 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -877,6 +877,8 @@ int Scumm::scummLoop(int delta) { if (_features & GF_AFTER_V7) { VAR(VAR_CAMERA_POS_X) = camera._cur.x; VAR(VAR_CAMERA_POS_Y) = camera._cur.y; + } else if (_features & GF_AFTER_V2) { + VAR(VAR_CAMERA_POS_X) = camera._cur.x / 8; } else { VAR(VAR_CAMERA_POS_X) = camera._cur.x; } |