aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMartin Kiewitz2010-06-28 16:56:15 +0000
committerMartin Kiewitz2010-06-28 16:56:15 +0000
commit06648cb186608e845c4dc214249b863632bbbb3c (patch)
tree5b9a307920e73b6df5753c8599ad088961bcbf54 /engines/sci
parente857cc623e86211ae0c59630342cbeea65214e6e (diff)
downloadscummvm-rg350-06648cb186608e845c4dc214249b863632bbbb3c.tar.gz
scummvm-rg350-06648cb186608e845c4dc214249b863632bbbb3c.tar.bz2
scummvm-rg350-06648cb186608e845c4dc214249b863632bbbb3c.zip
SCI: fix regression of r50422, please no refactoring without proper testing - fixes animations in all sorts of games
svn-id: r50451
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/graphics/view.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp
index 71261490e4..b3bc733383 100644
--- a/engines/sci/graphics/view.cpp
+++ b/engines/sci/graphics/view.cpp
@@ -279,10 +279,8 @@ const CelInfo *GfxView::getCelInfo(int16 loopNo, int16 celNo) const {
}
uint16 GfxView::getCelCount(int16 loopNo) const {
-// assert(_loopCount);
-// loopNo = CLIP<int16>(loopNo, 0, _loopCount - 1);
- if ((loopNo < 0) || (loopNo >= _loopCount))
- return 0;
+ assert(_loopCount);
+ loopNo = CLIP<int16>(loopNo, 0, _loopCount - 1);
return _loop[loopNo].celCount;
}