[Scummvm-git-logs] scummvm master -> f55b16ef8936418434d76e7da18941295c7a77dd

aquadran noreply at scummvm.org
Sun Jul 20 17:05:09 UTC 2025


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

Summary:
f55b16ef89 WINTERMUTE: W/A - replace accented chars in translated text for Polish version of Alpha Polaris


Commit: f55b16ef8936418434d76e7da18941295c7a77dd
    https://github.com/scummvm/scummvm/commit/f55b16ef8936418434d76e7da18941295c7a77dd
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2025-07-20T19:05:05+02:00

Commit Message:
WINTERMUTE: W/A - replace accented chars in translated text for Polish version of Alpha Polaris

Changed paths:
    engines/wintermute/base/base_string_table.cpp
    engines/wintermute/base/base_string_table.h


diff --git a/engines/wintermute/base/base_string_table.cpp b/engines/wintermute/base/base_string_table.cpp
index cd8b297cd77..ad03695872e 100644
--- a/engines/wintermute/base/base_string_table.cpp
+++ b/engines/wintermute/base/base_string_table.cpp
@@ -109,6 +109,31 @@ char *BaseStringTable::getKey(const char *str) const {
 	}
 }
 
+void BaseStringTable::replaceExpand(char *key, char *newStr, size_t newStrSize) const {
+	// W/A: Remove accented chars as input text in Polish version of Alpha Polaris
+	if (BaseEngine::instance().getGameId() == "alphapolaris" &&
+	    BaseEngine::instance().getLanguage() == Common::PL_POL) {
+		if (strcmp(key, "hotspot0360") == 0)
+			Common::strcpy_s(newStr, newStrSize, "Skuter sniezny");
+		if (strcmp(key, "hotspot0361") == 0)
+			Common::strcpy_s(newStr, newStrSize, "Slizgacz");
+		if (strcmp(key, "hotspot0362") == 0)
+			Common::strcpy_s(newStr, newStrSize, "Sniezny");
+		if (strcmp(key, "hotspot0364") == 0)
+			Common::strcpy_s(newStr, newStrSize, "Plemie");
+		if (strcmp(key, "hotspot0369") == 0)
+			Common::strcpy_s(newStr, newStrSize, "Lad");
+		if (strcmp(key, "hotspot0370") == 0)
+			Common::strcpy_s(newStr, newStrSize, "Wschod");
+		if (strcmp(key, "hotspot0375") == 0)
+			Common::strcpy_s(newStr, newStrSize, "Krzeslo");
+		if (strcmp(key, "hotspot0373") == 0)
+			Common::strcpy_s(newStr, newStrSize, "Wladza");
+		if (strcmp(key, "hotspot0378") == 0)
+			Common::strcpy_s(newStr, newStrSize, "Czlowiek");
+	}
+}
+
 //////////////////////////////////////////////////////////////////////////
 void BaseStringTable::expand(char **str) const {
 	if (str == nullptr || *str == nullptr || *str[0] != '/') {
@@ -134,6 +159,7 @@ void BaseStringTable::expand(char **str) const {
 		size_t newStrSize = it->_value.size() + 1;
 		newStr = new char[newStrSize];
 		Common::strcpy_s(newStr, newStrSize, it->_value.c_str());
+		replaceExpand(key, newStr, newStrSize);
 	} else {
 		size_t newStrSize = strlen(value) + 1;
 		newStr = new char[newStrSize];
diff --git a/engines/wintermute/base/base_string_table.h b/engines/wintermute/base/base_string_table.h
index 87f0e9c3179..5200f694a0a 100644
--- a/engines/wintermute/base/base_string_table.h
+++ b/engines/wintermute/base/base_string_table.h
@@ -51,7 +51,7 @@ private:
 	Common::HashMap<Common::String, Common::String> _strings;
 	Common::Array<Common::String> _filenames;
 	typedef Common::HashMap<Common::String, Common::String>::const_iterator StringsIter;
-
+	void replaceExpand(char *key, char *newStr, size_t newStrSize) const;
 };
 
 } // End of namespace Wintermute




More information about the Scummvm-git-logs mailing list