From a06a28fa97f4c278166cfa83fac87977b3a0f864 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 10 Apr 2006 17:32:04 +0000 Subject: Implements saving the color cache to a file (much faster startup for custom effect + less memory while gui isn't shown) svn-id: r21766 --- gui/theme.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gui/theme.h') diff --git a/gui/theme.h b/gui/theme.h index 9a58afe57e..bf13ad72eb 100644 --- a/gui/theme.h +++ b/gui/theme.h @@ -26,6 +26,7 @@ #include "common/system.h" #include "common/rect.h" #include "common/str.h" +#include "common/file.h" #include "common/config-file.h" #include "graphics/surface.h" @@ -426,9 +427,15 @@ private: Common::String _shadingEpxressionR, _shadingEpxressionG, _shadingEpxressionB; uint _numCacheColors; + bool _usingColorCache; OverlayColor *_colorCacheTable; void setupColorCache(); - + void clearColorCache(); + + Common::String cacheFileName(); + bool loadCacheFile(); + bool createCacheFile(); + typedef OverlayColor (ThemeNew::*InactiveDialogCallback)(OverlayColor col, bool cache); InactiveDialogCallback _dialogShadingCallback; -- cgit v1.2.3