aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2010-08-11 21:16:45 +0000
committerMartin Kiewitz2010-08-11 21:16:45 +0000
commit7e3b2bedb6bcffb172dda4f4436dc3dc89a0a649 (patch)
tree79af3505d62fb053f636408eb70a4f1b1bca5a66 /engines
parent60b27502092eb149271715e3c3a5d8ab0cbc4308 (diff)
downloadscummvm-rg350-7e3b2bedb6bcffb172dda4f4436dc3dc89a0a649.tar.gz
scummvm-rg350-7e3b2bedb6bcffb172dda4f4436dc3dc89a0a649.tar.bz2
scummvm-rg350-7e3b2bedb6bcffb172dda4f4436dc3dc89a0a649.zip
SCI: revert r51969
broke laura bow 1, need to figure out whats exactly wrong svn-id: r52004
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/graphics/animate.cpp10
-rw-r--r--engines/sci/graphics/animate.h4
2 files changed, 6 insertions, 8 deletions
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;