[Scummvm-cvs-logs] CVS: scummvm stdafx.h,1.6,1.7 sdl.cpp,1.20,1.21 scummvm.cpp,1.23,1.24 scummsys.h,1.11,1.12 scumm.h,1.24,1.25 script_v2.cpp,1.8,1.9 resource.cpp,1.18,1.19 object.cpp,1.12,1.13 gfx.cpp,1.18,1.19 costume.cpp,1.8,1.9 actor.cpp,1.11,1.12

Ludvig Strigeus strigeus at users.sourceforge.net
Sun Nov 11 08:55:02 CET 2001


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

Modified Files:
	stdafx.h sdl.cpp scummvm.cpp scummsys.h scumm.h script_v2.cpp 
	resource.cpp object.cpp gfx.cpp costume.cpp actor.cpp 
Log Message:
implemented some sam&max specific features,
fixed some bugs

Index: stdafx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/stdafx.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** stdafx.h	2001/11/06 22:59:59	1.6
--- stdafx.h	2001/11/11 16:54:45	1.7
***************
*** 3,6 ****
--- 3,10 ----
   *
   * $Log$
+  * Revision 1.7  2001/11/11 16:54:45  strigeus
+  * implemented some sam&max specific features,
+  * fixed some bugs
+  *
   * Revision 1.6  2001/11/06 22:59:59  cmatsuoka
   * Re-added changes to allow cygwin and beos cross-compilation.
***************
*** 49,52 ****
--- 53,57 ----
  #include <assert.h>
  #include <mmsystem.h>
+ #include <ctype.h>
  
  #else

Index: sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sdl.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** sdl.cpp	2001/11/10 23:30:12	1.20
--- sdl.cpp	2001/11/11 16:54:45	1.21
***************
*** 107,111 ****
  				s->resourceStats();
  			}
! 			
  			break;
  		case SDL_MOUSEMOTION: {
--- 107,116 ----
  				s->resourceStats();
  			}
! 
! #if defined(__APPLE__)
! 			if (event.key.keysym.sym=='q' && event.key.keysym.mod&KMOD_LMETA) {
! 				exit(1);
! 			} 
! #endif
  			break;
  		case SDL_MOUSEMOTION: {
***************
*** 616,620 ****
--- 621,629 ----
  }
  
+ 
+ #if !defined(__APPLE__)
  #undef main
+ #endif
+ 
  int main(int argc, char* argv[]) {
  	int delta,tmp;

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** scummvm.cpp	2001/11/10 19:12:32	1.23
--- scummvm.cpp	2001/11/11 16:54:45	1.24
***************
*** 335,339 ****
--- 335,341 ----
  		gdi._cursorActive = _cursorState > 0;
  
+ 		drawEnqueuedObjects();
  		drawDirtyScreenParts();
+ 		removeEnqueuedObjects();
  
  		if (_majorScummVersion==5)

Index: scummsys.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummsys.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** scummsys.h	2001/11/07 18:17:20	1.11
--- scummsys.h	2001/11/11 16:54:45	1.12
***************
*** 20,34 ****
   */
  
- #if defined(WIN32)
- 
- /* Pragmas are VC++-specific */
  #if defined(_MSC_VER)
  #pragma warning (disable: 4244)
  #pragma warning (disable: 4101)
- #endif
  
  #define scumm_stricmp stricmp
  
- 
  #if defined(CHECK_HEAP)
  #undef CHECK_HEAP
--- 20,30 ----
   */
  
  #if defined(_MSC_VER)
+ 
  #pragma warning (disable: 4244)
  #pragma warning (disable: 4101)
  
  #define scumm_stricmp stricmp
  
  #if defined(CHECK_HEAP)
  #undef CHECK_HEAP
***************
*** 55,59 ****
  #define END_PACK_STRUCTS   pack(pop)
  
! #elif defined(UNIX)
  
  #define scumm_stricmp strcasecmp
--- 51,76 ----
  #define END_PACK_STRUCTS   pack(pop)
  
! #elif defined(__CYGWIN__)
! 
! #define scumm_stricmp stricmp
! #define CHECK_HEAP
! #define SCUMM_LITTLE_ENDIAN
! 
! #define FORCEINLINE inline
! #define NORETURN _declspec(noreturn)
! 
! typedef unsigned char byte;
! typedef unsigned char uint8;
! typedef unsigned short uint16;
! typedef unsigned long uint32;
! typedef unsigned int uint;
! typedef signed char int8;
! typedef signed short int16;
! typedef signed long int32;
! 
! #define START_PACK_STRUCTS pack (push,1)
! #define END_PACK_STRUCTS   pack(pop)
! 
! #elif (defined(UNIX) || defined(__APPLE__))
  
  #define scumm_stricmp strcasecmp

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** scumm.h	2001/11/10 20:51:55	1.24
--- scumm.h	2001/11/11 16:54:45	1.25
***************
*** 38,46 ****
  };
  
- struct AdjustBoxResult {
- 	int16 x,y;
- 	uint16 dist;
- };
- 
  #define SIZEOF_BOX 20
  struct Box { /* file format */
--- 38,41 ----
***************
*** 54,149 ****
  };
  
- struct VerbSlot {
- 	int16 x,y;
- 	int16 right, bottom;
- 	int16 oldleft, oldtop, oldright,oldbottom;
- 	uint8 verbid;
- 	uint8 color,hicolor,dimcolor,bkcolor,type;
- 	uint8 charset_nr,curmode;
- 	uint8 saveid;
- 	uint8 key;
- 	bool center;
- 	uint8 field_1B;
- 	uint16 imgindex;
- };
- 
- struct VirtScreen {
- 	int number;
- 	uint16 unk1;
- 	uint16 topline;
- 	uint16 width,height;
- 	uint16 size;
- 	byte alloctwobuffers;
- 	byte scrollable;
- 	uint16 xstart;
- 	byte tdirty[40];
- 	byte bdirty[40];
- };
- 
- struct ActorWalkData {
- 	int16 destx,desty;
- 	byte destbox;
- 	byte destdir;
- 	byte curbox;
- 	byte field_7;
- 	int16 x,y,newx,newy;
- 	int32 XYFactor, YXFactor;
- 	uint16 xfrac,yfrac;
- };
- 
- struct CostumeData {
- 	uint16 hdr;
- 	uint16 animCounter1;
- 	byte animCounter2;
- 	byte x_1;
- 	uint16 a[16], b[16], c[16], d[16];
- };
- 
- struct MouseCursor {
- 	int8 hotspot_x, hotspot_y;
- 	byte colors[4];
- 	byte data[32];
- };
- 
- struct ScriptSlot {
- 	uint32 offs;
- 	int32 delay;
- 	uint16 number;
- 	uint16 newfield;
- 	byte status;
- 	byte type;
- 	byte unk1,unk2,freezeCount,didexec;
- 	byte cutsceneOverride;
- 	byte unk5;
- };
- 
- struct NestedScript {
- 	uint16 number;
- 	uint8 type;
- 	uint8 slot;
- };
- 
  struct ResHeader {
  	uint32 size;
  };
  
- class ObjectData {
- public:
- 	uint32 offs_obim_to_room;
- 	uint32 offs_obcd_to_room;
- 	uint16 walk_x, walk_y;
- 	uint16 obj_nr;
- 	int16 x_pos;
- 	int16 y_pos;
- 	uint16 numstrips;
- 	uint16 height;
- 	byte actordir;
- 	byte parent;
- 	byte parentstate;
- 	byte ownerstate;
- 	byte fl_object_index;
- 	byte unk_3;
- };
- 
  struct RoomHeader {
  	uint32 tag, size;
--- 49,56 ----
***************
*** 152,155 ****
--- 59,68 ----
  };
  
+ struct BompHeader {
+ 	uint32 tag,size;
+ 	uint16 unk;
+ 	uint16 width,height;
+ };
+ 
  struct CodeHeader {
  	uint32 id;
***************
*** 193,196 ****
--- 106,161 ----
  #pragma END_PACK_STRUCTS
  
+ struct AdjustBoxResult {
+ 	int16 x,y;
+ 	uint16 dist;
+ };
+ 
+ struct VerbSlot {
+ 	int16 x,y;
+ 	int16 right, bottom;
+ 	int16 oldleft, oldtop, oldright,oldbottom;
+ 	uint8 verbid;
+ 	uint8 color,hicolor,dimcolor,bkcolor,type;
+ 	uint8 charset_nr,curmode;
+ 	uint8 saveid;
+ 	uint8 key;
+ 	bool center;
+ 	uint8 field_1B;
+ 	uint16 imgindex;
+ };
+ 
+ class ObjectData {
+ public:
+ 	uint32 offs_obim_to_room;
+ 	uint32 offs_obcd_to_room;
+ 	uint16 walk_x, walk_y;
+ 	uint16 obj_nr;
+ 	int16 x_pos;
+ 	int16 y_pos;
+ 	uint16 numstrips;
+ 	uint16 height;
+ 	byte actordir;
+ 	byte parent;
+ 	byte parentstate;
+ 	byte ownerstate;
+ 	byte fl_object_index;
+ 	byte unk_3;
+ };
+ 
+ struct CostumeData {
+ 	uint16 hdr;
+ 	uint16 animCounter1;
+ 	byte animCounter2;
+ 	byte x_1;
+ 	uint16 a[16], b[16], c[16], d[16];
+ };
+ 
+ struct EnqueuedObject {
+ 	uint16 a,b,c,d,e;
+ 	uint16 x,y;
+ 	uint16 width,height;
+ 	uint16 j,k,l;
+ };
+ 
  struct PathNode {
  	uint index;
***************
*** 203,207 ****
--- 168,219 ----
  };
  
+ struct VirtScreen {
+ 	int number;
+ 	uint16 unk1;
+ 	uint16 topline;
+ 	uint16 width,height;
+ 	uint16 size;
+ 	byte alloctwobuffers;
+ 	byte scrollable;
+ 	uint16 xstart;
+ 	byte tdirty[40];
+ 	byte bdirty[40];
+ };
+ 
+ struct ActorWalkData {
+ 	int16 destx,desty;
+ 	byte destbox;
+ 	byte destdir;
+ 	byte curbox;
+ 	byte field_7;
+ 	int16 x,y,newx,newy;
+ 	int32 XYFactor, YXFactor;
+ 	uint16 xfrac,yfrac;
+ };
+ 
+ struct MouseCursor {
+ 	int8 hotspot_x, hotspot_y;
+ 	byte colors[4];
+ 	byte data[32];
+ };
+ 
+ struct ScriptSlot {
+ 	uint32 offs;
+ 	int32 delay;
+ 	uint16 number;
+ 	uint16 newfield;
+ 	byte status;
+ 	byte type;
+ 	byte unk1,unk2,freezeCount,didexec;
+ 	byte cutsceneOverride;
+ 	byte unk5;
+ };
  
+ struct NestedScript {
+ 	uint16 number;
+ 	uint8 type;
+ 	uint8 slot;
+ };
+  
  enum {
  	sleByte = 1,
***************
*** 425,428 ****
--- 437,441 ----
  	void proc2();
  	void proc1();
+ 	void proc_special(byte code);
  	byte mainRoutine(Actor *a, int slot, int frame);
  	void ignorePakCols(int num);
***************
*** 454,458 ****
  	bool needRedraw, needBgReset,costumeNeedsInit,visible;
  	uint speedx,speedy;
! 	byte data8; /* unused */
  	byte animIndex;
  	byte walkbox;
--- 467,471 ----
  	bool needRedraw, needBgReset,costumeNeedsInit,visible;
  	uint speedx,speedy;
! 	byte data8;
  	byte animIndex;
  	byte walkbox;
***************
*** 844,847 ****
--- 857,865 ----
  	int16 _soundQue[0x100];
  
+ 	uint16 _enqueue_b,_enqueue_c,_enqueue_d,_enqueue_e;
+ 
+ 	int _enqueuePos; 
+ 	EnqueuedObject _enqueuedObjects[32];
+ 
  	byte _soundQue2Pos;
  	byte _soundQue2[10];
***************
*** 1589,1592 ****
--- 1607,1621 ----
  
  	void exitCutscene();
+ 	void nukeFlObjects(int min, int max);
+ 
+ 	void swapPalColors(int a, int b);
+ 
+ 	void enqueueObject(int a, int b, int c, int d, int e, int f, int g, int h);
+ 
+ 	void clearEnqueue() { _enqueuePos = 0; }
+ 	void drawEnqueuedObjects();
+ 	void drawEnqueuedObject(EnqueuedObject *eo);
+ 	void removeEnqueuedObjects();
+ 	void removeEnqueuedObject(EnqueuedObject *eo);
  };
  

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v2.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** script_v2.cpp	2001/11/10 19:12:32	1.8
--- script_v2.cpp	2001/11/11 16:54:45	1.9
***************
*** 1449,1453 ****
  		a->animProgress = 0;
  		break;
! 	case 98:
  		a->data8 = pop();
  		break;
--- 1449,1453 ----
  		a->animProgress = 0;
  		break;
! 	case 98: /* set data8 */
  		a->data8 = pop();
  		break;
***************
*** 1990,1993 ****
--- 1990,1994 ----
  	int16 args[30];
  	int i;
+ 	Actor *a;
  
  	getStackList(args,sizeof(args)/sizeof(args[0]));
***************
*** 2016,2019 ****
--- 2017,2102 ----
  		unkMiscOp9();
  		break;
+ 
+ 	case 124: /* samnmax */
+ 		warning("o6_miscOps: _saveSound=%d", args[1]);
+ 		break;
+ 
+ 	case 104: /* samnmax */
+ 		nukeFlObjects(args[2], args[3]);
+ 		break;
+ 	
+ 	case 106:
+ 		error("stub o6_miscOps_106()");
+ 		break;
+ 	
+ 	case 107: /* set actor scale */
+ 		a = derefActorSafe(args[1], "o6_miscops: 107");
+ 		a->scalex = args[2];
+ 		a->needBgReset = true;
+ 		a->needRedraw = true;
+ 		break;
+ 
+ 	case 108:
+ 	case 109:
+ 		error("stub o6_miscOps_108(%d,%d,%d,%d,%d,%d,%d)",
+ 			args[1], args[2], args[3], args[4], args[5],
+ 			0,256);
+ 		break;
+ 
+ 	case 110:
+ 		gdi.clearUpperMask();
+ 		break;
+ 
+ 	case 111:
+ 		a = derefActorSafe(args[1], "o6_miscops: 111");
+ 		a->data8 = args[2] + args[3];
+ 		break;
+ 
+ 	case 112:
+ 		error("stub o6_miscOps_112(%d,%d,%d,%d,%d,%d,%d)",
+ 			args[1], args[2], args[3], args[4], args[5],
+ 			args[6], args[7]);
+ 		break;
+ 
+ 	case 114: /* palette? */
+ 		error("stub o6_miscOps_114()");
+ 		break;
+ 			
+ 	case 117:
+ 		error("stub o6_miscOps_117()");
+ 		break;
+ 
+ 	case 118:
+ 		error("stub o6_miscOps_118(%d,%d,%d,%d,%d,%d,%d)",
+ 			args[1], args[2], args[3], args[4], args[5],
+ 			args[6], args[7]);
+ 		break;
+ 
+ 	case 119:
+ 		enqueueObject(args[1], args[2], args[3], args[4], args[5],
+ 			args[6], args[7], args[8]);
+ 		break;
+ 
+ 	case 120:
+ 		swapPalColors(args[1],args[2]);
+ 		break;
+ 
+ 	case 121:
+ 		error("stub o6_miscOps_121(%d)", args[1]);
+ 		break;
+ 
+ 	case 122:
+ 		error("stub o6_miscOps_122(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d)", 
+ 			args[1],args[2],args[3],args[4],
+ 			args[5],args[6],args[7],args[8],
+ 			args[9],args[10],args[11],args[12]);
+ 		break;
+ 
+ 	case 123:
+ 		error("stub o6_miscOps_123(%d,%d)", args[1], args[2]);
+ 		break;
+ 
+ 	default:
+ 		error("o6_miscOps: default case %d", args[0]);
  	}
  }

Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/resource.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** resource.cpp	2001/11/10 23:30:12	1.18
--- resource.cpp	2001/11/11 16:54:45	1.19
***************
*** 493,497 ****
  
  int Scumm::readSoundResource(int type, int index) {
! 	uint32 resStart, size, tag, size2;
  	byte *ptr;
  	int i;
--- 493,497 ----
  
  int Scumm::readSoundResource(int type, int index) {
! 	uint32 resStart, size, tag, size2, basetag;
  	byte *ptr;
  	int i;
***************
*** 501,507 ****
  	resStart = 0;
  
! 	fileReadDwordLE();
  	size = fileReadDwordBE();
  
  	while (size>resStart) {
  		tag = fileReadDword();
--- 501,514 ----
  	resStart = 0;
  
! 	basetag = fileReadDwordLE();
  	size = fileReadDwordBE();
  
+ #ifdef SAMNMAX
+ 	if (basetag == MKID('MIDI')) {
+ 		fileSeek(_fileHandle, -8, SEEK_CUR);
+ 		fileRead(_fileHandle,createResource(type, index, size+8), size+8);
+ 		return 1;
+ 	}
+ #else
  	while (size>resStart) {
  		tag = fileReadDword();
***************
*** 521,525 ****
  		fileSeek(_fileHandle, size2, SEEK_CUR);
  	}
! 
  	res.roomoffs[type][index] = 0xFFFFFFFF;
  	return 0;
--- 528,532 ----
  		fileSeek(_fileHandle, size2, SEEK_CUR);
  	}
! #endif
  	res.roomoffs[type][index] = 0xFFFFFFFF;
  	return 0;
***************
*** 627,630 ****
--- 634,639 ----
  byte *findResource(uint32 tag, byte *searchin, int index) {
  	uint32 maxsize,curpos,totalsize,size;
+ 
+ 	assert(searchin);
  
  	searchin += 4;

Index: object.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/object.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** object.cpp	2001/11/07 18:10:51	1.12
--- object.cpp	2001/11/11 16:54:45	1.13
***************
*** 139,143 ****
  			ptr += od->offs_obim_to_room;
  		}
! 
  		imhd = (ImageHeader*)findResource(MKID('IMHD'), ptr, 0);
  		x = od->x_pos*8 + (int16)READ_LE_UINT16(&imhd->hotspot[state].x);
--- 139,143 ----
  			ptr += od->offs_obim_to_room;
  		}
! 		assert(ptr);
  		imhd = (ImageHeader*)findResource(MKID('IMHD'), ptr, 0);
  		x = od->x_pos*8 + (int16)READ_LE_UINT16(&imhd->hotspot[state].x);
***************
*** 806,807 ****
--- 806,929 ----
  
  }
+ 
+ void Scumm::nukeFlObjects(int min, int max) {
+ 	ObjectData *od;
+ 	int i;
+ 
+ 	warning("nukeFlObjects(%d,%d)", min, max);
+ 
+ 	for (i=_numObjectsInRoom,od=_objs; --i>=0; od++)
+ 		if (od->fl_object_index && od->obj_nr>=min && od->obj_nr<=max) {
+ 			nukeResource(rtFlObject, od->fl_object_index);
+ 			od->obj_nr = 0;
+ 			od->fl_object_index = 0;
+ 		}
+ }
+ 
+ void Scumm::enqueueObject(int a, int b, int c, int d, int e, int f, int g, int h) {
+ 	EnqueuedObject *eo;
+ 	ObjectData *od;
+ 
+ 	if (_enqueuePos==sizeof(_enqueuedObjects)/sizeof(_enqueuedObjects[0]))
+ 		error("enqueueObject: overflow");
+ 
+ 	eo = &_enqueuedObjects[_enqueuePos++];
+ 	eo->a = a;
+ 	eo->b = _enqueue_b;
+ 	eo->c = _enqueue_c;
+ 	eo->d = _enqueue_d;
+ 	eo->e = _enqueue_e;
+ 	eo->x = b;
+ 	eo->y = c;
+ 	if (d==0) {
+ 		od = &_objs[getObjectIndex(a)];
+ 		eo->width = od->numstrips<<3;
+ 	} else {
+ 		eo->width = d;
+ 	}
+ 	if (e==0) {
+ 		od = &_objs[getObjectIndex(a)];
+ 		eo->height = od->height<<3;
+ 	} else {
+ 		eo->height = e;
+ 	}
+ 
+ 	eo->j = f;
+ 	eo->k = g;
+ 	eo->l = h;
+ }
+ 
+ void Scumm::drawEnqueuedObjects() {
+ 	EnqueuedObject *eo;
+ 	int i;
+ 
+ 	eo = _enqueuedObjects;
+ 	for(i=0; i < _enqueuePos; i++,eo++) {
+ 		drawEnqueuedObject(eo);
+ 	}
+ }
+ 
+ 
+ void Scumm::drawEnqueuedObject(EnqueuedObject *eo) {
+ 	VirtScreen *vs;
+ 	byte *roomptr,*bomp;
+ 	byte *ptr;
+ 	int index;
+ 	ObjectData *od;
+ 	int width,height;
+ 	byte *outptr;
+ 	int x,y;
+ 	byte *dataptr;
+ 
+ 	vs = &virtscr[0];
+ 
+ 	_lastXstart = vs->xstart;
+ 
+ 	if (eo->l==0) {
+ 		roomptr = getResourceAddress(1, _roomResource);
+ 		index = getObjectIndex(eo->a);
+ 		ptr = roomptr + _objs[index].offs_obim_to_room;
+ 	} else if (eo->a!=0) {
+ 		od = &_objs[getObjectIndex(eo->a)];
+ 		ptr = getResourceAddress(rtFlObject, od->fl_object_index);
+ 		ptr = findResource(MKID('OBIM'), ptr, 0);
+ 	} else {
+ 		warning("drawEnqueuedObject: invalid");
+ 		return;
+ 	}
+ 
+ 	ptr = findResource(MKID('IM01'), ptr, 0);
+ 	bomp = findResource(MKID('BOMP'), ptr, 0);
+ 
+ 	width = READ_LE_UINT16(&((BompHeader*)bomp)->width);
+ 	height = READ_LE_UINT16(&((BompHeader*)bomp)->height);
+ 
+ 	outptr = getResourceAddress(rtBuffer, vs->number+1) + vs->xstart;
+ 
+ 	x = eo->x;
+ 	y = eo->y;
+ 
+ 	if (eo->a) {
+ 		dataptr = bomp + 18;
+ 
+ 	}
+ 
+ 	updateDirtyRect(vs->number, x, x+width,y,y+height,0);
+ }
+ 
+ void Scumm::removeEnqueuedObjects() {
+ 	EnqueuedObject *eo;
+ 	int i;
+ 
+ 	eo = _enqueuedObjects;
+ 	for(i=0; i < _enqueuePos; i++,eo++) {
+ 		removeEnqueuedObject(eo);
+ 	}
+ 
+ 	clearEnqueue();
+ }
+ 
+ void Scumm::removeEnqueuedObject(EnqueuedObject *eo) {
+ 	restoreBG(eo->x, eo->y, eo->x + eo->width, eo->y + eo->height);
+ }
+ 

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gfx.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** gfx.cpp	2001/11/10 20:51:55	1.18
--- gfx.cpp	2001/11/11 16:54:45	1.19
***************
*** 581,584 ****
--- 581,586 ----
  	smap_ptr = findResource(MKID('SMAP'), ptr, 0);
  
+ 	assert(smap_ptr);
+ 
  	numzbuf = _disable_zbuffer ? 0 : _numZBuffer;
  
***************
*** 1586,1589 ****
--- 1588,1608 ----
  		nukeResource(rtTemp, 5);
  	}
+ }
+ 
+ void Scumm::swapPalColors(int a, int b) {
+ 	byte *ap,*bp;
+ 	byte t;
+ 
+ 	if ((uint)a>=256 || (uint)b>=256)
+ 		error("swapPalColors: invalid values, %d, %d", a, b);
+ 	
+ 	ap = &_currentPalette[a*3];
+ 	bp = &_currentPalette[b*3];
+ 
+ 	t=ap[0]; ap[0]=bp[0]; bp[0]=t;
+ 	t=ap[1]; ap[1]=bp[1]; bp[1]=t;
+ 	t=ap[2]; ap[2]=bp[2]; bp[2]=t;
+ 
+ 	setDirtyColors(a,b);
  }
  

Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/costume.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** costume.cpp	2001/11/06 20:00:47	1.8
--- costume.cpp	2001/11/11 16:54:45	1.9
***************
*** 293,296 ****
--- 293,301 ----
  	CHECK_HEAP
  
+ 	if (a->data8) {
+ 		proc_special(a->data8);
+ 		return b;
+ 	}
+ 
  	switch ((scaling<<2)|(masking<<1)|charsetmask) {
  	case 0: 
***************
*** 659,662 ****
--- 664,671 ----
  		} while (--len);
  	} while(1);
+ }
+ 
+ void CostumeRenderer::proc_special(byte code) {
+ 	warning("stub CostumeRenderer::proc_special(%d) not implemented");
  }
  

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/actor.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** actor.cpp	2001/11/10 19:12:32	1.11
--- actor.cpp	2001/11/11 16:54:45	1.12
***************
*** 51,54 ****
--- 51,55 ----
  	a->newDirection = 0;
  	a->moving = 0;
+ 	a->data8 = 0;
  
  	setActorWalkSpeed(a, 8, 2);





More information about the Scummvm-git-logs mailing list