From 649f8e0a84804a9d1272ba16b146ea2b9da501fe Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 13 May 2011 14:02:53 +0200 Subject: SCUMM: Rename ResTypes->ResType, introduce ResId typedef, change code to use both --- engines/scumm/script_v2.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'engines/scumm/script_v2.cpp') diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp index f7d4e74898..7f02e899b4 100644 --- a/engines/scumm/script_v2.cpp +++ b/engines/scumm/script_v2.cpp @@ -738,23 +738,23 @@ void ScummEngine_v2::o2_drawObject() { } void ScummEngine_v2::o2_resourceRoutines() { - const ResTypes resTypes[] = { - rtNumTypes, // Invalid - rtNumTypes, // Invalid + const ResType resTypes[] = { + rtInvalid, + rtInvalid, rtCostume, rtRoom, - rtNumTypes, // Invalid + rtInvalid, rtScript, rtSound }; int resid = getVarOrDirectByte(PARAM_1); int opcode = fetchScriptByte(); - ResTypes type = rtNumTypes; + ResType type = rtInvalid; if (0 <= (opcode >> 4) && (opcode >> 4) < (int)ARRAYSIZE(resTypes)) type = resTypes[opcode >> 4]; - if ((opcode & 0x0f) == 0 || type == rtNumTypes) + if ((opcode & 0x0f) == 0 || type == rtInvalid) return; // HACK V2 Maniac Mansion tries to load an invalid sound resource in demo script. -- cgit v1.2.3