aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2014-09-12 19:23:06 +0200
committerStrangerke2014-09-12 19:23:06 +0200
commit5016b2e768688d449b3fd9c42e243da61b12b1f4 (patch)
tree7ad9e820415d6801a8bf06e9e9574b67c51f7b4e
parent6f03127512a31db27a43e6ca899a909b618fff7f (diff)
downloadscummvm-rg350-5016b2e768688d449b3fd9c42e243da61b12b1f4.tar.gz
scummvm-rg350-5016b2e768688d449b3fd9c42e243da61b12b1f4.tar.bz2
scummvm-rg350-5016b2e768688d449b3fd9c42e243da61b12b1f4.zip
ACCESS: Implement a coupld of special commands
-rw-r--r--engines/access/amazon/amazon_scripts.cpp22
-rw-r--r--engines/access/amazon/amazon_scripts.h2
2 files changed, 23 insertions, 1 deletions
diff --git a/engines/access/amazon/amazon_scripts.cpp b/engines/access/amazon/amazon_scripts.cpp
index 24cd8b9ab4..c5b49ab630 100644
--- a/engines/access/amazon/amazon_scripts.cpp
+++ b/engines/access/amazon/amazon_scripts.cpp
@@ -65,6 +65,17 @@ void AmazonScripts::mWhile(int param1) {
}
}
+void AmazonScripts::loadBackground(int param1, int param2) {
+ _vm->_files->_loadPalFlag = false;
+ _vm->_files->loadScreen(param1, param2);
+
+ _vm->_buffer2.copyFrom(*_vm->_screen);
+ _vm->_buffer1.copyFrom(*_vm->_screen);
+
+ _vm->_screen->forceFadeOut();
+
+}
+
void AmazonScripts::setInactive() {
_game->_rawInactiveX = _vm->_player->_rawPlayer.x;
_game->_rawInactiveY = _vm->_player->_rawPlayer.y;
@@ -73,13 +84,22 @@ void AmazonScripts::setInactive() {
mWhile(_game->_rawInactiveY);
}
+void AmazonScripts::boatWalls(int param1, int param2) {
+ if (param1 == 1)
+ _vm->_room->_plotter._walls[42] = Common::Rect(96, 27, 87, 42);
+ else {
+ _vm->_room->_plotter._walls[39].bottom = _vm->_room->_plotter._walls[41].bottom = 106;
+ _vm->_room->_plotter._walls[40].left = 94;
+ }
+}
+
void AmazonScripts::executeSpecial(int commandIndex, int param1, int param2) {
switch (commandIndex) {
case 1:
_vm->establish(param1, param2);
break;
case 2:
- warning("TODO LOADBACKGROUND");
+ loadBackground(param1, param2);
break;
case 3:
warning("TODO DOCAST");
diff --git a/engines/access/amazon/amazon_scripts.h b/engines/access/amazon/amazon_scripts.h
index 45caa5fa6b..4845863a21 100644
--- a/engines/access/amazon/amazon_scripts.h
+++ b/engines/access/amazon/amazon_scripts.h
@@ -40,7 +40,9 @@ protected:
virtual void executeCommand(int commandIndex);
void mWhile(int param1);
+ void loadBackground(int param1, int param2);
void setInactive();
+ void boatWalls(int param1, int param2);
void cmdHelp();
void CMDCYCLEBACK();