From ce9dcd7aa844c09167558a1fac5a1aadb16b52a9 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Sun, 25 Oct 2009 19:04:36 +0000 Subject: SCI/newgui: kAddToPic - behaviour is different between SCI1EARLY and SCI1MIDDLE (fixes graphic glitch in qfg2 intro) svn-id: r45373 --- engines/sci/gui/gui.cpp | 10 +++++++++- engines/sci/gui/gui.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/sci/gui/gui.cpp b/engines/sci/gui/gui.cpp index 4ec3edae9f..a9f5915801 100644 --- a/engines/sci/gui/gui.cpp +++ b/engines/sci/gui/gui.cpp @@ -563,6 +563,13 @@ void SciGui::animate(reg_t listReference, bool cycle, int argc, reg_t *argv) { _gfx->SetPort(oldPort); } +void SciGui::addToPicSetPicNotValid() { + if (getSciVersion() <= SCI_VERSION_1_EARLY) + _screen->_picNotValid = 1; + else + _screen->_picNotValid = 2; +} + void SciGui::addToPicList(reg_t listReference, int argc, reg_t *argv) { List *list; @@ -575,12 +582,13 @@ void SciGui::addToPicList(reg_t listReference, int argc, reg_t *argv) { _animate->makeSortedList(list); _animate->addToPicDrawCels(); - _screen->_picNotValid = 2; + addToPicSetPicNotValid(); } void SciGui::addToPicView(GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo celNo, int16 leftPos, int16 topPos, int16 priority, int16 control) { _gfx->SetPort((GuiPort *)_windowMgr->_picWind); _animate->addToPicDrawView(viewId, loopNo, celNo, leftPos, topPos, priority, control); + addToPicSetPicNotValid(); } void SciGui::setNowSeen(reg_t objectReference) { diff --git a/engines/sci/gui/gui.h b/engines/sci/gui/gui.h index 5298c3a2e4..d7df04fb84 100644 --- a/engines/sci/gui/gui.h +++ b/engines/sci/gui/gui.h @@ -143,6 +143,7 @@ protected: private: virtual void initPriorityBands(); virtual void animateShowPic(); + virtual void addToPicSetPicNotValid(); SciGuiGfx *_gfx; SciGuiresources *_resources; -- cgit v1.2.3