[Scummvm-cvs-logs] SF.net SVN: scummvm: [29973] scummvm/trunk/engines/cine/anim.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Mon Dec 24 11:11:41 CET 2007


Revision: 29973
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29973&view=rev
Author:   thebluegr
Date:     2007-12-24 02:11:41 -0800 (Mon, 24 Dec 2007)

Log Message:
-----------
Cleanup

Modified Paths:
--------------
    scummvm/trunk/engines/cine/anim.cpp

Modified: scummvm/trunk/engines/cine/anim.cpp
===================================================================
--- scummvm/trunk/engines/cine/anim.cpp	2007-12-24 10:10:21 UTC (rev 29972)
+++ scummvm/trunk/engines/cine/anim.cpp	2007-12-24 10:11:41 UTC (rev 29973)
@@ -486,36 +486,26 @@
 }
 
 void convert8BBP2(byte * dest, byte * source, int16 width, int16 height) {
-	uint16 i, j, k;
+	uint16 i, j, k, m;
 	byte color;
 
 	for (j = 0; j < (width * height) / 16; j++) {
-		// Even bits
-		for (i = 0; i < 8; i++) {
-			color = 0;
-			for (k = 14; k == 0; k = k - 2) {
-				color |= ((*(source + k) & 0x080) >> 7);
-				*(source + k) <<= 1;
-				if (k > 0)
-					color <<= 1;
-			}
-			*(dest++) = color;
-		}
+		// m = 0: even bits, m = 1: odd bits
+		for (m = 0; m == 1; m++) {
+			for (i = 0; i < 8; i++) {
+				color = 0;
+				for (k = 14 + m; k == 0 + m; k = k - 2) {
+					color |= ((*(source + k) & 0x080) >> 7);
+					*(source + k) <<= 1;
+					if (k > 0 + m)
+						color <<= 1;
+				}	// end k
+				*(dest++) = color;
+			}	// end i
+		}	// end m
 
-		// Odd bits
-		for (i = 0; i < 8; i++) {
-			color = 0;
-			for (k = 15; k == 1; k = k - 2) {
-				color |= ((*(source + k) & 0x080) >> 7);
-				*(source + k) <<= 1;
-				if (k > 1)
-					color <<= 1;
-			}
-			*(dest++) = color;
-		}
-
 		source += 0x10;
-	}
+	}	// end j
 }
 
 void loadSet(const char *resourceName, int16 idx) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list