diff options
author | Johannes Schickel | 2009-06-25 19:58:17 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-06-25 19:58:17 +0000 |
commit | 2b87ffc31ebb81954f36769333e2754e5062655d (patch) | |
tree | 042d511b2e417825cfbdbeb882305e4e89b2e8e0 | |
parent | df307cfdc8931acda420a0bf5b4b59e2c72947a5 (diff) | |
download | scummvm-rg350-2b87ffc31ebb81954f36769333e2754e5062655d.tar.gz scummvm-rg350-2b87ffc31ebb81954f36769333e2754e5062655d.tar.bz2 scummvm-rg350-2b87ffc31ebb81954f36769333e2754e5062655d.zip |
Change Screen_HoF::generateGrayOverlay to use a Palette object internally.
svn-id: r41883
-rw-r--r-- | engines/kyra/screen_hof.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/kyra/screen_hof.cpp b/engines/kyra/screen_hof.cpp index 206f8beb87..13df86b821 100644 --- a/engines/kyra/screen_hof.cpp +++ b/engines/kyra/screen_hof.cpp @@ -45,7 +45,7 @@ const ScreenDim *Screen_HoF::getScreenDim(int dim) { } void Screen_HoF::generateGrayOverlay(const uint8 *srcPal, uint8 *grayOverlay, int factor, int addR, int addG, int addB, int lastColor, bool flag) { - uint8 tmpPal[768]; + Palette tmpPal(lastColor); for (int i = 0; i != lastColor; i++) { if (flag) { @@ -63,7 +63,7 @@ void Screen_HoF::generateGrayOverlay(const uint8 *srcPal, uint8 *grayOverlay, in } for (int i = 0; i < lastColor; i++) - grayOverlay[i] = findLeastDifferentColor(tmpPal + 3 * i, srcPal, lastColor); + grayOverlay[i] = findLeastDifferentColor(tmpPal.getData() + 3 * i, srcPal, lastColor); } void Screen_HoF::cmpFadeFrameStep(int srcPage, int srcW, int srcH, int srcX, int srcY, int dstPage, int dstW, |