diff options
author | Kari Salminen | 2008-07-17 07:13:41 +0000 |
---|---|---|
committer | Kari Salminen | 2008-07-17 07:13:41 +0000 |
commit | 67bef188d3977478c7d57b4016885c9293642cd2 (patch) | |
tree | d19833a841141b8635c03e8b6c97d8ff2512fa17 | |
parent | 17d86414cb5d7c2b4c5159b5b5d1b2330fa8eb83 (diff) | |
download | scummvm-rg350-67bef188d3977478c7d57b4016885c9293642cd2.tar.gz scummvm-rg350-67bef188d3977478c7d57b4016885c9293642cd2.tar.bz2 scummvm-rg350-67bef188d3977478c7d57b4016885c9293642cd2.zip |
Patch #2019455: Patch for reducing the BSS size of Cine engine.
svn-id: r33087
-rw-r--r-- | engines/cine/cine.h | 1 | ||||
-rw-r--r-- | engines/cine/gfx.cpp | 4 | ||||
-rw-r--r-- | engines/cine/texte.cpp | 10 | ||||
-rw-r--r-- | engines/cine/texte.h | 5 |
4 files changed, 11 insertions, 9 deletions
diff --git a/engines/cine/cine.h b/engines/cine/cine.h index 7568d8310e..06f2dfd982 100644 --- a/engines/cine/cine.h +++ b/engines/cine/cine.h @@ -94,6 +94,7 @@ public: Common::StringList _volumeResourceFiles; StringPtrHashMap _volumeEntriesMap; + TextHandler _textHandler; private: void initialize(void); diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index 2b7f3b8890..1f868ccb75 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -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; } diff --git a/engines/cine/texte.cpp b/engines/cine/texte.cpp index 9b4b83f420..e4fd334926 100644 --- a/engines/cine/texte.cpp +++ b/engines/cine/texte.cpp @@ -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; } } diff --git a/engines/cine/texte.h b/engines/cine/texte.h index ae82832aea..f471c3c49e 100644 --- a/engines/cine/texte.h +++ b/engines/cine/texte.h @@ -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; |