From c8544430dfe7403540b2485d19584d951881e727 Mon Sep 17 00:00:00 2001 From: athrxx Date: Fri, 20 Dec 2019 01:27:43 +0100 Subject: KYRA: (EOB2/FM-TOWNS) - fix minor color glitch - in nightmare sequence in dungeon level -4 - can not always be noticed --- engines/kyra/graphics/screen_eob.cpp | 7 +++++++ engines/kyra/graphics/screen_eob.h | 1 + engines/kyra/sequence/sequences_darkmoon.cpp | 4 +--- 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/kyra/graphics/screen_eob.cpp b/engines/kyra/graphics/screen_eob.cpp index 1e3fb383a8..d7916f510f 100644 --- a/engines/kyra/graphics/screen_eob.cpp +++ b/engines/kyra/graphics/screen_eob.cpp @@ -156,6 +156,13 @@ void Screen_EoB::clearCurDim() { fillRect(_curDim->sx << 3, _curDim->sy, ((_curDim->sx + _curDim->w) << 3) - 1, (_curDim->sy + _curDim->h) - 1, _isAmiga ? amigaColorMap[_curDim->unkA] : _use16ColorMode ? 0 : _curDim->unkA); } +void Screen_EoB::clearCurDimOvl(int pageNum) { + if (pageNum > 1 || !_useOverlays) + return; + addDirtyRect(_curDim->sx << 3, _curDim->sy, _curDim->w << 3, _curDim->h); + clearOverlayRect(pageNum, _curDim->sx << 3, _curDim->sy, _curDim->w << 3, _curDim->h); +} + void Screen_EoB::setMouseCursor(int x, int y, const byte *shape) { setMouseCursor(x, y, shape, 0); } diff --git a/engines/kyra/graphics/screen_eob.h b/engines/kyra/graphics/screen_eob.h index fc6c5d28aa..6927ff7cce 100644 --- a/engines/kyra/graphics/screen_eob.h +++ b/engines/kyra/graphics/screen_eob.h @@ -39,6 +39,7 @@ public: void setClearScreenDim(int dim); void clearCurDim(); + void clearCurDimOvl(int pageNum); void setMouseCursor(int x, int y, const byte *shape); void setMouseCursor(int x, int y, const byte *shape, const uint8 *ovl); diff --git a/engines/kyra/sequence/sequences_darkmoon.cpp b/engines/kyra/sequence/sequences_darkmoon.cpp index 7d187e5a5a..b924b8fe85 100644 --- a/engines/kyra/sequence/sequences_darkmoon.cpp +++ b/engines/kyra/sequence/sequences_darkmoon.cpp @@ -1804,10 +1804,8 @@ const char *const DarkmoonSequenceHelper::_palFilesFinaleAmiga[] = { void DarkMoonEngine::seq_nightmare() { Screen::FontId of = _screen->setFont(Screen::FID_6_FNT); - if (_flags.lang == Common::JA_JPN) - _screen->clearCurDim(); + _screen->clearCurDimOvl(0); _screen->copyRegion(0, 0, 0, 120, 176, 24, 12, 2, Screen::CR_NO_P_CHECK); - initDialogueSequence(); gui_drawDialogueBox(); -- cgit v1.2.3