Moved to a database to save memory on PalmOS

svn-id: r16164
This commit is contained in:
Chris Apers 2004-12-20 16:50:29 +00:00
parent 5950a2346e
commit f9d9484d7b
2 changed files with 55 additions and 0 deletions

View file

@ -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

View file

@ -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];