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
This commit is contained in:
Lars Skovlund 2010-09-20 18:31:59 +00:00
parent f7f743ac31
commit bd9f9bb06e
2 changed files with 12 additions and 1 deletions

View File

@ -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);

View File

@ -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 {