diff options
Diffstat (limited to 'scumm/script_v80he.cpp')
-rw-r--r-- | scumm/script_v80he.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/scumm/script_v80he.cpp b/scumm/script_v80he.cpp index 345ab72c51..b1cb185bed 100644 --- a/scumm/script_v80he.cpp +++ b/scumm/script_v80he.cpp @@ -135,7 +135,7 @@ void ScummEngine_v80he::setupOpcodes() { OPCODE(o6_invalid), OPCODE(o72_wordArrayWrite), /* 48 */ - OPCODE(o6_invalid), + OPCODE(o80_unknown48), OPCODE(o80_unknown49), OPCODE(o80_unknown4A), OPCODE(o72_wordArrayIndexedWrite), @@ -401,6 +401,23 @@ void ScummEngine_v80he::o80_unknown45() { debug(1,"o80_unknown45 stub (%d)",subOp); } +void ScummEngine_v80he::o80_unknown48() { + int id, len, val; + byte *addr; + char string[100]; + + id = pop(); + + addr = getStringAddress(id); + if (!addr) + error("o80_unknown48: Reference to zeroed array pointer (%d)", id); + + len = resStrLen(getStringAddress(id)) + 1; + memcpy(string, addr, len); + val = atoi(string); + push(val); +} + void ScummEngine_v80he::o80_unknown49() { // Sound related int result = 0; |