From 73365aa2c7e225fcc7558e1e8482e5c2fd4f3212 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 14 Jul 2003 06:44:47 +0000 Subject: [PATCH] Split the v1 palette, since there is a minor difference. svn-id: r8999 --- scumm/gfx.cpp | 21 ++++++++++++++++++++- scumm/saveload.cpp | 5 ++++- scumm/scumm.h | 3 ++- scumm/scummvm.cpp | 5 ++++- 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 03e3e480bc8..e9d1ca08c39 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -2573,7 +2573,7 @@ void Scumm::setupEGAPalette() { setPalColor(15, 252, 252, 252); } -void Scumm::setupC64Palette() { +void Scumm::setupV1ManiacPalette() { setPalColor( 0, 0, 0, 0); setPalColor( 1, 252, 252, 252); setPalColor( 2, 168, 0, 0); @@ -2592,6 +2592,25 @@ void Scumm::setupC64Palette() { setPalColor(15, 84, 84, 84); } +void Scumm::setupV1ZakPalette() { + setPalColor( 0, 0, 0, 0); + setPalColor( 1, 252, 252, 252); + setPalColor( 2, 168, 0, 0); + setPalColor( 3, 0, 168, 168); + setPalColor( 4, 168, 0, 168); + setPalColor( 5, 0, 168, 0); + setPalColor( 6, 0, 0, 168); + setPalColor( 7, 252, 252, 84); + setPalColor( 8, 252, 84, 84); + setPalColor( 9, 168, 84, 0); + setPalColor(10, 252, 84, 84); + setPalColor(11, 84, 84, 84); + setPalColor(12, 168, 168, 168); + setPalColor(13, 84, 252, 84); + setPalColor(14, 84, 84, 252); + setPalColor(15, 168, 168, 168); +} + /* Old palette used in Commodre 64 versions void Scumm::setupC64Palette() { diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp index 8ae4902e91c..5123a2091ab 100644 --- a/scumm/saveload.cpp +++ b/scumm/saveload.cpp @@ -170,7 +170,10 @@ bool Scumm::loadState(int slot, bool compat, SaveFileManager *mgr) { // ever add options for using different 16-colour palettes. if (_version == 1) { - setupC64Palette(); + if (_gameId == GID_MANIAC) + setupV1ManiacPalette(); + else + setupV1ZakPalette(); } else if (_features & GF_16COLOR) { if (_features & GF_AMIGA) setupAmigaPalette(); diff --git a/scumm/scumm.h b/scumm/scumm.h index 81beb1a0b26..b7c45a72de4 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -874,7 +874,8 @@ protected: const byte *getPalettePtr(); void setupAmigaPalette(); void setupEGAPalette(); - void setupC64Palette(); + void setupV1ManiacPalette(); + void setupV1ZakPalette(); void setPalette(int pal); void setPaletteFromPtr(const byte *ptr); void setPaletteFromRes(); diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index c4498bc30a2..983e29fea4f 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -791,7 +791,10 @@ void Scumm::scummInit() { if (_version == 1) { for (i = 0; i < 16; i++) _shadowPalette[i] = i; - setupC64Palette(); + if (_gameId == GID_MANIAC) + setupV1ManiacPalette(); + else + setupV1ZakPalette(); } else if (_features & GF_16COLOR) { for (i = 0; i < 16; i++) _shadowPalette[i] = i;