aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2015-01-06 00:41:10 +0100
committerStrangerke2015-01-06 00:41:10 +0100
commit7323140847b8c1c47ef9e0f7a825fa667ddf99cc (patch)
tree1f3c569fd0cd5aa2fc813f29db179ef25039034e /engines
parentcc75fb5fe0a5eaef623da48badf28a2d9fa05ed3 (diff)
downloadscummvm-rg350-7323140847b8c1c47ef9e0f7a825fa667ddf99cc.tar.gz
scummvm-rg350-7323140847b8c1c47ef9e0f7a825fa667ddf99cc.tar.bz2
scummvm-rg350-7323140847b8c1c47ef9e0f7a825fa667ddf99cc.zip
ACCESS: MM - Fix cmdSaveRect, implement cmdCheckTravel
Diffstat (limited to 'engines')
-rw-r--r--engines/access/scripts.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/engines/access/scripts.cpp b/engines/access/scripts.cpp
index a9f01f137f..2a70fe3542 100644
--- a/engines/access/scripts.cpp
+++ b/engines/access/scripts.cpp
@@ -568,10 +568,11 @@ void Scripts::cmdSetScroll() {
}
void Scripts::cmdSaveRect() {
- if (_vm->_vidEnd)
- cmdGoto();
- else
- _data->skip(2);
+ int x = _vm->_screen->_lastBoundsX;
+ int y = _vm->_screen->_lastBoundsY;
+ int w = _vm->_screen->_lastBoundsW;
+ int h = _vm->_screen->_lastBoundsH;
+ _vm->_newRects.push_back(Common::Rect(x, y, x + w, x + h));
}
void Scripts::cmdVideoEnded() {
@@ -892,7 +893,13 @@ void Scripts::cmdPushLocation() {
}
void Scripts::cmdCheckTravel() {
- error("TODO: DEMO - cmdCheckTravel");
+ int idx = _data->readSint16LE();
+ int val = _data->readUint16LE();
+
+ if (_vm->TRAVEL[idx] == val)
+ cmdGoto();
+ else
+ _data->skip(2);
}
void Scripts::cmdBlock() {