aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2014-11-08 16:34:06 -0500
committerPaul Gilbert2014-12-12 22:25:01 -0500
commitfddff687da7b7f9eb2156a84407794c44978caa8 (patch)
tree43b7bd0ed077091bf11653121ee3080e8516a679
parent6434ace3b695cc88593547f8079f6abd309b7f72 (diff)
downloadscummvm-rg350-fddff687da7b7f9eb2156a84407794c44978caa8.tar.gz
scummvm-rg350-fddff687da7b7f9eb2156a84407794c44978caa8.tar.bz2
scummvm-rg350-fddff687da7b7f9eb2156a84407794c44978caa8.zip
ACCESS: Workaround for original game vertical room scrolling
-rw-r--r--engines/access/amazon/amazon_room.cpp11
-rw-r--r--engines/access/amazon/amazon_room.h2
-rw-r--r--engines/access/room.h3
3 files changed, 15 insertions, 1 deletions
diff --git a/engines/access/amazon/amazon_room.cpp b/engines/access/amazon/amazon_room.cpp
index 098220ee0c..96d34e70bb 100644
--- a/engines/access/amazon/amazon_room.cpp
+++ b/engines/access/amazon/amazon_room.cpp
@@ -125,6 +125,17 @@ void AmazonRoom::reloadRoom1() {
_vm->_newRects.clear();
}
+void AmazonRoom::setupRoom() {
+ Room::setupRoom();
+
+ // WORKAROUND: The original engine doesn't handle vertical scrolling rooms
+ Screen &screen = *_vm->_screen;
+ if (screen._vWindowHeight == (_playFieldHeight - 1)) {
+ screen._scrollRow = 1;
+ screen._scrollY = 0;
+ }
+}
+
void AmazonRoom::roomSet() {
_vm->_numAnimTimers = 0;
_vm->_scripts->_sequence = 1000;
diff --git a/engines/access/amazon/amazon_room.h b/engines/access/amazon/amazon_room.h
index 122eed991e..ccace1ea45 100644
--- a/engines/access/amazon/amazon_room.h
+++ b/engines/access/amazon/amazon_room.h
@@ -48,6 +48,8 @@ protected:
virtual void reloadRoom1();
+ virtual void setupRoom();
+
virtual void roomMenu();
virtual void mainAreaClick();
diff --git a/engines/access/room.h b/engines/access/room.h
index fdeccc87c8..810082edb4 100644
--- a/engines/access/room.h
+++ b/engines/access/room.h
@@ -80,7 +80,6 @@ private:
bool checkCode(int v1, int v2);
protected:
void loadRoomData(const byte *roomData);
- void setupRoom();
/**
* Free the playfield data
@@ -115,6 +114,8 @@ protected:
virtual void reloadRoom1() = 0;
+ virtual void setupRoom();
+
virtual void doCommands();
virtual void roomMenu() = 0;