diff options
author | Martin Kiewitz | 2010-01-31 17:14:58 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-01-31 17:14:58 +0000 |
commit | 66c88b98f54fb750bebb038ef92636bcc906db55 (patch) | |
tree | 453adae0cbd2ff6c76ccd98e61e34f14318ee42a /engines/sci/engine | |
parent | 6a3308150fd401b25cb2cab1c8c494fbf3af1a12 (diff) | |
download | scummvm-rg350-66c88b98f54fb750bebb038ef92636bcc906db55.tar.gz scummvm-rg350-66c88b98f54fb750bebb038ef92636bcc906db55.tar.bz2 scummvm-rg350-66c88b98f54fb750bebb038ef92636bcc906db55.zip |
SCI: GfxCache is now also called directly w/o SciGui nor SciGui32
svn-id: r47759
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 36 | ||||
-rw-r--r-- | engines/sci/engine/state.h | 2 |
2 files changed, 8 insertions, 30 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 572429a016..347487f42d 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -38,6 +38,7 @@ #include "sci/graphics/gui32.h" #include "sci/graphics/ports.h" #include "sci/graphics/animate.h" +#include "sci/graphics/cache.h" #include "sci/graphics/cursor.h" #include "sci/graphics/palette.h" #include "sci/graphics/screen.h" @@ -80,12 +81,7 @@ void _k_dirloop(reg_t object, uint16 angle, EngineState *s, int argc, reg_t *arg else loopNo = -1; } -#ifdef ENABLE_SCI32 - if (s->_gui32) - maxLoops = s->_gui32->getLoopCount(viewId); - else -#endif - maxLoops = s->_gui->getLoopCount(viewId); + maxLoops = s->_gfxCache->kernelViewGetLoopCount(viewId); if ((loopNo > 1) && (maxLoops < 4)) @@ -466,12 +462,7 @@ reg_t kCelHigh(EngineState *s, int argc, reg_t *argv) { int16 celNo = (argc >= 3) ? argv[2].toSint16() : 0; int16 celHeight; -#ifdef ENABLE_SCI32 - if (s->_gui32) - celHeight = s->_gui32->getCelHeight(viewId, loopNo, celNo); - else -#endif - celHeight = s->_gui->getCelHeight(viewId, loopNo, celNo); + celHeight = s->_gfxCache->kernelViewGetCelHeight(viewId, loopNo, celNo); return make_reg(0, celHeight); } @@ -484,12 +475,7 @@ reg_t kCelWide(EngineState *s, int argc, reg_t *argv) { int16 celNo = (argc >= 3) ? argv[2].toSint16() : 0; int16 celWidth; -#ifdef ENABLE_SCI32 - if (s->_gui32) - celWidth = s->_gui32->getCelWidth(viewId, loopNo, celNo); - else -#endif - celWidth = s->_gui->getCelWidth(viewId, loopNo, celNo); + celWidth = s->_gfxCache->kernelViewGetCelWidth(viewId, loopNo, celNo); return make_reg(0, celWidth); } @@ -499,12 +485,7 @@ reg_t kNumLoops(EngineState *s, int argc, reg_t *argv) { GuiResourceId viewId = GET_SEL32V(s->_segMan, object, view); int16 loopCount; -#ifdef ENABLE_SCI32 - if (s->_gui32) - loopCount = s->_gui32->getLoopCount(viewId); - else -#endif - loopCount = s->_gui->getLoopCount(viewId); + loopCount = s->_gfxCache->kernelViewGetLoopCount(viewId); debugC(2, kDebugLevelGraphics, "NumLoops(view.%d) = %d", viewId, loopCount); @@ -517,12 +498,7 @@ reg_t kNumCels(EngineState *s, int argc, reg_t *argv) { int16 loopNo = GET_SEL32V(s->_segMan, object, loop); int16 celCount; -#ifdef ENABLE_SCI32 - if (s->_gui32) - celCount = s->_gui32->getCelCount(viewId, loopNo); - else -#endif - celCount = s->_gui->getCelCount(viewId, loopNo); + celCount = s->_gfxCache->kernelViewGetCelCount(viewId, loopNo); debugC(2, kDebugLevelGraphics, "NumCels(view.%d, %d) = %d", viewId, loopNo, celCount); diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h index 58cf2f9b76..299e6ac1d6 100644 --- a/engines/sci/engine/state.h +++ b/engines/sci/engine/state.h @@ -55,6 +55,7 @@ class GfxAnimate; class GfxPorts; class GfxScreen; class GfxPalette; +class GfxCache; class SciGui; class Cursor; class MessageState; @@ -155,6 +156,7 @@ public: GfxPorts *_gfxPorts; // Port managment for 16-bit gfx GfxScreen *_gfxScreen; GfxPalette *_gfxPalette; + GfxCache *_gfxCache; SciGui *_gui; /* Currently active Gui */ #ifdef ENABLE_SCI32 |