diff options
Diffstat (limited to 'engines/gob/inter_v6.cpp')
-rw-r--r-- | engines/gob/inter_v6.cpp | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/engines/gob/inter_v6.cpp b/engines/gob/inter_v6.cpp index fd8c6fcd4d..20186a165d 100644 --- a/engines/gob/inter_v6.cpp +++ b/engines/gob/inter_v6.cpp @@ -133,7 +133,7 @@ void Inter_v6::setupOpcodes() { {NULL, ""}, {NULL, ""}, /* 40 */ - OPCODE(o2_totSub), + OPCODE(o6_totSub), OPCODE(o2_switchTotSub), OPCODE(o2_copyVars), OPCODE(o2_pasteVars), @@ -653,6 +653,33 @@ const char *Inter_v6::getOpcodeGoblinDesc(int i) { return ""; } +void Inter_v6::o6_totSub() { + char totFile[14]; + byte length; + int flags; + int i; + + length = *_vm->_global->_inter_execPtr++; + if ((length & 0x7F) > 13) + error("Length in o2_totSub is greater than 13 (%d)", length); + + if (length & 0x80) { + evalExpr(0); + strcpy(totFile, _vm->_global->_inter_resStr); + } else { + for (i = 0; i < length; i++) + totFile[i] = (char) *_vm->_global->_inter_execPtr++; + totFile[i] = 0; + } + + flags = *_vm->_global->_inter_execPtr++; + + if (flags & 0x40) + warning("Urban Stub: o6_totSub(), flags & 0x40"); + + _vm->_game->totSub(flags, totFile); +} + void Inter_v6::o6_playVmdOrMusic() { char fileName[128]; int16 x, y; |