[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.31,2.32 script_v8.cpp,2.133,2.134

James Brown ender at users.sourceforge.net
Sun Jan 26 22:52:02 CET 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv17283/scumm

Modified Files:
	intern.h script_v8.cpp 
Log Message:
Theoretically implement O_DRAW_OBJECT - although it doesn't seem to work


Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.31
retrieving revision 2.32
diff -u -d -r2.31 -r2.32
--- intern.h	26 Jan 2003 06:17:25 -0000	2.31
+++ intern.h	27 Jan 2003 06:51:26 -0000	2.32
@@ -432,6 +432,7 @@
 
 	void o8_getActorChore();
 
+	void o8_drawObject();
 	void o8_getObjectImageX();
 	void o8_getObjectImageY();
 	void o8_getObjectImageWidth();

Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.133
retrieving revision 2.134
diff -u -d -r2.133 -r2.134
--- script_v8.cpp	26 Jan 2003 14:26:02 -0000	2.133
+++ script_v8.cpp	27 Jan 2003 06:51:26 -0000	2.134
@@ -229,7 +229,7 @@
 		OPCODE(o6_printSystem),
 		OPCODE(o8_blastText),
 		/* 98 */
-		OPCODE(o6_isSoundRunning), // FIXME should be O_DRAW_OBJECT
+		OPCODE(o8_drawObject),
 		OPCODE(o6_invalid),
 		OPCODE(o6_invalid),
 		OPCODE(o6_invalid),
@@ -1730,4 +1730,29 @@
 	
 	push(width);
 	_scriptPointer += len + 1;
+}
+
+void Scumm_v8::o8_drawObject()
+{
+	int state = pop(), y = pop(), x = pop(), objnum = getObjectIndex(pop());
+	ObjectData *od;
+
+	if (!objnum)
+		return;
+
+        od = &_objs[objnum];
+        if (x != 0x7FFFFFFF) {
+                od->x_pos = x;
+                od->y_pos = y;
+		printf("setting position: 0x%X b 0x%X\n", x, y);
+        }
+
+	addObjectToDrawQue(objnum);
+
+	if (state == 255 || state == 254)
+		warning("o8_drawObject(%d, %d, %d, %d): extended attributes unimplemented", x, y, objnum, state);
+	else
+		warning("o8_drawObject(%d, %d, %d, %d)", x, y, objnum, state);
+
+	putState(objnum, state);
 }





More information about the Scummvm-git-logs mailing list