diff options
-rw-r--r-- | engines/sci/engine/seg_manager.cpp | 8 | ||||
-rw-r--r-- | engines/sci/graphics/animate.cpp | 3 |
2 files changed, 4 insertions, 7 deletions
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index f19c03d5a8..5371238304 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -531,12 +531,6 @@ Node *SegManager::lookupNode(reg_t addr) { SegmentType type = getSegmentType(addr.segment); if (type != SEG_TYPE_NODES) { - if (g_sci->getGameId() == "kq1sci") { - // WORKAROUND: The demo of KQ1 is trying to use an invalid memory reference as a list node - warning("Attempt to use non-node %04x:%04x (type %d) as list node", PRINT_REG(addr), type); - return NULL; - } - error("Attempt to use non-node %04x:%04x (type %d) as list node", PRINT_REG(addr), type); return NULL; } @@ -544,7 +538,7 @@ Node *SegManager::lookupNode(reg_t addr) { NodeTable *nt = (NodeTable *)_heap[addr.segment]; if (!nt->isValidEntry(addr.offset)) { - error("Attempt to use invalid reference %04x:%04x as list node", PRINT_REG(addr)); + error("Attempt to use invalid or discarded reference %04x:%04x as list node", PRINT_REG(addr)); return NULL; } diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp index 598724f2be..06054f3a19 100644 --- a/engines/sci/graphics/animate.cpp +++ b/engines/sci/graphics/animate.cpp @@ -606,6 +606,9 @@ void GfxAnimate::kernelAnimate(reg_t listReference, bool cycle, int argc, reg_t if (cycle) { if (!invoke(list, argc, argv)) return; + + // Look up the list again, as it may have been modified + list = _s->_segMan->lookupList(listReference); } Port *oldPort = _ports->setPort((Port *)_ports->_picWind); |