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

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Tue Jul 31 21:12:44 CEST 2007


Revision: 28365
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28365&view=rev
Author:   peres001
Date:     2007-07-31 12:12:44 -0700 (Tue, 31 Jul 2007)

Log Message:
-----------
Renamed palette functions.

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

Modified: scummvm/trunk/engines/parallaction/callables_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/callables_ns.cpp	2007-07-31 18:26:14 UTC (rev 28364)
+++ scummvm/trunk/engines/parallaction/callables_ns.cpp	2007-07-31 19:12:44 UTC (rev 28365)
@@ -205,7 +205,7 @@
 	memset(pal, 0, sizeof(Gfx::Palette));
 
 	for (uint16 _di = 0; _di < 64; _di++) {
-		_gfx->fadePalette(pal);
+		_gfx->fadeInPalette(pal);
 		_gfx->setPalette(pal);
 
 		g_system->delayMillis(20);
@@ -341,7 +341,7 @@
 	byte* _enginePal = _gfx->_palette;
 	Gfx::Palette pal;
 
-	_gfx->buildBWPalette(pal);
+	_gfx->makeGrayscalePalette(pal);
 
 	int16 w = 0, h = 0;
 	_gfx->getStringExtent(_location._endComment, 130, &w, &h);

Modified: scummvm/trunk/engines/parallaction/graphics.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.cpp	2007-07-31 18:26:14 UTC (rev 28364)
+++ scummvm/trunk/engines/parallaction/graphics.cpp	2007-07-31 19:12:44 UTC (rev 28365)
@@ -203,14 +203,14 @@
 	return;
 }
 
-void Gfx::fadePalette(Palette pal) {
+void Gfx::fadeInPalette(Palette pal) {
 	for (uint16 i = 0; i < BASE_PALETTE_COLORS * 3; i++)
 		if (pal[i] < _palette[i]) pal[i]++;
 
 	return;
 }
 
-void Gfx::buildBWPalette(Palette pal) {
+void Gfx::makeGrayscalePalette(Palette pal) {
 
 	for (uint16 i = 0; i < BASE_PALETTE_COLORS; i++) {
 		byte max;
@@ -226,7 +226,7 @@
 	return;
 }
 
-void Gfx::quickFadePalette(Palette pal) {
+void Gfx::fadePalette(Palette pal) {
 
 	for (uint16 i = 0; i < BASE_PALETTE_COLORS * 3; i++) {
 		if (pal[i] == _palette[i]) continue;

Modified: scummvm/trunk/engines/parallaction/graphics.h
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.h	2007-07-31 18:26:14 UTC (rev 28364)
+++ scummvm/trunk/engines/parallaction/graphics.h	2007-07-31 19:12:44 UTC (rev 28365)
@@ -209,9 +209,9 @@
 	void setPalette(Palette palette, uint32 first = FIRST_BASE_COLOR, uint32 num = BASE_PALETTE_COLORS);
 	void setBlackPalette();
 	void animatePalette();
-	void fadePalette(Palette palette);
-	void buildBWPalette(Palette palette);
-	void quickFadePalette(Palette palette);
+	void fadeInPalette(Palette palette);		// fades palette (from black) to system palette
+	void fadePalette(Palette palette);			// fades palette to system palette
+	void makeGrayscalePalette(Palette palette);		// transform palette into black and white
 
 	// amiga specific
 	void setHalfbriteMode(bool enable);

Modified: scummvm/trunk/engines/parallaction/location.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/location.cpp	2007-07-31 18:26:14 UTC (rev 28364)
+++ scummvm/trunk/engines/parallaction/location.cpp	2007-07-31 19:12:44 UTC (rev 28365)
@@ -424,7 +424,7 @@
     }
 
 	byte pal[PALETTE_SIZE];
-	_gfx->buildBWPalette(pal);
+	_gfx->makeGrayscalePalette(pal);
 	_gfx->setPalette(pal);
 
 	jobRunScripts(NULL, NULL);
@@ -452,7 +452,7 @@
 
 	// fades maximum intensity palette towards approximation of main palette
 	for (uint16 _si = 0; _si<6; _si++) {
-		_gfx->quickFadePalette(pal);
+		_gfx->fadePalette(pal);
 		_gfx->setPalette(pal);
 		waitTime( 1 );
 		_gfx->updateScreen();


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