From b138b5cce12228670b92c069fc4a272e7ed96175 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 1 Feb 2007 13:10:49 +0000 Subject: Fix for missing Brandon in Zanthia's home (see bug #1498221 "KYRA1: Subtitles missing when meeting Zanthia "). svn-id: r25320 --- engines/kyra/screen.cpp | 15 ++++++++++++--- engines/kyra/screen.h | 1 + 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'engines/kyra') diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 759249dfb8..20f6022101 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -138,6 +138,16 @@ void Screen::updateScreen() { if (_disableScreen) return; + updateDirtyRects(); + + _forceFullUpdate = false; + _numDirtyRects = 0; + //for debug reasons (needs 640x200 screen) + //_system->copyRectToScreen(getPagePtr(2), SCREEN_W, 320, 0, SCREEN_W, SCREEN_H); + _system->updateScreen(); +} + +void Screen::updateDirtyRects() { if (_forceFullUpdate) { _system->copyRectToScreen(getCPagePtr(0), SCREEN_W, 0, 0, SCREEN_W, SCREEN_H); } else { @@ -149,9 +159,6 @@ void Screen::updateScreen() { } _forceFullUpdate = false; _numDirtyRects = 0; - //for debug reasons (needs 640x200 screen) - //_system->copyRectToScreen(getPagePtr(2), SCREEN_W, 320, 0, SCREEN_W, SCREEN_H); - _system->updateScreen(); } uint8 *Screen::getPagePtr(int pageNum) { @@ -237,6 +244,8 @@ void Screen::fadeSpecialPalette(int palIndex, int startIndex, int size, int fade void Screen::fadePalette(const uint8 *palData, int delay) { debugC(9, kDebugLevelScreen, "Screen::fadePalette(%p, %d)", (const void *)palData, delay); + updateDirtyRects(); + uint8 fadePal[768]; memcpy(fadePal, _screenPalette, 768); uint8 diff, maxDiff = 0; diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h index aeaabd792b..db220a8e5e 100644 --- a/engines/kyra/screen.h +++ b/engines/kyra/screen.h @@ -200,6 +200,7 @@ public: private: uint8 *getPagePtr(int pageNum); + void updateDirtyRects(); int16 encodeShapeAndCalculateSize(uint8 *from, uint8 *to, int size); void restoreMouseRect(); -- cgit v1.2.3