[Scummvm-cvs-logs] CVS: scummvm scummvm.cpp,1.29,1.30 scumm.h,1.33,1.34 object.cpp,1.17,1.18

Ludvig Strigeus strigeus at users.sourceforge.net
Tue Dec 4 13:45:03 CET 2001


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

Modified Files:
	scummvm.cpp scumm.h object.cpp 
Log Message:
fixed some stuff related to in what order objects are drawn as well as a bug with object parents

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** scummvm.cpp	2001/12/01 17:06:13	1.29
--- scummvm.cpp	2001/12/04 21:44:41	1.30
***************
*** 410,414 ****
  		GF_NEW_OPCODES|GF_AFTER_V6|GF_USE_KEY},
  	{"samnmax", "Sam & Max", GID_SAMNMAX, 6, 4, 2, 
! 		GF_NEW_OPCODES|GF_AFTER_V6|GF_USE_KEY},
  	{"snmdemo", "Sam & Max (Demo)", GID_SAMNMAX, 6, 3, 0, 
  		GF_NEW_OPCODES|GF_AFTER_V6|GF_USE_KEY},
--- 410,414 ----
  		GF_NEW_OPCODES|GF_AFTER_V6|GF_USE_KEY},
  	{"samnmax", "Sam & Max", GID_SAMNMAX, 6, 4, 2, 
! 		GF_NEW_OPCODES|GF_AFTER_V6|GF_USE_KEY|GF_DRAWOBJ_OTHER_ORDER},
  	{"snmdemo", "Sam & Max (Demo)", GID_SAMNMAX, 6, 3, 0, 
  		GF_NEW_OPCODES|GF_AFTER_V6|GF_USE_KEY},

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** scumm.h	2001/12/04 10:44:33	1.33
--- scumm.h	2001/12/04 21:44:41	1.34
***************
*** 882,885 ****
--- 882,886 ----
  	GF_USE_KEY = 8,
  	GF_USE_ANGLES = GF_AFTER_V7,
+ 	GF_DRAWOBJ_OTHER_ORDER = 16,
  
  	GF_DEFAULT = GF_USE_KEY,
***************
*** 1660,1663 ****
--- 1661,1665 ----
  	void redrawBGAreas();
  	void drawRoomObjects(int arg);
+ 	void drawRoomObject(int i, int arg);
  	void redrawBGStrip(int start, int num);
  	void drawObject(int obj, int arg);

Index: object.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/object.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** object.cpp	2001/12/03 11:49:06	1.17
--- object.cpp	2001/12/04 21:44:41	1.18
***************
*** 226,246 ****
  }
  
! void Scumm::drawRoomObjects(int arg) {
! 	int i;
  	ObjectData *od;
  	byte a;
  
! 	for(i=1; i<=_numObjectsInRoom; i++) {
! 		od = &_objs[i];
! 		if (!od->obj_nr || !od->state)
! 			continue;
! 		do {
! 			a = od->parentstate;
! 			if (!od->parent) {
! 				drawObject(i, arg);
! 				break;
! 			}
! 			od = &_objs[od->parent];
! 		} while (od->state==a);
  	}
  }
--- 226,256 ----
  }
  
! void Scumm::drawRoomObject(int i, int arg) {
  	ObjectData *od;
  	byte a;
  
! 	od = &_objs[i];
! 	if (!od->obj_nr || !od->state)
! 		return;
! 
! 	do {
! 		a = od->parentstate;
! 		if (!od->parent) {
! 			drawObject(i, arg);
! 			break;
! 		}
! 		od = &_objs[od->parent];
! 	} while (od->state==a);
! }
! 
! void Scumm::drawRoomObjects(int arg) {
! 	int i;
! 
! 	if (_features & GF_DRAWOBJ_OTHER_ORDER) {
! 		for(i=1; i<=_numObjectsInRoom; i++)
! 			drawRoomObject(i,arg);
! 	} else {
! 		for(i=_numObjectsInRoom; i!=0; i--)
! 			drawRoomObject(i,arg);
  	}
  }
***************
*** 408,414 ****
  		od->y_pos = ((int16)READ_LE_UINT16(&cdhd->v6.y));
  		if (cdhd->v6.flags == 0x80) {
! 			od->parentstate = 1<<4;
  		} else {
! 			od->parentstate = (cdhd->v6.flags&0xF)<<OF_STATE_SHL;
  		}
  		od->parent = cdhd->v6.parent;
--- 418,424 ----
  		od->y_pos = ((int16)READ_LE_UINT16(&cdhd->v6.y));
  		if (cdhd->v6.flags == 0x80) {
! 			od->parentstate = 1;
  		} else {
! 			od->parentstate = (cdhd->v6.flags&0xF);
  		}
  		od->parent = cdhd->v6.parent;
***************
*** 420,426 ****
  		od->y_pos = cdhd->v5.y<<3;
  		if (cdhd->v5.flags == 0x80) {
! 			od->parentstate = 1<<4;
  		} else {
! 			od->parentstate = (cdhd->v5.flags&0xF)<<OF_STATE_SHL;
  		}
  		od->parent = cdhd->v5.parent;
--- 430,436 ----
  		od->y_pos = cdhd->v5.y<<3;
  		if (cdhd->v5.flags == 0x80) {
! 			od->parentstate = 1;
  		} else {
! 			od->parentstate = (cdhd->v5.flags&0xF);
  		}
  		od->parent = cdhd->v5.parent;





More information about the Scummvm-git-logs mailing list