diff options
Diffstat (limited to 'scumm/script_v72he.cpp')
-rw-r--r-- | scumm/script_v72he.cpp | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index 9a0e25fb18..36cea0253a 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -346,7 +346,7 @@ void ScummEngine_v72he::setupOpcodes() { /* F0 */ OPCODE(o70_concatString), OPCODE(o70_compareString), - OPCODE(o72_checkGlobQueue), + OPCODE(o72_isResourceLoaded), OPCODE(o72_readINI), /* F4 */ OPCODE(o72_writeINI), @@ -2107,12 +2107,34 @@ void ScummEngine_v72he::copyArrayHelper(ArrayHeader *ah, int idx2, int idx1, int } } -void ScummEngine_v72he::o72_checkGlobQueue() { +void ScummEngine_v72he::o72_isResourceLoaded() { + // Reports percentage of resource loaded by queue + int type; + byte subOp = fetchScriptByte(); int idx = pop(); - debug(1,"o72_checkGlobQueue stub (%d, %d)", subOp, idx); - push(100); + switch (subOp) { + case 18: + type = rtImage; + break; + case 226: + type = rtRoom; + break; + case 227: + type = rtCostume; + break; + case 228: + type = rtSound; + break; + case 229: + type = rtScript; + break; + default: + error("o72_isResourceLoaded: default case %d", subOp); + } + + push (res.isResourceLoaded(type, idx) ? 100 : 0); } void ScummEngine_v72he::o72_readINI() { |