aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2006-02-05 00:40:48 +0000
committerTravis Howell2006-02-05 00:40:48 +0000
commitdf3d553e321aa01df6357134e7d42c655379dbea (patch)
treeb5d00e987f5192b2b3c7b36298b0be8bc0bb5fe3
parentbdedc81c229793dadcf4f8e7201eeb586073c724 (diff)
downloadscummvm-rg350-df3d553e321aa01df6357134e7d42c655379dbea.tar.gz
scummvm-rg350-df3d553e321aa01df6357134e7d42c655379dbea.tar.bz2
scummvm-rg350-df3d553e321aa01df6357134e7d42c655379dbea.zip
Sync. subOp variable name and always use byte.
svn-id: r20382
-rw-r--r--scumm/script_v100he.cpp44
-rw-r--r--scumm/script_v6.cpp50
-rw-r--r--scumm/script_v6he.cpp22
-rw-r--r--scumm/script_v72he.cpp58
-rw-r--r--scumm/script_v7he.cpp8
-rw-r--r--scumm/script_v8.cpp5
-rw-r--r--scumm/script_v80he.cpp15
-rw-r--r--scumm/script_v90he.cpp15
8 files changed, 115 insertions, 102 deletions
diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp
index db8a06c65a..f71bad3864 100644
--- a/scumm/script_v100he.cpp
+++ b/scumm/script_v100he.cpp
@@ -377,10 +377,9 @@ void ScummEngine_v100he::o100_actorOps() {
Actor *a;
int i, j, k;
int args[32];
- byte subOp;
byte string[256];
- subOp = fetchScriptByte();
+ byte subOp = fetchScriptByte();
if (subOp == 129) {
_curActor = pop();
return;
@@ -733,8 +732,9 @@ void ScummEngine_v100he::o100_createSound() {
void ScummEngine_v100he::o100_dim2dimArray() {
int data, dim1end, dim2end;
- byte type = fetchScriptByte();
- switch (type) {
+ byte subOp = fetchScriptByte();
+
+ switch (subOp) {
case 41: // SO_BIT_ARRAY
data = kBitArray;
break;
@@ -754,7 +754,7 @@ void ScummEngine_v100he::o100_dim2dimArray() {
data = kStringArray;
break;
default:
- error("o100_dim2dimArray: default case %d", type);
+ error("o100_dim2dimArray: default case %d", subOp);
}
dim1end = pop();
@@ -764,9 +764,10 @@ void ScummEngine_v100he::o100_dim2dimArray() {
void ScummEngine_v100he::o100_dimArray() {
int data;
- int type = fetchScriptByte();
- switch (type) {
+ int subOp = fetchScriptByte();
+
+ switch (subOp) {
case 41: // SO_BIT_ARRAY
data = kBitArray;
break;
@@ -789,7 +790,7 @@ void ScummEngine_v100he::o100_dimArray() {
nukeArray(fetchScriptWord());
return;
default:
- error("o100_dimArray: default case %d", type);
+ error("o100_dimArray: default case %d", subOp);
}
defineArray(fetchScriptWord(), data, 0, 0, 0, pop());
@@ -823,9 +824,10 @@ void ScummEngine_v100he::o100_drawLine() {
}
void ScummEngine_v100he::o100_drawObject() {
- byte subOp = fetchScriptByte();
int state, y, x;
+ byte subOp = fetchScriptByte();
+
switch (subOp) {
case 6:
state = 1;
@@ -865,6 +867,7 @@ void ScummEngine_v100he::o100_drawObject() {
void ScummEngine_v100he::o100_floodFill() {
byte subOp = fetchScriptByte();
+
switch (subOp) {
case 0:
memset(&_floodFillParams, 0, sizeof(_floodFillParams));
@@ -1374,9 +1377,10 @@ void ScummEngine_v100he::o100_wizImageOps() {
void ScummEngine_v100he::o100_dim2dim2Array() {
int data, dim1start, dim1end, dim2start, dim2end;
- int type = fetchScriptByte();
- switch (type) {
+ byte subOp = fetchScriptByte();
+
+ switch (subOp) {
case 41: // SO_BIT_ARRAY
data = kBitArray;
break;
@@ -1396,7 +1400,7 @@ void ScummEngine_v100he::o100_dim2dim2Array() {
data = kStringArray;
break;
default:
- error("o100_dim2dim2Array: default case %d", type);
+ error("o100_dim2dim2Array: default case %d", subOp);
}
if (pop() == 2) {
@@ -1442,6 +1446,7 @@ void ScummEngine_v100he::o100_paletteOps() {
int a, b, c, d, e;
byte subOp = fetchScriptByte();
+
switch (subOp) {
case 0:
_hePaletteNum = pop();
@@ -1539,6 +1544,7 @@ void ScummEngine_v100he::o100_redimArray() {
newX = pop();
byte subOp = fetchScriptByte();
+
switch (subOp) {
case 42:
redimArray(fetchScriptWord(), 0, newX, 0, newY, kIntArray);
@@ -1556,12 +1562,11 @@ void ScummEngine_v100he::o100_redimArray() {
void ScummEngine_v100he::o100_roomOps() {
int a, b, c, d, e;
- byte op;
byte filename[100];
- op = fetchScriptByte();
+ byte subOp = fetchScriptByte();
- switch (op) {
+ switch (subOp) {
case 63: // SO_ROOM_PALETTE
d = pop();
c = pop();
@@ -1649,7 +1654,7 @@ void ScummEngine_v100he::o100_roomOps() {
break;
default:
- error("o100_roomOps: default case %d", op);
+ error("o100_roomOps: default case %d", subOp);
}
}
@@ -2182,7 +2187,7 @@ void ScummEngine_v100he::o100_cursorCommand() {
void ScummEngine_v100he::o100_videoOps() {
// Uses Bink video
- int subOp = fetchScriptByte();
+ byte subOp = fetchScriptByte();
switch (subOp) {
case 0:
@@ -2232,6 +2237,7 @@ void ScummEngine_v100he::o100_wait() {
int actnum;
int offs = -2;
Actor *a;
+
byte subOp = fetchScriptByte();
switch (subOp) {
@@ -2268,8 +2274,9 @@ void ScummEngine_v100he::o100_wait() {
}
void ScummEngine_v100he::o100_writeFile() {
- int resID = pop();
+ int32 resID = pop();
int slot = pop();
+
byte subOp = fetchScriptByte();
switch (subOp) {
@@ -2572,6 +2579,7 @@ void ScummEngine_v100he::o100_getPaletteData() {
void ScummEngine_v100he::o100_readFile() {
int slot, val;
int32 size;
+
byte subOp = fetchScriptByte();
switch (subOp) {
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index 4af2a273eb..2f5ced6da5 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -943,7 +943,8 @@ void ScummEngine_v6::o6_freezeUnfreeze() {
void ScummEngine_v6::o6_cursorCommand() {
int a, i;
int args[16];
- int subOp = fetchScriptByte();
+
+ byte subOp = fetchScriptByte();
switch (subOp) {
case 0x90: // SO_CURSOR_ON Turn cursor on
@@ -1532,10 +1533,11 @@ void ScummEngine_v6::o6_createBoxMatrix() {
}
void ScummEngine_v6::o6_resourceRoutines() {
- int resid, op;
- op = fetchScriptByte();
+ int resid;
- switch (op) {
+ byte subOp = fetchScriptByte();
+
+ switch (subOp) {
case 100: // SO_LOAD_SCRIPT
resid = pop();
if (_version >= 7)
@@ -1633,18 +1635,17 @@ void ScummEngine_v6::o6_resourceRoutines() {
break;
}
default:
- error("o6_resourceRoutines: default case %d", op);
+ error("o6_resourceRoutines: default case %d", subOp);
}
}
void ScummEngine_v6::o6_roomOps() {
int a, b, c, d, e;
- byte op;
- op = fetchScriptByte();
+ byte subOp = fetchScriptByte();
- switch (op) {
+ switch (subOp) {
case 172: // SO_ROOM_SCROLL
b = pop();
a = pop();
@@ -1763,7 +1764,7 @@ void ScummEngine_v6::o6_roomOps() {
setPalette(a);
break;
default:
- error("o6_roomOps: default case %d", op);
+ error("o6_roomOps: default case %d", subOp);
}
}
@@ -1771,9 +1772,8 @@ void ScummEngine_v6::o6_actorOps() {
Actor *a;
int i, j, k;
int args[8];
- byte subOp;
- subOp = fetchScriptByte();
+ byte subOp = fetchScriptByte();
if (subOp == 197) {
_curActor = pop();
return;
@@ -1924,10 +1924,9 @@ void ScummEngine_v6::o6_actorOps() {
void ScummEngine_v6::o6_verbOps() {
int slot, a, b;
VerbSlot *vs;
- byte op;
- op = fetchScriptByte();
- if (op == 196) {
+ byte subOp = fetchScriptByte();
+ if (subOp == 196) {
_curVerb = pop();
_curVerbSlot = getVerbSlot(_curVerb, 0);
checkRange(_numVerbs - 1, 0, _curVerbSlot, "Illegal new verb slot %d");
@@ -1935,7 +1934,7 @@ void ScummEngine_v6::o6_verbOps() {
}
vs = &_verbs[_curVerbSlot];
slot = _curVerbSlot;
- switch (op) {
+ switch (subOp) {
case 124: // SO_VERB_IMAGE
a = pop();
if (_curVerbSlot) {
@@ -2036,7 +2035,7 @@ void ScummEngine_v6::o6_verbOps() {
verbMouseOver(0);
break;
default:
- error("o6_verbops: default case %d", op);
+ error("o6_verbops: default case %d", subOp);
}
}
@@ -2181,6 +2180,7 @@ void ScummEngine_v6::o6_wait() {
int actnum;
int offs = -2;
Actor *a;
+
byte subOp = fetchScriptByte();
switch (subOp) {
@@ -2288,6 +2288,7 @@ void ScummEngine_v6::o6_isAnyOf() {
void ScummEngine_v6::o6_systemOps() {
byte subOp = fetchScriptByte();
+
switch (subOp) {
case 158: // SO_RESTART
restart();
@@ -2374,7 +2375,9 @@ void ScummEngine_v6::o6_talkEgo() {
void ScummEngine_v6::o6_dimArray() {
int data;
- switch (fetchScriptByte()) {
+ byte subOp = fetchScriptByte();
+
+ switch (subOp) {
case 199: // SO_INT_ARRAY
data = kIntArray;
break;
@@ -2394,7 +2397,7 @@ void ScummEngine_v6::o6_dimArray() {
nukeArray(fetchScriptWord());
return;
default:
- error("o6_dimArray: default case");
+ error("o6_dimArray: default case %d", subOp);
}
defineArray(fetchScriptWord(), data, 0, pop());
@@ -2408,7 +2411,10 @@ void ScummEngine_v6::o6_dummy() {
void ScummEngine_v6::o6_dim2dimArray() {
int a, b, data;
- switch (fetchScriptByte()) {
+
+ byte subOp = fetchScriptByte();
+
+ switch (subOp) {
case 199: // SO_INT_ARRAY
data = kIntArray;
break;
@@ -2425,7 +2431,7 @@ void ScummEngine_v6::o6_dim2dimArray() {
data = kStringArray;
break;
default:
- error("o6_dim2dimArray: default case");
+ error("o6_dim2dimArray: default case %d", subOp);
}
b = pop();
@@ -3121,9 +3127,7 @@ void ScummEngine_v6::o6_setBoxSet() {
}
void ScummEngine_v6::decodeParseString(int m, int n) {
- byte b;
-
- b = fetchScriptByte();
+ byte b = fetchScriptByte();
switch (b) {
case 65: // SO_AT
diff --git a/scumm/script_v6he.cpp b/scumm/script_v6he.cpp
index a28c2b2ab0..43320867a1 100644
--- a/scumm/script_v6he.cpp
+++ b/scumm/script_v6he.cpp
@@ -417,11 +417,10 @@ void ScummEngine_v60he::o60_setState() {
void ScummEngine_v60he::o60_roomOps() {
int a, b, c, d, e;
- byte op;
- op = fetchScriptByte();
+ byte subOp = fetchScriptByte();
- switch (op) {
+ switch (subOp) {
case 172: // SO_ROOM_SCROLL
b = pop();
a = pop();
@@ -549,7 +548,7 @@ void ScummEngine_v60he::o60_roomOps() {
setRoomPalette(a, b);
break;
default:
- error("o60_roomOps: default case %d", op);
+ error("o60_roomOps: default case %d", subOp);
}
}
@@ -581,9 +580,8 @@ void ScummEngine_v60he::o60_actorOps() {
Actor *a;
int i, j, k;
int args[8];
- byte subOp;
- subOp = fetchScriptByte();
+ byte subOp = fetchScriptByte();
if (subOp == 197) {
_curActor = pop();
return;
@@ -1134,6 +1132,7 @@ void ScummEngine_v60he::o60_writeFile() {
void ScummEngine_v60he::o60_soundOps() {
byte subOp = fetchScriptByte();
int arg = pop();
+
switch (subOp) {
case 0xde:
_imuse->setMusicVolume(arg);
@@ -1204,15 +1203,15 @@ void ScummEngine_v60he::o60_readFilePos() {
}
void ScummEngine_v60he::o60_redimArray() {
- int subcode, newX, newY;
+ int newX, newY;
newY = pop();
newX = pop();
if (newY == 0)
SWAP(newX, newY);
- subcode = fetchScriptByte();
- switch (subcode) {
+ byte subOp = fetchScriptByte();
+ switch (subOp) {
case 199:
redimArray(fetchScriptWord(), newX, newY, kIntArray);
break;
@@ -1220,7 +1219,7 @@ void ScummEngine_v60he::o60_redimArray() {
redimArray(fetchScriptWord(), newX, newY, kByteArray);
break;
default:
- error("o60_redimArray: default type %d", subcode);
+ error("o60_redimArray: default type %d", subOp);
}
}
@@ -1251,11 +1250,10 @@ void ScummEngine_v60he::redimArray(int arrayId, int newX, int newY, int type) {
}
void ScummEngine_v60he::decodeParseString(int m, int n) {
- byte b;
int i, colors;
int args[31];
- b = fetchScriptByte();
+ byte b = fetchScriptByte();
switch (b) {
case 65: // SO_AT
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index b604569c29..9a5f2c09ac 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -865,7 +865,7 @@ void ScummEngine_v72he::o72_captureWizImage() {
void ScummEngine_v72he::o72_getTimer() {
int timer = pop();
- int cmd = fetchScriptByte();
+ byte cmd = fetchScriptByte();
if (cmd == 10 || cmd == 50) {
push(getHETimer(timer));
@@ -876,7 +876,7 @@ void ScummEngine_v72he::o72_getTimer() {
void ScummEngine_v72he::o72_setTimer() {
int timer = pop();
- int cmd = fetchScriptByte();
+ byte cmd = fetchScriptByte();
if (cmd == 158 || cmd == 61) {
setHETimer(timer);
@@ -1015,12 +1015,11 @@ void ScummEngine_v72he::o72_getNumFreeArrays() {
void ScummEngine_v72he::o72_roomOps() {
int a, b, c, d, e;
- byte op;
byte filename[100];
- op = fetchScriptByte();
+ byte subOp = fetchScriptByte();
- switch (op) {
+ switch (subOp) {
case 172: // SO_ROOM_SCROLL
b = pop();
a = pop();
@@ -1108,7 +1107,7 @@ void ScummEngine_v72he::o72_roomOps() {
break;
default:
- error("o72_roomOps: default case %d", op);
+ error("o72_roomOps: default case %d", subOp);
}
}
@@ -1116,10 +1115,9 @@ void ScummEngine_v72he::o72_actorOps() {
Actor *a;
int i, j, k;
int args[32];
- byte subOp;
byte string[256];
- subOp = fetchScriptByte();
+ byte subOp = fetchScriptByte();
if (subOp == 197) {
_curActor = pop();
return;
@@ -1313,11 +1311,10 @@ void ScummEngine_v72he::o72_actorOps() {
void ScummEngine_v72he::o72_verbOps() {
int slot, a, b;
VerbSlot *vs;
- byte op;
byte name[200];
- op = fetchScriptByte();
- if (op == 196) {
+ byte subOp = fetchScriptByte();
+ if (subOp == 196) {
_curVerb = pop();
_curVerbSlot = getVerbSlot(_curVerb, 0);
checkRange(_numVerbs - 1, 0, _curVerbSlot, "Illegal new verb slot %d");
@@ -1325,7 +1322,7 @@ void ScummEngine_v72he::o72_verbOps() {
}
vs = &_verbs[_curVerbSlot];
slot = _curVerbSlot;
- switch (op) {
+ switch (subOp) {
case 124: // SO_VERB_IMAGE
a = pop();
if (_curVerbSlot) {
@@ -1424,7 +1421,7 @@ void ScummEngine_v72he::o72_verbOps() {
verbMouseOver(0);
break;
default:
- error("o72_verbops: default case %d", op);
+ error("o72_verbops: default case %d", subOp);
}
}
@@ -1624,9 +1621,10 @@ void ScummEngine_v72he::o72_talkEgo() {
void ScummEngine_v72he::o72_dimArray() {
int data;
- int type = fetchScriptByte();
- switch (type) {
+ byte subOp = fetchScriptByte();
+
+ switch (subOp) {
case 2: // SO_BIT_ARRAY
data = kBitArray;
break;
@@ -1649,7 +1647,7 @@ void ScummEngine_v72he::o72_dimArray() {
nukeArray(fetchScriptWord());
return;
default:
- error("o72_dimArray: default case %d", type);
+ error("o72_dimArray: default case %d", subOp);
}
defineArray(fetchScriptWord(), data, 0, 0, 0, pop());
@@ -1659,8 +1657,9 @@ void ScummEngine_v72he::o72_dimArray() {
void ScummEngine_v72he::o72_dim2dimArray() {
int data, dim1end, dim2end;
- byte type = fetchScriptByte();
- switch (type) {
+ byte subOp = fetchScriptByte();
+
+ switch (subOp) {
case 2: // SO_BIT_ARRAY
data = kBitArray;
break;
@@ -1680,7 +1679,7 @@ void ScummEngine_v72he::o72_dim2dimArray() {
data = kStringArray;
break;
default:
- error("o72_dim2dimArray: default case %d", type);
+ error("o72_dim2dimArray: default case %d", subOp);
}
dim1end = pop();
@@ -1995,6 +1994,7 @@ void ScummEngine_v72he::o72_redimArray() {
newX = pop();
byte subOp = fetchScriptByte();
+
switch (subOp) {
case 5:
redimArray(fetchScriptWord(), 0, newX, 0, newY, kIntArray);
@@ -2146,12 +2146,12 @@ void ScummEngine_v72he::o72_readINI() {
byte option[128];
ArrayHeader *ah;
const char *entry;
- int len, type;
+ int len;
copyScriptString(option, sizeof(option));
- type = fetchScriptByte();
+ byte subOp = fetchScriptByte();
- switch (type) {
+ switch (subOp) {
case 43: // HE 100
case 6: // number
if (!strcmp((char *)option, "NoPrinting")) {
@@ -2174,19 +2174,19 @@ void ScummEngine_v72he::o72_readINI() {
push(readVar(0));
break;
default:
- error("o72_readINI: default type %d", type);
+ error("o72_readINI: default type %d", subOp);
}
debug(0, "o72_readINI: Option %s", option);
}
void ScummEngine_v72he::o72_writeINI() {
- int type, value;
+ int value;
byte option[256], string[1024];
- type = fetchScriptByte();
+ byte subOp = fetchScriptByte();
- switch (type) {
+ switch (subOp) {
case 43: // HE 100
case 6: // number
value = pop();
@@ -2215,7 +2215,7 @@ void ScummEngine_v72he::o72_writeINI() {
debug(0, "o72_writeINI: Option %s String %s", option, string);
break;
default:
- error("o72_writeINI: default type %d", type);
+ error("o72_writeINI: default type %d", subOp);
}
ConfMan.flushToDisk();
@@ -2269,9 +2269,9 @@ void ScummEngine_v72he::o72_setFilePath() {
void ScummEngine_v72he::o72_setWindowCaption() {
byte name[1024];
copyScriptString(name, sizeof(name));
- int id = fetchScriptByte();
+ byte subOp = fetchScriptByte();
- debug(1,"o72_setWindowCaption: (%d) %s", id, name);
+ debug(1,"o72_setWindowCaption: (%d) %s", subOp, name);
}
void ScummEngine_v72he::decodeParseString(int m, int n) {
diff --git a/scumm/script_v7he.cpp b/scumm/script_v7he.cpp
index 8029341a04..ef0f1addd5 100644
--- a/scumm/script_v7he.cpp
+++ b/scumm/script_v7he.cpp
@@ -509,9 +509,9 @@ void ScummEngine_v70he::o70_getActorRoom() {
}
void ScummEngine_v70he::o70_resourceRoutines() {
- int objidx, resid, subOp;
+ int objidx, resid;
- subOp = fetchScriptByte();
+ byte subOp = fetchScriptByte();
switch (subOp) {
case 100: // SO_LOAD_SCRIPT
@@ -1086,9 +1086,9 @@ void ScummEngine_v70he::o70_setFilePath() {
}
void ScummEngine_v70he::o70_setWindowCaption() {
- int num = fetchScriptByte();
+ byte subOp = fetchScriptByte();
int len = resStrLen(_scriptPointer);
- debug(1,"stub o70_setWindowCaption(%d, \"%s\")", num, _scriptPointer);
+ debug(1,"stub o70_setWindowCaption(%d, \"%s\")", subOp, _scriptPointer);
_scriptPointer += len + 1;
}
diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp
index 0bac9b283c..72e5890b11 100644
--- a/scumm/script_v8.cpp
+++ b/scumm/script_v8.cpp
@@ -460,9 +460,7 @@ void ScummEngine_v8::writeVar(uint var, int value) {
}
void ScummEngine_v8::decodeParseString(int m, int n) {
- byte b;
-
- b = fetchScriptByte();
+ byte b = fetchScriptByte();
switch (b) {
case 0xC8: // SO_PRINT_BASEOP
@@ -1049,6 +1047,7 @@ void ScummEngine_v8::o8_actorOps() {
void ScummEngine_v8::o8_cameraOps() {
byte subOp = fetchScriptByte();
+
switch (subOp) {
case 0x32: // SO_CAMERA_PAUSE
//debug(0, "freezeCamera NYI");
diff --git a/scumm/script_v80he.cpp b/scumm/script_v80he.cpp
index d69292b7c3..46fa09962a 100644
--- a/scumm/script_v80he.cpp
+++ b/scumm/script_v80he.cpp
@@ -453,8 +453,9 @@ void ScummEngine_v80he::o80_readConfigFile() {
Common::ConfigFile ConfFile;
ConfFile.loadFromFile((const char *)filename);
- byte type = fetchScriptByte();
- switch (type) {
+ byte subOp = fetchScriptByte();
+
+ switch (subOp) {
case 43: // HE 100
case 6: // number
ConfFile.getKey((const char *)option, (const char *)section, entry);
@@ -472,7 +473,7 @@ void ScummEngine_v80he::o80_readConfigFile() {
push(readVar(0));
break;
default:
- error("o80_readConfigFile: default type %d", type);
+ error("o80_readConfigFile: default type %d", subOp);
}
debug(0, "o80_readConfigFile: Filename %s Section %s Option %s Value %s", filename, section, option, entry.c_str());
@@ -482,8 +483,9 @@ void ScummEngine_v80he::o80_writeConfigFile() {
byte filename[256], section[256], option[256], string[1024];
int value;
- byte type = fetchScriptByte();
- switch (type) {
+ byte subOp = fetchScriptByte();
+
+ switch (subOp) {
case 43: // HE 100
case 6: // number
value = pop();
@@ -502,7 +504,7 @@ void ScummEngine_v80he::o80_writeConfigFile() {
convertFilePath(filename, true);
break;
default:
- error("o80_writeConfigFile: default type %d", type);
+ error("o80_writeConfigFile: default type %d", subOp);
}
Common::ConfigFile ConfFile;
@@ -515,6 +517,7 @@ void ScummEngine_v80he::o80_writeConfigFile() {
void ScummEngine_v80he::o80_cursorCommand() {
int a, i;
int args[16];
+
byte subOp = fetchScriptByte();
switch (subOp) {
diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp
index dbe6110080..e4a41c6f56 100644
--- a/scumm/script_v90he.cpp
+++ b/scumm/script_v90he.cpp
@@ -560,7 +560,7 @@ void ScummEngine_v90he::o90_videoOps() {
void ScummEngine_v90he::o90_getVideoData() {
// Uses Smacker video
- int subOp = fetchScriptByte();
+ byte subOp = fetchScriptByte();
subOp -= 32;
switch (subOp) {
@@ -593,6 +593,7 @@ void ScummEngine_v90he::o90_getVideoData() {
void ScummEngine_v90he::o90_wizImageOps() {
int a, b;
+
int subOp = fetchScriptByte();
subOp -= 46;
@@ -812,9 +813,10 @@ void ScummEngine_v90he::o90_wizImageOps() {
}
void ScummEngine_v90he::o90_getDistanceBetweenPoints() {
- byte subOp = fetchScriptByte();
int x1, y1, z1, x2, y2, z2, dx, dy, dz, d;
+ byte subOp = fetchScriptByte();
+
switch (subOp) {
case 23: // HE100
case 28:
@@ -2030,9 +2032,10 @@ void ScummEngine_v90he::o90_cond() {
void ScummEngine_v90he::o90_dim2dim2Array() {
int data, dim1start, dim1end, dim2start, dim2end;
- int type = fetchScriptByte();
- switch (type) {
+ byte subOp = fetchScriptByte();
+
+ switch (subOp) {
case 2: // SO_BIT_ARRAY
data = kBitArray;
break;
@@ -2052,7 +2055,7 @@ void ScummEngine_v90he::o90_dim2dim2Array() {
data = kStringArray;
break;
default:
- error("o90_dim2dim2Array: default case %d", type);
+ error("o90_dim2dim2Array: default case %d", subOp);
}
if (pop() == 2) {
@@ -2310,7 +2313,6 @@ void ScummEngine_v90he::sortArray(int array, int dim2start, int dim2end, int dim
}
void ScummEngine_v90he::o90_sortArray() {
- // Sorts array via qsort
byte subOp = fetchScriptByte();
switch (subOp) {
@@ -2333,7 +2335,6 @@ void ScummEngine_v90he::o90_sortArray() {
}
void ScummEngine_v90he::o90_getObjectData() {
- // Object related
byte subOp = fetchScriptByte();
subOp -= 32;