From 01d53a62165d229b88db11647ffe40ff2502d7b4 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 13 Jun 2010 22:01:10 +0000 Subject: Disabled two cases of findObjectByName() in SCI0 early games svn-id: r49639 --- engines/sci/engine/vm.cpp | 2 +- engines/sci/graphics/animate.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 1db9649a54..95ed13a3d3 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -201,7 +201,7 @@ static void validate_write_var(reg_t *r, reg_t *stack_base, int type, int max, i // stopGroop object, which points to ego, to the new ego object. If this is not // done, ego's movement will not be updated properly, so the result is // unpredictable (for example in LSL5, Patti spins around instead of walking). - if (index == 0 && type == VAR_GLOBAL) { // global 0 is ego + if (index == 0 && type == VAR_GLOBAL && getSciVersion() > SCI_VERSION_0_EARLY) { // global 0 is ego reg_t stopGroopPos = segMan->findObjectByName("stopGroop"); if (!stopGroopPos.isNull()) { // does the game have a stopGroop object? // Find the "client" member variable of the stopGroop object, and update it diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp index 48715af53e..598724f2be 100644 --- a/engines/sci/graphics/animate.cpp +++ b/engines/sci/graphics/animate.cpp @@ -63,9 +63,11 @@ void GfxAnimate::init() { if (getSciVersion() <= SCI_VERSION_01) _ignoreFastCast = true; // Also if fastCast object exists at gamestartup, we can assume that the interpreter doesnt do kAnimate aborts - // (found in larry 1) - if (!_s->_segMan->findObjectByName("fastCast").isNull()) - _ignoreFastCast = true; + // (found in Larry 1) + if (getSciVersion() > SCI_VERSION_0_EARLY) { + if (!_s->_segMan->findObjectByName("fastCast").isNull()) + _ignoreFastCast = true; + } } void GfxAnimate::disposeLastCast() { -- cgit v1.2.3