diff options
author | Strangerke | 2015-01-05 22:43:21 +0100 |
---|---|---|
committer | Strangerke | 2015-01-05 22:43:21 +0100 |
commit | e1ded539ea428efe811d763b8c025bf09c2559df (patch) | |
tree | 9a8a040441ea6d5f87b2638a8b3edb1881d0a625 /engines/access | |
parent | 0f9174fca7c06d157736056a78238f0086298055 (diff) | |
download | scummvm-rg350-e1ded539ea428efe811d763b8c025bf09c2559df.tar.gz scummvm-rg350-e1ded539ea428efe811d763b8c025bf09c2559df.tar.bz2 scummvm-rg350-e1ded539ea428efe811d763b8c025bf09c2559df.zip |
ACCESS: MM - Implement some game specific opcodes
Diffstat (limited to 'engines/access')
-rw-r--r-- | engines/access/access.cpp | 4 | ||||
-rw-r--r-- | engines/access/access.h | 4 | ||||
-rw-r--r-- | engines/access/scripts.cpp | 26 | ||||
-rw-r--r-- | engines/access/scripts.h | 1 |
4 files changed, 30 insertions, 5 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp index dabcd1351b..5973f3bd28 100644 --- a/engines/access/access.cpp +++ b/engines/access/access.cpp @@ -97,6 +97,10 @@ AccessEngine::AccessEngine(OSystem *syst, const AccessGameDescription *gameDesc) for (int i = 0; i < 7; i++) TRAVEL[i] = 0; STARTTRAVELITEM = STARTTRAVELBOX = 0; + for (int i = 0; i < 16; i++) + ASK[i]; + _startAboutItem = 0; + _vidEnd = false; } AccessEngine::~AccessEngine() { diff --git a/engines/access/access.h b/engines/access/access.h index de44905f9b..c853276c12 100644 --- a/engines/access/access.h +++ b/engines/access/access.h @@ -209,7 +209,9 @@ public: int TRAVEL[7]; int STARTTRAVELITEM; int STARTTRAVELBOX; - + int ASK[16]; + int _startAboutItem; + bool _vidEnd; bool _clearSummaryFlag; bool _cheatFl; bool _restartFl; diff --git a/engines/access/scripts.cpp b/engines/access/scripts.cpp index 05c2d93cea..a9f01f137f 100644 --- a/engines/access/scripts.cpp +++ b/engines/access/scripts.cpp @@ -170,6 +170,10 @@ void Scripts::charLoop() { _endFlag = endFlag; } +void Scripts::printWatch() { + warning("TODO: printWatch"); +} + void Scripts::findNull() { // No implementation required in ScummVM, the strings in the script files are already skipped by the use of readByte() } @@ -463,7 +467,11 @@ void Scripts::cmdDispInv() { } void Scripts::cmdSetAbout() { - error("TODO: DEMO - cmdSetAbout"); + int idx = _data->readByte(); + int val = _data->readByte(); + _vm->ASK[idx] = val; + _vm->_startAboutBox = 0; + _vm->_startAboutItem = 0; } void Scripts::cmdSetTimer() { @@ -560,7 +568,10 @@ void Scripts::cmdSetScroll() { } void Scripts::cmdSaveRect() { - error("TODO: DEMO - cmdSaveRect"); + if (_vm->_vidEnd) + cmdGoto(); + else + _data->skip(2); } void Scripts::cmdVideoEnded() { @@ -596,7 +607,13 @@ void Scripts::cmdDoTravel() { } void Scripts::cmdCheckAbout() { - error("TODO: DEMO - cmdCheckAbout"); + int idx = _data->readSint16LE(); + int val = _data->readSint16LE(); + + if (_vm->ASK[idx] == val) + cmdGoto(); + else + _data->skip(2); } void Scripts::cmdSpecial() { @@ -862,7 +879,8 @@ void Scripts::cmdPlayVideoSound() { } void Scripts::cmdPrintWatch() { - error("TODO: DEMO - cmdPrintWatch"); + printWatch(); + findNull(); } void Scripts::cmdDispAbout() { diff --git a/engines/access/scripts.h b/engines/access/scripts.h index f61d35f81d..4d074b681a 100644 --- a/engines/access/scripts.h +++ b/engines/access/scripts.h @@ -43,6 +43,7 @@ private: int _specialFunction; void charLoop(); + void printWatch(); protected: Common::SeekableReadStream *_data; ScriptMethodPtr COMMAND_LIST[100]; |