[Scummvm-cvs-logs] CVS: scummvm actor.cpp,1.8,1.9 boxes.cpp,1.3,1.4 costume.cpp,1.7,1.8 debug.cpp,1.3,1.4 gfx.cpp,1.11,1.12 object.cpp,1.8,1.9 resource.cpp,1.9,1.10 saveload.cpp,1.7,1.8 script.cpp,1.6,1.7 script_v1.cpp,1.6,1.7 script_v2.cpp,1.5,1.6 scumm.h,1.17,1.18 scummsys.h,1.8,1.9 scummvm.cpp,1.15,1.16 scummvm.dsp,1.10,1.11 sdl.cpp,1.15,1.16 sound.cpp,1.3,1.4 string.cpp,1.6,1.7 sys.cpp,1.3,1.4 verbs.cpp,1.5,1.6 windows.cpp,1.11,1.12

Ludvig Strigeus strigeus at users.sourceforge.net
Tue Nov 6 12:30:02 CET 2001


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

Modified Files:
	actor.cpp boxes.cpp costume.cpp debug.cpp gfx.cpp object.cpp 
	resource.cpp saveload.cpp script.cpp script_v1.cpp 
	script_v2.cpp scumm.h scummsys.h scummvm.cpp scummvm.dsp 
	sdl.cpp sound.cpp string.cpp sys.cpp verbs.cpp windows.cpp 
Log Message:
full screen flag,
better mouse cursors,
removed change log from individual files

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/actor.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** actor.cpp	2001/11/05 19:21:49	1.8
--- actor.cpp	2001/11/06 20:00:47	1.9
***************
*** 16,49 ****
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * Change Log:
!  * $Log$
!  * Revision 1.8  2001/11/05 19:21:49  strigeus
!  * bug fixes,
!  * speech in dott
!  *
!  * Revision 1.7  2001/10/26 17:34:50  strigeus
!  * bug fixes, code cleanup
!  *
!  * Revision 1.6  2001/10/23 19:51:50  strigeus
!  * recompile not needed when switching games
!  * debugger skeleton implemented
!  *
!  * Revision 1.5  2001/10/16 10:01:44  strigeus
!  * preliminary DOTT support
!  *
!  * Revision 1.4  2001/10/10 17:18:33  strigeus
!  * fixed swapped parameters in o_walkActorToActor
!  *
!  * Revision 1.3  2001/10/10 11:24:21  strigeus
!  * fixed return value from adjustXYToBeInBox
!  *
!  * Revision 1.2  2001/10/09 18:35:02  strigeus
!  * fixed object parent bug
!  * fixed some signed/unsigned comparisons
!  *
!  * Revision 1.1.1.1  2001/10/09 14:30:14  strigeus
!  *
!  * initial revision
!  *
   *
   */
--- 16,20 ----
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * $Header$
   *
   */

Index: boxes.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/boxes.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** boxes.cpp	2001/11/05 19:21:49	1.3
--- boxes.cpp	2001/11/06 20:00:47	1.4
***************
*** 16,33 ****
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * Change Log:
!  * $Log$
!  * Revision 1.3  2001/11/05 19:21:49  strigeus
!  * bug fixes,
!  * speech in dott
!  *
!  * Revision 1.2  2001/10/11 10:45:39  strigeus
!  * Fixed bug in Scumm::getBoxCoordinates where unsigned integers were read
!  * instead of signed ones.
!  *
!  * Revision 1.1.1.1  2001/10/09 14:30:14  strigeus
!  *
!  * initial revision
!  *
   *
   */
--- 16,20 ----
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * $Header$
   *
   */

Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/costume.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** costume.cpp	2001/11/05 19:21:49	1.7
--- costume.cpp	2001/11/06 20:00:47	1.8
***************
*** 16,46 ****
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * Change Log:
!  * $Log$
!  * Revision 1.7  2001/11/05 19:21:49  strigeus
!  * bug fixes,
!  * speech in dott
!  *
!  * Revision 1.6  2001/10/26 17:34:50  strigeus
!  * bug fixes, code cleanup
!  *
!  * Revision 1.5  2001/10/23 19:51:50  strigeus
!  * recompile not needed when switching games
!  * debugger skeleton implemented
!  *
!  * Revision 1.4  2001/10/16 20:31:27  strigeus
!  * misc fixes
!  *
!  * Revision 1.3  2001/10/16 10:01:45  strigeus
!  * preliminary DOTT support
!  *
!  * Revision 1.2  2001/10/09 18:35:02  strigeus
!  * fixed object parent bug
!  * fixed some signed/unsigned comparisons
!  *
!  * Revision 1.1.1.1  2001/10/09 14:30:14  strigeus
!  *
!  * initial revision
!  *
   *
   */
--- 16,20 ----
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * $Header$
   *
   */

Index: debug.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/debug.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** debug.cpp	2001/10/26 17:34:50	1.3
--- debug.cpp	2001/11/06 20:00:47	1.4
***************
*** 16,31 ****
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * Change Log:
!  * $Log$
!  * Revision 1.3  2001/10/26 17:34:50  strigeus
!  * bug fixes, code cleanup
!  *
!  * Revision 1.2  2001/10/23 19:56:57  strigeus
!  * fixed spelling error
!  *
!  * Revision 1.1  2001/10/23 19:51:50  strigeus
!  * recompile not needed when switching games
!  * debugger skeleton implemented
!  *
   *
   */
--- 16,20 ----
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * $Header$
   *
   */

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gfx.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** gfx.cpp	2001/11/05 19:21:49	1.11
--- gfx.cpp	2001/11/06 20:00:47	1.12
***************
*** 16,59 ****
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * Change Log:
!  * $Log$
!  * Revision 1.11  2001/11/05 19:21:49  strigeus
!  * bug fixes,
!  * speech in dott
!  *
!  * Revision 1.10  2001/10/29 23:07:24  strigeus
!  * better MI1 compatibility
!  *
!  * Revision 1.9  2001/10/26 17:34:50  strigeus
!  * bug fixes, code cleanup
!  *
!  * Revision 1.8  2001/10/23 19:51:50  strigeus
!  * recompile not needed when switching games
!  * debugger skeleton implemented
!  *
!  * Revision 1.7  2001/10/17 10:07:39  strigeus
!  * fixed verbs not saved in non dott games,
!  * implemented a screen effect
!  *
!  * Revision 1.6  2001/10/17 07:12:37  strigeus
!  * fixed nasty signed/unsigned bug
!  *
!  * Revision 1.5  2001/10/16 20:31:27  strigeus
!  * misc fixes
!  *
!  * Revision 1.4  2001/10/16 10:01:47  strigeus
!  * preliminary DOTT support
!  *
!  * Revision 1.3  2001/10/10 12:52:21  strigeus
!  * fixed bug in GDI_UnkDecode7()
!  *
!  * Revision 1.2  2001/10/10 10:02:33  strigeus
!  * alternative mouse cursor
!  * basic save&load
!  *
!  * Revision 1.1.1.1  2001/10/09 14:30:14  strigeus
!  *
!  * initial revision
!  *
   *
   */
--- 16,20 ----
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * $Header$
   *
   */
***************
*** 1722,1725 ****
--- 1683,1703 ----
  	/* TODO: handle shake here */
  
+ 	if (_cursorAnimate) {
+ 		if (!(_cursorAnimateIndex&0x3))
+ 			decompressDefaultCursor((_cursorAnimateIndex>>2)&3);
+ 		_cursorAnimateIndex++;
+ 		
+ 	}
+ 
+ 	::drawMouse(this, 
+ 		mouse.x - _cursorHotspotX, 
+ 		mouse.y - _cursorHotspotY,
+ 		_cursorWidth,
+ 		_cursorHeight,
+ 		_grabbedCursor,
+ 		gdi._unk4>0
+ 	);
+ 
+ /*
  	::drawMouse(this,
  		mouse.x - gdi._hotspot_x,
***************
*** 1729,1732 ****
--- 1707,1711 ----
  		gdi._unk4>0
  		);
+ 	*/
  }
  
***************
*** 1736,1767 ****
  	cur->hotspot_y = y;
  }
- 
- void Scumm::setCursorImg(int room, int img) {
- 	byte *ptr;
- 	int index;
- 	CodeHeader *cdhd;
- 	ImageHeader *imhd;
- 	int w,h;
- 	byte *roomptr;
- 	RoomHeader *rmhd;
  
! 	if (getObjectIndex(img)!=-1) {
! 		cdhd = (CodeHeader*)getObjectAddress(img);
! 		ptr = (byte*)cdhd + READ_BE_UINT32(&cdhd->size);
! 		cdhd = (CodeHeader*)findResource(MKID('CDHD'), (byte*)cdhd, 0);
! 		w = READ_LE_UINT16(&cdhd->v6.w)>>3;
! 		h = READ_LE_UINT16(&cdhd->v6.h)>>3;
! 		imhd = (ImageHeader*)findResource(MKID('IMHD'), ptr, 0);
! 	} else {
! //		error("setCursorImg: -1 not impl");
! 	}
! 
! 	
! 	
! //	offs = ((uint32*)ptr)[img+1];
! //	if (!offs)
! //		return;
! 
! 	warning("stub setCursorImg(%d,%d)", room, img);
  }
  
--- 1715,1722 ----
  	cur->hotspot_y = y;
  }
  
! void Scumm::setCursorHotspot2(int x,int y) {
! 	_cursorHotspotX = x;
! 	_cursorHotspotY = y;
  }
  
***************
*** 1877,1905 ****
  }
  
! void Scumm::unkMiscOp4(int a, int b, int c, int d) {
! 	VirtScreen *vs = findVirtScreen(b);
  
  	if (vs==NULL) {
! 		warning("unkMiscOp4: invalid virtscreen %d", b);
  		return;
  	}
  
  	grabCursor(
! 		getResourceAddress(rtBuffer, vs->number+1) + (b-vs->topline)*320 + a, 
! 		c,d);
  
! //	_cursor_width = c;
! //	_cursor_height = d;
  }
  
  void Scumm::grabCursor(byte *ptr, int width, int height) {
! #if 0
! 	int size;
! 	byte *ptr;
  	
  	size = width * height;
! 	if (size > 10240)
  		error("grabCursor: grabbed cursor too big");
! 	ptr = createResource(
! #endif
  }
--- 1832,1949 ----
  }
  
! void Scumm::grabCursor(int x, int y, int w, int h) {
! 	VirtScreen *vs = findVirtScreen(y);
  
  	if (vs==NULL) {
! 		warning("grabCursor: invalid Y %d", y);
  		return;
  	}
  
  	grabCursor(
! 		getResourceAddress(rtBuffer, vs->number+1) + (y-vs->topline)*320 + x, 
! 		w,h);
  
! }
! 
! void Scumm::decompressBomp(byte *dst, byte *src, int w, int h) {
! 	int len,num;
! 	byte code,color;
! 
! 	src += 8;
! 
! 	do {
! 		len = w;
! 		src += 2;
! 		while (len) {
! 			code = *src++;
! 			num = (code>>1)+1;
! 			if (num>len) num=len;
! 			len -= num;
! 			if (code&1) {
! 				color = *src++;
! 				do *dst++ = color; while (--num);
! 			} else {
! 				do *dst++ = *src++; while (--num);
! 			}
! 		}
! 	} while (--h);
  }
  
  void Scumm::grabCursor(byte *ptr, int width, int height) {
! 	uint size;
! 	byte *dst;
  	
  	size = width * height;
! 	if (size > sizeof(_grabbedCursor))
  		error("grabCursor: grabbed cursor too big");
! 
! 	_cursorWidth = width;
! 	_cursorHeight = height;
! 	_cursorAnimate = false;
! 
! 	dst = _grabbedCursor;
! 	for(;height;height--) {
! 		memcpy(dst, ptr, width);
! 		dst += width;
! 		ptr += 320;
! 	}
! 
! }
! 
! void Scumm::useIm01Cursor(byte *im, int w, int h) {
! 	VirtScreen *vs = &virtscr[0];
! 	
! 	w<<=3;
! 	h<<=3;
! 	
! 	drawBox(0,0,w-1,h-1,0xFF);
! 
! 	vs->alloctwobuffers = false;
! 	gdi._disable_zbuffer = true;
! 	gdi.drawBitmap(im, vs, _screenStartStrip, 0, h, 0, w>>3, 0);
! 	vs->alloctwobuffers = true;
! 	gdi._disable_zbuffer = false;
! 
! 	grabCursor(getResourceAddress(rtBuffer, 1) + vs->xstart, w, h);
! 	
! 	blit(getResourceAddress(rtBuffer, 1) + vs->xstart, getResourceAddress(rtBuffer, 5) + vs->xstart, w, h);
! }
! 
! void Scumm::useBompCursor(byte *im, int width, int height) {
! 	uint size;
! 
! 	width<<=3;
! 	height<<=3;
! 	
! 	size = width * height;
! 	if (size > sizeof(_grabbedCursor))
! 		error("useBompCursor: cursor too big");
! 
! 	_cursorWidth = width;
! 	_cursorHeight = height;
! 	_cursorAnimate = false;
! 
! 	decompressBomp(_grabbedCursor, im+10, width, height);
! }
! 
! static const byte default_cursor_colors[4] = {
! 	15,15,7,8
! };
! 
! void Scumm::decompressDefaultCursor(int index) {
! 	int i;
! 	byte color;
! 
! 	memset(_grabbedCursor, 0xFF, sizeof(_grabbedCursor));
! 	_cursorWidth = 16;
! 	_cursorHeight = 16;
! 	_cursorHotspotX = 8;
! 	_cursorHotspotY = 7;
! 
! 	color = default_cursor_colors[index];
! 	
! 	for(i=0; i<16; i++) {
! 		_grabbedCursor[16*8+i] = color;
! 		_grabbedCursor[16*i+8] = color;
! 	}
  }

Index: object.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/object.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** object.cpp	2001/11/05 19:21:49	1.8
--- object.cpp	2001/11/06 20:00:47	1.9
***************
*** 16,49 ****
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * Change Log:
!  * $Log$
!  * Revision 1.8  2001/11/05 19:21:49  strigeus
!  * bug fixes,
!  * speech in dott
!  *
!  * Revision 1.7  2001/10/26 17:34:50  strigeus
!  * bug fixes, code cleanup
!  *
!  * Revision 1.6  2001/10/23 19:51:50  strigeus
!  * recompile not needed when switching games
!  * debugger skeleton implemented
!  *
!  * Revision 1.5  2001/10/17 12:37:50  strigeus
!  * fixed big endian bug
!  *
!  * Revision 1.4  2001/10/16 12:20:18  strigeus
!  * made files compile on unix
!  *
!  * Revision 1.3  2001/10/16 10:01:47  strigeus
!  * preliminary DOTT support
!  *
!  * Revision 1.2  2001/10/09 18:35:02  strigeus
!  * fixed object parent bug
!  * fixed some signed/unsigned comparisons
!  *
!  * Revision 1.1.1.1  2001/10/09 14:30:14  strigeus
!  *
!  * initial revision
!  *
   *
   */
--- 16,20 ----
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * $Header$
   *
   */
***************
*** 170,175 ****
  		y = od->y_pos*8 + (int16)READ_LE_UINT16(&imhd->hotspot[state].y);
  	} else {
! 		x = od->cdhd_10;
! 		y = od->cdhd_12;
  	}
  
--- 141,146 ----
  		y = od->y_pos*8 + (int16)READ_LE_UINT16(&imhd->hotspot[state].y);
  	} else {
! 		x = od->walk_x;
! 		y = od->walk_y;
  	}
  
***************
*** 402,437 ****
  	od = &_objs[1];
  	for (i=1; i<=_numObjectsInRoom; i++,od++) {
! 		ptr = room + _objs[i].offs_obcd_to_room;
  		cdhd = (CodeHeader*)findResource(MKID('CDHD'), ptr,0);
! 		_objs[i].obj_nr = READ_LE_UINT16(&cdhd->obj_id);
  
  		if (_majorScummVersion == 6) {
! 			_objs[i].numstrips = READ_LE_UINT16(&cdhd->v6.w)>>3;
! 			_objs[i].height = READ_LE_UINT16(&cdhd->v6.h)>>3;
! 			_objs[i].x_pos = ((int16)READ_LE_UINT16(&cdhd->v6.x))>>3;
! 			_objs[i].y_pos = ((int16)READ_LE_UINT16(&cdhd->v6.y))>>3;
  			if (cdhd->v6.flags == 0x80) {
! 				_objs[i].parentstate = 1<<4;
  			} else {
! 				_objs[i].parentstate = (cdhd->v6.flags&0xF)<<4;
  			}
! 			_objs[i].parent = cdhd->v6.parent;
! 			_objs[i].actordir = cdhd->v6.actordir;
  		} else {
! 			_objs[i].numstrips = cdhd->v5.w;
! 			_objs[i].height = cdhd->v5.h;
! 			_objs[i].x_pos = cdhd->v5.x;
! 			_objs[i].y_pos = cdhd->v5.y;
  			if (cdhd->v5.flags == 0x80) {
! 				_objs[i].parentstate = 1<<4;
  			} else {
! 				_objs[i].parentstate = (cdhd->v5.flags&0xF)<<4;
  			}
! 			_objs[i].parent = cdhd->v5.parent;
! 			_objs[i].cdhd_10 = READ_LE_UINT16(&cdhd->v5.unk2);
! 			_objs[i].cdhd_12 = READ_LE_UINT16(&cdhd->v5.unk3);
! 			_objs[i].actordir = cdhd->v5.actordir;
  		}
! 		_objs[i].fl_object_index = 0;
  	}
  
--- 373,408 ----
  	od = &_objs[1];
  	for (i=1; i<=_numObjectsInRoom; i++,od++) {
! 		ptr = room + od->offs_obcd_to_room;
  		cdhd = (CodeHeader*)findResource(MKID('CDHD'), ptr,0);
! 		od->obj_nr = READ_LE_UINT16(&cdhd->obj_id);
  
  		if (_majorScummVersion == 6) {
! 			od->numstrips = READ_LE_UINT16(&cdhd->v6.w)>>3;
! 			od->height = READ_LE_UINT16(&cdhd->v6.h)>>3;
! 			od->x_pos = ((int16)READ_LE_UINT16(&cdhd->v6.x))>>3;
! 			od->y_pos = ((int16)READ_LE_UINT16(&cdhd->v6.y))>>3;
  			if (cdhd->v6.flags == 0x80) {
! 				od->parentstate = 1<<4;
  			} else {
! 				od->parentstate = (cdhd->v6.flags&0xF)<<4;
  			}
! 			od->parent = cdhd->v6.parent;
! 			od->actordir = cdhd->v6.actordir;
  		} else {
! 			od->numstrips = cdhd->v5.w;
! 			od->height = cdhd->v5.h;
! 			od->x_pos = cdhd->v5.x;
! 			od->y_pos = cdhd->v5.y;
  			if (cdhd->v5.flags == 0x80) {
! 				od->parentstate = 1<<4;
  			} else {
! 				od->parentstate = (cdhd->v5.flags&0xF)<<4;
  			}
! 			od->parent = cdhd->v5.parent;
! 			od->walk_x = READ_LE_UINT16(&cdhd->v5.walk_x);
! 			od->walk_y = READ_LE_UINT16(&cdhd->v5.walk_y);
! 			od->actordir = cdhd->v5.actordir;
  		}
! 		od->fl_object_index = 0;
  	}
  
***************
*** 577,581 ****
  }
  
! void Scumm::addObjectToInventory(int obj, int room) {
  	int i, slot;
  	byte *ptr,*obcdptr;
--- 548,552 ----
  }
  
! void Scumm::addObjectToInventory(uint obj, uint room) {
  	int i, slot;
  	byte *ptr,*obcdptr;
***************
*** 765,767 ****
--- 736,804 ----
  
  	return getDist(x,y,x2,y2) * 0xFF / ((i + j)>>1);
+ }
+ 
+ void Scumm::setCursorImg(uint room, uint img) {
+ 	byte *ptr;
+ 	int index;
+ 	CodeHeader *cdhd;
+ 	ImageHeader *imhd;
+ 	int w,h;
+ 	byte *roomptr,*obcd,*obim,*dataptr,*bomp;
+ 	RoomHeader *rmhd;
+ 	int i,numobj;
+ 	uint32 size;
+ 
+ 	if (getObjectIndex(img)!=-1) {
+ 		obim = getObjectAddress(img);
+ 		ptr = obim + READ_BE_UINT32(&((ImageHeader*)obim)->size);
+ 		cdhd = (CodeHeader*)findResource(MKID('CDHD'), obim, 0);
+ 		imhd = (ImageHeader*)findResource(MKID('IMHD'), ptr, 0);
+ 	} else {
+ 		ensureResourceLoaded(1, room);
+ 		roomptr = getResourceAddress(1, room);
+ 		rmhd = (RoomHeader*)findResource(MKID('RMHD'), roomptr, 0);
+ 
+ 		numobj = READ_LE_UINT16(&rmhd->numObjects);
+ 		for(i=0; ;i++) {
+ 			if (i>=numobj)
+ 				error("setCursorImg: object %d code not found in room %d", img, room);
+ 			
+ 			obcd = findResource(MKID('OBCD'), roomptr, i);
+ 			if (obcd==NULL)
+ 				error("setCursorImg: not enough code blocks in room %d", room);
+ 			cdhd = (CodeHeader*)findResource(MKID('CDHD'), obcd, 0);
+ 			if (READ_LE_UINT16(&cdhd->obj_id) == img)
+ 				break;
+ 		}
+ 
+ 		for(i=0; ;i++) {
+ 			if (i>=numobj)
+ 				error("setCursorImg: object %d image not found in room %d", img, room);
+ 			obim = findResource(MKID('OBIM'), roomptr, i);
+ 			if (obim==NULL)
+ 				error("setCursorImg: not enough image blocks in room %d", room);
+ 			imhd = (ImageHeader*)findResource(MKID('IMHD'), obim, 0);
+ 			if (READ_LE_UINT16(&imhd->obj_id) == img)
+ 				break;
+ 		}
+ 	}
+ 
+ 	setCursorHotspot2(
+ 		READ_LE_UINT16(&imhd->hotspot[0].x),
+ 		READ_LE_UINT16(&imhd->hotspot[0].y));
+ 
+ 	w = READ_LE_UINT16(&cdhd->v6.w)>>3;
+ 	h = READ_LE_UINT16(&cdhd->v6.h)>>3;
+ 
+ 	size = READ_BE_UINT32(&cdhd->size);
+ 	if (size > 1000)
+ 		error("setCursorImg: Cursor image too large");
+ 	
+ 	dataptr = findResource(MKID('IM01'),obim, 0);
+ 
+ 	if ((bomp = findResource(MKID('BOMP'), dataptr, 0)) != NULL)
+ 		useBompCursor(bomp, w, h);
+ 	else
+ 		useIm01Cursor(dataptr, w, h);
+ 
  }

Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/resource.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** resource.cpp	2001/11/05 19:21:49	1.9
--- resource.cpp	2001/11/06 20:00:47	1.10
***************
*** 16,52 ****
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * Change Log:
!  * $Log$
!  * Revision 1.9  2001/11/05 19:21:49  strigeus
!  * bug fixes,
!  * speech in dott
!  *
!  * Revision 1.8  2001/10/29 21:49:25  strigeus
!  * fixed bug in validateResource
!  *
!  * Revision 1.7  2001/10/26 17:34:50  strigeus
!  * bug fixes, code cleanup
!  *
!  * Revision 1.6  2001/10/24 20:12:52  strigeus
!  * fixed some bugs related to string handling
!  *
!  * Revision 1.5  2001/10/23 19:51:50  strigeus
!  * recompile not needed when switching games
!  * debugger skeleton implemented
!  *
!  * Revision 1.4  2001/10/16 12:20:20  strigeus
!  * made files compile on unix
!  *
!  * Revision 1.3  2001/10/16 10:01:47  strigeus
!  * preliminary DOTT support
!  *
!  * Revision 1.2  2001/10/10 10:02:33  strigeus
!  * alternative mouse cursor
!  * basic save&load
!  *
!  * Revision 1.1.1.1  2001/10/09 14:30:14  strigeus
!  *
!  * initial revision
!  *
   *
   */
--- 16,20 ----
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * $Header$
   *
   */

Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saveload.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** saveload.cpp	2001/11/05 19:21:49	1.7
--- saveload.cpp	2001/11/06 20:00:47	1.8
***************
*** 16,46 ****
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * Change Log:
!  * $Log$
!  * Revision 1.7  2001/11/05 19:21:49  strigeus
!  * bug fixes,
!  * speech in dott
!  *
!  * Revision 1.6  2001/10/26 17:34:50  strigeus
!  * bug fixes, code cleanup
!  *
!  * Revision 1.5  2001/10/18 20:04:58  strigeus
!  * flags were not saved properly
!  *
!  * Revision 1.4  2001/10/17 10:07:39  strigeus
!  * fixed verbs not saved in non dott games,
!  * implemented a screen effect
!  *
!  * Revision 1.3  2001/10/16 10:01:47  strigeus
!  * preliminary DOTT support
!  *
!  * Revision 1.2  2001/10/10 10:02:33  strigeus
!  * alternative mouse cursor
!  * basic save&load
!  *
!  * Revision 1.1.1.1  2001/10/09 14:30:13  strigeus
!  *
!  * initial revision
!  *
   *
   */
--- 16,20 ----
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * $Header$
   *
   */
***************
*** 157,162 ****
  		MKLINE(ObjectData,offs_obim_to_room,sleUint32),
  		MKLINE(ObjectData,offs_obcd_to_room,sleUint32),
! 		MKLINE(ObjectData,cdhd_10,sleUint16),
! 		MKLINE(ObjectData,cdhd_12,sleUint16),
  		MKLINE(ObjectData,obj_nr,sleUint16),
  		MKLINE(ObjectData,x_pos,sleInt16),
--- 131,136 ----
  		MKLINE(ObjectData,offs_obim_to_room,sleUint32),
  		MKLINE(ObjectData,offs_obcd_to_room,sleUint32),
! 		MKLINE(ObjectData,walk_x,sleUint16),
! 		MKLINE(ObjectData,walk_y,sleUint16),
  		MKLINE(ObjectData,obj_nr,sleUint16),
  		MKLINE(ObjectData,x_pos,sleInt16),

Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** script.cpp	2001/11/05 19:21:49	1.6
--- script.cpp	2001/11/06 20:00:47	1.7
***************
*** 16,42 ****
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * Change Log:
!  * $Log$
!  * Revision 1.6  2001/11/05 19:21:49  strigeus
!  * bug fixes,
!  * speech in dott
!  *
!  * Revision 1.5  2001/10/26 17:34:50  strigeus
!  * bug fixes, code cleanup
!  *
!  * Revision 1.4  2001/10/23 19:51:50  strigeus
!  * recompile not needed when switching games
!  * debugger skeleton implemented
!  *
!  * Revision 1.3  2001/10/16 10:01:47  strigeus
!  * preliminary DOTT support
!  *
!  * Revision 1.2  2001/10/11 13:36:25  strigeus
!  * fixed swapped parameters in o_walkActorToActor
!  *
!  * Revision 1.1.1.1  2001/10/09 14:30:13  strigeus
!  *
!  * initial revision
!  *
   *
   */
--- 16,20 ----
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * $Header$
   *
   */

Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v1.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** script_v1.cpp	2001/11/05 19:21:49	1.6
--- script_v1.cpp	2001/11/06 20:00:47	1.7
***************
*** 16,40 ****
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * Change Log:
!  * $Log$
!  * Revision 1.6  2001/11/05 19:21:49  strigeus
!  * bug fixes,
!  * speech in dott
!  *
!  * Revision 1.5  2001/10/29 22:09:20  strigeus
!  * script invoked loading&saving in compatible mode
!  *
!  * Revision 1.4  2001/10/26 17:34:50  strigeus
!  * bug fixes, code cleanup
!  *
!  * Revision 1.3  2001/10/23 19:51:50  strigeus
!  * recompile not needed when switching games
!  * debugger skeleton implemented
!  *
!  * Revision 1.2  2001/10/16 20:31:27  strigeus
!  * misc fixes
!  *
!  * Revision 1.1  2001/10/16 10:01:47  strigeus
!  * preliminary DOTT support
   *
   */
--- 16,20 ----
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * $Header$
   *
   */
***************
*** 738,744 ****
  	od = &_objs[index];
  	if (_xPos!=0xFF) {
! 		od->cdhd_10 += (_xPos - od->x_pos)<<3;
  		od->x_pos = _xPos;
! 		od->cdhd_12 += (_yPos - od->y_pos)<<3;
  		od->y_pos = _yPos;
  	}
--- 718,724 ----
  	od = &_objs[index];
  	if (_xPos!=0xFF) {
! 		od->walk_x += (_xPos - od->x_pos)<<3;
  		od->x_pos = _xPos;
! 		od->walk_y += (_yPos - od->y_pos)<<3;
  		od->y_pos = _yPos;
  	}

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v2.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** script_v2.cpp	2001/11/05 19:21:49	1.5
--- script_v2.cpp	2001/11/06 20:00:47	1.6
***************
*** 16,37 ****
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * Change Log:
!  * $Log$
!  * Revision 1.5  2001/11/05 19:21:49  strigeus
!  * bug fixes,
!  * speech in dott
!  *
!  * Revision 1.4  2001/10/26 17:34:50  strigeus
!  * bug fixes, code cleanup
!  *
!  * Revision 1.3  2001/10/24 20:12:52  strigeus
!  * fixed some bugs related to string handling
!  *
!  * Revision 1.2  2001/10/23 19:51:50  strigeus
!  * recompile not needed when switching games
!  * debugger skeleton implemented
!  *
!  * Revision 1.1  2001/10/16 10:01:47  strigeus
!  * preliminary DOTT support
   *
   */
--- 16,20 ----
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * $Header$
   *
   */
***************
*** 744,748 ****
  		break;
  	case 0xD6:
! 		new_unk_1(pop());
  		break;
  	}
--- 727,731 ----
  		break;
  	case 0xD6:
! 		makeCursorColorTransparent(pop());
  		break;
  	}
***************
*** 2014,2018 ****
  		break;
  	case 4:
! 		unkMiscOp4(args[1], args[2], args[3], args[4]);
  		break;
  	case 5:
--- 1997,2001 ----
  		break;
  	case 4:
! 		grabCursor(args[1], args[2], args[3], args[4]);
  		break;
  	case 5:

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** scumm.h	2001/11/05 20:45:07	1.17
--- scumm.h	2001/11/06 20:00:47	1.18
***************
*** 16,76 ****
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * Change Log:
!  * $Log$
!  * Revision 1.17  2001/11/05 20:45:07  strigeus
!  * fixed playSfxSound types
!  *
!  * Revision 1.16  2001/11/05 19:21:49  strigeus
!  * bug fixes,
!  * speech in dott
!  *
!  * Revision 1.15  2001/10/29 23:07:24  strigeus
!  * better MI1 compatibility
!  *
!  * Revision 1.14  2001/10/26 17:34:50  strigeus
!  * bug fixes, code cleanup
!  *
!  * Revision 1.13  2001/10/24 20:12:52  strigeus
!  * fixed some bugs related to string handling
!  *
!  * Revision 1.12  2001/10/23 19:51:50  strigeus
!  * recompile not needed when switching games
!  * debugger skeleton implemented
!  *
!  * Revision 1.11  2001/10/17 10:07:40  strigeus
!  * fixed verbs not saved in non dott games,
!  * implemented a screen effect
!  *
!  * Revision 1.10  2001/10/17 07:12:37  strigeus
!  * fixed nasty signed/unsigned bug
!  *
!  * Revision 1.9  2001/10/16 20:31:27  strigeus
!  * misc fixes
!  *
!  * Revision 1.8  2001/10/16 10:01:47  strigeus
!  * preliminary DOTT support
!  *
!  * Revision 1.7  2001/10/11 12:07:35  strigeus
!  * Determine caption from file name.
!  *
!  * Revision 1.6  2001/10/11 08:00:42  strigeus
!  * Dump scripts by using DUMP_SCRIPTS as a compile option instead.
!  *
!  * Revision 1.5  2001/10/10 10:02:33  strigeus
!  * alternative mouse cursor
!  * basic save&load
!  *
!  * Revision 1.4  2001/10/09 19:02:28  strigeus
!  * command line parameter support
!  *
!  * Revision 1.3  2001/10/09 18:35:02  strigeus
!  * fixed object parent bug
!  * fixed some signed/unsigned comparisons
!  *
!  * Revision 1.2  2001/10/09 17:38:20  strigeus
!  * Autodetection of endianness.
!  *
!  * Revision 1.1.1.1  2001/10/09 14:30:12  strigeus
!  * initial revision
   *
   */
--- 16,20 ----
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * $Header$
   *
   */
***************
*** 188,192 ****
  	uint32 offs_obim_to_room;
  	uint32 offs_obcd_to_room;
! 	uint16 cdhd_10, cdhd_12;
  	uint16 obj_nr;
  	int16 x_pos;
--- 132,136 ----
  	uint32 offs_obim_to_room;
  	uint32 offs_obcd_to_room;
! 	uint16 walk_x, walk_y;
  	uint16 obj_nr;
  	int16 x_pos;
***************
*** 218,223 ****
  			byte flags;
  			byte parent;
! 			uint16 unk2;
! 			uint16 unk3;
  			byte actordir;
  		} v5;
--- 162,167 ----
  			byte flags;
  			byte parent;
! 			uint16 walk_x;
! 			uint16 walk_y;
  			byte actordir;
  		} v5;
***************
*** 227,232 ****
  			uint16 w,h;
  			byte flags, parent;
  			uint16 unk2;
- 			uint16 unk3;
  			byte actordir;
  		} v6;
--- 171,176 ----
  			uint16 w,h;
  			byte flags, parent;
+ 			uint16 unk1;
  			uint16 unk2;
  			byte actordir;
  		} v6;
***************
*** 743,746 ****
--- 687,692 ----
  	uint32 _minHeapThreshold;
  	
+ 	bool _fullScreen;
+ 
  	byte _bkColor;
  	uint16 _lastXstart;
***************
*** 751,754 ****
--- 697,705 ----
  	int16 _virtual_mouse_x, _virtual_mouse_y;
  
+ 	int _cursorHotspotX, _cursorHotspotY;
+ 	int _cursorWidth, _cursorHeight;
+ 	byte _cursorAnimateIndex;
+ 	bool _cursorAnimate;
+ 
  	byte _charsetColor;
  
***************
*** 929,933 ****
  	int _boxMatrixItem;
  
! //	void _grabbedCursor[1024];
  	
  	OpcodeProc getOpcode(int i) { return _opcodes[i]; }
--- 880,884 ----
  	int _boxMatrixItem;
  
! 	byte _grabbedCursor[1024];
  	
  	OpcodeProc getOpcode(int i) { return _opcodes[i]; }
***************
*** 1451,1455 ****
  	void walkActorTo(Actor *a, int x, int y, int direction);
  
! 	void setCursorImg(int cursor, int img);
  	void setCursorHotspot(int cursor, int x, int y);
  	void initCharset(int charset);
--- 1402,1406 ----
  	void walkActorTo(Actor *a, int x, int y, int direction);
  
! 	void setCursorImg(uint cursor, uint img);
  	void setCursorHotspot(int cursor, int x, int y);
  	void initCharset(int charset);
***************
*** 1461,1465 ****
  	void setBoxScale(int box, int b);
  	void createBoxMatrix();
! 	void addObjectToInventory(int obj, int room);
  	void removeObjectFromRoom(int obj);
  	void decodeParseString();
--- 1412,1416 ----
  	void setBoxScale(int box, int b);
  	void createBoxMatrix();
! 	void addObjectToInventory(uint obj, uint room);
  	void removeObjectFromRoom(int obj);
  	void decodeParseString();
***************
*** 1481,1485 ****
  	void clearOwnerOf(int obj);
  	void runVerbCode(int script, int entry, int a, int b, int16 *vars);
! 	void setVerbObject(int room, int object, int verb);
  	void unkMessage1();
  	void unkMessage2();
--- 1432,1436 ----
  	void clearOwnerOf(int obj);
  	void runVerbCode(int script, int entry, int a, int b, int16 *vars);
! 	void setVerbObject(uint room, uint object, uint verb);
  	void unkMessage1();
  	void unkMessage2();
***************
*** 1550,1554 ****
  	void setCursorHotspot2(int x,int y);
  
! 	void new_unk_1(int a);
  
  	void faceActorToObj(int act, int obj);
--- 1501,1505 ----
  	void setCursorHotspot2(int x,int y);
  
! 	void makeCursorColorTransparent(int a);
  
  	void faceActorToObj(int act, int obj);
***************
*** 1591,1595 ****
  	int defineArray(int a, int b, int c, int d);
  	int getDistanceBetween(bool is_obj_1, int b, int c, bool is_obj_2, int e, int f);
! 	void unkMiscOp4(int a, int b, int c, int d);
  	void unkMiscOp9();
  	void startManiac();
--- 1542,1546 ----
  	int defineArray(int a, int b, int c, int d);
  	int getDistanceBetween(bool is_obj_1, int b, int c, bool is_obj_2, int e, int f);
! 	void grabCursor(int x, int y, int w, int h);
  	void unkMiscOp9();
  	void startManiac();
***************
*** 1614,1617 ****
--- 1565,1577 ----
  	void freeResources();
  	void destroy();
+ 
+ 	void useIm01Cursor(byte *im, int w, int h);
+ 	void useBompCursor(byte *im, int w, int h);
+ 
+ 	void decompressBomp(byte *dst, byte *src, int w, int h);
+ 
+ 	void setupCursor() { _cursorAnimate = true; }
+ 
+ 	void decompressDefaultCursor(int index);
  };
  
***************
*** 1687,1694 ****
  void CDECL debug(int level, const char *s, ...);
  void checkHeap();
! void initGraphics(Scumm *s);
  void updateScreen(Scumm *s);
  
  void drawMouse(Scumm *s, int x, int y, int color, byte *mask, bool visible);
  void blit(byte *dst, byte *src, int w, int h);
  byte *findResource(uint32 id, byte *searchin, int index);
--- 1647,1655 ----
  void CDECL debug(int level, const char *s, ...);
  void checkHeap();
! void initGraphics(Scumm *s, bool fullScreen);
  void updateScreen(Scumm *s);
  
  void drawMouse(Scumm *s, int x, int y, int color, byte *mask, bool visible);
+ void drawMouse(Scumm *s, int x, int y, int w, int h, byte *buf, bool visible);
  void blit(byte *dst, byte *src, int w, int h);
  byte *findResource(uint32 id, byte *searchin, int index);

Index: scummsys.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummsys.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** scummsys.h	2001/11/06 10:34:48	1.8
--- scummsys.h	2001/11/06 20:00:47	1.9
***************
*** 16,49 ****
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * Change Log:
!  * $Log$
!  * Revision 1.8  2001/11/06 10:34:48  cmatsuoka
!  * Added missing missing/sys files.
!  *
!  * Revision 1.7  2001/11/05 19:21:49  strigeus
!  * bug fixes,
!  * speech in dott
!  *
!  * Revision 1.6  2001/11/03 06:33:29  cmatsuoka
!  * Protecting VC++-specific pragmas with ifdef _MSC_VER to allow
!  * a clean Cygwin build.
!  *
!  * Revision 1.5  2001/10/23 19:51:50  strigeus
!  * recompile not needed when switching games
!  * debugger skeleton implemented
!  *
!  * Revision 1.4  2001/10/16 10:01:47  strigeus
!  * preliminary DOTT support
!  *
!  * Revision 1.3  2001/10/09 18:35:02  strigeus
!  * fixed object parent bug
!  * fixed some signed/unsigned comparisons
!  *
!  * Revision 1.2  2001/10/09 17:38:20  strigeus
!  * Autodetection of endianness.
!  *
!  * Revision 1.1.1.1  2001/10/09 14:30:14  strigeus
!  * initial revision
!  *
   *
   */
--- 16,20 ----
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * $Header$
   *
   */
***************
*** 132,145 ****
  
  #if defined(SCUMM_NEED_ALIGNMENT)
! 	int FORCEINLINE READ_LE_UINT16(void *ptr) {
  		return (((byte*)ptr)[1]<<8)|((byte*)ptr)[0];
  	}
  #else
! 	int FORCEINLINE READ_LE_UINT16(void *ptr) {
  		return *(uint16*)(ptr);
  	}
  #endif
  
! int FORCEINLINE READ_BE_UINT16(void *ptr) {
  	return (((byte*)ptr)[0]<<8)|((byte*)ptr)[1];
  }
--- 103,116 ----
  
  #if defined(SCUMM_NEED_ALIGNMENT)
! 	uint FORCEINLINE READ_LE_UINT16(void *ptr) {
  		return (((byte*)ptr)[1]<<8)|((byte*)ptr)[0];
  	}
  #else
! 	uint FORCEINLINE READ_LE_UINT16(void *ptr) {
  		return *(uint16*)(ptr);
  	}
  #endif
  
! uint FORCEINLINE READ_BE_UINT16(void *ptr) {
  	return (((byte*)ptr)[0]<<8)|((byte*)ptr)[1];
  }
***************
*** 198,211 ****
  }
  
! int FORCEINLINE READ_LE_UINT16(void *ptr) {
  	byte *b = (byte*)ptr;
  	return (b[1]<<8) + b[0];
  }
  
! int FORCEINLINE READ_BE_UINT16(void *ptr) {
  	return *(uint16*)(ptr);
  }
  
! int FORCEINLINE READ_BE_UINT16_UNALIGNED(void *ptr) {
  	return (((byte*)ptr)[0]<<8)|((byte*)ptr)[1];
  }
--- 169,182 ----
  }
  
! uint FORCEINLINE READ_LE_UINT16(void *ptr) {
  	byte *b = (byte*)ptr;
  	return (b[1]<<8) + b[0];
  }
  
! uint FORCEINLINE READ_BE_UINT16(void *ptr) {
  	return *(uint16*)(ptr);
  }
  
! uint FORCEINLINE READ_BE_UINT16_UNALIGNED(void *ptr) {
  	return (((byte*)ptr)[0]<<8)|((byte*)ptr)[1];
  }

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** scummvm.cpp	2001/11/05 19:21:49	1.15
--- scummvm.cpp	2001/11/06 20:00:47	1.16
***************
*** 16,72 ****
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * Change Log:
!  * $Log$
!  * Revision 1.15  2001/11/05 19:21:49  strigeus
!  * bug fixes,
!  * speech in dott
!  *
!  * Revision 1.14  2001/10/29 23:07:24  strigeus
!  * better MI1 compatibility
!  *
!  * Revision 1.13  2001/10/26 17:34:50  strigeus
!  * bug fixes, code cleanup
!  *
!  * Revision 1.12  2001/10/24 20:12:52  strigeus
!  * fixed some bugs related to string handling
!  *
!  * Revision 1.11  2001/10/23 19:51:50  strigeus
!  * recompile not needed when switching games
!  * debugger skeleton implemented
!  *
!  * Revision 1.10  2001/10/17 10:07:40  strigeus
!  * fixed verbs not saved in non dott games,
!  * implemented a screen effect
!  *
!  * Revision 1.9  2001/10/16 20:31:27  strigeus
!  * misc fixes
!  *
!  * Revision 1.8  2001/10/16 12:20:22  strigeus
!  * made files compile on unix
!  *
!  * Revision 1.7  2001/10/16 10:01:48  strigeus
!  * preliminary DOTT support
!  *
!  * Revision 1.6  2001/10/11 11:49:51  strigeus
!  * Determine caption from file name.
!  *
!  * Revision 1.5  2001/10/10 16:29:59  strigeus
!  * temporary fix to prevent freeze in stan's room until sound is there
!  *
!  * Revision 1.4  2001/10/10 10:02:33  strigeus
!  * alternative mouse cursor
!  * basic save&load
!  *
!  * Revision 1.3  2001/10/09 19:02:28  strigeus
!  * command line parameter support
!  *
!  * Revision 1.2  2001/10/09 18:35:02  strigeus
!  * fixed object parent bug
!  * fixed some signed/unsigned comparisons
!  *
!  * Revision 1.1.1.1  2001/10/09 14:30:13  strigeus
!  *
!  * initial revision
!  *
   *
   */
--- 16,20 ----
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * $Header$
   *
   */
***************
*** 131,135 ****
  
  	setShake(0);
! 	setCursor(0);
  
  	for (i=1,a=getFirstActor(); ++a,i<13; i++) {
--- 79,83 ----
  
  	setShake(0);
! 	setupCursor();
  
  	for (i=1,a=getFirstActor(); ++a,i<13; i++) {
***************
*** 277,281 ****
  	}
  
! 	initGraphics(this);
  
  	if (_majorScummVersion==6)
--- 225,229 ----
  	}
  
! 	initGraphics(this, _fullScreen);
  
  	if (_majorScummVersion==6)
***************
*** 447,450 ****
--- 395,401 ----
  					_bootParam = atoi(s+1);
  					goto NextArg;
+ 				case 'f':
+ 					_fullScreen = true;
+ 					break;
  				default:
  ShowHelpAndExit:;
***************
*** 454,458 ****
  						"\tscummvm [-b<num>] game\n"
  						"Flags:\n"
! 						"\tb<num> - start in that room\n");
  					exit(1);
  				}
--- 405,410 ----
  						"\tscummvm [-b<num>] game\n"
  						"Flags:\n"
! 						"\tb<num> - start in that room\n"
! 						"\tf - fullscreen mode\n");
  					exit(1);
  				}
***************
*** 909,918 ****
  }
  
! void Scumm::new_unk_1(int a) {
! 	warning("stub new_unk_1(%d)", a);
! }
  
! void Scumm::setCursorHotspot2(int x,int y) {
! 	warning("stub setCursorHotspot2(%d,%d)", x,y);
  }
  
--- 861,872 ----
  }
  
! void Scumm::makeCursorColorTransparent(int a) {
! 	int i,size;
  
! 	size = _cursorWidth * _cursorHeight;
! 
! 	for(i=0; i<size; i++)
! 		if (_grabbedCursor[i] == (byte)a)
! 			_grabbedCursor[i] = 0xFF;
  }
  

Index: scummvm.dsp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.dsp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** scummvm.dsp	2001/11/05 19:24:43	1.10
--- scummvm.dsp	2001/11/06 20:00:47	1.11
***************
*** 43,47 ****
  # PROP Target_Dir ""
  # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
! # ADD CPP /nologo /Zp4 /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
  # ADD BASE RSC /l 0x41d /d "NDEBUG"
  # ADD RSC /l 0x41d /d "NDEBUG"
--- 43,47 ----
  # PROP Target_Dir ""
  # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
! # ADD CPP /nologo /Zp4 /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "DUMP_SCRIPTS" /Yu"stdafx.h" /FD /c
  # ADD BASE RSC /l 0x41d /d "NDEBUG"
  # ADD RSC /l 0x41d /d "NDEBUG"
***************
*** 320,327 ****
  # Begin Source File
  
- SOURCE=.\fmopl.h
- # End Source File
- # Begin Source File
- 
  SOURCE=.\scumm.h
  # End Source File
--- 320,323 ----
***************
*** 329,336 ****
  
  SOURCE=.\scummsys.h
- # End Source File
- # Begin Source File
- 
- SOURCE=.\sound.h
  # End Source File
  # Begin Source File
--- 325,328 ----

Index: sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sdl.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** sdl.cpp	2001/11/06 07:47:01	1.15
--- sdl.cpp	2001/11/06 20:00:47	1.16
***************
*** 16,68 ****
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * Change Log:
!  * $Log$
!  * Revision 1.15  2001/11/06 07:47:01  strigeus
!  * fixed integer overflow for large sounds
!  *
!  * Revision 1.14  2001/11/05 20:45:07  strigeus
!  * fixed playSfxSound types
!  *
!  * Revision 1.13  2001/11/05 19:21:49  strigeus
!  * bug fixes,
!  * speech in dott
!  *
!  * Revision 1.12  2001/10/26 17:34:50  strigeus
!  * bug fixes, code cleanup
!  *
!  * Revision 1.11  2001/10/23 19:51:50  strigeus
!  * recompile not needed when switching games
!  * debugger skeleton implemented
!  *
!  * Revision 1.10  2001/10/17 11:30:19  strigeus
!  * *** empty log message ***
!  *
!  * Revision 1.9  2001/10/16 20:31:27  strigeus
!  * misc fixes
!  *
!  * Revision 1.8  2001/10/16 10:01:48  strigeus
!  * preliminary DOTT support
!  *
!  * Revision 1.7  2001/10/11 11:49:51  strigeus
!  * Determine caption from file name.
!  *
!  * Revision 1.6  2001/10/11 10:15:58  strigeus
!  * no SDL cursor
!  *
!  * Revision 1.5  2001/10/10 11:53:39  strigeus
!  * smoother mouse + bug fix
!  *
!  * Revision 1.4  2001/10/10 10:02:33  strigeus
!  * alternative mouse cursor
!  * basic save&load
!  *
!  * Revision 1.3  2001/10/09 19:02:28  strigeus
!  * command line parameter support
!  *
!  * Revision 1.2  2001/10/09 17:38:20  strigeus
!  * Autodetection of endianness.
!  *
!  * Revision 1.1.1.1  2001/10/09 14:30:13  strigeus
!  * initial revision
   *
   */
--- 16,20 ----
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * $Header$
   *
   */
***************
*** 193,199 ****
  
  int old_mouse_x, old_mouse_y;
  bool has_mouse,hide_mouse;
- byte old_backup[24*16*2];
  
  
  void addDirtyRect(int x, int y, int w, int h) {
--- 145,155 ----
  
  int old_mouse_x, old_mouse_y;
+ int old_mouse_h, old_mouse_w;
  bool has_mouse,hide_mouse;
  
+ #define BAK_WIDTH 40
+ #define BAK_HEIGHT 24
+ byte old_backup[BAK_WIDTH*BAK_HEIGHT*2];
+ 
  
  void addDirtyRect(int x, int y, int w, int h) {
***************
*** 298,301 ****
--- 254,360 ----
  }
  
+ void drawMouse(Scumm *s, int xdraw, int ydraw, int w, int h, byte *buf, bool visible) {
+ 	int x,y;
+ 	byte *dst,*bak;
+ 	byte color;
+ 
+ 	if (hide_mouse)
+ 		visible = false;
+ 
+ 	if (SDL_LockSurface(screen)==-1)
+ 		error("SDL_LockSurface failed: %s.\n", SDL_GetError());
+ 
+ #if defined(SCALEUP_2x2)
+ 
+ 	if (has_mouse) {
+ 		dst = (byte*)screen->pixels + old_mouse_y*640*2 + old_mouse_x*2;
+ 		bak = old_backup;
+ 
+ 		for (y=0; y<old_mouse_h; y++,bak+=BAK_WIDTH*2,dst+=640*2) {
+ 			if ( (uint)(old_mouse_y + y) < 200) {
+ 				for (x=0; x<old_mouse_w; x++) {
+ 					if ((uint)(old_mouse_x + x) < 320) {
+ 						dst[x*2+640] = dst[x*2] = bak[x*2];
+ 						dst[x*2+640+1] = dst[x*2+1] = bak[x*2+1];
+ 					}
+ 				}
+ 			}
+ 		}
+ 	}
+ 
+ 	if (visible) {
+ 		dst = (byte*)screen->pixels + ydraw*640*2 + xdraw*2;
+ 		bak = old_backup;
+ 
+ 		for (y=0; y<h; y++,dst+=640*2,bak+=BAK_WIDTH*2,buf+=w) {
+ 			if ((uint)(ydraw+y)<200) {
+ 				for (x=0; x<w; x++) {
+ 					if ((uint)(xdraw+x)<320) {
+ 						bak[x*2] = dst[x*2];
+ 						bak[x*2+1] = dst[x*2+1];
+ 						if ((color=buf[x])!=0xFF) {
+ 							dst[x*2] = color;
+ 							dst[x*2+1] = color;
+ 							dst[x*2+640] = color;
+ 							dst[x*2+1+640] = color;
+ 						}
+ 					}
+ 				}
+ 			}
+ 		}
+ 	}
+ #else
+ 	if (has_mouse) {
+ 		dst = (byte*)screen->pixels + old_mouse_y*320 + old_mouse_x;
+ 		bak = old_backup;
+ 
+ 		for (y=0; y<h; y++,bak+=BAK_WIDTH,dst+=320) {
+ 			if ( (uint)(old_mouse_y + y) < 200) {
+ 				for (x=0; x<w; x++) {
+ 					if ((uint)(old_mouse_x + x) < 320) {
+ 						dst[x] = bak[x];
+ 					}
+ 				}
+ 			}
+ 		}
+ 	}
+ 	if (visible) {
+ 		dst = (byte*)screen->pixels + ydraw*320 + xdraw;
+ 		bak = old_backup;
+ 
+ 		for (y=0; y<h; y++,dst+=320,bak+=BAK_WIDTH,buf+=w) {
+ 			if ((uint)(ydraw+y)<200) {
+ 				for (x=0; x<w; x++) {
+ 					if ((uint)(xdraw+x)<320) {
+ 						bak[x] = dst[x];
+ 						if ((color=buf[x])!=0xFF) {
+ 							dst[x] = color;
+ 						}
+ 					}
+ 				}
+ 			}
+ 		}
+ 	}
+ 
+ 
+ #endif	
+ 
+ 	SDL_UnlockSurface(screen);
+ 
+ 	if (has_mouse) {
+ 		has_mouse = false;
+ 		addDirtyRectClipped(old_mouse_x, old_mouse_y, old_mouse_w, old_mouse_h);
+ 	}
+ 
+ 	if (visible) {
+ 		has_mouse = true;
+ 		addDirtyRectClipped(xdraw, ydraw, w, h);
+ 		old_mouse_x = xdraw;
+ 		old_mouse_y = ydraw;
+ 		old_mouse_w = w;
+ 		old_mouse_h = h;
+ 	}
+ }
+ 
  void drawMouse(Scumm *s, int xdraw, int ydraw, int color, byte *mask, bool visible) {
  	int x,y;
***************
*** 469,473 ****
  }
  
! void initGraphics(Scumm *s) {
  	SDL_AudioSpec desired;
  
--- 528,532 ----
  }
  
! void initGraphics(Scumm *s, bool fullScreen) {
  	SDL_AudioSpec desired;
  
***************
*** 497,505 ****
  	SDL_ShowCursor(SDL_DISABLE);
  
- 
  #if !defined(SCALEUP_2x2)
! 	screen = SDL_SetVideoMode(320, 200, 8, SDL_SWSURFACE);
  #else
! 	screen = SDL_SetVideoMode(640, 400, 8, SDL_SWSURFACE);
  #endif
  
--- 556,563 ----
  	SDL_ShowCursor(SDL_DISABLE);
  
  #if !defined(SCALEUP_2x2)
! 	screen = SDL_SetVideoMode(320, 200, 8, fullScreen ? (SDL_SWSURFACE | SDL_FULLSCREEN) : SDL_SWSURFACE);
  #else
! 	screen = SDL_SetVideoMode(640, 400, 8, fullScreen ? (SDL_SWSURFACE | SDL_FULLSCREEN) : SDL_SWSURFACE);
  #endif
  

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** sound.cpp	2001/11/05 19:21:49	1.3
--- sound.cpp	2001/11/06 20:00:47	1.4
***************
*** 16,32 ****
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * Change Log:
!  * $Log$
!  * Revision 1.3  2001/11/05 19:21:49  strigeus
!  * bug fixes,
!  * speech in dott
!  *
!  * Revision 1.2  2001/10/16 10:01:48  strigeus
!  * preliminary DOTT support
!  *
!  * Revision 1.1.1.1  2001/10/09 14:30:13  strigeus
!  *
!  * initial revision
!  *
   *
   */
--- 16,20 ----
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * $Header$
   *
   */

Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/string.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** string.cpp	2001/11/05 19:21:49	1.6
--- string.cpp	2001/11/06 20:00:47	1.7
***************
*** 16,42 ****
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * Change Log:
!  * $Log$
!  * Revision 1.6  2001/11/05 19:21:49  strigeus
!  * bug fixes,
!  * speech in dott
!  *
!  * Revision 1.5  2001/10/26 17:34:50  strigeus
!  * bug fixes, code cleanup
!  *
!  * Revision 1.4  2001/10/24 20:12:52  strigeus
!  * fixed some bugs related to string handling
!  *
!  * Revision 1.3  2001/10/23 19:51:50  strigeus
!  * recompile not needed when switching games
!  * debugger skeleton implemented
!  *
!  * Revision 1.2  2001/10/16 10:01:48  strigeus
!  * preliminary DOTT support
!  *
!  * Revision 1.1.1.1  2001/10/09 14:30:13  strigeus
!  *
!  * initial revision
!  *
   *
   */
--- 16,20 ----
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * $Header$
   *
   */

Index: sys.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sys.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** sys.cpp	2001/11/05 19:21:49	1.3
--- sys.cpp	2001/11/06 20:00:47	1.4
***************
*** 16,33 ****
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * Change Log:
!  * $Log$
!  * Revision 1.3  2001/11/05 19:21:49  strigeus
!  * bug fixes,
!  * speech in dott
!  *
!  * Revision 1.2  2001/10/10 10:02:33  strigeus
!  * alternative mouse cursor
!  * basic save&load
!  *
!  * Revision 1.1.1.1  2001/10/09 14:30:13  strigeus
!  *
!  * initial revision
!  *
   *
   */
--- 16,20 ----
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * $Header$
   *
   */

Index: verbs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/verbs.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** verbs.cpp	2001/11/05 19:21:49	1.5
--- verbs.cpp	2001/11/06 20:00:47	1.6
***************
*** 16,38 ****
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * Change Log:
!  * $Log$
!  * Revision 1.5  2001/11/05 19:21:49  strigeus
!  * bug fixes,
!  * speech in dott
!  *
!  * Revision 1.4  2001/10/26 17:34:50  strigeus
!  * bug fixes, code cleanup
!  *
!  * Revision 1.3  2001/10/16 10:01:48  strigeus
!  * preliminary DOTT support
!  *
!  * Revision 1.2  2001/10/09 19:02:28  strigeus
!  * command line parameter support
!  *
!  * Revision 1.1.1.1  2001/10/09 14:30:13  strigeus
!  *
!  * initial revision
!  *
   *
   */
--- 16,20 ----
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
!  * $Header$
   *
   */
***************
*** 261,265 ****
  }
  
! void Scumm::setVerbObject(int room, int object, int verb) {
  	int numobj, i;
  	byte  *obimptr;
--- 243,247 ----
  }
  
! void Scumm::setVerbObject(uint room, uint object, uint verb) {
  	int numobj, i;
  	byte  *obimptr;

Index: windows.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/windows.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** windows.cpp	2001/11/06 07:47:00	1.11
--- windows.cpp	2001/11/06 20:00:47	1.12
***************
*** 18,21 ****
--- 18,26 ----
   * Change Log:
   * $Log$
+  * Revision 1.12  2001/11/06 20:00:47  strigeus
+  * full screen flag,
+  * better mouse cursors,
+  * removed change log from individual files
+  *
   * Revision 1.11  2001/11/06 07:47:00  strigeus
   * fixed integer overflow for large sounds
***************
*** 927,932 ****
  }
  
! void initGraphics(Scumm *s) {
! 
  }
  
--- 932,938 ----
  }
  
! void initGraphics(Scumm *s, bool fullScreen) {
! 	if(fullScreen)
! 		warning("Use SDL for fullscreen support");
  }
  





More information about the Scummvm-git-logs mailing list