From 5a1c64e7329bd85c0089c7ee55217266be36c921 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 11 Mar 2014 21:32:42 -0400 Subject: MADS: Further fixes for PaletteUsage::process --- engines/mads/palette.cpp | 8 ++++---- engines/mads/palette.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/engines/mads/palette.cpp b/engines/mads/palette.cpp index 9b93fb3cd3..2e4995e939 100644 --- a/engines/mads/palette.cpp +++ b/engines/mads/palette.cpp @@ -138,7 +138,7 @@ int PaletteUsage::process(Common::Array &palette, uint flags) { for (uint palIndex = 0; palIndex < palette.size(); ++palIndex) { bool var48 = false; int var4 = 0xffff; - int v1 = pal1[palIndex]; + int v1 = pal2[palIndex]; if (palette[v1]._flags & 8) { var48 = true; @@ -196,7 +196,7 @@ int PaletteUsage::process(Common::Array &palette, uint flags) { if (var2 > var10) { var48 = true; - var2 = idx; + var4 = idx; var2 = var10; } } @@ -502,7 +502,7 @@ void Palette::setSystemPalette() { void Palette::resetGamePalette(int lowRange, int highRange) { Common::fill((byte *)&_gamePalette[0], (byte *)&_gamePalette[PALETTE_COUNT], 0); - initRange(_mainPalette); + initVGAPalette(_mainPalette); // Init low range to common RGB values if (lowRange) { @@ -549,7 +549,7 @@ void Palette::initGamePalette() { _rgbList.reset(); } -void Palette::initRange(byte *palette) { +void Palette::initVGAPalette(byte *palette) { int var6 = 0; int vdx = 0; int vbx = 0; diff --git a/engines/mads/palette.h b/engines/mads/palette.h index ad9d1f3c4b..b540aa572f 100644 --- a/engines/mads/palette.h +++ b/engines/mads/palette.h @@ -120,9 +120,9 @@ public: class Palette { private: /** - * Initialises a stanadrd range of colours for the given palette + * Initialises a stanadrd VGA palette */ - void initRange(byte *palette); + void initVGAPalette(byte *palette); protected: MADSEngine *_vm; -- cgit v1.2.3