diff options
author | Peter Kohaut | 2019-09-07 21:07:31 +0200 |
---|---|---|
committer | Peter Kohaut | 2019-09-07 21:18:20 +0200 |
commit | 94b9304014217c57d4e050efb66ba9861f948ae2 (patch) | |
tree | e45844431d8707eda3a0a38204b2ee58f06b6bea /engines/bladerunner/ui/kia_section_suspects.cpp | |
parent | d99ba0a12675286d81431cb38f6ef55c02e7d497 (diff) | |
download | scummvm-rg350-94b9304014217c57d4e050efb66ba9861f948ae2.tar.gz scummvm-rg350-94b9304014217c57d4e050efb66ba9861f948ae2.tar.bz2 scummvm-rg350-94b9304014217c57d4e050efb66ba9861f948ae2.zip |
BLADERUNNER: Improved support for Russian translations
Adds support for Home Systems, Inc. + Siberian Studio R4 translation
patch.
Added name scrambling algorithm from R4 patch.
Fixed R3 support (previously was not named).
closes #11102
Diffstat (limited to 'engines/bladerunner/ui/kia_section_suspects.cpp')
-rw-r--r-- | engines/bladerunner/ui/kia_section_suspects.cpp | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/engines/bladerunner/ui/kia_section_suspects.cpp b/engines/bladerunner/ui/kia_section_suspects.cpp index c98c2c77bf..962d0a332f 100644 --- a/engines/bladerunner/ui/kia_section_suspects.cpp +++ b/engines/bladerunner/ui/kia_section_suspects.cpp @@ -211,10 +211,10 @@ void KIASectionSuspects::draw(Graphics::Surface &surface) { if (_suspectsWithIdentity[_suspectSelected]) { text = suspectName; } else if (_vm->_suspectsDatabase->get(_suspectSelected)->getSex()) { - sprintf(generatedText, "%s %s", _vm->_textKIA->getText(20), scrambleSuspectsName(suspectName)); + sprintf(generatedText, "%s %s", _vm->_textKIA->getText(20), _vm->_kia->scrambleSuspectsName(suspectName)); text = generatedText; } else { - sprintf(generatedText, "%s %s", _vm->_textKIA->getText(21), scrambleSuspectsName(suspectName)); + sprintf(generatedText, "%s %s", _vm->_textKIA->getText(21), _vm->_kia->scrambleSuspectsName(suspectName)); text = generatedText; } } @@ -283,34 +283,6 @@ void KIASectionSuspects::selectSuspect(int suspectId) { updateSuspectPhoto(); } -const char *KIASectionSuspects::scrambleSuspectsName(const char *name) { - static char buffer[32]; - - char *bufferPtr = buffer; - const char *namePtr = name; - - for (int i = 0 ; i < 6; ++i) { - if (Common::isAlpha(*namePtr)) { - char upper = toupper(*namePtr); - if ( upper < 'J' ) { - *bufferPtr++ = upper - 16; - } else { - *bufferPtr++ = upper - 9; - } - } else { - *bufferPtr++ = '0'; - } - if (*namePtr) { - ++namePtr; - } - if (i == 1) { - *bufferPtr++ = '-'; - } - } - *bufferPtr = 0; - return buffer; -} - void KIASectionSuspects::scrollBoxCallback(void *callbackData, void *source, int lineData, int mouseButton) { KIASectionSuspects *self = (KIASectionSuspects *)callbackData; |