[Scummvm-cvs-logs] SF.net SVN: scummvm: [24548] scummvm/trunk/engines/agos/vga.cpp

kirben at users.sourceforge.net kirben at users.sourceforge.net
Sat Oct 28 06:44:15 CEST 2006


Revision: 24548
          http://svn.sourceforge.net/scummvm/?rev=24548&view=rev
Author:   kirben
Date:     2006-10-27 21:44:10 -0700 (Fri, 27 Oct 2006)

Log Message:
-----------
Add code for vc37_pokePalette

Modified Paths:
--------------
    scummvm/trunk/engines/agos/vga.cpp

Modified: scummvm/trunk/engines/agos/vga.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga.cpp	2006-10-28 03:29:58 UTC (rev 24547)
+++ scummvm/trunk/engines/agos/vga.cpp	2006-10-28 04:44:10 UTC (rev 24548)
@@ -1142,10 +1142,17 @@
 }
 
 void AGOSEngine::vc37_pokePalette() {
-	// TODO
-	uint a = vcReadNextWord();
-	uint b = vcReadNextWord();
-	debug(0, "vc37_pokePalette: stub (%d, %d)", a, b);
+	uint16 offs = vcReadNextWord();
+	uint16 color = vcReadNextWord();
+
+	byte *palptr = _displayPalette + offs * 4;
+	palptr[0] = ((color & 0xf00) >> 8) * 32;
+	palptr[1] = ((color & 0x0f0) >> 4) * 32;
+	palptr[2] = ((color & 0x00f) >> 0) * 32;
+	palptr[3] = 0;
+
+	_paletteFlag = 2;
+	_vgaSpriteChanged++;
 }
 
 void AGOSEngine::vc38_ifVarNotZero() {


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