diff options
Diffstat (limited to 'scumm/script_v100he.cpp')
-rw-r--r-- | scumm/script_v100he.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp index 9fd166246d..1494cdc40f 100644 --- a/scumm/script_v100he.cpp +++ b/scumm/script_v100he.cpp @@ -2191,6 +2191,7 @@ void ScummEngine_v100he::o100_writeFile() { } void ScummEngine_v100he::o100_getResourceSize() { + const byte *ptr; int size, type; int resid = pop(); @@ -2214,15 +2215,18 @@ void ScummEngine_v100he::o100_getResourceSize() { int offs; _sound->getHEMusicDetails(resid, offs, size); push(size); - return; + } else { + ptr = getResourceAddress(rtSound, resid); + assert(ptr); + size = READ_BE_UINT32(ptr + 4) - 40; + push(size); } - type = rtSound; - break; + return; default: error("o100_getResourceSize: default type %d", subOp); } - const byte *ptr = getResourceAddress(type, resid); + ptr = getResourceAddress(type, resid); assert(ptr); size = READ_BE_UINT32(ptr + 4) - 8; push(size); |