aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/animate.cpp
diff options
context:
space:
mode:
authorMartin Kiewitz2010-10-26 20:19:17 +0000
committerMartin Kiewitz2010-10-26 20:19:17 +0000
commitd078a4d235117696d889a6f52a0b2c6a0569d6ea (patch)
tree40d4b1da9464fb8da4f5b975c0ca3f35ce552031 /engines/sci/graphics/animate.cpp
parentd3523a604071eae4f78f879f9d42a81f29b9121f (diff)
downloadscummvm-rg350-d078a4d235117696d889a6f52a0b2c6a0569d6ea.tar.gz
scummvm-rg350-d078a4d235117696d889a6f52a0b2c6a0569d6ea.tar.bz2
scummvm-rg350-d078a4d235117696d889a6f52a0b2c6a0569d6ea.zip
SCI: fix gfx issues when giving out cards hoyle4
bit 2 actually triggers special drawing of cels in sierra sci svn-id: r53855
Diffstat (limited to 'engines/sci/graphics/animate.cpp')
-rw-r--r--engines/sci/graphics/animate.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp
index 8aa6f5284f..159f791ebd 100644
--- a/engines/sci/graphics/animate.cpp
+++ b/engines/sci/graphics/animate.cpp
@@ -283,17 +283,21 @@ void GfxAnimate::fill(byte &old_picNotValid) {
if ((signal & kSignalHidden) && !(signal & kSignalAlwaysUpdate))
setNsRect = false;
} else {
- view->getCelRect(it->loopNo, it->celNo, it->x, it->y, it->z, it->celRect);
+ // This special handling is not included in the other SCI1.1 interpreters and MUST NOT be
+ // checked in those cases, otherwise we will break games (e.g. EcoQuest 2, room 200)
+ if ((g_sci->getGameId() == GID_HOYLE4) && (it->scaleSignal & kScaleSignalHoyle4SpecialHandling)) {
+ view->getCelRect(it->loopNo, it->celNo, it->x, it->y, it->z, it->celRect);
+ it->celRect.left = readSelectorValue(_s->_segMan, curObject, SELECTOR(nsLeft));
+ it->celRect.top = readSelectorValue(_s->_segMan, curObject, SELECTOR(nsTop));
+ it->celRect.right = readSelectorValue(_s->_segMan, curObject, SELECTOR(nsRight));
+ it->celRect.bottom = readSelectorValue(_s->_segMan, curObject, SELECTOR(nsBottom));
+ view->getCelSpecialHoyle4Rect(it->loopNo, it->celNo, it->x, it->y, it->z, it->celRect);
+ setNsRect = false;
+ } else {
+ view->getCelRect(it->loopNo, it->celNo, it->x, it->y, it->z, it->celRect);
+ }
}
- // Checking for this bit must be here for Hoyle4, otherwise cards are unclickable.
- // This feature is not included in the other SCI1.1 interpreters and MUST NOT be
- // checked in those cases, otherwise we will break games (e.g. EcoQuest 2, room 200)
- // TODO: hoyle 4 has different code inside kAnimate and even special code, when bit 0 is not
- // set, but bit 2 is
- if ((g_sci->getGameId() == GID_HOYLE4) && (it->scaleSignal & kScaleSignalHoyle4DontSetNsrect))
- setNsRect = false;
-
if (setNsRect) {
writeSelectorValue(_s->_segMan, curObject, SELECTOR(nsLeft), it->celRect.left);
writeSelectorValue(_s->_segMan, curObject, SELECTOR(nsTop), it->celRect.top);