diff options
author | Johannes Schickel | 2009-06-25 19:57:35 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-06-25 19:57:35 +0000 |
commit | df307cfdc8931acda420a0bf5b4b59e2c72947a5 (patch) | |
tree | 11342b58a775441f0c16cd1f027722b6ea3fa28b | |
parent | 6e69a149cd5e22e472f4bb3850d5f8b6561a138e (diff) | |
download | scummvm-rg350-df307cfdc8931acda420a0bf5b4b59e2c72947a5.tar.gz scummvm-rg350-df307cfdc8931acda420a0bf5b4b59e2c72947a5.tar.bz2 scummvm-rg350-df307cfdc8931acda420a0bf5b4b59e2c72947a5.zip |
Change Screen_LoL::generateGrayOverlay to use a Palette object internally.
svn-id: r41882
-rw-r--r-- | engines/kyra/screen_lol.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/kyra/screen_lol.cpp b/engines/kyra/screen_lol.cpp index b044cb89a6..e75745d51c 100644 --- a/engines/kyra/screen_lol.cpp +++ b/engines/kyra/screen_lol.cpp @@ -145,7 +145,7 @@ void Screen_LoL::fprintStringIntro(const char *format, int x, int y, uint8 c1, u } void Screen_LoL::generateGrayOverlay(const uint8 *srcPal, uint8 *grayOverlay, int factor, int addR, int addG, int addB, int lastColor, bool skipSpecialColors) { - uint8 tmpPal[768]; + Palette tmpPal(lastColor); for (int i = 0; i != lastColor; i++) { int v = (((srcPal[3 * i] & 0x3f) * factor) / 0x40) + addR; @@ -157,7 +157,7 @@ void Screen_LoL::generateGrayOverlay(const uint8 *srcPal, uint8 *grayOverlay, in } for (int i = 0; i < lastColor; i++) - grayOverlay[i] = findLeastDifferentColor(tmpPal + 3 * i, srcPal, lastColor, skipSpecialColors); + grayOverlay[i] = findLeastDifferentColor(tmpPal.getData() + 3 * i, srcPal, lastColor, skipSpecialColors); } uint8 *Screen_LoL::generateLevelOverlay(const uint8 *srcPal, uint8 *ovl, int opColor, int weight) { |