[Scummvm-cvs-logs] CVS: scummvm/scumm scummvm.cpp,2.11,2.12 nut_renderer.cpp,1.5,1.6

Max Horn fingolfin at users.sourceforge.net
Wed Dec 25 15:19:02 CET 2002


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

Modified Files:
	scummvm.cpp nut_renderer.cpp 
Log Message:
cleanup

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.11
retrieving revision 2.12
diff -u -d -r2.11 -r2.12
--- scummvm.cpp	25 Dec 2002 21:57:01 -0000	2.11
+++ scummvm.cpp	25 Dec 2002 23:18:30 -0000	2.12
@@ -207,6 +207,11 @@
 	else
 		_resourceHeaderSize = 8;
 
+	if (_features & GF_OLD256)
+		_charset = new CharsetRendererOld256(this);
+	else
+		_charset = new CharsetRendererClassic(this);
+
 	memset(_charsetData, 0, sizeof(_charsetData));
 	
 	if (!(_features & GF_SMALL_NAMES) && !(_features & GF_AFTER_V8))
@@ -1552,11 +1557,6 @@
 
 void Scumm::launch()
 {
-	if (_features & GF_OLD256)
-		_charset = new CharsetRendererOld256(this);
-	else
-		_charset = new CharsetRendererClassic(this);
-
 	gdi._vm = this;
 
 	_maxHeapThreshold = 450000;

Index: nut_renderer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/nut_renderer.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- nut_renderer.cpp	25 Dec 2002 20:07:09 -0000	1.5
+++ nut_renderer.cpp	25 Dec 2002 23:18:30 -0000	1.6
@@ -223,14 +223,8 @@
 		for (int32 tx = 0; tx < width; tx++) {
 			byte pixel = *(_tmpCodecBuffer + ty * width + tx);
 			if (pixel != 0) {
-				if (color == 0) {
-					if (pixel == 0x01)
-						pixel = 0xf;
-				}
-				else {
-					if (pixel == 0x01)
-						pixel = color;
-				}
+				if (pixel == 0x01)
+					pixel = (color == 0) ? 0xf : color;
 				if (pixel == 0xff)
 					pixel = 0x0;
 				*(_dstPtr + ((ty + y) * _dstPitch + x + tx)) = pixel;
@@ -238,4 +232,3 @@
 		}
 	}
 }
-





More information about the Scummvm-git-logs mailing list