diff options
author | Martin Kiewitz | 2010-01-31 17:45:22 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-01-31 17:45:22 +0000 |
commit | aaf756e7364658bcde053932907bbf009e1762ab (patch) | |
tree | 1f5ac575c4e5c97de6a28fd8b1856c42a6336328 /engines/sci/graphics/cache.h | |
parent | 3b411f65767256f3d55fd361a253d06f6426654c (diff) | |
download | scummvm-rg350-aaf756e7364658bcde053932907bbf009e1762ab.tar.gz scummvm-rg350-aaf756e7364658bcde053932907bbf009e1762ab.tar.bz2 scummvm-rg350-aaf756e7364658bcde053932907bbf009e1762ab.zip |
SCI: implemented font caching
svn-id: r47762
Diffstat (limited to 'engines/sci/graphics/cache.h')
-rw-r--r-- | engines/sci/graphics/cache.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/sci/graphics/cache.h b/engines/sci/graphics/cache.h index a8c3dd5a13..d15d5b25c3 100644 --- a/engines/sci/graphics/cache.h +++ b/engines/sci/graphics/cache.h @@ -35,6 +35,7 @@ namespace Sci { class Font; class View; +typedef Common::HashMap<int, Font *> FontCache; typedef Common::HashMap<int, View *> ViewCache; class GfxCache { @@ -42,19 +43,23 @@ public: GfxCache(ResourceManager *resMan, GfxScreen *screen, GfxPalette *palette); ~GfxCache(); - View *getView(GuiResourceId viewNum); + Font *getFont(GuiResourceId fontId); + + View *getView(GuiResourceId viewId); int16 kernelViewGetCelWidth(GuiResourceId viewId, int16 loopNo, int16 celNo); int16 kernelViewGetCelHeight(GuiResourceId viewId, int16 loopNo, int16 celNo); int16 kernelViewGetLoopCount(GuiResourceId viewId); int16 kernelViewGetCelCount(GuiResourceId viewId, int16 loopNo); private: - void purgeCache(); + void purgeFontCache(); + void purgeViewCache(); ResourceManager *_resMan; GfxScreen *_screen; GfxPalette *_palette; + FontCache _cachedFonts; ViewCache _cachedViews; }; |