From 5d4e7b540cd5180e7190b80f2245c744797b20b8 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 25 Jun 2009 19:59:06 +0000 Subject: Change Screen_LoL genereta overlay functionallity to accept a Palette object as source. svn-id: r41884 --- engines/kyra/screen_lol.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engines/kyra/screen_lol.cpp') diff --git a/engines/kyra/screen_lol.cpp b/engines/kyra/screen_lol.cpp index e75745d51c..a717a10931 100644 --- a/engines/kyra/screen_lol.cpp +++ b/engines/kyra/screen_lol.cpp @@ -144,7 +144,7 @@ void Screen_LoL::fprintStringIntro(const char *format, int x, int y, uint8 c1, u printText(buffer, x, y, c1, c2); } -void Screen_LoL::generateGrayOverlay(const uint8 *srcPal, uint8 *grayOverlay, int factor, int addR, int addG, int addB, int lastColor, bool skipSpecialColors) { +void Screen_LoL::generateGrayOverlay(const Palette &srcPal, uint8 *grayOverlay, int factor, int addR, int addG, int addB, int lastColor, bool skipSpecialColors) { Palette tmpPal(lastColor); for (int i = 0; i != lastColor; i++) { @@ -157,11 +157,11 @@ void Screen_LoL::generateGrayOverlay(const uint8 *srcPal, uint8 *grayOverlay, in } for (int i = 0; i < lastColor; i++) - grayOverlay[i] = findLeastDifferentColor(tmpPal.getData() + 3 * i, srcPal, lastColor, skipSpecialColors); + grayOverlay[i] = findLeastDifferentColor(tmpPal.getData() + 3 * i, srcPal.getData(), lastColor, skipSpecialColors); } -uint8 *Screen_LoL::generateLevelOverlay(const uint8 *srcPal, uint8 *ovl, int opColor, int weight) { - if (!srcPal || !ovl) +uint8 *Screen_LoL::generateLevelOverlay(const Palette &srcPal, uint8 *ovl, int opColor, int weight) { + if (!ovl) return ovl; if (weight > 255) @@ -186,7 +186,7 @@ uint8 *Screen_LoL::generateLevelOverlay(const uint8 *srcPal, uint8 *ovl, int opC int m = 0x7fff; int ii = 127; int x = 1; - const uint8 *s = srcPal + 3; + const uint8 *s = srcPal.getData() + 3; do { if (i == x) { -- cgit v1.2.3