Skip to content

Commit

Permalink
ACCESS: Workaround for original game vertical room scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Dec 13, 2014
1 parent 6434ace commit fddff68
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
11 changes: 11 additions & 0 deletions engines/access/amazon/amazon_room.cpp
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions engines/access/amazon/amazon_room.h
Expand Up @@ -48,6 +48,8 @@ class AmazonRoom : public Room {

virtual void reloadRoom1();

virtual void setupRoom();

virtual void roomMenu();

virtual void mainAreaClick();
Expand Down
3 changes: 2 additions & 1 deletion engines/access/room.h
Expand Up @@ -80,7 +80,6 @@ class Room: public Manager {
bool checkCode(int v1, int v2);
protected:
void loadRoomData(const byte *roomData);
void setupRoom();

/**
* Free the playfield data
Expand Down Expand Up @@ -115,6 +114,8 @@ class Room: public Manager {

virtual void reloadRoom1() = 0;

virtual void setupRoom();

virtual void doCommands();

virtual void roomMenu() = 0;
Expand Down

0 comments on commit fddff68

Please sign in to comment.