aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/kyra/screen_hof.cpp4
-rw-r--r--engines/kyra/screen_hof.h2
-rw-r--r--engines/kyra/sequences_hof.cpp8
3 files changed, 7 insertions, 7 deletions
diff --git a/engines/kyra/screen_hof.cpp b/engines/kyra/screen_hof.cpp
index 13df86b821..590ced22dd 100644
--- a/engines/kyra/screen_hof.cpp
+++ b/engines/kyra/screen_hof.cpp
@@ -44,7 +44,7 @@ const ScreenDim *Screen_HoF::getScreenDim(int dim) {
return &_screenDimTable[dim];
}
-void Screen_HoF::generateGrayOverlay(const uint8 *srcPal, uint8 *grayOverlay, int factor, int addR, int addG, int addB, int lastColor, bool flag) {
+void Screen_HoF::generateGrayOverlay(const Palette &srcPal, uint8 *grayOverlay, int factor, int addR, int addG, int addB, int lastColor, bool flag) {
Palette tmpPal(lastColor);
for (int i = 0; i != lastColor; i++) {
@@ -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.getData() + 3 * i, srcPal, lastColor);
+ grayOverlay[i] = findLeastDifferentColor(tmpPal.getData() + 3 * i, srcPal.getData(), lastColor);
}
void Screen_HoF::cmpFadeFrameStep(int srcPage, int srcW, int srcH, int srcX, int srcY, int dstPage, int dstW,
diff --git a/engines/kyra/screen_hof.h b/engines/kyra/screen_hof.h
index 088e8b7f55..1c17a424b3 100644
--- a/engines/kyra/screen_hof.h
+++ b/engines/kyra/screen_hof.h
@@ -41,7 +41,7 @@ public:
const ScreenDim *getScreenDim(int dim);
// sequence player
- void generateGrayOverlay(const uint8 *srcPal, uint8 *grayOverlay, int factor, int addR, int addG, int addB, int lastColor, bool flag);
+ void generateGrayOverlay(const Palette &pal, uint8 *grayOverlay, int factor, int addR, int addG, int addB, int lastColor, bool flag);
void cmpFadeFrameStep(int srcPage, int srcW, int srcH, int srcX, int srcY, int dstPage, int dstW, int dstH, int dstX, int dstY, int cmpW, int cmpH, int cmpPage);
void copyPageMemory(int srcPage, int srcPos, int dstPage, int dstPos, int numBytes);
void copyRegionEx(int srcPage, int srcW, int srcH, int dstPage, int dstX,int dstY, int dstW, int dstH, const ScreenDim *d, bool flag = false);
diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp
index 75c46185a0..f78aa61c4a 100644
--- a/engines/kyra/sequences_hof.cpp
+++ b/engines/kyra/sequences_hof.cpp
@@ -384,7 +384,7 @@ int KyraEngine_HoF::seq_introOverview(WSAMovie_v2 *wsaObj, int x, int y, int frm
break;
case 1:
- _screen->generateGrayOverlay(_screen->getPalette(0).getData(), _screen->getPalette(3).getData(), 0x40, 0, 0, 0, 0x100, true);
+ _screen->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x40, 0, 0, 0, 0x100, true);
for (int i = 0; i < 256; i++)
tmpPal[_screen->getPalette(3)[i]] = 1;
@@ -465,7 +465,7 @@ int KyraEngine_HoF::seq_introLibrary(WSAMovie_v2 *wsaObj, int x, int y, int frm)
_seqSubframePlaying = true;
_sound->playTrack(5);
- _screen->generateGrayOverlay(_screen->getPalette(0).getData(), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
+ _screen->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
_seqTextColor[1] = _screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0).getData() + 3, 255) & 0xff;
memset(_seqTextColorMap, _seqTextColor[1], 16);
_seqTextColorMap[1] = _seqTextColor[0] = _screen->findLeastDifferentColor(_seqTextColorPresets + 3, _screen->getPalette(0).getData() + 3, 255) & 0xff;
@@ -539,7 +539,7 @@ int KyraEngine_HoF::seq_introHand(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
_seqSubframePlaying = true;
_sound->playTrack(6);
- _screen->generateGrayOverlay(_screen->getPalette(0).getData(), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
+ _screen->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
_seqTextColor[1] = _screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0).getData() + 3, 255) & 0xff;
memset(_seqTextColorMap, _seqTextColor[1], 16);
_seqTextColorMap[1] = _seqTextColor[0] = _screen->findLeastDifferentColor(_seqTextColorPresets + 3, _screen->getPalette(0).getData() + 3, 255) & 0xff;
@@ -633,7 +633,7 @@ int KyraEngine_HoF::seq_introPoint(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
memset(_seqTextColorMap, _seqTextColor[1], 16);
_seqTextColorMap[1] = _seqTextColor[0] = _screen->findLeastDifferentColor(_seqTextColorPresets + 3, _screen->getPalette(0).getData() + 3, 255) & 0xff;
_screen->setTextColorMap(_seqTextColorMap);
- _screen->generateGrayOverlay(_screen->getPalette(0).getData(), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
+ _screen->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
break;
case 1: