[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.13,2.14 gfx.h,1.18,1.19

Max Horn fingolfin at users.sourceforge.net
Mon Dec 30 20:46:02 CET 2002


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

Modified Files:
	gfx.cpp gfx.h 
Log Message:
getting rid of _currentX

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.13
retrieving revision 2.14
diff -u -d -r2.13 -r2.14
--- gfx.cpp	31 Dec 2002 04:36:14 -0000	2.13
+++ gfx.cpp	31 Dec 2002 04:45:21 -0000	2.14
@@ -1253,7 +1253,7 @@
 	byte incm, reps;
 
 	do {
-		_currentX = 8;
+		int x = 8;
 		do {
 			FILL_BITS;
 			*dst++ = color + _palette_mod;
@@ -1270,8 +1270,8 @@
 					FILL_BITS;
 					reps = bits & 0xFF;
 					do {
-						if (!--_currentX) {
-							_currentX = 8;
+						if (!--x) {
+							x = 8;
 							dst += _vm->_realWidth - 8;
 							if (!--height)
 								return;
@@ -1288,7 +1288,7 @@
 				cl -= _decomp_shr;
 				bits >>= _decomp_shr;
 			}
-		} while (--_currentX);
+		} while (--x);
 		dst += _vm->_realWidth - 8;
 	} while (--height);
 }
@@ -1302,7 +1302,7 @@
 	byte bit;
 
 	do {
-		_currentX = 8;
+		int x = 8;
 		do {
 			FILL_BITS;
 			if (color != _transparency)
@@ -1321,7 +1321,7 @@
 				inc = -inc;
 				color += inc;
 			}
-		} while (--_currentX);
+		} while (--x);
 		dst += _vm->_realWidth - 8;
 	} while (--height);
 }
@@ -1335,7 +1335,7 @@
 	byte incm, reps;
 
 	do {
-		_currentX = 8;
+		int x = 8;
 		do {
 			FILL_BITS;
 			if (color != _transparency)
@@ -1354,8 +1354,8 @@
 					FILL_BITS;
 					reps = bits & 0xFF;
 					do {
-						if (!--_currentX) {
-							_currentX = 8;
+						if (!--x) {
+							x = 8;
 							dst += _vm->_realWidth - 8;
 							if (!--height)
 								return;
@@ -1374,7 +1374,7 @@
 				cl -= _decomp_shr;
 				bits >>= _decomp_shr;
 			}
-		} while (--_currentX);
+		} while (--x);
 		dst += _vm->_realWidth - 8;
 	} while (--height);
 }
@@ -1387,7 +1387,7 @@
 	byte cl = 8;
 	byte bit;
 
-	_currentX = 8;
+	int x = 8;
 	do {
 		int h = height;
 		do {
@@ -1410,7 +1410,7 @@
 			}
 		} while (--h);
 		dst -= _vertStripNextInc;
-	} while (--_currentX);
+	} while (--x);
 }
 
 void Gdi::unkDecode5(byte *dst, byte *src, int height)
@@ -1422,7 +1422,7 @@
 	byte bit;
 
 	do {
-		_currentX = 8;
+		int x = 8;
 		do {
 			FILL_BITS;
 			*dst++ = color + _palette_mod;
@@ -1439,7 +1439,7 @@
 				inc = -inc;
 				color += inc;
 			}
-		} while (--_currentX);
+		} while (--x);
 		dst += _vm->_realWidth - 8;
 	} while (--height);
 }
@@ -1452,7 +1452,7 @@
 	byte cl = 8;
 	byte bit;
 
-	_currentX = 8;
+	int x = 8;
 	do {
 		int h = height;
 		do {
@@ -1474,7 +1474,7 @@
 			}
 		} while (--h);
 		dst -= _vertStripNextInc;
-	} while (--_currentX);
+	} while (--x);
 }
 
 /* Ender - Zak256/Indy256 decoders */
@@ -1485,7 +1485,7 @@
 #define NEXT_ROW                                            \
 				dst += _vm->_realWidth;                     \
 				if (--h == 0) {                             \
-					if (!--_currentX)                       \
+					if (!--x)                       \
 						  return;                           \
 					dst -= _vertStripNextInc;               \
 					h = height;                             \
@@ -1493,11 +1493,10 @@
 
 void Gdi::unkDecode7(byte *dst, byte *src, int height)
 {
-printf("unkDecode7(%d)\n", height);
 	uint h = height;
 
 	if (_vm->_features & GF_OLD256) {
-		_currentX = 8;
+		int x = 8;
 		for (;;) {
 			*dst = *src++;
 			NEXT_ROW
@@ -1521,7 +1520,7 @@
 {
 	uint h = height;
 
-	_currentX = 8;
+	int x = 8;
 	for (;;) {
 		uint run = (*src++) + 1;
 		byte color = *src++;
@@ -1536,12 +1535,12 @@
 void Gdi::unkDecode9(byte *dst, byte *src, int height)
 {
 	unsigned char c, bits, color, run;
-	int x, y, i, z;
+	int i, j;
 	uint buffer = 0, mask = 128;
 	int h = height;
-	x = y = i = z = run = 0;
+	i = j = run = 0;
 
-	_currentX = 8;
+	int x = 8;
 	for (;;) {
 		c = 0;
 		for (i = 0; i < 4; i++) {
@@ -1565,9 +1564,9 @@
 		case 1:
 			for (i = 0; i < ((c & 3) + 1); i++) {
 				color = 0;
-				for (z = 0; z < 4; z++) {
+				for (j = 0; j < 4; j++) {
 					READ_256BIT;
-					color += bits << z;
+					color += bits << j;
 				}
 				*dst = (run * 16 + color);
 				NEXT_ROW
@@ -1594,7 +1593,7 @@
 	for (i = 0; i < numcolors; i++)
 		local_palette[i] = *src++;
 
-	_currentX = 8;
+	int x = 8;
 
 	for (;;) {
 		byte color = *src++;
@@ -1619,7 +1618,7 @@
 	uint buffer = 0, mask = 128;
 	unsigned char inc = 1, color = *src++;
 
-	_currentX = 8;
+	int x = 8;
 	do {
 		int h = height;
 		do {
@@ -1651,7 +1650,7 @@
 			}
 		} while (--h);
 		dst -= _vertStripNextInc;
-	} while (--_currentX);
+	} while (--x);
 }
 
 #undef NEXT_ROW

Index: gfx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- gfx.h	26 Dec 2002 18:10:13 -0000	1.18
+++ gfx.h	31 Dec 2002 04:45:21 -0000	1.19
@@ -124,7 +124,6 @@
 	byte *_readPtr;
 
 	bool _useOrDecompress;
-	byte _currentX;
 	byte _cursorActive;
 
 	byte *_mask_ptr;





More information about the Scummvm-git-logs mailing list