[Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.57,1.58 costume.cpp,1.42,1.43 costume.h,1.11,1.12

Max Horn fingolfin at users.sourceforge.net
Wed May 28 18:28:08 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv12129

Modified Files:
	akos.cpp costume.cpp costume.h 
Log Message:
cleanup

Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- akos.cpp	28 May 2003 22:13:30 -0000	1.57
+++ akos.cpp	29 May 2003 01:27:16 -0000	1.58
@@ -882,28 +882,22 @@
 
 void AkosRenderer::codec1_ignorePakCols(int num) {
 	int n;
-	byte repcolor;
-	byte replen;
-	const byte *src;
 
 	n = _height;
 	if (num > 1)
 		n *= num;
-	src = srcptr;
 	do {
-		repcolor = *src++;
-		replen = repcolor & v1.mask;
-		if (replen == 0) {
-			replen = *src++;
+		v1.repcolor = *srcptr++;
+		v1.replen = v1.repcolor & v1.mask;
+		if (v1.replen == 0) {
+			v1.replen = *srcptr++;
 		}
 		do {
 			if (!--n) {
-				v1.repcolor = repcolor >> v1.shr;
-				v1.replen = replen;
-				srcptr = src;
+				v1.repcolor >>= v1.shr;
 				return;
 			}
-		} while (--replen);
+		} while (--v1.replen);
 	} while (1);
 }
 
@@ -1056,51 +1050,18 @@
 		akos16.bits >>= (n);
 
 
-void AkosRenderer::akos16SkipData(int32 numskip) {
-	uint16 bits, tmp_bits;
-	
-	while (numskip != 0) {
-		if (akos16.unk5 == 0) {
-			AKOS16_FILL_BITS()
-			bits = akos16.bits & 3;
-			if (bits & 1) {
-				AKOS16_EAT_BITS(2)
-				if (bits & 2) {
-					tmp_bits = akos16.bits & 7;
-					AKOS16_EAT_BITS(3)
-					if (tmp_bits != 4) {
-						akos16.color += (tmp_bits - 4);
-					} else {
-						akos16.unk5 = 1;
-						AKOS16_FILL_BITS()
-						akos16.unk6 = (akos16.bits & 0xff) - 1;
-						AKOS16_EAT_BITS(8)
-						AKOS16_FILL_BITS()
-					}
-				} else {
-					AKOS16_FILL_BITS()
-					akos16.color = ((byte)akos16.bits) & akos16.mask;
-					AKOS16_EAT_BITS(akos16.shift)
-					AKOS16_FILL_BITS()
-				}
-			} else {
-				AKOS16_EAT_BITS(1);
-			}
-		} else {
-			if (--akos16.unk6 == 0) {
-				akos16.unk5 = 0;
-			}
-		}
-		numskip--;
-	}
+void AkosRenderer::akos16SkipData(int32 numbytes) {
+	akos16DecodeLine(0, numbytes, 0);
 }
 
 void AkosRenderer::akos16DecodeLine(byte *buf, int32 numbytes, int32 dir) {
 	uint16 bits, tmp_bits;
 
 	while (numbytes != 0) {
-		*buf = akos16.color;
-		buf += dir;
+		if (buf) {
+			*buf = akos16.color;
+			buf += dir;
+		}
 		
 		if (akos16.unk5 == 0) {
 			AKOS16_FILL_BITS()

Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.cpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- costume.cpp	28 May 2003 21:08:56 -0000	1.42
+++ costume.cpp	29 May 2003 01:27:16 -0000	1.43
@@ -28,12 +28,12 @@
 
 const byte revBitMask[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 };
 
-void CostumeRenderer::ignorePakCols(int a) {
+void CostumeRenderer::ignorePakCols(int num) {
 	int n;
 
 	n = _height;
-	if (a > 1)
-		n *= a;
+	if (num > 1)
+		n *= num;
 
 	do {
 		_repcolor = *_srcptr++;
@@ -77,7 +77,7 @@
 	238, 30, 158, 94, 222, 62, 190, 126, 254
 };
 
-byte CostumeRenderer::mainRoutine(int slot, int frame) {
+byte CostumeRenderer::mainRoutine() {
 	int xmove, ymove, i, s;
 	byte drawFlag = 1;
 	uint scal;
@@ -503,7 +503,7 @@
 
 	if (code != 0x7B) {
 		if (!(_vm->_features & GF_OLD256) || code < 0x79)
-			return mainRoutine(limb, code);
+			return mainRoutine();
 	}
 
 	return 0;

Index: costume.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- costume.h	18 May 2003 18:36:14 -0000	1.11
+++ costume.h	29 May 2003 01:27:16 -0000	1.12
@@ -85,7 +85,7 @@
 
 	void proc3();
 	void proc3_ami();
-	byte mainRoutine(int limb, int frame);
+	byte mainRoutine();
 	void ignorePakCols(int num);
 };
 





More information about the Scummvm-git-logs mailing list