aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Apers2004-12-20 16:50:29 +0000
committerChris Apers2004-12-20 16:50:29 +0000
commitf9d9484d7be4fc5cd14f28e866ce35ff79a2df97 (patch)
treedf5d1c66342891a0e2b4bc866aef5a1dff2b016c
parent5950a2346eabaa6759b77cf2d2ea099e43a26a7e (diff)
downloadscummvm-rg350-f9d9484d7be4fc5cd14f28e866ce35ff79a2df97.tar.gz
scummvm-rg350-f9d9484d7be4fc5cd14f28e866ce35ff79a2df97.tar.bz2
scummvm-rg350-f9d9484d7be4fc5cd14f28e866ce35ff79a2df97.zip
Moved to a database to save memory on PalmOS
svn-id: r16164
-rw-r--r--sky/hufftext.cpp41
-rw-r--r--sky/text.h14
2 files changed, 55 insertions, 0 deletions
diff --git a/sky/hufftext.cpp b/sky/hufftext.cpp
index b701ec271b..7cccf1364d 100644
--- a/sky/hufftext.cpp
+++ b/sky/hufftext.cpp
@@ -23,6 +23,17 @@
namespace Sky {
+#ifdef __PALM_OS__
+const HuffTree *Text::_huffTree_00109;
+const HuffTree *Text::_huffTree_00267;
+const HuffTree *Text::_huffTree_00288;
+const HuffTree *Text::_huffTree_00303;
+const HuffTree *Text::_huffTree_00331;
+const HuffTree *Text::_huffTree_00348;
+const HuffTree *Text::_huffTree_00365;
+const HuffTree *Text::_huffTree_00368;
+const HuffTree *Text::_huffTree_00372;
+#else
const HuffTree Text::_huffTree_00109[] = {
{ 1, 22, 0 },
{ 2, 9, 0 },
@@ -2000,5 +2011,35 @@ const HuffTree Text::_huffTree_00372[] = {
{ 0, 0, 148 },
{ 0, 0, '!' },
};
+#endif
} // End of namespace Sky
+
+#ifdef __PALM_OS__
+#include "scumm_globals.h"
+
+_GINIT(Sky_Hufftext)
+_GSETPTR(Sky::Text::_huffTree_00109, GBVARS_HUFFTREE_00109_INDEX, const Sky::HuffTree, GBVARS_QUEEN)
+_GSETPTR(Sky::Text::_huffTree_00267, GBVARS_HUFFTREE_00267_INDEX, const Sky::HuffTree, GBVARS_QUEEN)
+_GSETPTR(Sky::Text::_huffTree_00288, GBVARS_HUFFTREE_00288_INDEX, const Sky::HuffTree, GBVARS_QUEEN)
+_GSETPTR(Sky::Text::_huffTree_00303, GBVARS_HUFFTREE_00303_INDEX, const Sky::HuffTree, GBVARS_QUEEN)
+_GSETPTR(Sky::Text::_huffTree_00331, GBVARS_HUFFTREE_00331_INDEX, const Sky::HuffTree, GBVARS_QUEEN)
+_GSETPTR(Sky::Text::_huffTree_00348, GBVARS_HUFFTREE_00348_INDEX, const Sky::HuffTree, GBVARS_QUEEN)
+_GSETPTR(Sky::Text::_huffTree_00365, GBVARS_HUFFTREE_00365_INDEX, const Sky::HuffTree, GBVARS_QUEEN)
+_GSETPTR(Sky::Text::_huffTree_00368, GBVARS_HUFFTREE_00368_INDEX, const Sky::HuffTree, GBVARS_QUEEN)
+_GSETPTR(Sky::Text::_huffTree_00372, GBVARS_HUFFTREE_00372_INDEX, const Sky::HuffTree, GBVARS_QUEEN)
+_GEND
+
+_GRELEASE(Sky_Hufftext)
+_GRELEASEPTR(GBVARS_HUFFTREE_00109_INDEX, GBVARS_QUEEN)
+_GRELEASEPTR(GBVARS_HUFFTREE_00267_INDEX, GBVARS_QUEEN)
+_GRELEASEPTR(GBVARS_HUFFTREE_00288_INDEX, GBVARS_QUEEN)
+_GRELEASEPTR(GBVARS_HUFFTREE_00303_INDEX, GBVARS_QUEEN)
+_GRELEASEPTR(GBVARS_HUFFTREE_00331_INDEX, GBVARS_QUEEN)
+_GRELEASEPTR(GBVARS_HUFFTREE_00348_INDEX, GBVARS_QUEEN)
+_GRELEASEPTR(GBVARS_HUFFTREE_00365_INDEX, GBVARS_QUEEN)
+_GRELEASEPTR(GBVARS_HUFFTREE_00368_INDEX, GBVARS_QUEEN)
+_GRELEASEPTR(GBVARS_HUFFTREE_00372_INDEX, GBVARS_QUEEN)
+_GEND
+
+#endif
diff --git a/sky/text.h b/sky/text.h
index 784e7e9f96..372c4b7023 100644
--- a/sky/text.h
+++ b/sky/text.h
@@ -103,6 +103,7 @@ protected:
bool _dtCentre; //set for centre text
uint32 _lowTextWidth, _mouseOfsX, _mouseOfsY;
+#ifndef __PALM_OS__
static const HuffTree _huffTree_00109[]; // trees moved to hufftext.cpp
static const HuffTree _huffTree_00267[];
static const HuffTree _huffTree_00288[];
@@ -112,6 +113,19 @@ protected:
static const HuffTree _huffTree_00365[];
static const HuffTree _huffTree_00368[];
static const HuffTree _huffTree_00372[];
+#else
+public:
+ static const HuffTree *_huffTree_00109; // trees moved to hufftext.cpp
+ static const HuffTree *_huffTree_00267;
+ static const HuffTree *_huffTree_00288;
+ static const HuffTree *_huffTree_00303;
+ static const HuffTree *_huffTree_00331;
+ static const HuffTree *_huffTree_00348;
+ static const HuffTree *_huffTree_00365;
+ static const HuffTree *_huffTree_00368;
+ static const HuffTree *_huffTree_00372;
+protected:
+#endif
static const PatchMessage _patchedMessages[NUM_PATCH_MSG];
static const uint16 _patchLangIdx[8];