aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-05-16 23:54:58 +0000
committerMax Horn2003-05-16 23:54:58 +0000
commit3244a79d4675cc50b1e7b4ac05687a9acfcffaf1 (patch)
tree760ea665d50b34aa5d75f1e554ee73cc6cb46baf
parent92a71eed1003368e70f2f4ffa3ac73120db06bd6 (diff)
downloadscummvm-rg350-3244a79d4675cc50b1e7b4ac05687a9acfcffaf1.tar.gz
scummvm-rg350-3244a79d4675cc50b1e7b4ac05687a9acfcffaf1.tar.bz2
scummvm-rg350-3244a79d4675cc50b1e7b4ac05687a9acfcffaf1.zip
V2 camera fix (again thanks MadMoose)
svn-id: r7587
-rw-r--r--scumm/gfx.cpp10
-rw-r--r--scumm/scummvm.cpp2
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;
}