From f5f6d86d78b980bade39c7000cb22dfd60476a1d Mon Sep 17 00:00:00 2001 From: AndywinXp Date: Thu, 2 May 2024 01:25:01 +0200 Subject: [PATCH] SCUMM: SPYFOX3: Fix #15108 and #15106 --- engines/scumm/gfx.cpp | 5 +++-- engines/scumm/he/intern_he.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index f0101be696b..85ef120de1f 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -2597,9 +2597,10 @@ void Gdi::drawBMAPObject(const byte *ptr, VirtScreen *vs, int obj, int x, int y, } case BMCOMP_SOLID_COLOR_FILL: { - WizRawPixel color = ((ScummEngine_v71he *)_vm)->_wiz->convert8BppToRawPixel(*bmapPtr, (WizRawPixel *)_vm->getHEPaletteSlot(1)); + ScummEngine_v71he *tmpVm = ((ScummEngine_v71he *)_vm); + WizRawPixel color = tmpVm->_wiz->convert8BppToRawPixel(*bmapPtr, (WizRawPixel *)_vm->getHEPaletteSlot(1)); - if (_vm->_game.heversion > 99 && _vm->VAR_COLOR_BLACK != 0xFF && _vm->VAR(_vm->VAR_COLOR_BLACK) == color) + if ((_vm->_game.heversion < 100) || (tmpVm->VAR_WIZ_TRANSPARENT_COLOR != 0xFF && _vm->VAR(tmpVm->VAR_WIZ_TRANSPARENT_COLOR) == *bmapPtr)) break; WizSimpleBitmap dstBitmap; diff --git a/engines/scumm/he/intern_he.h b/engines/scumm/he/intern_he.h index b3980b435f4..91e31e8b7e5 100644 --- a/engines/scumm/he/intern_he.h +++ b/engines/scumm/he/intern_he.h @@ -268,6 +268,7 @@ class Moonbase; class ScummEngine_v71he : public ScummEngine_v70he { friend class Wiz; friend class Moonbase; + friend class Gdi; protected: enum SubOpType {