Patch #2019455: Patch for reducing the BSS size of Cine engine.

svn-id: r33087
This commit is contained in:
Kari Salminen 2008-07-17 07:13:41 +00:00
parent 17d86414cb
commit 67bef188d3
4 changed files with 11 additions and 9 deletions

View File

@ -94,6 +94,7 @@ public:
Common::StringList _volumeResourceFiles;
StringPtrHashMap _volumeEntriesMap;
TextHandler _textHandler;
private:
void initialize(void);

View File

@ -337,7 +337,7 @@ int FWRenderer::drawChar(char character, int x, int y) {
x += 5;
} else if ((width = fontParamTable[(unsigned char)character].characterWidth)) {
idx = fontParamTable[(unsigned char)character].characterIdx;
drawSpriteRaw(textTable[idx][0], textTable[idx][1], 16, 8, _backBuffer, x, y);
drawSpriteRaw(g_cine->_textHandler.textTable[idx][0], g_cine->_textHandler.textTable[idx][1], 16, 8, _backBuffer, x, y);
x += width + 1;
}
@ -938,7 +938,7 @@ int OSRenderer::drawChar(char character, int x, int y) {
x += 5;
} else if ((width = fontParamTable[(unsigned char)character].characterWidth)) {
idx = fontParamTable[(unsigned char)character].characterIdx;
drawSpriteRaw2(textTable[idx][0], 0, 16, 8, _backBuffer, x, y);
drawSpriteRaw2(g_cine->_textHandler.textTable[idx][0], 0, 16, 8, _backBuffer, x, y);
x += width + 1;
}

View File

@ -31,8 +31,6 @@ namespace Cine {
byte *textDataPtr;
byte textTable[256][2][16 * 8];
const char **failureMessages;
const CommandeType *defaultActionCommand;
const CommandeType *systemMenu;
@ -77,14 +75,14 @@ void loadTextData(const char *pFileName, byte *pDestinationBuffer) {
loadRelatedPalette(pFileName);
for (i = 0; i < numCharacters; i++) {
gfxConvertSpriteToRaw(textTable[i][0], tempBuffer, 16, 8);
generateMask(textTable[i][0], textTable[i][1], 16 * 8, 0);
gfxConvertSpriteToRaw(g_cine->_textHandler.textTable[i][0], tempBuffer, 16, 8);
generateMask(g_cine->_textHandler.textTable[i][0], g_cine->_textHandler.textTable[i][1], 16 * 8, 0);
tempBuffer += dataSize;
}
} else {
for (i = 0; i < 90; i++) {
gfxConvertSpriteToRaw(textTable[i][0], tempBuffer, 8, 8);
generateMask(textTable[i][0], textTable[i][1], 8 * 8, 0);
gfxConvertSpriteToRaw(g_cine->_textHandler.textTable[i][0], tempBuffer, 8, 8);
generateMask(g_cine->_textHandler.textTable[i][0], g_cine->_textHandler.textTable[i][1], 8 * 8, 0);
tempBuffer += 0x40;
}
}

View File

@ -34,7 +34,10 @@ namespace Cine {
typedef char CommandeType[20];
extern byte *textDataPtr;
extern byte textTable[256][2][16 * 8];
struct TextHandler {
byte textTable[256][2][16 * 8];
};
extern const char **failureMessages;
extern const CommandeType *defaultActionCommand;