[Scummvm-git-logs] scummvm master -> 9720b96f383b76dace83baecadfefb630ee4877f

sev- sev at scummvm.org
Sat Jul 31 13:00:37 UTC 2021


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
6404ff39d6 AGI: Fix Russian input in Russian localizations
8a2284ebc7 AGI: Added user input conversion for Russian titles
9720b96f38 DEVTOOLS: Print out hls output in verbose mode in dumper companion


Commit: 6404ff39d683896c876d0fe661f78ef53b258e72
    https://github.com/scummvm/scummvm/commit/6404ff39d683896c876d0fe661f78ef53b258e72
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-31T15:00:27+02:00

Commit Message:
AGI: Fix Russian input in Russian localizations

Changed paths:
    engines/agi/keyboard.cpp


diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp
index d1ad572c73..5f01318313 100644
--- a/engines/agi/keyboard.cpp
+++ b/engines/agi/keyboard.cpp
@@ -146,6 +146,16 @@ void AgiEngine::processScummVMEvents() {
 				key = key - 0x05d0 + 0xe0;
 			}
 
+			if (_game._vm->getLanguage() == Common::RU_RUS) {
+				// Convert UTF16 to CP866
+				if (key >= 0x400 && key <= 0x4ff) {
+					if (key >= 0x440)
+						key = key - 0x410 + 0xb0;
+					else
+						key = key - 0x410 + 0x80;
+				}
+			}
+
 			if ((key) && (key <= 0xFF)) {
 				// No special key, directly accept it
 				// Is ISO-8859-1, we need lower 128 characters only, which is plain ASCII, so no mapping required


Commit: 8a2284ebc7ed4c5df0cecf4520d1bc1c9376f818
    https://github.com/scummvm/scummvm/commit/8a2284ebc7ed4c5df0cecf4520d1bc1c9376f818
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-31T15:00:27+02:00

Commit Message:
AGI: Added user input conversion for Russian titles

Changed paths:
    engines/agi/words.cpp


diff --git a/engines/agi/words.cpp b/engines/agi/words.cpp
index 92e6dcd138..e1c3cf6221 100644
--- a/engines/agi/words.cpp
+++ b/engines/agi/words.cpp
@@ -345,6 +345,33 @@ void Words::parseUsingDictionary(const char *rawUserInput) {
 	userInputLowcased = userInput;
 	userInputLowcased.toLowercase();
 
+	if (_vm->getLanguage() == Common::RU_RUS) {
+		const char *conv =
+			// АБВГДЕЖЗИЙКЛМНОП
+			  "abvgdewziiklmnop" // 80
+			// РСТУФХЦЧШЩЪЫЬЭЮЯ
+			  "rstufxcyhhjijeuq" // 90
+			// абвгдежзийклмноп
+			  "abvgdewziiklmnop" // a0
+			  "                " // b0
+			  "                " // c0
+			  "                " // d0
+			// рстуфхцчшщъыьэюя
+			  "rstufxcyhhjijeuq" // e0
+			// Ее
+			  "ee              ";// f0
+
+		Common::String tr;
+		for (uint i = 0; i < userInputLowcased.size(); i++) {
+			if ((byte)userInputLowcased[i] >= 0x80) {
+				tr += conv[(byte)userInputLowcased[i] - 0x80];
+			} else {
+				tr += (byte)userInputLowcased[i];
+			}
+		}
+		userInputLowcased = tr;
+	}
+
 	userInputLen = userInput.size();
 	userInputPtr = userInput.c_str();
 


Commit: 9720b96f383b76dace83baecadfefb630ee4877f
    https://github.com/scummvm/scummvm/commit/9720b96f383b76dace83baecadfefb630ee4877f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-31T15:00:28+02:00

Commit Message:
DEVTOOLS: Print out hls output in verbose mode in dumper companion

Changed paths:
    devtools/dumper-companion.pl


diff --git a/devtools/dumper-companion.pl b/devtools/dumper-companion.pl
index e20f3a5040..d749359582 100755
--- a/devtools/dumper-companion.pl
+++ b/devtools/dumper-companion.pl
@@ -100,6 +100,8 @@ sub processIso($) {
 	system1("hmount \"$isofile\" >/dev/null 2>&1") == 0 or die "Can't execute hmount";
 	print "done\n" unless $verbose;
 
+	print "C: hls -1alRU\n" if $verbose;
+
 	open(my $ls, "-|", "hls -1alRU");
 
 	my $dir = "";
@@ -111,6 +113,8 @@ sub processIso($) {
 	my $prevlen = 0;
 
 	while (<$ls>) {
+		print "LS: $_" if $verbose;
+
 		chomp;
 		flush STDOUT;
 
@@ -274,7 +278,7 @@ EOF
 sub system1($) {
 	my $cmd = shift;
 
-	print "$cmd\n" if $verbose;
+	print "C: $cmd\n" if $verbose;
 
 	return system $cmd;
 }




More information about the Scummvm-git-logs mailing list