aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2005-03-07 10:21:23 +0000
committerTravis Howell2005-03-07 10:21:23 +0000
commit214742783ed4d0ec3e28f2fd00f682ddcf7ffc31 (patch)
tree4bd2881b6726b144b89825b790297ccdcee19d38 /scumm
parent8cc18e679763655f33fbd8cae7132635bf989e49 (diff)
downloadscummvm-rg350-214742783ed4d0ec3e28f2fd00f682ddcf7ffc31.tar.gz
scummvm-rg350-214742783ed4d0ec3e28f2fd00f682ddcf7ffc31.tar.bz2
scummvm-rg350-214742783ed4d0ec3e28f2fd00f682ddcf7ffc31.zip
Add opcode for Spy Fox 2 mini game.
svn-id: r17026
Diffstat (limited to 'scumm')
-rw-r--r--scumm/intern.h1
-rw-r--r--scumm/script_v90he.cpp26
2 files changed, 26 insertions, 1 deletions
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();