diff options
author | Travis Howell | 2004-09-22 03:56:27 +0000 |
---|---|---|
committer | Travis Howell | 2004-09-22 03:56:27 +0000 |
commit | 93784786744cc1507de68c27065d2d79b5bdb112 (patch) | |
tree | 3e06076d300a78de87cf6293212dc2179c7dc53f /scumm/script_v72he.cpp | |
parent | 76e0414117eeac589fe1cf76a9ec174da427b7aa (diff) | |
download | scummvm-rg350-93784786744cc1507de68c27065d2d79b5bdb112.tar.gz scummvm-rg350-93784786744cc1507de68c27065d2d79b5bdb112.tar.bz2 scummvm-rg350-93784786744cc1507de68c27065d2d79b5bdb112.zip |
smaller is 99 after all.
add some array code
svn-id: r15230
Diffstat (limited to 'scumm/script_v72he.cpp')
-rw-r--r-- | scumm/script_v72he.cpp | 57 |
1 files changed, 36 insertions, 21 deletions
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index e5ea4f1296..f8ece1fd73 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -1232,12 +1232,14 @@ void ScummEngine_v72he::o72_findObject() { void ScummEngine_v72he::o72_arrayOps() { byte subOp = fetchScriptByte(); int array = fetchScriptWord(); - int a, b, c, d; - int id, len = 0; + int b, c; + int dim1end, dim1start, dim2end, dim2start; + int id, len, len2; ArrayHeader *ah; int list[128]; byte string[2048]; + debug(1,"o72_arrayOps: case %d\n", subOp); switch (subOp) { case 7: // SO_ASSIGN_STRING copyScriptString(string); @@ -1247,37 +1249,50 @@ void ScummEngine_v72he::o72_arrayOps() { break; case 126: - len = getStackList(list, ARRAYSIZE(list)); - a = pop(); - b = pop(); - c = pop(); - d = pop(); + len2 = getStackList(list, ARRAYSIZE(list)); + dim1end = pop(); + dim1start = pop(); + dim2end = pop(); + dim2start = pop(); id = readVar(array); if (id == 0) { - defineArray(array, kDwordArray, d, c, b, a); + defineArray(array, kDwordArray, dim2start, dim2end, dim1start, dim1end); + } + while (dim2start < dim2end) { + len = len2; + while (--len >= 0) { + writeArray(array, dim2start, len, list[len]); + } + dim2start++; } - // TODO write array break; case 127: + { // TODO - fetchScriptWord(); - pop(); - pop(); - pop(); - pop(); - pop(); - pop(); - pop(); - pop(); + // Array copy and cat? + //Array1 + dim1end = pop(); + dim1start = pop(); + dim2end = pop(); + dim2start = pop(); + //Array2 + array = fetchScriptWord(); + dim1end = pop(); + dim1start = pop(); + dim2end = pop(); + dim2start = pop(); + } break; case 128: - a = pop(); b = pop(); c = pop(); - d = pop(); + dim1end = pop(); + dim1start = pop(); + dim2end = pop(); + dim2start = pop(); id = readVar(array); if (id == 0) { - defineArray(array, kDwordArray, d, c, b, a); + defineArray(array, kDwordArray, dim2start, dim2end, dim1start, dim1end); } // TODO write array break; |