aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2009-10-21 15:12:10 +0000
committerMartin Kiewitz2009-10-21 15:12:10 +0000
commitc9e618b6a5b682f2bc1b62a1c6b09bad3e7391b0 (patch)
tree39ace8cb7ed99017d3f438f1019c29ae28d516b8 /engines
parent1e4e76af0f231bc02871d36fae65810f6cf9a994 (diff)
downloadscummvm-rg350-c9e618b6a5b682f2bc1b62a1c6b09bad3e7391b0.tar.gz
scummvm-rg350-c9e618b6a5b682f2bc1b62a1c6b09bad3e7391b0.tar.bz2
scummvm-rg350-c9e618b6a5b682f2bc1b62a1c6b09bad3e7391b0.zip
SCI/newgui: updating flags separately to fix issue in sq1 (almost at the end) where wilco will go michael jackson otherwise
svn-id: r45308
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/gui/gui_animate.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/engines/sci/gui/gui_animate.cpp b/engines/sci/gui/gui_animate.cpp
index 150e37ec30..f52c5c7ae5 100644
--- a/engines/sci/gui/gui_animate.cpp
+++ b/engines/sci/gui/gui_animate.cpp
@@ -427,6 +427,20 @@ void SciGuiAnimate::restoreAndDelete(int argc, reg_t *argv) {
GuiAnimateList::iterator listIterator;
GuiAnimateList::iterator listEnd = _list.end();
+
+ // This has to be done in a separate loop. At least in sq1 some .dispose modifies FIXEDLOOP flag in signal for
+ // another object. In that case we would overwrite the new signal with our version of the old signal
+ listIterator = _list.begin();
+ while (listIterator != listEnd) {
+ listEntry = *listIterator;
+ curObject = listEntry->object;
+ signal = listEntry->signal;
+
+ // Finally update signal
+ PUT_SEL32V(segMan, curObject, signal, signal);
+ listIterator++;
+ }
+
listIterator = _list.reverse_begin();
while (listIterator != listEnd) {
listEntry = *listIterator;
@@ -438,9 +452,6 @@ void SciGuiAnimate::restoreAndDelete(int argc, reg_t *argv) {
PUT_SEL32V(segMan, curObject, underBits, 0);
}
- // Finally update signal
- PUT_SEL32V(segMan, curObject, signal, signal);
-
if (signal & SCI_ANIMATE_SIGNAL_DISPOSEME) {
// Call .delete_ method of that object
invoke_selector(_s, curObject, _s->_kernel->_selectorCache.delete_, kContinueOnInvalidSelector, argv, argc, __FILE__, __LINE__, 0);