[Scummvm-cvs-logs] CVS: scummvm/scumm script_v100he.cpp,2.187,2.188 script_v6.cpp,1.457,1.458 script_v90he.cpp,2.292,2.293 scumm-md5.h,2.159,2.160 sprite_he.cpp,1.156,1.157 wiz_he.cpp,2.106,2.107 wiz_he.h,2.35,2.36

kirben kirben at users.sourceforge.net
Mon Jan 16 01:21:03 CET 2006


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11263/scumm

Modified Files:
	script_v100he.cpp script_v6.cpp script_v90he.cpp scumm-md5.h 
	sprite_he.cpp wiz_he.cpp wiz_he.h 
Log Message:

Match sizes of original versions, to avoid possible overflows.


Index: script_v100he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v100he.cpp,v
retrieving revision 2.187
retrieving revision 2.188
diff -u -d -r2.187 -r2.188
--- script_v100he.cpp	15 Jan 2006 08:37:00 -0000	2.187
+++ script_v100he.cpp	16 Jan 2006 09:20:27 -0000	2.188
@@ -1681,7 +1681,7 @@
 		debug(0,"o100_startSound: case 83 (snd %d, var %d, value %d)", _heSndSoundId, var, value);
 		break;
 	case 92:
-		debug(0, "o100_startSound (ID %d, Offset %d, Channel %d, Flags %d)", _heSndSoundId, _heSndOffset, _heSndChannel, _heSndFlags);
+		debug(0, "o100_startSound: case 92 (ID %d, Offset %d, Channel %d, Flags %d)", _heSndSoundId, _heSndOffset, _heSndChannel, _heSndFlags);
 		_sound->addSoundToQueue(_heSndSoundId, _heSndOffset, _heSndChannel, _heSndFlags);
 		break;
 	case 128:
@@ -2441,7 +2441,7 @@
 	byte filename[4096];
 	int resId, state, type;
 	int32 w, h;
-	int16 x, y;
+	int32 x, y;
 
 	byte subOp = fetchScriptByte();
 	subOp -= 20;

Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.457
retrieving revision 1.458
diff -u -d -r1.457 -r1.458
--- script_v6.cpp	9 Jan 2006 11:01:35 -0000	1.457
+++ script_v6.cpp	16 Jan 2006 09:20:27 -0000	1.458
@@ -2260,7 +2260,7 @@
 void ScummEngine_v6::o6_isAnyOf() {
 	int list[100];
 	int num;
-	int16 val;
+	int32 val;
 
 	num = getStackList(list, ARRAYSIZE(list));
 	val = pop();

Index: script_v90he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
retrieving revision 2.292
retrieving revision 2.293
diff -u -d -r2.292 -r2.293
--- script_v90he.cpp	10 Jan 2006 21:39:13 -0000	2.292
+++ script_v90he.cpp	16 Jan 2006 09:20:27 -0000	2.293
@@ -1682,7 +1682,7 @@
 	byte filename[4096];
 	int state, resId;
 	int32 w, h;
-	int16 x, y;
+	int32 x, y;
 
 	byte subOp = fetchScriptByte();
 	subOp -= 30;
@@ -2621,7 +2621,7 @@
 		_wiz->_rectOverrideEnabled = false;
 		break;
 	case 714:
-		debug(0, "o90_kernelSetFunctions: case 714: type %d resId %d unk1 %d", args[1], args[2], args[3]);
+		debug(5, "o90_kernelSetFunctions: case 714: type %d resId %d unk1 %d", args[1], args[2], args[3]);
 		break;
 	case 1492:
 		// Remote start script function

Index: scumm-md5.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm-md5.h,v
retrieving revision 2.159
retrieving revision 2.160
diff -u -d -r2.159 -r2.160
--- scumm-md5.h	15 Jan 2006 23:02:52 -0000	2.159
+++ scumm-md5.h	16 Jan 2006 09:20:27 -0000	2.160
@@ -1,5 +1,5 @@
 /*
-  This file was generated by the md5table tool on Sun Jan 15 23:01:43 2006
+  This file was generated by the md5table tool on Mon Jan 16 00:58:35 2006
   DO NOT EDIT MANUALLY!
  */
 

Index: sprite_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sprite_he.cpp,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -d -r1.156 -r1.157
--- sprite_he.cpp	6 Nov 2005 11:29:08 -0000	1.156
+++ sprite_he.cpp	16 Jan 2006 09:20:27 -0000	1.157
@@ -43,7 +43,7 @@
 
 void Sprite::getSpriteBounds(int spriteId, bool checkGroup, Common::Rect &bound) {
 	checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d");
-	int16 spr_wiz_x, spr_wiz_y;
+	int32 spr_wiz_x, spr_wiz_y;
 	int angle, scale, x1, y1;
 	int32 w, h;
 
@@ -157,7 +157,7 @@
 
 			image = spi->curImage;
 			if (spi->maskImage) {
-				int16 x1, x2, y1, y2;
+				int32 x1, x2, y1, y2;
 
 				imageState = spi->curImageState % _vm->_wiz->getWizImageStates(spi->maskImage);
 
@@ -1233,7 +1233,7 @@
 
 void Sprite::processImages(bool arg) {
 	int spr_flags;
-	int16 spr_wiz_x, spr_wiz_y;
+	int32 spr_wiz_x, spr_wiz_y;
 	int image, imageState;
 	Common::Rect *bboxPtr;
 	int angle, scale;

Index: wiz_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/wiz_he.cpp,v
retrieving revision 2.106
retrieving revision 2.107
diff -u -d -r2.106 -r2.107
--- wiz_he.cpp	5 Nov 2005 13:05:52 -0000	2.106
+++ wiz_he.cpp	16 Jan 2006 09:20:27 -0000	2.107
@@ -1355,13 +1355,13 @@
 	_imagesNum = 0;
 }
 
-void Wiz::loadImgSpot(int resId, int state, int16 &x, int16 &y) {
+void Wiz::loadImgSpot(int resId, int state, int32 &x, int32 &y) {
 	uint8 *dataPtr = _vm->getResourceAddress(rtImage, resId);
 	assert(dataPtr);
 	uint8 *spotPtr = _vm->findWrappedBlock(MKID('SPOT'), dataPtr, state, 0);
 	if (spotPtr) {
-		x = (int16)READ_LE_UINT32(spotPtr + 0);
-		y = (int16)READ_LE_UINT32(spotPtr + 4);
+		x = READ_LE_UINT32(spotPtr + 0);
+		y = READ_LE_UINT32(spotPtr + 4);
 	} else {
 		x = 0;
 		y = 0;
@@ -1369,7 +1369,7 @@
 }
 
 void Wiz::loadWizCursor(int resId) {
-	int16 x, y;
+	int32 x, y;
 	loadImgSpot(resId, 0, x, y);
 	if (x < 0) {
 		x = 0;
@@ -1733,7 +1733,7 @@
 	char buf[512];
 	unsigned int i;
 
-	debug(0, "processWizImage: processMode %d", params->processMode);
+	debug(5, "processWizImage: processMode %d", params->processMode);
 	switch (params->processMode) {
 	case 0:
 		// Used in racedemo

Index: wiz_he.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/wiz_he.h,v
retrieving revision 2.35
retrieving revision 2.36
diff -u -d -r2.35 -r2.36
--- wiz_he.h	5 Nov 2005 13:05:52 -0000	2.35
+++ wiz_he.h	16 Jan 2006 09:20:27 -0000	2.36
@@ -175,7 +175,7 @@
 
 	void flushWizBuffer();
 
-	void loadImgSpot(int resId, int state, int16 &x, int16 &y);
+	void loadImgSpot(int resId, int state, int32 &x, int32 &y);
 	void loadWizCursor(int resId);
 
 	void displayWizComplexImage(const WizParameters *params);





More information about the Scummvm-git-logs mailing list