[Scummvm-cvs-logs] SF.net SVN: scummvm:[39015] scummvm/branches/branch-0-13-0/engines/agos

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Sun Mar 1 08:15:34 CET 2009


Revision: 39015
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39015&view=rev
Author:   Kirben
Date:     2009-03-01 07:15:34 +0000 (Sun, 01 Mar 2009)

Log Message:
-----------
Fix bottom palette in AtariST version of Elvira 2.

Modified Paths:
--------------
    scummvm/branches/branch-0-13-0/engines/agos/gfx.cpp
    scummvm/branches/branch-0-13-0/engines/agos/vga.cpp

Modified: scummvm/branches/branch-0-13-0/engines/agos/gfx.cpp
===================================================================
--- scummvm/branches/branch-0-13-0/engines/agos/gfx.cpp	2009-03-01 07:14:13 UTC (rev 39014)
+++ scummvm/branches/branch-0-13-0/engines/agos/gfx.cpp	2009-03-01 07:15:34 UTC (rev 39015)
@@ -938,6 +938,9 @@
 	if (getGameType() == GType_ELVIRA2 || getGameType() == GType_WW)
 		state->palette = state->surf_addr[0] & 0xF0;
 
+	if (getGameType() == GType_ELVIRA2 && getPlatform() == Common::kPlatformAtariST && yoffs > 133)
+		state->palette = 208;
+
 	if (_backFlag == 1) {
 		drawBackGroundImage(state);
 	} else {

Modified: scummvm/branches/branch-0-13-0/engines/agos/vga.cpp
===================================================================
--- scummvm/branches/branch-0-13-0/engines/agos/vga.cpp	2009-03-01 07:14:13 UTC (rev 39014)
+++ scummvm/branches/branch-0-13-0/engines/agos/vga.cpp	2009-03-01 07:15:34 UTC (rev 39015)
@@ -847,6 +847,25 @@
 	}
 }
 
+static const uint8 iconPalette[64] = {
+	0x00, 0x00, 0x00,
+	0x77, 0x77, 0x55,
+	0x55, 0x00, 0x00,
+	0x77, 0x00, 0x00,
+	0x22, 0x00, 0x00,
+	0x00, 0x11, 0x00,
+	0x11, 0x22, 0x11,
+	0x22, 0x33, 0x22,
+	0x44, 0x55, 0x44,
+	0x33, 0x44, 0x00,
+	0x11, 0x33, 0x00,
+	0x00, 0x11, 0x44,
+	0x77, 0x44, 0x00,
+	0x66, 0x22, 0x00,
+	0x00, 0x22, 0x66,
+	0x77, 0x55, 0x00,
+};
+
 void AGOSEngine::vc22_setPaletteOld() {
 	byte *offs, *palptr, *src;
 	uint16 b, num;
@@ -884,6 +903,20 @@
 		}
 	}
 
+	if (getGameType() == GType_ELVIRA2 && getPlatform() == Common::kPlatformAtariST) {
+		// Custom palette used for icon area
+		palptr = &_displayPalette[13 * 64];
+		for (uint8 c = 0; c < 16; c++) {
+			palptr[0] = iconPalette[c * 3 + 0] * 2;
+			palptr[1] = iconPalette[c * 3 + 1] * 2;
+			palptr[2] = iconPalette[c * 3 + 2] * 2;
+			palptr[3] = 0;
+
+			palptr += 4;
+		};
+	}
+
+	palptr = _displayPalette;
 	offs = _curVgaFile1 + READ_BE_UINT16(_curVgaFile1 + 6);
 	src = offs + b * 32;
 


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