From 7e3b2bedb6bcffb172dda4f4436dc3dc89a0a649 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Wed, 11 Aug 2010 21:16:45 +0000 Subject: SCI: revert r51969 broke laura bow 1, need to figure out whats exactly wrong svn-id: r52004 --- engines/sci/graphics/animate.cpp | 10 ++++------ engines/sci/graphics/animate.h | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'engines') diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp index 6f5a7ceac4..4aa19db9f4 100644 --- a/engines/sci/graphics/animate.cpp +++ b/engines/sci/graphics/animate.cpp @@ -204,15 +204,13 @@ void GfxAnimate::fill(byte &old_picNotValid, bool maySetNsRect) { // Get the corresponding view view = _cache->getView(it->viewId); - uint16 viewLoopCount = view->getLoopCount(); // adjust loop and cel, if any of those is invalid - if (it->loopNo >= viewLoopCount) { - it->loopNo = viewLoopCount - 1; + if (it->loopNo >= view->getLoopCount()) { + it->loopNo = 0; writeSelectorValue(_s->_segMan, curObject, SELECTOR(loop), it->loopNo); } - uint16 viewCelCount = view->getCelCount(it->loopNo); - if (it->celNo >= viewCelCount) { - it->celNo = viewCelCount - 1; + if (it->celNo >= view->getCelCount(it->loopNo)) { + it->celNo = 0; writeSelectorValue(_s->_segMan, curObject, SELECTOR(cel), it->celNo); } diff --git a/engines/sci/graphics/animate.h b/engines/sci/graphics/animate.h index 4739eb0d31..f25e54915e 100644 --- a/engines/sci/graphics/animate.h +++ b/engines/sci/graphics/animate.h @@ -60,8 +60,8 @@ struct AnimateEntry { int16 givenOrderNo; reg_t object; GuiResourceId viewId; - uint16 loopNo; - uint16 celNo; + int16 loopNo; + int16 celNo; int16 paletteNo; int16 x, y, z; int16 priority; -- cgit v1.2.3