mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-05 02:17:05 +00:00
DREAMWEB: Added support for Russian fan-translation
This commit is contained in:
parent
ac83b1d08c
commit
93dfd3922e
@ -490,12 +490,9 @@ void DreamWebEngine::cls() {
|
||||
}
|
||||
|
||||
uint8 DreamWebEngine::modifyChar(uint8 c) const {
|
||||
if (c < 128)
|
||||
return c;
|
||||
|
||||
switch(getLanguage()) {
|
||||
switch (getLanguage()) {
|
||||
case Common::DE_DEU:
|
||||
switch(c) {
|
||||
switch (c) {
|
||||
case 129:
|
||||
return 'Z' + 3;
|
||||
case 132:
|
||||
@ -570,6 +567,10 @@ uint8 DreamWebEngine::modifyChar(uint8 c) const {
|
||||
default:
|
||||
return c;
|
||||
}
|
||||
case Common::RU_RUS:
|
||||
if (c >= 224)
|
||||
c -= 48;
|
||||
// fall through
|
||||
default:
|
||||
return c;
|
||||
}
|
||||
|
@ -776,6 +776,9 @@ public:
|
||||
void loadRoomData(const Room &room, bool skipDat);
|
||||
void useTempCharset(GraphicsFile *charset);
|
||||
void useCharset1();
|
||||
void useCharsetIcons1();
|
||||
void useCharsetTempgraphics();
|
||||
void resetCharset();
|
||||
void printMessage(uint16 x, uint16 y, uint8 index, uint8 maxWidth, bool centered);
|
||||
void printMessage2(uint16 x, uint16 y, uint8 index, uint8 maxWidth, bool centered, uint8 count);
|
||||
bool isItDescribed(const ObjPos *objPos);
|
||||
|
@ -440,6 +440,10 @@ void DreamWebEngine::showLeftPage() {
|
||||
showFrame(_folderGraphics2, 0, y, 5, 0);
|
||||
_lineSpacing = 8;
|
||||
_charShift = 91;
|
||||
|
||||
if (getLanguage() == Common::RU_RUS)
|
||||
_charShift = 182;
|
||||
|
||||
uint8 pageIndex = _folderPage - 2;
|
||||
const uint8 *string = getTextInFile1(pageIndex * 2);
|
||||
y = 48;
|
||||
@ -845,6 +849,10 @@ void DreamWebEngine::diaryKeyN() {
|
||||
void DreamWebEngine::showDiaryPage() {
|
||||
showFrame(_diaryGraphics, kDiaryx, kDiaryy, 0, 0);
|
||||
useTempCharset(&_diaryCharset);
|
||||
|
||||
if (getLanguage() == Common::RU_RUS)
|
||||
useCharsetTempgraphics();
|
||||
|
||||
_charShift = 91+91;
|
||||
const uint8 *string = getTextInFile1(_diaryPage);
|
||||
uint16 y = kDiaryy + 16;
|
||||
|
@ -344,7 +344,12 @@ void DreamWebEngine::printCurs() {
|
||||
height = 11;
|
||||
} else
|
||||
height = 8;
|
||||
multiGet(_textUnder, x, y, 6, height);
|
||||
|
||||
int w = 6;
|
||||
if (getLanguage() == Common::RU_RUS)
|
||||
w = 7;
|
||||
|
||||
multiGet(_textUnder, x, y, w, height);
|
||||
++_mainTimer;
|
||||
if ((_mainTimer & 16) == 0)
|
||||
showFrame(_monitorCharset, x, y, '/' - 32, 0);
|
||||
|
@ -103,7 +103,7 @@ uint8 DreamWebEngine::printSlow(const uint8 *string, uint16 x, uint16 y, uint8 m
|
||||
}
|
||||
if (charCount != 1) {
|
||||
c1 = modifyChar(c1);
|
||||
_charShift = 91;
|
||||
_charShift = getLanguage() == Common::RU_RUS ? 182 : 91;
|
||||
uint16 offset2 = offset;
|
||||
printBoth(_charset1, &offset2, y, c1, c2);
|
||||
_charShift = 0;
|
||||
@ -194,6 +194,16 @@ uint8 DreamWebEngine::getNumber(const GraphicsFile &charSet, const uint8 *string
|
||||
}
|
||||
|
||||
uint8 DreamWebEngine::kernChars(uint8 firstChar, uint8 secondChar, uint8 width) {
|
||||
if (getLanguage() == Common::RU_RUS) {
|
||||
if ((firstChar == 'a') || (firstChar == 'u') || (firstChar == 0xa0)
|
||||
|| (firstChar == 0xa8) || (firstChar == 0xa9) || (firstChar == 0xe9)) {
|
||||
if ((secondChar == 0xe2) || (secondChar == 'n') || (secondChar == 't') || (secondChar == 'r') || (secondChar == 'i') || (secondChar == 'l'))
|
||||
return width-1;
|
||||
|
||||
}
|
||||
return width;
|
||||
}
|
||||
|
||||
if ((firstChar == 'a') || (firstChar == 'u')) {
|
||||
if ((secondChar == 'n') || (secondChar == 't') || (secondChar == 'r') || (secondChar == 'i') || (secondChar == 'l'))
|
||||
return width-1;
|
||||
|
@ -780,6 +780,10 @@ void DreamWebEngine::showNames() {
|
||||
}
|
||||
if (_loadingOrSave != 2) {
|
||||
_charShift = 91;
|
||||
|
||||
if (getLanguage() == Common::RU_RUS)
|
||||
_charShift = 182;
|
||||
|
||||
printDirect((const uint8 *)name.c_str(), kOpsx + 21, kOpsy + 10*slot + 10, 200, false);
|
||||
_charShift = 0;
|
||||
continue;
|
||||
|
@ -1789,16 +1789,29 @@ void DreamWebEngine::showTime() {
|
||||
int minutes = _vars._minuteCount;
|
||||
int hours = _vars._hourCount;
|
||||
|
||||
showFrame(_charset1, 282+5, 21, 91*3+10 + seconds / 10, 0);
|
||||
showFrame(_charset1, 282+9, 21, 91*3+10 + seconds % 10, 0);
|
||||
if (getLanguage() == Common::RU_RUS) {
|
||||
showFrame(_icons1, 282+5, 21, 32+10 + seconds / 10, 0);
|
||||
showFrame(_icons1, 282+9, 21, 32+10 + seconds % 10, 0);
|
||||
|
||||
showFrame(_charset1, 270+5, 21, 91*3 + minutes / 10, 0);
|
||||
showFrame(_charset1, 270+11, 21, 91*3 + minutes % 10, 0);
|
||||
showFrame(_icons1, 270+5, 21, 32 + minutes / 10, 0);
|
||||
showFrame(_icons1, 270+11, 21, 32 + minutes % 10, 0);
|
||||
|
||||
showFrame(_charset1, 256+5, 21, 91*3 + hours / 10, 0);
|
||||
showFrame(_charset1, 256+11, 21, 91*3 + hours % 10, 0);
|
||||
showFrame(_icons1, 256+5, 21, 32 + hours / 10, 0);
|
||||
showFrame(_icons1, 256+11, 21, 32 + hours % 10, 0);
|
||||
|
||||
showFrame(_charset1, 267+5, 21, 91*3+20, 0);
|
||||
showFrame(_icons1, 267+5, 21, 32+20, 0);
|
||||
} else {
|
||||
showFrame(_charset1, 282+5, 21, 91*3+10 + seconds / 10, 0);
|
||||
showFrame(_charset1, 282+9, 21, 91*3+10 + seconds % 10, 0);
|
||||
|
||||
showFrame(_charset1, 270+5, 21, 91*3 + minutes / 10, 0);
|
||||
showFrame(_charset1, 270+11, 21, 91*3 + minutes % 10, 0);
|
||||
|
||||
showFrame(_charset1, 256+5, 21, 91*3 + hours / 10, 0);
|
||||
showFrame(_charset1, 256+11, 21, 91*3 + hours % 10, 0);
|
||||
|
||||
showFrame(_charset1, 267+5, 21, 91*3+20, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void DreamWebEngine::watchCount() {
|
||||
@ -1806,7 +1819,10 @@ void DreamWebEngine::watchCount() {
|
||||
return;
|
||||
++_timerCount;
|
||||
if (_timerCount == 9) {
|
||||
showFrame(_charset1, 268+4, 21, 91*3+21, 0);
|
||||
if (getLanguage() == Common::RU_RUS)
|
||||
showFrame(_icons1, 268+4, 21, 53, 0);
|
||||
else
|
||||
showFrame(_charset1, 268+4, 21, 91*3+21, 0);
|
||||
_watchDump = 1;
|
||||
} else if (_timerCount == 18) {
|
||||
_timerCount = 0;
|
||||
@ -1827,14 +1843,14 @@ void DreamWebEngine::watchCount() {
|
||||
}
|
||||
|
||||
void DreamWebEngine::roomName() {
|
||||
printMessage(88, 18, 53, 240, false);
|
||||
printMessage(88, (getLanguage() == Common::RU_RUS ? 17 : 18), 53, 240, false);
|
||||
uint16 textIndex = _roomNum;
|
||||
if (textIndex >= 32)
|
||||
textIndex -= 32;
|
||||
_lineSpacing = 7;
|
||||
uint8 maxWidth = (_vars._watchOn == 1) ? 120 : 160;
|
||||
const uint8 *string = (const uint8 *)_roomDesc.getString(textIndex);
|
||||
printDirect(string, 88, 25, maxWidth, false);
|
||||
printDirect(string, 88, (getLanguage() == Common::RU_RUS ? 26 : 25), maxWidth, false);
|
||||
_lineSpacing = 10;
|
||||
useCharset1();
|
||||
}
|
||||
@ -1935,6 +1951,20 @@ void DreamWebEngine::useCharset1() {
|
||||
_currentCharset = &_charset1;
|
||||
}
|
||||
|
||||
void DreamWebEngine::resetCharset() {
|
||||
_charShift = 0;
|
||||
useCharset1();
|
||||
}
|
||||
|
||||
void DreamWebEngine::useCharsetIcons1() {
|
||||
_currentCharset = &_icons1;
|
||||
_charShift = 182;
|
||||
}
|
||||
|
||||
void DreamWebEngine::useCharsetTempgraphics() {
|
||||
_currentCharset = &_diaryGraphics;
|
||||
}
|
||||
|
||||
void DreamWebEngine::useTempCharset(GraphicsFile *charset) {
|
||||
_currentCharset = charset;
|
||||
}
|
||||
@ -2304,7 +2334,15 @@ void DreamWebEngine::describeOb() {
|
||||
if (_foreignRelease && _objectType == kSetObjectType1)
|
||||
y = 82;
|
||||
_charShift = 91 + 91;
|
||||
|
||||
if (getLanguage() == Common::RU_RUS)
|
||||
useCharsetIcons1();
|
||||
|
||||
printDirect(&obText, 33, &y, 241, 241 & 1);
|
||||
|
||||
if (getLanguage() == Common::RU_RUS)
|
||||
resetCharset();
|
||||
|
||||
_charShift = 0;
|
||||
y = 104;
|
||||
if (_foreignRelease && _objectType == kSetObjectType1)
|
||||
|
@ -91,9 +91,16 @@ void DreamWebEngine::startTalk() {
|
||||
uint16 y;
|
||||
|
||||
_charShift = 91+91;
|
||||
|
||||
if (getLanguage() == Common::RU_RUS)
|
||||
useCharsetIcons1();
|
||||
|
||||
y = 64;
|
||||
printDirect(&str, 66, &y, 241, true);
|
||||
|
||||
if (getLanguage() == Common::RU_RUS)
|
||||
resetCharset();
|
||||
|
||||
_charShift = 0;
|
||||
y = 80;
|
||||
printDirect(&str, 66, &y, 241, true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user