[Scummvm-git-logs] scummvm master -> 29c8c930f35f98e67a973cad984101765a66e85c

Scorpeg noreply at scummvm.org
Sat Jul 18 19:18:17 UTC 2026


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:
29c8c930f3 PHOENIXVR: Support for chinese and japanese releases


Commit: 29c8c930f35f98e67a973cad984101765a66e85c
    https://github.com/scummvm/scummvm/commit/29c8c930f35f98e67a973cad984101765a66e85c
Author: Scorp (scorp at mrs.mn)
Date: 2026-07-18T22:18:00+03:00

Commit Message:
PHOENIXVR: Support for chinese and japanese releases

Changed paths:
    engines/phoenixvr/detection_tables.h
    engines/phoenixvr/phoenixvr.cpp


diff --git a/engines/phoenixvr/detection_tables.h b/engines/phoenixvr/detection_tables.h
index 012c236d6c3..eb4880c46d3 100644
--- a/engines/phoenixvr/detection_tables.h
+++ b/engines/phoenixvr/detection_tables.h
@@ -246,6 +246,32 @@ const ADGameDescription gameDescriptions[] = {
 		GUIO1(GUIO_NONE)
 	},
 
+	{"messenger",
+		nullptr,
+		AD_ENTRY5s("script.pak", "1e0f9cb47bc203e9e2983b03ffa85174", 185,
+                   "textes.txt", "b3a05836ab3aa9a6e01d86549386f0de", 4746,
+				   "cd1/Data/interface.vr", "23ccee9fa38fedc054d781312253d825", 325513,
+				   "cd1/Data/Script1.pak", "c451dddc568dd9f91e5e381388bd6b58", 54909,
+				   "cd2/Data/Script2.pak", "d7af7fa917912626c9d13503a2a1178c", 82085),
+		Common::JA_JPN,
+		Common::kPlatformWindows,
+		ADGF_DROPPLATFORM | ADGF_CD | ADGF_UNSTABLE,
+		GUIO1(GUIO_NONE)
+	},
+
+	{"messenger",
+		nullptr,
+		AD_ENTRY5s("script.pak", "1e0f9cb47bc203e9e2983b03ffa85174", 185,
+                   "textes.txt", "a52f4c494c9a85d99d7ea08051d9f4d8", 3770,
+				   "cd1/Data/interface.vr", "110c55142ec95dcbdc0dd86a68013d2a", 188422,
+				   "cd1/Data/Script1.pak", "f599fc4da33515e414ddb97d8ef9010c", 54920,
+				   "cd2/Data/Script2.pak", "d7af7fa917912626c9d13503a2a1178c", 82085),
+		Common::ZH_TWN,
+		Common::kPlatformWindows,
+		ADGF_DROPPLATFORM | ADGF_CD | ADGF_UNSTABLE,
+		GUIO1(GUIO_NONE)
+	},
+
 	{"dracula1",
 		"GOG release",
 		AD_ENTRY2s("script.lst", "78060b78cf403ddb7e22903ba7b269d6", 548,
diff --git a/engines/phoenixvr/phoenixvr.cpp b/engines/phoenixvr/phoenixvr.cpp
index 9c68fba07a3..de9de5bee9e 100644
--- a/engines/phoenixvr/phoenixvr.cpp
+++ b/engines/phoenixvr/phoenixvr.cpp
@@ -60,8 +60,12 @@ PhoenixVREngine *g_engine;
 
 static Common::CodePage getTextCodePage(Common::Language language) {
 	switch (language) {
+	case Common::JA_JPN:
+		return Common::kWindows932;
 	case Common::RU_RUS:
 		return Common::kWindows1251;
+	case Common::ZH_TWN:
+		return Common::kBig5;
 	default:
 		return Common::kWindows1252;
 	}
@@ -1613,12 +1617,34 @@ Common::Error PhoenixVREngine::run() {
 
 	_arn.reset(ARN::create());
 #ifdef USE_FREETYPE2
-	static const Common::String regular("NotoSans-Regular.ttf");
-	static const Common::String bold("NotoSans-Bold.ttf");
+	const Common::Language language = _gameDescription->language;
+	const bool isJapanese = language == Common::JA_JPN;
+	const bool isTraditionalChinese = language == Common::ZH_TWN;
+	static const Common::String defaultRegular("NotoSans-Regular.ttf");
+	static const Common::String defaultBold("NotoSans-Bold.ttf");
+	static const Common::String japaneseRegular("NotoSansJP-Regular.otf");
+	static const Common::String japaneseBold("NotoSansJP-Regular.otf");
+	static const Common::String traditionalChineseRegular("NotoSansTC-Regular.otf");
+	static const Common::String traditionalChineseBold("NotoSansTC-Bold.otf");
+	const Common::String *regular = &defaultRegular;
+	const Common::String *bold = &defaultBold;
+
+	if (isJapanese) {
+		regular = &japaneseRegular;
+		bold = &japaneseBold;
+	} else if (isTraditionalChinese) {
+		regular = &traditionalChineseRegular;
+		bold = &traditionalChineseBold;
+	}
+
 	const int fontSizes[] = {8, 10, 12, 14, 16, 18};
 	for (uint i = 0; i < ARRAYSIZE(fontSizes); ++i) {
-		_regularFonts[i].reset(Graphics::loadTTFFontFromArchive(regular, fontSizes[i]));
-		_boldFonts[i].reset(Graphics::loadTTFFontFromArchive(bold, fontSizes[i]));
+		_regularFonts[i].reset(Graphics::loadTTFFontFromArchive(*regular, fontSizes[i]));
+		_boldFonts[i].reset(Graphics::loadTTFFontFromArchive(*bold, fontSizes[i]));
+		if (isJapanese && !_regularFonts[i])
+			_regularFonts[i].reset(Graphics::loadTTFFontFromArchive("VL-Gothic-Regular.ttf", fontSizes[i], Graphics::kTTFSizeModeCell));
+		if (isJapanese && !_boldFonts[i])
+			_boldFonts[i].reset(Graphics::loadTTFFontFromArchive("VL-Gothic-Regular.ttf", fontSizes[i], Graphics::kTTFSizeModeCell));
 	}
 #endif
 
@@ -1633,11 +1659,11 @@ Common::Error PhoenixVREngine::run() {
 
 	_variables.loadVariableTxt();
 	{
-		Common::File textes;
-		if (textes.open(Common::Path("textes.txt"))) {
+		Common::ScopedPtr<Common::SeekableReadStream> textes(open("textes.txt"));
+		if (textes) {
 			Common::CodePage textCodePage = getTextCodePage(_gameDescription->language);
-			while (!textes.eos()) {
-				auto text = textes.readLine();
+			while (!textes->eos()) {
+				auto text = textes->readLine();
 				if (text.empty() || text[0] != '*')
 					continue;
 				uint pos = 1;




More information about the Scummvm-git-logs mailing list