[Scummvm-cvs-logs] CVS: scummvm object.cpp,1.24,1.25 script_v1.cpp,1.20,1.21

Vincent Hamm yazoo at users.sourceforge.net
Wed Feb 13 12:21:07 CET 2002


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

Modified Files:
	object.cpp script_v1.cpp 
Log Message:
fixed lots of object problems in loomcd

Index: object.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/object.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** object.cpp	13 Feb 2002 17:33:52 -0000	1.24
--- object.cpp	13 Feb 2002 20:16:01 -0000	1.25
***************
*** 135,138 ****
--- 135,139 ----
  	int x,y;
  	AdjustBoxResult abr;
+ 	
          if(!(_features & GF_SMALL_HEADER)) {
                  if (_features&GF_AFTER_V6) {
***************
*** 156,164 ****
                          y = (int16)READ_LE_UINT16(&od->walk_y);
                  }
          } else {
!                 x = (int16)READ_LE_UINT16(&od->x_pos);
!                 y = (int16)READ_LE_UINT16(&od->y_pos);
                  _xPos = x;
                  _yPos = y;
          }
  
--- 157,170 ----
                          y = (int16)READ_LE_UINT16(&od->walk_y);
                  }
+ 		_xPos = x;
+ 		_yPos = y;
+ 		_dir = oldDirToNewDir(od->actordir&3);
          } else {
!                 x = (int16)READ_LE_UINT32(&od->walk_x);
!                 y = (int16)READ_LE_UINT16(&od->walk_y);
                  _xPos = x;
                  _yPos = y;
+ 		_dir= oldDirToNewDir(od->actordir&3);
+ 	
          }
  
***************
*** 166,172 ****
  //	_xPos = abr.x;
  //	_yPos = abr.y;
! 	_xPos = x;
! 	_yPos = y;
! 	_dir = oldDirToNewDir(od->actordir&3);
  }
  
--- 172,178 ----
  //	_xPos = abr.x;
  //	_yPos = abr.y;
! //	_xPos = x;
! //	_yPos = y;
! //	_dir = oldDirToNewDir(od->actordir&3);
  }
  
***************
*** 484,500 ****
  
          if(_features & GF_SMALL_HEADER) {
!                byte *ptr = room + od->offs_obcd_to_room;
!                od->obj_nr = READ_LE_UINT16(ptr+6);
!                od->width = *(ptr+11)<<3;
!                od->height = *(ptr+17);
!                od->x_pos = *(ptr+9)<<3;
!                od->y_pos = *(ptr+10)<<3;
! 
!                if(*(ptr+10) == 0x80) {
  			od->parentstate = 1;  // it's 0x10 in the original code
!                } else {
  			od->parentstate = 0;
!                }
  
                 return;
          }
--- 490,519 ----
  
          if(_features & GF_SMALL_HEADER) {
!                
! 		byte *ptr = room + od->offs_obcd_to_room;
! 		
! 		od->obj_nr = READ_LE_UINT16(ptr+6); // ok
! 		
! 		od->width = *(ptr+11)<<3; // ok		
! 		od->x_pos = *(ptr+9)<<3; // ok
! 		
! 		if(*(ptr+10) & 0x80) {
  			od->parentstate = 1;  // it's 0x10 in the original code
! 		} else {
  			od->parentstate = 0;
! 		}
  
+ 		od->y_pos = ((*(ptr+10))&0x7F)<<3;
+ 		
+ 		od->parent = *(ptr+12);
+ 		od->walk_x = READ_LE_UINT16(ptr+13);
+ 
+ 		od->walk_y = READ_LE_UINT16(ptr+15);
+ 		
+ 		od->actordir = (*(ptr+17))&7;
+ 		od->height = *(ptr+17); // ok
+ 		
+ 						
+ 	       
                 return;
          }

Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v1.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** script_v1.cpp	13 Feb 2002 17:33:52 -0000	1.20
--- script_v1.cpp	13 Feb 2002 20:16:01 -0000	1.21
***************
*** 1933,1936 ****
--- 1933,1938 ----
  	int nr;
  
+ 	warning("walk actor to actor");
+ 
  	a = derefActorSafe(getVarOrDirectByte(0x80), "o5_walkActorToActor");
  	if (a->room != _currentRoom) {
***************
*** 1970,1973 ****
--- 1972,1977 ----
  	int obj;
  	Actor *a;
+ 
+ 	warning("walk object to object");
  
  	a = derefActorSafe(getVarOrDirectByte(0x80), "o5_walkActorToObject");





More information about the Scummvm-git-logs mailing list