aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorWalter van Niftrik2016-04-16 16:58:41 +0200
committerWalter van Niftrik2016-06-06 20:35:49 +0200
commit2cdb1d49a5cb0d91d70244383a05d4fed12d1ca2 (patch)
tree8b3b359a68974908fe3d040278d8b21bf2956050 /engines
parent92b1b287b1686424a58abfb06661916bf3dfcaeb (diff)
downloadscummvm-rg350-2cdb1d49a5cb0d91d70244383a05d4fed12d1ca2.tar.gz
scummvm-rg350-2cdb1d49a5cb0d91d70244383a05d4fed12d1ca2.tar.bz2
scummvm-rg350-2cdb1d49a5cb0d91d70244383a05d4fed12d1ca2.zip
ADL: Add stubs for hires6 opcodes
Diffstat (limited to 'engines')
-rw-r--r--engines/adl/adl.cpp12
-rw-r--r--engines/adl/adl_v3.cpp55
-rw-r--r--engines/adl/adl_v3.h4
3 files changed, 58 insertions, 13 deletions
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp
index 761b60c717..de2edde7a2 100644
--- a/engines/adl/adl.cpp
+++ b/engines/adl/adl.cpp
@@ -544,6 +544,7 @@ Common::Error AdlEngine::run() {
while (1) {
uint verb = 0, noun = 0;
+ _isRestarting = false;
// When restoring from the launcher, we don't read
// input on the first iteration. This is needed to
@@ -553,6 +554,9 @@ Common::Error AdlEngine::run() {
if (!_isRestoring) {
showRoom();
+ if (_isRestarting)
+ continue;
+
_canSaveNow = _canRestoreNow = true;
getInput(verb, noun);
_canSaveNow = _canRestoreNow = false;
@@ -580,17 +584,13 @@ Common::Error AdlEngine::run() {
}
// Restarting does end command processing
- if (_isRestarting) {
- _isRestarting = false;
+ if (_isRestarting)
continue;
- }
doAllCommands(_globalCommands, verb, noun);
- if (_isRestarting) {
- _isRestarting = false;
+ if (_isRestarting)
continue;
- }
advanceClock();
_state.moves++;
diff --git a/engines/adl/adl_v3.cpp b/engines/adl/adl_v3.cpp
index 9041a47945..a017f9aeb6 100644
--- a/engines/adl/adl_v3.cpp
+++ b/engines/adl/adl_v3.cpp
@@ -87,18 +87,18 @@ void AdlEngine_v3::setupOpcodeTables() {
// 0x08
Opcode(o1_setPic);
Opcode(o1_printMsg);
- Opcode(o1_setLight);
- Opcode(o1_setDark);
+ Opcode(o3_dummy);
+ Opcode(o3_setTextMode);
// 0x0c
Opcode(o2_moveAllItems);
Opcode(o1_quit);
- OpcodeUnImpl();
+ Opcode(o3_dummy);
Opcode(o2_save);
// 0x10
Opcode(o2_restore);
Opcode(o1_restart);
- Opcode(o2_placeItem);
- Opcode(o1_setItemPic);
+ Opcode(o3_setDisk);
+ Opcode(o3_dummy);
// 0x14
Opcode(o1_resetPic);
Opcode(o1_goDirection<IDI_DIR_NORTH>);
@@ -112,8 +112,8 @@ void AdlEngine_v3::setupOpcodeTables() {
// 0x1c
Opcode(o1_dropItem);
Opcode(o1_setRoomPic);
- Opcode(o2_tellTime);
- Opcode(o2_setRoomFromVar);
+ Opcode(o3_sound);
+ OpcodeUnImpl();
// 0x20
Opcode(o2_initDisk);
}
@@ -188,4 +188,45 @@ int AdlEngine_v3::o3_moveItem(ScriptEnv &e) {
return 2;
}
+int AdlEngine_v3::o3_dummy(ScriptEnv &e) {
+ OP_DEBUG_0("\tDUMMY()");
+
+ return 0;
+}
+
+int AdlEngine_v3::o3_setTextMode(ScriptEnv &e) {
+ OP_DEBUG_1("\tSET_TEXT_MODE(%d)", e.arg(1));
+
+ // TODO
+ // 1: 4-line mode
+ // 2: 24-line mode
+
+ switch (e.arg(1)) {
+ case 3:
+ // We re-use the restarting flag here, to simulate a long jump
+ _isRestarting = true;
+ return -1;
+ }
+
+ return 1;
+}
+
+int AdlEngine_v3::o3_setDisk(ScriptEnv &e) {
+ OP_DEBUG_2("\tSET_DISK(%d, %d)", e.arg(1), e.arg(2));
+
+ // TODO
+ // Arg 1: disk
+ // Arg 2: room
+
+ return 2;
+}
+
+int AdlEngine_v3::o3_sound(ScriptEnv &e) {
+ OP_DEBUG_0("\tSOUND()");
+
+ // TODO
+
+ return 0;
+}
+
} // End of namespace Adl
diff --git a/engines/adl/adl_v3.h b/engines/adl/adl_v3.h
index 77b64fde23..b36c97ec67 100644
--- a/engines/adl/adl_v3.h
+++ b/engines/adl/adl_v3.h
@@ -51,6 +51,10 @@ protected:
int o3_isNounNotInRoom(ScriptEnv &e);
int o3_skipOneCommand(ScriptEnv &e);
int o3_moveItem(ScriptEnv &e);
+ int o3_dummy(ScriptEnv &e);
+ int o3_setTextMode(ScriptEnv &e);
+ int o3_setDisk(ScriptEnv &e);
+ int o3_sound(ScriptEnv &e);
Common::Array<Common::String> _itemDesc;
byte _curDisk;