[Scummvm-cvs-logs] CVS: scummvm/scumm script_v100he.cpp,2.194,2.195 script_v6.cpp,1.461,1.462 script_v6he.cpp,2.172,2.173 script_v72he.cpp,2.324,2.325 script_v7he.cpp,2.181,2.182 script_v8.cpp,2.301,2.302 script_v80he.cpp,2.132,2.133 script_v90he.cpp,2.297,2.298

kirben kirben at users.sourceforge.net
Sat Feb 4 16:41:03 CET 2006


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1972/scumm

Modified Files:
	script_v100he.cpp script_v6.cpp script_v6he.cpp 
	script_v72he.cpp script_v7he.cpp script_v8.cpp 
	script_v80he.cpp script_v90he.cpp 
Log Message:

Sync. subOp variable name and always use byte.


Index: script_v100he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v100he.cpp,v
retrieving revision 2.194
retrieving revision 2.195
diff -u -d -r2.194 -r2.195
--- script_v100he.cpp	4 Feb 2006 12:11:09 -0000	2.194
+++ script_v100he.cpp	5 Feb 2006 00:40:45 -0000	2.195
@@ -377,10 +377,9 @@
 	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_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 @@
 		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_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 @@
 		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_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_floodFill() {
 	byte subOp = fetchScriptByte();
+
 	switch (subOp) {
 	case 0:
 		memset(&_floodFillParams, 0, sizeof(_floodFillParams));
@@ -1374,9 +1377,10 @@
 
 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 @@
 		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 @@
 	int a, b, c, d, e;
 
 	byte subOp = fetchScriptByte();
+
 	switch (subOp) {
 	case 0:
 		_hePaletteNum = pop();
@@ -1539,6 +1544,7 @@
 	newX = pop();
 
 	byte subOp = fetchScriptByte();
+
 	switch (subOp) {
 	case 42:
 		redimArray(fetchScriptWord(), 0, newX, 0, newY, kIntArray);
@@ -1556,12 +1562,11 @@
 
 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 @@
 		break;
 
 	default:
-		error("o100_roomOps: default case %d", op);
+		error("o100_roomOps: default case %d", subOp);
 	}
 }
 
@@ -2182,7 +2187,7 @@
 
 void ScummEngine_v100he::o100_videoOps() {
 	// Uses Bink video
-	int subOp = fetchScriptByte();
+	byte subOp = fetchScriptByte();
 
 	switch (subOp) {
 	case 0:
@@ -2232,6 +2237,7 @@
 	int actnum;
 	int offs = -2;
 	Actor *a;
+
 	byte subOp = fetchScriptByte();
 
 	switch (subOp) {
@@ -2268,8 +2274,9 @@
 }
 
 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_readFile() {
 	int slot, val;
 	int32 size;
+
 	byte subOp = fetchScriptByte();
 
 	switch (subOp) {

Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.461
retrieving revision 1.462
diff -u -d -r1.461 -r1.462
--- script_v6.cpp	23 Jan 2006 19:08:47 -0000	1.461
+++ script_v6.cpp	5 Feb 2006 00:40:47 -0000	1.462
@@ -943,7 +943,8 @@
 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_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 @@
 			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 @@
 			setPalette(a);
 		break;
 	default:
-		error("o6_roomOps: default case %d", op);
+		error("o6_roomOps: default case %d", subOp);
 	}
 }
 
@@ -1771,9 +1772,8 @@
 	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_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 @@
 	}
 	vs = &_verbs[_curVerbSlot];
 	slot = _curVerbSlot;
-	switch (op) {
+	switch (subOp) {
 	case 124:		// SO_VERB_IMAGE
 		a = pop();
 		if (_curVerbSlot) {
@@ -2036,7 +2035,7 @@
 		verbMouseOver(0);
 		break;
 	default:
-		error("o6_verbops: default case %d", op);
+		error("o6_verbops: default case %d", subOp);
 	}
 }
 
@@ -2181,6 +2180,7 @@
 	int actnum;
 	int offs = -2;
 	Actor *a;
+
 	byte subOp = fetchScriptByte();
 
 	switch (subOp) {
@@ -2288,6 +2288,7 @@
 
 void ScummEngine_v6::o6_systemOps() {
 	byte subOp = fetchScriptByte();
+
 	switch (subOp) {
 	case 158:		// SO_RESTART
 		restart();
@@ -2374,7 +2375,9 @@
 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 @@
 		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_dim2dimArray() {
 	int a, b, data;
-	switch (fetchScriptByte()) {
+
+	byte subOp = fetchScriptByte();
+
+	switch (subOp) {
 	case 199:		// SO_INT_ARRAY
 		data = kIntArray;
 		break;
@@ -2425,7 +2431,7 @@
 		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::decodeParseString(int m, int n) {
-	byte b;
-
-	b = fetchScriptByte();
+	byte b = fetchScriptByte();
 
 	switch (b) {
 	case 65:		// SO_AT

Index: script_v6he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6he.cpp,v
retrieving revision 2.172
retrieving revision 2.173
diff -u -d -r2.172 -r2.173
--- script_v6he.cpp	4 Feb 2006 12:11:09 -0000	2.172
+++ script_v6he.cpp	5 Feb 2006 00:40:48 -0000	2.173
@@ -417,11 +417,10 @@
 
 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 @@
 		setRoomPalette(a, b);
 		break;
 	default:
-		error("o60_roomOps: default case %d", op);
+		error("o60_roomOps: default case %d", subOp);
 	}
 }
 
@@ -581,9 +580,8 @@
 	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_soundOps() {
 	byte subOp = fetchScriptByte();
 	int arg = pop();
+
 	switch (subOp) {
 	case 0xde:
 		_imuse->setMusicVolume(arg);
@@ -1204,15 +1203,15 @@
 }
 
 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 @@
 		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::decodeParseString(int m, int n) {
-	byte b;
 	int i, colors;
 	int args[31];
 
-	b = fetchScriptByte();
+	byte b = fetchScriptByte();
 
 	switch (b) {
 	case 65:		// SO_AT

Index: script_v72he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v72he.cpp,v
retrieving revision 2.324
retrieving revision 2.325
diff -u -d -r2.324 -r2.325
--- script_v72he.cpp	4 Feb 2006 12:11:09 -0000	2.324
+++ script_v72he.cpp	5 Feb 2006 00:40:48 -0000	2.325
@@ -865,7 +865,7 @@
 
 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_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_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 @@
 		break;
 
 	default:
-		error("o72_roomOps: default case %d", op);
+		error("o72_roomOps: default case %d", subOp);
 	}
 }
 
@@ -1116,10 +1115,9 @@
 	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_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 @@
 	}
 	vs = &_verbs[_curVerbSlot];
 	slot = _curVerbSlot;
-	switch (op) {
+	switch (subOp) {
 	case 124:		// SO_VERB_IMAGE
 		a = pop();
 		if (_curVerbSlot) {
@@ -1424,7 +1421,7 @@
 		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_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 @@
 		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_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 @@
 		data = kStringArray;
 		break;
 	default:
-		error("o72_dim2dimArray: default case %d", type);
+		error("o72_dim2dimArray: default case %d", subOp);
 	}
 
 	dim1end = pop();
@@ -1995,6 +1994,7 @@
 	newX = pop();
 
 	byte subOp = fetchScriptByte();
+
 	switch (subOp) {
 	case 5:
 		redimArray(fetchScriptWord(), 0, newX, 0, newY, kIntArray);
@@ -2146,12 +2146,12 @@
 	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 @@
 		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 @@
 		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_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) {

Index: script_v7he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v7he.cpp,v
retrieving revision 2.181
retrieving revision 2.182
diff -u -d -r2.181 -r2.182
--- script_v7he.cpp	4 Feb 2006 12:11:09 -0000	2.181
+++ script_v7he.cpp	5 Feb 2006 00:40:48 -0000	2.182
@@ -509,9 +509,9 @@
 }
 
 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_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;
 }
 

Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.301
retrieving revision 2.302
diff -u -d -r2.301 -r2.302
--- script_v8.cpp	18 Jan 2006 17:39:47 -0000	2.301
+++ script_v8.cpp	5 Feb 2006 00:40:48 -0000	2.302
@@ -460,9 +460,7 @@
 }
 
 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_cameraOps() {
 	byte subOp = fetchScriptByte();
+
 	switch (subOp) {
 	case 0x32:		// SO_CAMERA_PAUSE
 		//debug(0, "freezeCamera NYI");

Index: script_v80he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v80he.cpp,v
retrieving revision 2.132
retrieving revision 2.133
diff -u -d -r2.132 -r2.133
--- script_v80he.cpp	4 Feb 2006 12:11:09 -0000	2.132
+++ script_v80he.cpp	5 Feb 2006 00:40:48 -0000	2.133
@@ -453,8 +453,9 @@
 	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 @@
 		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 @@
 	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 @@
 		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_cursorCommand() {
 	int a, i;
 	int args[16];
+
 	byte subOp = fetchScriptByte();
 
 	switch (subOp) {

Index: script_v90he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
retrieving revision 2.297
retrieving revision 2.298
diff -u -d -r2.297 -r2.298
--- script_v90he.cpp	4 Feb 2006 12:11:09 -0000	2.297
+++ script_v90he.cpp	5 Feb 2006 00:40:48 -0000	2.298
@@ -560,7 +560,7 @@
 
 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_wizImageOps() {
 	int a, b;
+
 	int subOp = fetchScriptByte();
 	subOp -= 46;
 
@@ -812,9 +813,10 @@
 }
 
 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_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 @@
 		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::o90_sortArray() {
-	// Sorts array via qsort
 	byte subOp = fetchScriptByte();
 
 	switch (subOp) {
@@ -2333,7 +2335,6 @@
 }
 
 void ScummEngine_v90he::o90_getObjectData() {
-	// Object related
 	byte subOp = fetchScriptByte();
 	subOp -= 32;
 





More information about the Scummvm-git-logs mailing list