diff options
author | Filippos Karapetis | 2009-10-25 22:33:08 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-10-25 22:33:08 +0000 |
commit | b5feeb60b64a62434ace4f316b51aa7849b2702e (patch) | |
tree | 42864894b6604939fb6fa42bfed3a7f49884bfc5 /engines/sci/gui | |
parent | 1a4b61739832a1f1d597b9c56e67dd8b80b32f76 (diff) | |
download | scummvm-rg350-b5feeb60b64a62434ace4f316b51aa7849b2702e.tar.gz scummvm-rg350-b5feeb60b64a62434ace4f316b51aa7849b2702e.tar.bz2 scummvm-rg350-b5feeb60b64a62434ace4f316b51aa7849b2702e.zip |
Moved the cel count calculation to the new graphics code
svn-id: r45379
Diffstat (limited to 'engines/sci/gui')
-rw-r--r-- | engines/sci/gui/gui.cpp | 11 | ||||
-rw-r--r-- | engines/sci/gui/gui.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/engines/sci/gui/gui.cpp b/engines/sci/gui/gui.cpp index a9f5915801..40434de5ff 100644 --- a/engines/sci/gui/gui.cpp +++ b/engines/sci/gui/gui.cpp @@ -690,6 +690,17 @@ int16 SciGui::getLoopCount(int view) { return loopCount; } +int16 SciGui::getCelCount(int view, int loop) { + SciGuiView *tmpView = new SciGuiView(_s->resMan, _screen, _palette, view); + if (!tmpView) + return -1; + + uint16 celCount = tmpView->getLoopInfo(loop)->celCount; + delete tmpView; + + return celCount; +} + bool SciGui::debugUndither(bool flag) { _screen->unditherSetState(flag); return false; diff --git a/engines/sci/gui/gui.h b/engines/sci/gui/gui.h index d7df04fb84..08ac12686a 100644 --- a/engines/sci/gui/gui.h +++ b/engines/sci/gui/gui.h @@ -127,6 +127,7 @@ public: int16 getCelHeight(int view, int loop, int cel); int16 getLoopCount(int view); + int16 getCelCount(int view, int loop); virtual bool debugUndither(bool flag); virtual bool debugShowMap(int mapNo); |