[Scummvm-cvs-logs] CVS: scummvm/scumm costume.cpp,1.126.2.2,1.126.2.3 palette.cpp,2.4.2.1,2.4.2.2 script_v6.cpp,1.293.2.19,1.293.2.20

Travis Howell kirben at users.sourceforge.net
Thu Aug 12 18:53:25 CEST 2004


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

Modified Files:
      Tag: branch-0-6-0
	costume.cpp palette.cpp script_v6.cpp 
Log Message:

Back port:
V1 costume fixes
INSANE and smush support for PC FT demo


Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.cpp,v
retrieving revision 1.126.2.2
retrieving revision 1.126.2.3
diff -u -d -r1.126.2.2 -r1.126.2.3
--- costume.cpp	28 Jun 2004 09:25:28 -0000	1.126.2.2
+++ costume.cpp	13 Aug 2004 01:52:06 -0000	1.126.2.3
@@ -200,7 +200,7 @@
 	v1.scaleXstep = _mirror ? 1 : -1;
 
 	if (_vm->_version == 1)
-		//HACK: it fix gfx glitches left by actor costume in V1 games, when actor moving to left
+		// V1 games uses 8 x 8 pixels for actors
 		_vm->markRectAsDirty(kMainVirtScreen, rect.left, rect.right + 8, rect.top, rect.bottom, _actorID);
 	else
 		_vm->markRectAsDirty(kMainVirtScreen, rect.left, rect.right + 1, rect.top, rect.bottom, _actorID);
@@ -240,7 +240,11 @@
 				v1.x = _outwidth - 1;
 			}
 		} else {
-			skip = -1 - rect.left;
+			// V1 games uses 8 x 8 pixels for actors
+			if (_loaded._format == 0x57)
+				skip = -8 - rect.left;
+			else
+				skip = -1 - rect.left;
 			if (skip <= 0)
 				drawFlag = 2;
 			else
@@ -293,46 +297,6 @@
 	return drawFlag;
 }
 
-void CostumeRenderer::c64_ignorePakCols(int num) {
-
-	warning("c64_ignorePakCols(%d) - this needs testing", num);
-
-	// FIXME: A problem with this is that num can be a number
-	// not divisible by 8, e.g. c64_ignorePakCols(17) happens.
-	// We currently don't really deal with that. OTOH it seems
-	// in all cases the number was of the form 8n+1, e.g. 1, 9, 17
-	//
-	
-	uint height = _height;
-	num /= 8;
-
-	while (num > 0) {
-		v1.replen = *_srcptr++;
-		if (v1.replen & 0x80) {
-			v1.replen &= 0x7f;
-			v1.repcolor = *_srcptr++;
-			while (v1.replen--) {
-				if (!--height) {
-					if (!--num) {
-						v1.replen |= 0x80;
-						return;
-					}
-					height = _height;
-				}
-			}
-		} else {
-			while (v1.replen--) {
-				v1.repcolor = *_srcptr++;
-				if (!--height) {
-					if (!--num)
-						return;
-					height = _height;
-				}
-			}
-		}
-	}
-}
-
 static const int v1_mm_actor_palatte_1[25] = {
 	8, 8, 8, 8, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8
 };
@@ -397,7 +361,7 @@
 			if (!rep)
 				color = *src++;
 			
-			if (0 <= y && y < _outheight) {
+			if (0 <= y && y < _outheight && 0 <= v1.x && v1.x < _outwidth) {
 				if (!_mirror) {
 					LINE(0, 0); LINE(2, 2); LINE(4, 4); LINE(6, 6);
 				} else {

Index: palette.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/palette.cpp,v
retrieving revision 2.4.2.1
retrieving revision 2.4.2.2
diff -u -d -r2.4.2.1 -r2.4.2.2
--- palette.cpp	29 Jul 2004 10:01:48 -0000	2.4.2.1
+++ palette.cpp	13 Aug 2004 01:52:06 -0000	2.4.2.2
@@ -512,7 +512,7 @@
 		if (b > 255)
 			b = 255;
 
-		bestsum = (uint)-1;
+		bestsum = 32000;
 
 		r &= ~3;
 		g &= ~3;
@@ -572,7 +572,7 @@
 			b = 255;
 
 		searchPtr = palPtr + from * 3;
-		bestResult = (uint)-1;
+		bestResult = 32000;
 		currentIndex = (byte) from;
 
 		for (j = from; j <= to; j++) {

Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.293.2.19
retrieving revision 1.293.2.20
diff -u -d -r1.293.2.19 -r1.293.2.20
--- script_v6.cpp	24 Jul 2004 08:55:37 -0000	1.293.2.19
+++ script_v6.cpp	13 Aug 2004 01:52:06 -0000	1.293.2.20
@@ -2459,19 +2459,18 @@
 			break;
 		case 6: {
 				uint32 speed;
-				assert(getStringAddressVar(VAR_VIDEONAME));
-				if (strcmp((char *)getStringAddressVar(VAR_VIDEONAME), "sq3.san") == 0) {
-					speed = 1000000 / 14;
-				} else {
-					if (_smushFrameRate == 0) 
-						_smushFrameRate = 14;
-					speed = 1000000 / _smushFrameRate;
-				}
+				if (_smushFrameRate == 0) 
+					_smushFrameRate = 14;
+				speed = 1000000 / _smushFrameRate;
 
 				debug(1, "INSANE Arg: %d %d", args[1], args[2]);
 
 				// INSANE mode 0: SMUSH movie playback
 				if (args[1] == 0) {
+					assert(getStringAddressVar(VAR_VIDEONAME));
+					if (strcmp((char *)getStringAddressVar(VAR_VIDEONAME), "sq3.san") == 0)
+						speed = 1000000 / 14;
+
 					SmushPlayer *sp = new SmushPlayer(this, speed);
 
 					// Correct incorrect smush filename in Macintosh FT demo





More information about the Scummvm-git-logs mailing list