aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
authorScott Percival2019-10-31 16:59:46 +0800
committerEugene Sandulenko2019-11-17 22:31:54 +0100
commit5f6e158fd3d60ab400074c667c275932d36a275c (patch)
treed5e4c1a82657461e943478633b01b0379684892a /engines/director
parent3891161b4c61c46a4454ab3d2f8e8230ef8d221c (diff)
downloadscummvm-rg350-5f6e158fd3d60ab400074c667c275932d36a275c.tar.gz
scummvm-rg350-5f6e158fd3d60ab400074c667c275932d36a275c.tar.bz2
scummvm-rg350-5f6e158fd3d60ab400074c667c275932d36a275c.zip
DIRECTOR: Add support for exit.
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/lingo/lingo-bytecode.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/director/lingo/lingo-bytecode.cpp b/engines/director/lingo/lingo-bytecode.cpp
index 832566c44a..618909cfb8 100644
--- a/engines/director/lingo/lingo-bytecode.cpp
+++ b/engines/director/lingo/lingo-bytecode.cpp
@@ -237,9 +237,12 @@ void Lingo::addCodeV4(Common::SeekableSubReadStreamEndian &stream, ScriptType ty
}
} else {
+ // exit condition
+ if (opcode == 0x01) {
+ offset_list.push_back(_currentScript->size());
+ g_lingo->code1(STOP);
// unimplemented instruction
-
- if (opcode < 0x40) { // 1 byte instruction
+ } else if (opcode < 0x40) { // 1 byte instruction
offset_list.push_back(_currentScript->size());
g_lingo->code1(Lingo::c_unk);
g_lingo->codeInt(opcode);