diff options
Diffstat (limited to 'scumm/script_v7he.cpp')
-rw-r--r-- | scumm/script_v7he.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/scumm/script_v7he.cpp b/scumm/script_v7he.cpp index f2016a7cd5..858ffcd08c 100644 --- a/scumm/script_v7he.cpp +++ b/scumm/script_v7he.cpp @@ -344,7 +344,7 @@ void ScummEngine_v7he::setupOpcodes() { /* EC */ OPCODE(o6_invalid), OPCODE(o6_invalid), - OPCODE(o6_stringLen), + OPCODE(o7_stringLen), OPCODE(o6_invalid), /* F0 */ OPCODE(o6_invalid), @@ -406,6 +406,19 @@ void ScummEngine_v7he::o7_objectY() { push(_objs[objnum].y_pos); } +void ScummEngine_v7he::o7_stringLen() { + int a, len; + + a = pop(); + + if (_gameId == GID_FREDDEMO) { + len = strlen((char *)getStringAddress(a)); + } else { + len = 0; // TODO: implement + } + push(len); +} + void ScummEngine_v7he::o7_unknownF4() { byte b; int len; |