[Scummvm-cvs-logs] SF.net SVN: scummvm:[47565] scummvm/trunk/engines/sci/graphics/palette.cpp

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Tue Jan 26 12:40:54 CET 2010


Revision: 47565
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47565&view=rev
Author:   m_kiewitz
Date:     2010-01-26 11:40:54 +0000 (Tue, 26 Jan 2010)

Log Message:
-----------
SCI: removing now unneeded table EGAtable from palette class

Modified Paths:
--------------
    scummvm/trunk/engines/sci/graphics/palette.cpp

Modified: scummvm/trunk/engines/sci/graphics/palette.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/palette.cpp	2010-01-26 11:28:11 UTC (rev 47564)
+++ scummvm/trunk/engines/sci/graphics/palette.cpp	2010-01-26 11:40:54 UTC (rev 47565)
@@ -113,25 +113,6 @@
 	}
 }
 
-static const byte EGApalette[16][3] = {
-	{ 0x000, 0x000, 0x000 },
-	{ 0x000, 0x000, 0x0AA },
-	{ 0x000, 0x0AA, 0x000 },
-	{ 0x000, 0x0AA, 0x0AA },
-	{ 0x0AA, 0x000, 0x000 },
-	{ 0x0AA, 0x000, 0x0AA },
-	{ 0x0AA, 0x055, 0x000 },
-	{ 0x0AA, 0x0AA, 0x0AA },
-	{ 0x055, 0x055, 0x055 },
-	{ 0x055, 0x055, 0x0FF },
-	{ 0x055, 0x0FF, 0x055 },
-	{ 0x055, 0x0FF, 0x0FF },
-	{ 0x0FF, 0x055, 0x055 },
-	{ 0x0FF, 0x055, 0x0FF },
-	{ 0x0FF, 0x0FF, 0x055 },
-	{ 0x0FF, 0x0FF, 0x0FF }
-};
-
 // Will try to set amiga palette by using "spal" file. If not found, we return false
 bool SciPalette::setAmiga() {
 	Common::File file;
@@ -173,11 +154,24 @@
 void SciPalette::setEGA() {
 	int curColor;
 	byte color1, color2;
+
+	_sysPalette.colors[1].r  = 0x000; _sysPalette.colors[1].g  = 0x000; _sysPalette.colors[1].b  = 0x0AA;
+	_sysPalette.colors[2].r  = 0x000; _sysPalette.colors[2].g  = 0x0AA; _sysPalette.colors[2].b  = 0x000;
+	_sysPalette.colors[3].r  = 0x000; _sysPalette.colors[3].g  = 0x0AA; _sysPalette.colors[3].b  = 0x0AA;
+	_sysPalette.colors[4].r  = 0x0AA; _sysPalette.colors[4].g  = 0x000; _sysPalette.colors[4].b  = 0x000;
+	_sysPalette.colors[5].r  = 0x0AA; _sysPalette.colors[5].g  = 0x000; _sysPalette.colors[5].b  = 0x0AA;
+	_sysPalette.colors[6].r  = 0x0AA; _sysPalette.colors[6].g  = 0x055; _sysPalette.colors[6].b  = 0x000;
+	_sysPalette.colors[7].r  = 0x0AA; _sysPalette.colors[7].g  = 0x0AA; _sysPalette.colors[7].b  = 0x0AA;
+	_sysPalette.colors[8].r  = 0x055; _sysPalette.colors[8].g  = 0x055; _sysPalette.colors[8].b  = 0x055;
+	_sysPalette.colors[9].r  = 0x055; _sysPalette.colors[9].g  = 0x055; _sysPalette.colors[9].b  = 0x0FF;
+	_sysPalette.colors[10].r = 0x055; _sysPalette.colors[10].g = 0x0FF; _sysPalette.colors[10].b = 0x055;
+	_sysPalette.colors[11].r = 0x055; _sysPalette.colors[11].g = 0x0FF; _sysPalette.colors[11].b = 0x0FF;
+	_sysPalette.colors[12].r = 0x0FF; _sysPalette.colors[12].g = 0x055; _sysPalette.colors[12].b = 0x055;
+	_sysPalette.colors[13].r = 0x0FF; _sysPalette.colors[13].g = 0x055; _sysPalette.colors[13].b = 0x0FF;
+	_sysPalette.colors[14].r = 0x0FF; _sysPalette.colors[14].g = 0x0FF; _sysPalette.colors[14].b = 0x055;
+	_sysPalette.colors[15].r = 0x0FF; _sysPalette.colors[15].g = 0x0FF; _sysPalette.colors[15].b = 0x0FF;
 	for (curColor = 0; curColor <= 15; curColor++) {
 		_sysPalette.colors[curColor].used = 1;
-		_sysPalette.colors[curColor].r = EGApalette[curColor][0];
-		_sysPalette.colors[curColor].g = EGApalette[curColor][1];
-		_sysPalette.colors[curColor].b = EGApalette[curColor][2];
 	}
 	// Now setting colors 16-254 to the correct mix colors that occur when not doing a dithering run on
 	//  finished pictures


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