aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
authorLars Skovlund2010-09-20 18:31:59 +0000
committerLars Skovlund2010-09-20 18:31:59 +0000
commitbd9f9bb06e7e69e4735aacbb75c8d5b3cf66b024 (patch)
treea4f0f4afb1331ac140f6717e6447bdcb0746a7bb /engines/sci/graphics
parentf7f743ac31d0ec5af6d21aa217dae7387498af42 (diff)
downloadscummvm-rg350-bd9f9bb06e7e69e4735aacbb75c8d5b3cf66b024.tar.gz
scummvm-rg350-bd9f9bb06e7e69e4735aacbb75c8d5b3cf66b024.tar.bz2
scummvm-rg350-bd9f9bb06e7e69e4735aacbb75c8d5b3cf66b024.zip
SCI: Handle bit 2 of scaleSignal by not updating nsRect values when
it's set. Currently game-specific for Hoyle4; fixes bug #3038424. But other SCI1.1 games should be tested with a general version of this to see whether it fixes relevant bugs. svn-id: r52818
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/animate.cpp10
-rw-r--r--engines/sci/graphics/animate.h3
2 files changed, 12 insertions, 1 deletions
diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp
index 75fbb3e097..6ea81a8925 100644
--- a/engines/sci/graphics/animate.cpp
+++ b/engines/sci/graphics/animate.cpp
@@ -278,6 +278,16 @@ void GfxAnimate::fill(byte &old_picNotValid, bool maySetNsRect) {
} else {
view->getCelRect(it->loopNo, it->celNo, it->x, it->y, it->z, it->celRect);
}
+
+ // This statement must be here for Hoyle4, otherwise cards are unclickable.
+ // This is probably one of the experimental features that were occasionally
+ // added to SCI interpreters; the corresponding check is absent in many SSCI
+ // versions. m_kiewitz knew about this flag before I (lskovlun) implemented it,
+ // so it is possible that more test cases are known. Also, some presently open
+ // SCI1.1 bugs may be fixed by this and should be re-tested with this patch generalized.
+ if (g_sci->getGameId() == GID_HOYLE4 && it->scaleSignal & kScaleSignalDontSetNsrect)
+ setNsRect = false;
+
if (setNsRect) {
writeSelectorValue(_s->_segMan, curObject, SELECTOR(nsLeft), it->celRect.left);
writeSelectorValue(_s->_segMan, curObject, SELECTOR(nsTop), it->celRect.top);
diff --git a/engines/sci/graphics/animate.h b/engines/sci/graphics/animate.h
index f25e54915e..370e589643 100644
--- a/engines/sci/graphics/animate.h
+++ b/engines/sci/graphics/animate.h
@@ -53,7 +53,8 @@ enum ViewSignals {
enum ViewScaleSignals {
kScaleSignalDoScaling = 0x0001, // enables scaling when drawing that cel (involves scaleX and scaleY)
kScaleSignalGlobalScaling = 0x0002, // means that global scaling shall get applied on that cel (sets scaleX/scaleY)
- kScaleSignalUnknown2 = 0x0004 // really unknown
+ kScaleSignalDontSetNsrect = 0x0004 // do not set nsRect inside kAnimate(); for a test case see bug #3038424
+
};
struct AnimateEntry {