aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/scumm.cpp
diff options
context:
space:
mode:
authorTravis Howell2009-01-04 03:49:23 +0000
committerTravis Howell2009-01-04 03:49:23 +0000
commitd0fc28bbd1bd5a3399c629e5d25ae3a64fef977c (patch)
tree68d39802db270642507b027fdeb25cfc059315de /engines/scumm/scumm.cpp
parent4670e37a78409bfe9279c5d73c8d581f0d66143e (diff)
downloadscummvm-rg350-d0fc28bbd1bd5a3399c629e5d25ae3a64fef977c.tar.gz
scummvm-rg350-d0fc28bbd1bd5a3399c629e5d25ae3a64fef977c.tar.bz2
scummvm-rg350-d0fc28bbd1bd5a3399c629e5d25ae3a64fef977c.zip
Use cache when converting 16bit colors, for faster conversions.
svn-id: r35714
Diffstat (limited to 'engines/scumm/scumm.cpp')
-rw-r--r--engines/scumm/scumm.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index aeb1269865..5fe4031de0 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -264,6 +264,7 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
_palManipPalette = NULL;
_palManipIntermediatePal = NULL;
memset(gfxUsageBits, 0, sizeof(gfxUsageBits));
+ _hePaletteCache = NULL;
_hePalettes = NULL;
_shadowPalette = NULL;
_shadowPaletteSize = 0;
@@ -805,6 +806,7 @@ ScummEngine_v90he::~ScummEngine_v90he() {
delete _logicHE;
}
if (_game.heversion >= 99) {
+ free(_hePaletteCache);
free(_hePalettes);
}
}
@@ -1521,6 +1523,9 @@ void ScummEngine_v99he::resetScumm() {
ScummEngine_v90he::resetScumm();
+ _hePaletteCache = (int16 *)malloc(65536);
+ memset(_hePaletteCache, -1, 65536);
+
_hePalettes = (uint8 *)malloc((_numPalettes + 1) * 1024);
memset(_hePalettes, 0, (_numPalettes + 1) * 1024);