[Scummvm-cvs-logs] scummvm master -> 088c4d118c84a5e64b140d2c160091379dd01bb0

m-kiewitz m_kiewitz at users.sourceforge.net
Fri Feb 5 23:54:06 CET 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
088c4d118c AGI: Adding Macintosh palettes for GR+SQ2


Commit: 088c4d118c84a5e64b140d2c160091379dd01bb0
    https://github.com/scummvm/scummvm/commit/088c4d118c84a5e64b140d2c160091379dd01bb0
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2016-02-05T23:53:26+01:00

Commit Message:
AGI: Adding Macintosh palettes for GR+SQ2

But not actually using the GR palette, because it looks horrible.

Changed paths:
    engines/agi/graphics.cpp
    engines/agi/palette.h



diff --git a/engines/agi/graphics.cpp b/engines/agi/graphics.cpp
index bbdbaba..e595691 100644
--- a/engines/agi/graphics.cpp
+++ b/engines/agi/graphics.cpp
@@ -93,7 +93,23 @@ int GfxMgr::initVideo() {
 		initPalette(_paletteGfxMode, PALETTE_ATARI_ST, 16, 3);
 		break;
 	case Common::kRenderMacintosh:
-		initPaletteCLUT(_paletteGfxMode, PALETTE_MACINTOSH_CLUT, 16);
+		switch (_vm->getGameID()) {
+		case GID_KQ3:
+		case GID_PQ1:
+			initPaletteCLUT(_paletteGfxMode, PALETTE_MACINTOSH_CLUT, 16);
+			break;
+		case GID_GOLDRUSH:
+			// We use the common KQ3/PQ1 palette at the moment.
+			// It seems the Gold Rush palette, that came with the game is quite ugly.
+			initPaletteCLUT(_paletteGfxMode, PALETTE_MACINTOSH_CLUT, 16);
+			break;
+		case GID_SQ2:
+			initPaletteCLUT(_paletteGfxMode, PALETTE_MACINTOSH_CLUT3, 16);
+			break;
+		default:
+			initPaletteCLUT(_paletteGfxMode, PALETTE_MACINTOSH_CLUT, 16);
+			break;
+		}
 		break;
 	default:
 		error("initVideo: unsupported render mode");
diff --git a/engines/agi/palette.h b/engines/agi/palette.h
index 4be29e4..f66582b 100644
--- a/engines/agi/palette.h
+++ b/engines/agi/palette.h
@@ -236,6 +236,10 @@ static const uint8 PALETTE_AMIGA_ALT[16 * 3] = {
 
 /**
  * 16 color Macintosh palette (CLUT format).
+ *
+ * Used by at least the following Macintosh AGI versions:
+ * ?.??? (Police Quest 1   v1.50 23.03.1988)
+ * ?.??? (King's Quest 3   v1.52 11.04.1988)
  */
 static const uint16 PALETTE_MACINTOSH_CLUT[16 * 3] = {
 	0x0000, 0x0000, 0x0000,
@@ -257,6 +261,56 @@ static const uint16 PALETTE_MACINTOSH_CLUT[16 * 3] = {
 };
 
 /**
+ * 16 color Macintosh palette (CLUT format).
+ *
+ * Used by at least the following Macintosh AGI versions:
+ * ?.??? (Gold Rush        v1.78 28.07.1989)
+ */
+static const uint16 PALETTE_MACINTOSH_CLUT2[16 * 3] = {
+	0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0xC000,
+	0x6524, 0xC2FF, 0x0000,
+	0x0000, 0xA000, 0xA000,
+	0xDD6B, 0x08C2, 0x06A2,
+	0x8000, 0x0000, 0xFFFF,
+	0x93FF, 0x281A, 0x12CC,
+	0xC000, 0xC000, 0xC000,
+	0x8000, 0x8000, 0x8000,
+	0x0000, 0x0000, 0xD400,
+	0x0000, 0xFFFF, 0x04F1,
+	0x0241, 0xAB54, 0xEAFF,
+	0xFFFF, 0xC3DC, 0x8160,
+	0xFFFF, 0x648A, 0x028C,
+	0xFC00, 0xF37D, 0x052F,
+	0xFFFF, 0xFFFF, 0xFFFF
+};
+
+/**
+ * 16 color Macintosh palette (CLUT format).
+ *
+ * Used by at least the following Macintosh AGI versions:
+ * ?.??? (Space Quest 2    v1.51 04.04.1988)
+ */
+static const uint16 PALETTE_MACINTOSH_CLUT3[16 * 3] = {
+	0x0000, 0x0000, 0x0000,
+	0x0000, 0x0000, 0xC000,
+	0x0000, 0xA7FF, 0x0000,
+	0x0000, 0x9FFF, 0x9FFF,
+	0xCE50, 0x0000, 0x0000,
+	0xC079, 0x0000, 0xFFFF,
+	0xCFFF, 0x6130, 0x32D0,
+	0xC000, 0xC000, 0xC000,
+	0x6000, 0x6000, 0x6000,
+	0x6800, 0x6800, 0xFFFF,
+	0x0000, 0xFFFF, 0x0000,
+	0x0000, 0xFFFF, 0xFFFF,
+	0xFFFF, 0x538C, 0x64B1,
+	0xFDCE, 0x1AC0, 0xFFFF,
+	0xFFFF, 0xFFFF, 0x0000,
+	0xFFFF, 0xFFFF, 0xFFFF,
+};
+
+/**
  * 256 color palette used with AGI256 and AGI256-2 games.
  * Uses full 8 bits per color component.
  * This is NOT the standard VGA palette.






More information about the Scummvm-git-logs mailing list