From 9702826aa016728f8b928aa05f01274da75d1d6d Mon Sep 17 00:00:00 2001 From: Robert Göffringmann Date: Thu, 31 Jul 2003 21:26:27 +0000 Subject: added patched messages for BASS's mistranslations. (also fixed bug about italian menu glitch) svn-id: r9349 --- sky/text.cpp | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'sky/text.cpp') diff --git a/sky/text.cpp b/sky/text.cpp index e789be2d63..26c9600bb9 100644 --- a/sky/text.cpp +++ b/sky/text.cpp @@ -222,6 +222,10 @@ void SkyText::fnTextModule(uint32 textInfoId, uint32 textNo) { } void SkyText::getText(uint32 textNr) { //load text #"textNr" into textBuffer + + if (patchMessage(textNr)) + return ; + uint32 sectionNo = (textNr & 0x0F000) >> 12; if (SkyState::_itemList[FIRST_TEXT_SEC + sectionNo] == (void **)NULL) { //check if already loaded @@ -586,3 +590,47 @@ char SkyText::getTextChar() { } } +bool SkyText::patchMessage(uint32 textNum) { + + uint16 patchIdx = _patchLangIdx[SkyState::_systemVars.language]; + uint16 patchNum = _patchLangNum[SkyState::_systemVars.language]; + for (uint16 cnt = 0; cnt < patchNum; cnt++) { + if (_patchedMessages[cnt + patchIdx].textNr == textNum) { + strcpy(_textBuffer, _patchedMessages[cnt + patchIdx].text); + return true; + } + } + return false; +} + +const PatchMessage SkyText::_patchedMessages[NUM_PATCH_MSG] = { + { 28724, "Testo e Parlato" }, // - italian + { 28707, "Solo Testo" }, + { 28693, "Solo Parlato" }, + { 28724, "Text och tal" }, // - swedish + { 28707, "Endast text" }, + { 28693, "Endast tal" }, + { 28686, "Musikvolym" } +}; + +const uint16 SkyText::_patchLangIdx[8] = { + 0xFFFF, // SKY_ENGLISH + 0xFFFF, // SKY_GERMAN + 0xFFFF, // SKY_FRENCH + 0xFFFF, // SKY_USA + 3, // SKY_SWEDISH + 0, // SKY_ITALIAN + 0xFFFF, // SKY_PORTUGUESE + 0xFFFF // SKY_SPANISH +}; + +const uint16 SkyText::_patchLangNum[8] = { + 0, // SKY_ENGLISH + 0, // SKY_GERMAN + 0, // SKY_FRENCH + 0, // SKY_USA + 4, // SKY_SWEDISH + 3, // SKY_ITALIAN + 0, // SKY_PORTUGUESE + 0 // SKY_SPANISH +}; -- cgit v1.2.3