[Scummvm-cvs-logs] CVS: scummvm verbs.cpp,1.15,1.16

Vincent Hamm yazoo at users.sourceforge.net
Fri Feb 15 09:18:17 CET 2002


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

Modified Files:
	verbs.cpp 
Log Message:
Fixed Loom interface

Index: verbs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/verbs.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** verbs.cpp	15 Feb 2002 01:16:27 -0000	1.15
--- verbs.cpp	15 Feb 2002 17:17:35 -0000	1.16
***************
*** 170,173 ****
--- 170,174 ----
  	byte *obim;
  	ImageHeader *imhd;
+ 	uint32 size;
  
  	if ((vs=findVirtScreen(y)) == NULL)
***************
*** 189,200 ****
                  int index, obj;
                  obj = READ_LE_UINT16(obim+6);
!                 index = getObjectIndex(obj);
!                  if(index==-1)
!                        return;
!                 od = &_objs[index];
!  
!                 imgw = od->width>>3;
!                 imgh = od->height>>3;
!                 imptr = obim+8;
          } else {
                  imhd = (ImageHeader*)findResourceData(MKID('IMHD'), obim);
--- 190,199 ----
                  int index, obj;
                  obj = READ_LE_UINT16(obim+6);
! 		size = READ_LE_UINT32(obim);
! 
! 		imgw = (*(obim+size+11)) ;
! 		imgh = (*(obim+size+17))>>3 ;
! 		imptr = (obim+8);
! 
          } else {
                  imhd = (ImageHeader*)findResourceData(MKID('IMHD'), obim);
***************
*** 256,260 ****
  void Scumm::setVerbObject(uint room, uint object, uint verb) {
  	byte  *obimptr;
! 	uint32 size;
  	FindObjectInRoom foir;
  	int i;
--- 255,260 ----
  void Scumm::setVerbObject(uint room, uint object, uint verb) {
  	byte  *obimptr;
! 	byte  *obcdptr;
! 	uint32 size, size2;
  	FindObjectInRoom foir;
  	int i;
***************
*** 268,274 ****
  				findObjectInRoom(&foir, foImageHeader, object, room);
  				size = READ_LE_UINT32(foir.obim);
! 				createResource(rtVerb, verb, size);
  				obimptr = getResourceAddress(rtRoom, room) - foir.roomptr + foir.obim;
  				memcpy(getResourceAddress(rtVerb, verb), obimptr, size);
  			}
  		}
--- 268,280 ----
  				findObjectInRoom(&foir, foImageHeader, object, room);
  				size = READ_LE_UINT32(foir.obim);
! 				printf("Size= %d",size);
! 				obcdptr = getResourceAddress(rtRoom, room) + getOBCDOffs(object);
! 				size2 = READ_LE_UINT32(obcdptr);
! 				printf("Size2= %d",size2);
! 				createResource(rtVerb, verb, size+size2);
  				obimptr = getResourceAddress(rtRoom, room) - foir.roomptr + foir.obim;
+ 				obcdptr = getResourceAddress(rtRoom, room) + getOBCDOffs(object);
  				memcpy(getResourceAddress(rtVerb, verb), obimptr, size);
+ 				memcpy(getResourceAddress(rtVerb, verb)+size, obcdptr, size2);
  			}
  		}





More information about the Scummvm-git-logs mailing list