[Scummvm-cvs-logs] SF.net SVN: scummvm: [28334] scummvm/trunk/engines/parallaction/ callables_ns.cpp

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Mon Jul 30 20:39:39 CEST 2007


Revision: 28334
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28334&view=rev
Author:   peres001
Date:     2007-07-30 11:39:38 -0700 (Mon, 30 Jul 2007)

Log Message:
-----------
Replaced some palette code in _c_endComment with a function call.

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/callables_ns.cpp

Modified: scummvm/trunk/engines/parallaction/callables_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/callables_ns.cpp	2007-07-30 18:35:16 UTC (rev 28333)
+++ scummvm/trunk/engines/parallaction/callables_ns.cpp	2007-07-30 18:39:38 UTC (rev 28334)
@@ -341,34 +341,8 @@
 	byte* _enginePal = _gfx->_palette;
 	Gfx::Palette pal;
 
-	uint32 si;
-	for (si = 0; si < 32; si++) {
+	_gfx->buildBWPalette(pal);
 
-		byte al = _enginePal[si*3+1];
-		if (al > _enginePal[si*3+2]) {
-			al = _enginePal[si*3+1];
-		} else {
-			al = _enginePal[si*3+2];
-		}
-
-		if (al < _enginePal[si*3]) {
-			al = _enginePal[si*3];
-		} else {
-			al = _enginePal[si*3+1];
-		}
-
-		if (al > _enginePal[si*3+2]) {
-			al = _enginePal[si*3+1];
-		} else {
-			al = _enginePal[si*3+2];
-		}
-
-		pal[si*3] = al;
-		pal[si*3+2] = al;
-		pal[si*3+1] = al;
-
-	}
-
 	int16 w = 0, h = 0;
 	_gfx->getStringExtent(_location._endComment, 130, &w, &h);
 
@@ -385,7 +359,7 @@
 	_gfx->displayWrappedString(_location._endComment, 3, 5, 0, 130);
 	_gfx->updateScreen();
 
-	uint32 di = 0;
+	uint32 si, di;
 	for (di = 0; di < PALETTE_COLORS; di++) {
 		for (si = 0; si <= 93; si +=3) {
 


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