From 8de4c596a090c819e36990085ddc03302b482c0e Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 7 May 2005 07:57:59 +0000 Subject: Add missing opcode details Fix regression (Fields not initied) svn-id: r17938 --- scumm/script_v72he.cpp | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'scumm/script_v72he.cpp') 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() { -- cgit v1.2.3