SCI: force palette merging for kq6 hires portraits (cause its needed on those)

svn-id: r47577
This commit is contained in:
Martin Kiewitz 2010-01-26 22:34:17 +00:00
parent 46a05ce332
commit 935ded3615
3 changed files with 7 additions and 7 deletions

View File

@ -197,21 +197,21 @@ bool SciPalette::setFromResource(GuiResourceId resourceId, uint16 flag) {
return false;
}
void SciPalette::set(Palette *sciPal, uint16 flag) {
void SciPalette::set(Palette *sciPal, uint16 flag, bool forceRealMerge) {
uint32 systime = _sysPalette.timestamp;
if (flag == 2 || sciPal->timestamp != systime) {
merge(sciPal, &_sysPalette, flag);
merge(sciPal, &_sysPalette, flag, forceRealMerge);
sciPal->timestamp = _sysPalette.timestamp;
if (_screen->_picNotValid == 0 && systime != _sysPalette.timestamp)
setOnScreen();
}
}
void SciPalette::merge(Palette *pFrom, Palette *pTo, uint16 flag) {
void SciPalette::merge(Palette *pFrom, Palette *pTo, uint16 flag, bool forceRealMerge) {
uint16 res;
int i,j;
if (getSciVersion() >= SCI_VERSION_1_1) {
if ((!forceRealMerge) && (getSciVersion() >= SCI_VERSION_1_1)) {
// SCI1.1+ doesnt do real merging anymore, but simply copying over the used colors from other palettes
for (i = 1; i < 255; i++) {
if (pFrom->colors[i].used) {

View File

@ -41,8 +41,8 @@ public:
void modifyAmigaPalette(byte *data);
void setEGA();
bool setFromResource(GuiResourceId resourceId, uint16 flag);
void set(Palette *sciPal, uint16 flag);
void merge(Palette *pFrom, Palette *pTo, uint16 flag);
void set(Palette *sciPal, uint16 flag, bool forceRealMerge = false);
void merge(Palette *pFrom, Palette *pTo, uint16 flag, bool forceRealMerge);
uint16 matchColor(Palette *pPal, byte r, byte g, byte b);
void getSys(Palette *pal);

View File

@ -140,7 +140,7 @@ void Portrait::doit(Common::Point position, uint16 resourceId, uint16 noun, uint
uint syncOffset = 0;
// Set the portrait palette
_palette->set(&_portraitPalette, 1);
_palette->set(&_portraitPalette, 1, true);
// Draw base bitmap
drawBitmap(0);