aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/kyra/screen_hof.cpp4
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,