diff options
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 8e97716b96..1e380e2573 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -492,7 +492,12 @@ reg_t kNumLoops(EngineState *s, int argc, reg_t *argv) { GuiResourceId viewId = readSelectorValue(s->_segMan, object, SELECTOR(view)); int16 loopCount; - loopCount = g_sci->_gfxCache->kernelViewGetLoopCount(viewId); +#ifdef ENABLE_SCI32 + if (getSciVersion() >= SCI_VERSION_2) { + loopCount = CelObjView::getNumLoops(viewId); + } else +#endif + loopCount = g_sci->_gfxCache->kernelViewGetLoopCount(viewId); debugC(9, kDebugLevelGraphics, "NumLoops(view.%d) = %d", viewId, loopCount); @@ -505,7 +510,12 @@ reg_t kNumCels(EngineState *s, int argc, reg_t *argv) { int16 loopNo = readSelectorValue(s->_segMan, object, SELECTOR(loop)); int16 celCount; - celCount = g_sci->_gfxCache->kernelViewGetCelCount(viewId, loopNo); +#ifdef ENABLE_SCI32 + if (getSciVersion() >= SCI_VERSION_2) { + celCount = CelObjView::getNumCels(viewId, loopNo); + } else +#endif + celCount = g_sci->_gfxCache->kernelViewGetCelCount(viewId, loopNo); debugC(9, kDebugLevelGraphics, "NumCels(view.%d, %d) = %d", viewId, loopNo, celCount); |