From 214742783ed4d0ec3e28f2fd00f682ddcf7ffc31 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 7 Mar 2005 10:21:23 +0000 Subject: Add opcode for Spy Fox 2 mini game. svn-id: r17026 --- scumm/intern.h | 1 + scumm/script_v90he.cpp | 26 +++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) (limited to 'scumm') diff --git a/scumm/intern.h b/scumm/intern.h index d208672ac7..448d4d7805 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -1038,6 +1038,7 @@ protected: void o90_getPolygonOverlap(); void o90_cond(); void o90_dim2dim2Array(); + void o90_redim2dimArray(); void o90_sortArray(); void o90_getObjectData(); void o90_getPaletteData(); diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index c261c5e034..746488cca7 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -111,7 +111,7 @@ void ScummEngine_v90he::setupOpcodes() { OPCODE(o90_cond), OPCODE(o90_dim2dim2Array), /* 38 */ - OPCODE(o6_invalid), + OPCODE(o90_redim2dimArray), OPCODE(o6_invalid), OPCODE(o90_sortArray), OPCODE(o6_invalid), @@ -1821,6 +1821,30 @@ void ScummEngine_v90he::o90_dim2dim2Array() { defineArray(fetchScriptWord(), data, dim2start, dim2end, dim1start, dim1end); } +void ScummEngine_v90he::o90_redim2dimArray() { + int a, b, c, d; + d = pop(); + c = pop(); + b = pop(); + a = pop(); + + byte subOp = fetchScriptByte(); + + switch (subOp) { + case 4: + redimArray(fetchScriptWord(), a, b, c, d, kByteArray); + break; + case 5: + redimArray(fetchScriptWord(), a, b, c, d, kIntArray); + break; + case 6: + redimArray(fetchScriptWord(), a, b, c, d, kDwordArray); + break; + default: + error("o90_redim2dimArray: default type %d", subOp); + } +} + void ScummEngine_v90he::o90_sortArray() { // Sorts array via qsort byte subOp = fetchScriptByte(); -- cgit v1.2.3