diff options
Diffstat (limited to 'scumm/script_v7he.cpp')
-rw-r--r-- | scumm/script_v7he.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/scumm/script_v7he.cpp b/scumm/script_v7he.cpp index 12ef2b9452..f3127a5314 100644 --- a/scumm/script_v7he.cpp +++ b/scumm/script_v7he.cpp @@ -333,7 +333,7 @@ void ScummEngine_v70he::setupOpcodes() { OPCODE(o6_invalid), /* E8 */ OPCODE(o6_invalid), - OPCODE(o60_seekFilePos), + OPCODE(o70_seekFilePos), OPCODE(o60_redimArray), OPCODE(o60_readFilePos), /* EC */ @@ -679,6 +679,30 @@ void ScummEngine_v70he::o70_quitPauseRestart() { } } +void ScummEngine_v70he::o70_seekFilePos() { + int mode, offset, slot; + mode = pop(); + offset = pop(); + slot = pop(); + + if (slot == -1) + return; + + switch (mode) { + case 1: + _hFileTable[slot].seek(offset, SEEK_SET); + break; + case 2: + _hFileTable[slot].seek(offset, SEEK_CUR); + break; + case 3: + _hFileTable[slot].seek(offset, SEEK_END); + break; + default: + error("o70_seekFilePos: default case 0x%x", mode); + } +} + void ScummEngine_v70he::o70_copyString() { int dst, size; int src = pop(); |