[Scummvm-cvs-logs] CVS: scummvm object.cpp,1.48,1.49 script_v1.cpp,1.58,1.59 scumm.h,1.108,1.109

James Brown ender at users.sourceforge.net
Wed Apr 3 07:55:44 CEST 2002


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

Modified Files:
	object.cpp script_v1.cpp scumm.h 
Log Message:
Zak/Loom/Indy3 object flags fix. Only translates CLASS_TOUCHABLE at the moment.



Index: object.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/object.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** object.cpp	24 Mar 2002 17:49:46 -0000	1.48
--- object.cpp	3 Apr 2002 15:45:32 -0000	1.49
***************
*** 27,34 ****
  	checkRange(_numGlobalObjects-1, 0, obj, "Object %d out of range in getClass");
  
! 	cls &= 0x7F;
  	checkRange(32,1,cls,"Class %d out of range in getClass");
  
! 	return (_classData[obj] & (1<<(cls-1))) != 0;
  }
  
--- 27,42 ----
  	checkRange(_numGlobalObjects-1, 0, obj, "Object %d out of range in getClass");
  
! 	
  	checkRange(32,1,cls,"Class %d out of range in getClass");
+ 	if (_features && GF_SMALL_HEADER) {
+ 		byte *oldClass = (byte*)&_classData[obj];
+ 		if (cls == 32)	// CLASS_TOUCHABLE
+ 			cls = 23;
  
! 		return (oldClass[cls/8] & bit_table[cls&0x07]) != 0;
! 	} else {
! 		cls &= 0x7F;
! 		return (_classData[obj] & (1<<(cls-1))) != 0;	
! 	}
  }
  
***************
*** 875,879 ****
  		if (value == 0) {
  				_vars[179]++;
- 				printf("Adding item %d to slot %d\n", obj, base);
  				writeArray(178, 0, base, obj);
  				return;
--- 883,886 ----

Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v1.cpp,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** script_v1.cpp	31 Mar 2002 08:35:42 -0000	1.58
--- script_v1.cpp	3 Apr 2002 15:45:32 -0000	1.59
***************
*** 806,813 ****
  }
  
- const int bit_table[16] =
- {1,2,4,8,0x10,0x20,0x40,0x80,0x100,0x200,0x400,0x800,0x1000,0x2000,0x4000,0x8000};
- 
- 
  void Scumm::o5_actorSetClass() {
  	int act = getVarOrDirectWord(0x80);
--- 806,809 ----
***************
*** 1506,1511 ****
  void Scumm::o5_matrixOps() {
  	int a,b;
- 	printf("o5_matrixOps\n");
  	if(_features & GF_OLD256) { /* FIXME: missing function call*/
  		a=getVarOrDirectByte(0x80);
  		b=fetchScriptByte();
--- 1502,1507 ----
  void Scumm::o5_matrixOps() {
  	int a,b;
  	if(_features & GF_OLD256) { /* FIXME: missing function call*/
+ 		warning("o5_matrixOps - unimplemented on GF_OLD256");
  		a=getVarOrDirectByte(0x80);
  		b=fetchScriptByte();

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.108
retrieving revision 1.109
diff -C2 -d -r1.108 -r1.109
*** scumm.h	1 Apr 2002 06:53:59 -0000	1.108
--- scumm.h	3 Apr 2002 15:45:32 -0000	1.109
***************
*** 61,64 ****
--- 61,65 ----
  const uint16 many_direction_tab[18] = {4, 8, 71, 109, 251, 530, 0, 0, 0, 0, 22, 72, 107, 157, 202, 252, 287, 337};
  const int16 many_direction_tab_2[16] = {0, 90, 180, 270, -1, -1, -1, -1, 0, 45, 90, 135, 180, 225, 270, 315};
+ const int bit_table[16] = {1,2,4,8,0x10,0x20,0x40,0x80,0x100,0x200,0x400,0x800,0x1000,0x2000,0x4000,0x8000};
  
  struct ScummPoint {





More information about the Scummvm-git-logs mailing list