[Scummvm-cvs-logs] CVS: scummvm script_v1.cpp,1.118,1.119

Max Horn fingolfin at users.sourceforge.net
Fri Jul 12 15:05:15 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv31189

Modified Files:
	script_v1.cpp 
Log Message:
this fix by MadMoose fixes the forest 'labyrinth' in monkeyvga

Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v1.cpp,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -d -r1.118 -r1.119
--- script_v1.cpp	7 Jul 2002 13:14:34 -0000	1.118
+++ script_v1.cpp	12 Jul 2002 22:04:24 -0000	1.119
@@ -1076,57 +1076,28 @@
 	obj = getVarOrDirectWord(0x80);
 
 	if (_features & GF_SMALL_HEADER) {
-		int temp = getVarOrDirectWord(0x40);
-		int temp2 = getVarOrDirectWord(0x20);	// Room
-
-		idx = getObjectIndex(obj);
-		if (idx == -1)
-			return;
-		od = &_objs[idx];
-		xpos = ypos = 255;
-		if (temp != 0xFF) {
-
-			od->x_pos = temp << 3;
-
-			od->y_pos = temp2 << 3;
+		xpos = getVarOrDirectWord(0x40);
+		ypos = getVarOrDirectWord(0x20);
+	} else {
+		switch ((_opcode = fetchScriptByte()) & 0x1F) {
+		case 1:										/* draw at */
+			xpos = getVarOrDirectWord(0x80);
+			ypos = getVarOrDirectWord(0x40);
+			break;
+		case 2:										/* set state */
+			state = getVarOrDirectWord(0x80);
+			break;
+		case 0x1F:									/* neither */
+			break;
+		default:
+			error("o5_drawObject: default case");
 		}
-
-
-
-		addObjectToDrawQue(idx);
-
-		x = od->x_pos;
-		y = od->y_pos;
-		w = od->width;
-		h = od->height;
-
-		i = _numObjectsInRoom;
-		do {
-			if (_objs[i].x_pos == x && _objs[i].y_pos == y && _objs[i].width == w && _objs[i].height == h)
-				putState(_objs[i].obj_nr, 0);
-		} while (--i);
-
-		putState(obj, state);
-		return;
-	}
-
-	switch ((_opcode = fetchScriptByte()) & 0x1F) {
-	case 1:											/* draw at */
-		xpos = getVarOrDirectWord(0x80);
-		ypos = getVarOrDirectWord(0x40);
-		break;
-	case 2:											/* set state */
-		state = getVarOrDirectWord(0x80);
-		break;
-	case 0x1F:										/* neither */
-		break;
-	default:
-		error("o5_drawObject: default case");
 	}
 
 	idx = getObjectIndex(obj);
 	if (idx == -1)
 		return;
+
 	od = &_objs[idx];
 	if (xpos != 0xFF) {
 		od->walk_x += (xpos << 3) - od->x_pos;





More information about the Scummvm-git-logs mailing list