[Scummvm-cvs-logs] CVS: scummvm/scumm costume.cpp,1.80,1.81

Max Horn fingolfin at users.sourceforge.net
Tue Jul 8 11:10:13 CEST 2003


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

Modified Files:
	costume.cpp 
Log Message:
each row has to be drawn 8 times (8x8 chars, after all), see also Gdi::drawStripC64Object etc.)

Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.cpp,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- costume.cpp	8 Jul 2003 17:44:06 -0000	1.80
+++ costume.cpp	8 Jul 2003 18:09:57 -0000	1.81
@@ -318,29 +318,33 @@
 		if (color & 0x80) {
 			len = color & 0x7f;
 			color = *src++;
-			for (int z = 0; z < len; z++) {
-				dst[0] = dst[1] = _vm->gdi._C64Colors[(color >> 6) & 3];
-				dst[2] = dst[3] = _vm->gdi._C64Colors[(color >> 4) & 3];
-				dst[4] = dst[5] = _vm->gdi._C64Colors[(color >> 2) & 3];
-				dst[6] = dst[7] = _vm->gdi._C64Colors[(color >> 0) & 3];
-				dst += _outwidth;
-				y++;
-				if (y >= (_height >> 3)) {
+			while (len--) {
+				for (int i = 0; i < 8; i++) {
+					dst[0] = dst[1] = _vm->gdi._C64Colors[(color >> 6) & 3];
+					dst[2] = dst[3] = _vm->gdi._C64Colors[(color >> 4) & 3];
+					dst[4] = dst[5] = _vm->gdi._C64Colors[(color >> 2) & 3];
+					dst[6] = dst[7] = _vm->gdi._C64Colors[(color >> 0) & 3];
+					dst += _outwidth;
+				}
+				y+=8;
+				if (y >= _height) {
 					y = 0;
 					dst = v1.destptr + (x << 3);
 				}
 			}
 		} else {
 			len = color;
-			for (int z = 0; z < len; z++) {
+			while (len--) {
 				color = *src++;
-				dst[0] = dst[1] = _vm->gdi._C64Colors[(color >> 6) & 3];
-				dst[2] = dst[3] = _vm->gdi._C64Colors[(color >> 4) & 3];
-				dst[4] = dst[5] = _vm->gdi._C64Colors[(color >> 2) & 3];
-				dst[6] = dst[7] = _vm->gdi._C64Colors[(color >> 0) & 3];
-				dst += _outwidth;
-				y++;
-				if (y >= (_height >> 3)) {
+				for (int i = 0; i < 8; i++) {
+					dst[0] = dst[1] = _vm->gdi._C64Colors[(color >> 6) & 3];
+					dst[2] = dst[3] = _vm->gdi._C64Colors[(color >> 4) & 3];
+					dst[4] = dst[5] = _vm->gdi._C64Colors[(color >> 2) & 3];
+					dst[6] = dst[7] = _vm->gdi._C64Colors[(color >> 0) & 3];
+					dst += _outwidth;
+				}
+				y+=8;
+				if (y >= _height) {
 					y = 0;
 					dst = v1.destptr + (x << 3);
 				}





More information about the Scummvm-git-logs mailing list