[Scummvm-git-logs] scummvm master -> e7b190fc77c1bc09b7526c9ba89d5c092b21c15d
sev-
sev at scummvm.org
Tue Jan 28 23:51:44 UTC 2020
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
93dfd3922e DREAMWEB: Added support for Russian fan-translation
e7b190fc77 NEWS: Mention support for Russian DreamWeb
Commit: 93dfd3922ec9f42677aa783e78b85b303187aa8e
https://github.com/scummvm/scummvm/commit/93dfd3922ec9f42677aa783e78b85b303187aa8e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-01-29T00:50:41+01:00
Commit Message:
DREAMWEB: Added support for Russian fan-translation
Changed paths:
engines/dreamweb/dreamweb.cpp
engines/dreamweb/dreamweb.h
engines/dreamweb/keypad.cpp
engines/dreamweb/monitor.cpp
engines/dreamweb/print.cpp
engines/dreamweb/saveload.cpp
engines/dreamweb/stubs.cpp
engines/dreamweb/talk.cpp
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp
index 435f91b..76db211 100644
--- a/engines/dreamweb/dreamweb.cpp
+++ b/engines/dreamweb/dreamweb.cpp
@@ -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;
}
diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h
index 8a5c72c..542db13 100644
--- a/engines/dreamweb/dreamweb.h
+++ b/engines/dreamweb/dreamweb.h
@@ -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);
diff --git a/engines/dreamweb/keypad.cpp b/engines/dreamweb/keypad.cpp
index 476e9b5..6c43c74 100644
--- a/engines/dreamweb/keypad.cpp
+++ b/engines/dreamweb/keypad.cpp
@@ -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;
diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index 5f0566c..daef8a4 100644
--- a/engines/dreamweb/monitor.cpp
+++ b/engines/dreamweb/monitor.cpp
@@ -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);
diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp
index b98d5dd..680e2bd 100644
--- a/engines/dreamweb/print.cpp
+++ b/engines/dreamweb/print.cpp
@@ -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;
diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp
index a104ba7..c869c13 100644
--- a/engines/dreamweb/saveload.cpp
+++ b/engines/dreamweb/saveload.cpp
@@ -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;
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 401ecf0..a519bf5 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -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)
diff --git a/engines/dreamweb/talk.cpp b/engines/dreamweb/talk.cpp
index 8bb469b..0ab25f7 100644
--- a/engines/dreamweb/talk.cpp
+++ b/engines/dreamweb/talk.cpp
@@ -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);
Commit: e7b190fc77c1bc09b7526c9ba89d5c092b21c15d
https://github.com/scummvm/scummvm/commit/e7b190fc77c1bc09b7526c9ba89d5c092b21c15d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-01-29T00:51:11+01:00
Commit Message:
NEWS: Mention support for Russian DreamWeb
Changed paths:
NEWS.md
diff --git a/NEWS.md b/NEWS.md
index dd611ef..c7dc75c 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -3,6 +3,9 @@ For a more comprehensive changelog of the latest experimental code, see:
#### 2.2.0 (XXXX-XX-XX)
+ Dreamweb:
+ - Added support for Russian fan-translation.
+
Kyra:
- Added support for the PC-98 version of Eye of the Beholder I.
More information about the Scummvm-git-logs
mailing list