[Scummvm-git-logs] scummvm-tools master -> 3b4c602aa02b0eac5d3f391d660637e79e78de3a

sev- sev at scummvm.org
Mon Apr 16 19:13:53 CEST 2018


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

Summary:
ea4eb9b6c3 TOOLS: Added support for other files in ru and en versions of Prince converter
3b4c602aa0 TOOLS: Add support for Polish in prince converter


Commit: ea4eb9b6c3e60183f9e1fbe5813cd7c233550cbf
    https://github.com/scummvm/scummvm-tools/commit/ea4eb9b6c3e60183f9e1fbe5813cd7c233550cbf
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2018-04-16T18:40:46+02:00

Commit Message:
TOOLS: Added support for other files in ru and en versions of Prince converter

Changed paths:
    engines/prince/convert-ru.pl


diff --git a/engines/prince/convert-ru.pl b/engines/prince/convert-ru.pl
index bf3c45f..7f05eca 100644
--- a/engines/prince/convert-ru.pl
+++ b/engines/prince/convert-ru.pl
@@ -13,9 +13,9 @@ my $lang;
 
 my @english = (' a ', ' is ', ' i ', ' and ', ' be ', 'can', ' me', 'you', 'ack', 'that', 'then', 'yes', 'um', 'chi', 'year', 'mm', 'no', 'da', 'on',
 				'bla', 'lik', 'ha', 'but', 'ma', 'wa', 'yeah', 'taste', 'str', 'grr', 'pff', 'air', 'lord', ' he, ', 'get', 'yuck', 'oo', 'blur', 'see',
-				'puah', 'lo', 'go', 'cur', 'hop', 'super', 'doing', 'well', 'real', 'sure', 'final', 'all', 'illeg');
+				'puah', 'lo', 'go', 'cur', 'hop', 'super', 'doing', 'well', 'real', 'sure', 'final', 'all', 'illeg', 'done', 'empt');
 
-while (<>) {
+while (<STDIN>) {
 	$line++;
 	my $str = $_;
 	my $lstr = lc $str;
@@ -25,7 +25,7 @@ while (<>) {
 		next;
 	}
 
-	if ($line == 4) {
+	if ($line > 4 and not defined $lang) {
 		if (/Bpdbyz/) {
 			$lang = 'ru';
 		} elsif (/Excuse/) {
@@ -35,7 +35,11 @@ while (<>) {
 		} elsif (/Przeppp/) {
 			$lang = 'pl';
 		} else {
-			die "Unknown lanugage";
+			if ($#ARGV == 0) {
+				$lang = $ARGV[0];
+			} else {
+				die "Unknown lanugage";
+			}
 		}
 	}
 
@@ -43,6 +47,8 @@ while (<>) {
 		# Heuristics to detect Russian
 		my $eng = 0;
 
+		s/\x0d\|/\|/;	# There is one instance of a stray ^M
+
 		for my $k (@english) {
 			if (index($lstr, $k) != -1) {
 				print;


Commit: 3b4c602aa02b0eac5d3f391d660637e79e78de3a
    https://github.com/scummvm/scummvm-tools/commit/3b4c602aa02b0eac5d3f391d660637e79e78de3a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2018-04-16T19:12:53+02:00

Commit Message:
TOOLS: Add support for Polish in prince converter

Changed paths:
    engines/prince/convert-ru.pl


diff --git a/engines/prince/convert-ru.pl b/engines/prince/convert-ru.pl
index 7f05eca..424b60b 100644
--- a/engines/prince/convert-ru.pl
+++ b/engines/prince/convert-ru.pl
@@ -25,7 +25,7 @@ while (<STDIN>) {
 		next;
 	}
 
-	if ($line > 4 and not defined $lang) {
+	if ($line >= 4 and not defined $lang) {
 		if (/Bpdbyz/) {
 			$lang = 'ru';
 		} elsif (/Excuse/) {
@@ -75,4 +75,10 @@ while (<STDIN>) {
 		tr /QWERTYUIOPASDFGHJKLZXCVBNM\x82\x7f\x83\x81\x84/ЙЦУКЕНГШЩЗФЫВАПРОЛДЯЧСМИТЬЭХБЖЮ/;
 		print;
 	}
+
+	if ($lang eq 'pl') {
+		tr /\x9c\xea\xbf\xb3\x9f\xe6\xf1\xf3\xb9\xaf\x8c\xa3\xd1\xc6\xca/śężłźćń󹯌ŁŃĆĘ/;
+
+		print;
+	}
 }





More information about the Scummvm-git-logs mailing list