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

elasota noreply at scummvm.org
Sun Apr 27 18:25:37 UTC 2025


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

Summary:
0929360dec VCRUISE: Fix CJK font rendering
9c7826bfec VCRUISE: Add support for Japanese DVD version
a0f13158af NEWS: Mention Schizm CJK fixes


Commit: 0929360dec1c11fcb4f6d0b371462a17fc48851f
    https://github.com/scummvm/scummvm/commit/0929360dec1c11fcb4f6d0b371462a17fc48851f
Author: elasota (1137273+elasota at users.noreply.github.com)
Date: 2025-04-27T14:21:39-04:00

Commit Message:
VCRUISE: Fix CJK font rendering

Changed paths:
    engines/vcruise/runtime.cpp


diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index d3ce191d0ca..1fe6edc135b 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -1500,25 +1500,6 @@ Runtime::Runtime(OSystem *system, Audio::Mixer *mixer, MidiDriver *midiDrv, cons
 
 	_rng.reset(new Common::RandomSource("vcruise"));
 
-#ifdef USE_FREETYPE2
-	if (_gameID == GID_AD2044) {
-		Common::File *f = new Common::File();
-		if (f->open("gfx/AD2044.TTF"))
-			_subtitleFontKeepalive.reset(Graphics::loadTTFFont(f, DisposeAfterUse::YES, 16, Graphics::kTTFSizeModeCharacter, 108, 72, Graphics::kTTFRenderModeLight));
-		else
-			delete f;
-	} else
-		_subtitleFontKeepalive.reset(Graphics::loadTTFFontFromArchive("NotoSans-Regular.ttf", 16, Graphics::kTTFSizeModeCharacter, 0, 0, Graphics::kTTFRenderModeLight));
-
-	_subtitleFont = _subtitleFontKeepalive.get();
-#endif
-
-	if (!_subtitleFont)
-		_subtitleFont = FontMan.getFontByUsage(Graphics::FontManager::kLocalizedFont);
-
-	if (!_subtitleFont)
-		warning("Couldn't load subtitle font, subtitles will be disabled");
-
 	_menuInterface.reset(new RuntimeMenuInterface(this));
 
 	for (int32 i = 0; i < 49; i++)
@@ -1957,6 +1938,46 @@ bool Runtime::bootGame(bool newGame) {
 	else
 		warning("Localization data failed to load!  Text and subtitles will be disabled.");
 
+
+#ifdef USE_FREETYPE2
+	if (_gameID == GID_AD2044) {
+		Common::File *f = new Common::File();
+		if (f->open("gfx/AD2044.TTF"))
+			_subtitleFontKeepalive.reset(Graphics::loadTTFFont(f, DisposeAfterUse::YES, 16, Graphics::kTTFSizeModeCharacter, 108, 72, Graphics::kTTFRenderModeLight));
+		else
+			delete f;
+	} else {
+		Common::String fontFile;
+		switch (_charSet) {
+		case kCharSetGreek:
+		case kCharSetLatin:
+		case kCharSetCyrillic:
+		default:
+			fontFile = "NotoSans-Regular.ttf";
+			break;
+		case kCharSetChineseSimplified:
+			fontFile = "NotoSansSC-Regular.otf";
+			break;
+		case kCharSetChineseTraditional:
+			fontFile = "NotoSansTC-Regular.otf";
+			break;
+		case kCharSetJapanese:
+			fontFile = "NotoSansJP-Regular.otf";
+			break;
+		}
+
+		_subtitleFontKeepalive.reset(Graphics::loadTTFFontFromArchive(fontFile, 16, Graphics::kTTFSizeModeCharacter, 0, 0, Graphics::kTTFRenderModeLight));
+	}
+
+	_subtitleFont = _subtitleFontKeepalive.get();
+#endif
+
+	if (!_subtitleFont)
+		_subtitleFont = FontMan.getFontByUsage(Graphics::FontManager::kLocalizedFont);
+
+	if (!_subtitleFont)
+		warning("Couldn't load subtitle font, subtitles will be disabled");
+
 	if (_gameID != GID_AD2044) {
 		_uiGraphics.resize(24);
 		for (uint i = 0; i < _uiGraphics.size(); i++) {
@@ -6609,6 +6630,8 @@ const Graphics::Font *Runtime::resolveFont(const Common::String &textStyle, uint
 #ifdef USE_FREETYPE2
 	const char *fontFile = nullptr;
 
+	const char *jpnFontName = "\x82\x6c\x82\x72\x20\x96\xbe\x92\xa9";
+
 	if (textStyle == "Verdana") {
 		switch (_charSet) {
 		case kCharSetGreek:
@@ -6618,13 +6641,13 @@ const Graphics::Font *Runtime::resolveFont(const Common::String &textStyle, uint
 			fontFile = "NotoSans-Bold.ttf";
 			break;
 		case kCharSetChineseSimplified:
-			fontFile = "NotoSansSC-Bold.ttf";
+			fontFile = "NotoSansSC-Bold.otf";
 			break;
 		case kCharSetChineseTraditional:
-			fontFile = "NotoSansTC-Bold.ttf";
+			fontFile = "NotoSansTC-Bold.otf";
 			break;
 		case kCharSetJapanese:
-			fontFile = "NotoSansJP-Bold.ttf";
+			fontFile = "NotoSansJP-Bold.otf";
 			break;
 		}
 	} else if (textStyle == "Arial") {
@@ -6636,15 +6659,17 @@ const Graphics::Font *Runtime::resolveFont(const Common::String &textStyle, uint
 			fontFile = "LiberationSans-Bold.ttf";
 			break;
 		case kCharSetChineseSimplified:
-			fontFile = "NotoSansSC-Bold.ttf";
+			fontFile = "NotoSansSC-Bold.otf";
 			break;
 		case kCharSetChineseTraditional:
-			fontFile = "NotoSansTC-Bold.ttf";
+			fontFile = "NotoSansTC-Bold.otf";
 			break;
 		case kCharSetJapanese:
-			fontFile = "NotoSansJP-Bold.ttf";
+			fontFile = "NotoSansJP-Bold.otf";
 			break;
 		}
+	} else if (textStyle == jpnFontName) {
+		fontFile = "NotoSansJP-Bold.otf";
 	}
 
 	if (fontFile) {


Commit: 9c7826bfecbfda049323bbfa61c2fcef8421eb38
    https://github.com/scummvm/scummvm/commit/9c7826bfecbfda049323bbfa61c2fcef8421eb38
Author: elasota (1137273+elasota at users.noreply.github.com)
Date: 2025-04-27T14:21:39-04:00

Commit Message:
VCRUISE: Add support for Japanese DVD version

Changed paths:
    engines/vcruise/detection.cpp
    engines/vcruise/detection.h
    engines/vcruise/detection_tables.h
    engines/vcruise/vcruise.cpp


diff --git a/engines/vcruise/detection.cpp b/engines/vcruise/detection.cpp
index 144adfc5db8..7c65dd1fa66 100644
--- a/engines/vcruise/detection.cpp
+++ b/engines/vcruise/detection.cpp
@@ -96,17 +96,23 @@ public:
 				game.appendGUIOptions(Common::getGameGUIOptionsDescriptionLanguage(Common::EL_GRC));
 				game.appendGUIOptions(Common::getGameGUIOptionsDescriptionLanguage(Common::RU_RUS));
 
-				// Steam version languages
-				if (adGame.desc->flags & VCruise::VCRUISE_GF_STEAM_LANGUAGES) {
+				if (adGame.desc->flags & VCruise::VCRUISE_GF_BUL_LANGUAGE)
 					game.appendGUIOptions(Common::getGameGUIOptionsDescriptionLanguage(Common::BG_BUL));
+
+				if (adGame.desc->flags & VCruise::VCRUISE_GF_TWN_LANGUAGE)
 					game.appendGUIOptions(Common::getGameGUIOptionsDescriptionLanguage(Common::ZH_TWN));
+
+				if (adGame.desc->flags & VCruise::VCRUISE_GF_JPN_LANGUAGE)
 					game.appendGUIOptions(Common::getGameGUIOptionsDescriptionLanguage(Common::JA_JPN));
+
+				if (adGame.desc->flags & VCruise::VCRUISE_GF_HUN_LANGUAGE)
 					game.appendGUIOptions(Common::getGameGUIOptionsDescriptionLanguage(Common::HU_HUN));
+
+				if (adGame.desc->flags & VCruise::VCRUISE_GF_CHN_LANGUAGE)
 					game.appendGUIOptions(Common::getGameGUIOptionsDescriptionLanguage(Common::ZH_CHN));
+
+				if (adGame.desc->flags & VCruise::VCRUISE_GF_CZE_LANGUAGE)
 					game.appendGUIOptions(Common::getGameGUIOptionsDescriptionLanguage(Common::CS_CZE));
-				} else if (adGame.desc->flags & VCruise::VCRUISE_GF_BUL_LANGUAGE) {
-					game.appendGUIOptions(Common::getGameGUIOptionsDescriptionLanguage(Common::BG_BUL));
-				}
 			}
 		}
 
diff --git a/engines/vcruise/detection.h b/engines/vcruise/detection.h
index 07a42770eb3..96f139dc68a 100644
--- a/engines/vcruise/detection.h
+++ b/engines/vcruise/detection.h
@@ -39,13 +39,21 @@ enum VCruiseGameFlag {
 	VCRUISE_GF_WANT_OGG_VORBIS	= (1 << 1),
 	VCRUISE_GF_NEED_JPEG		= (1 << 2),
 	VCRUISE_GF_GENTEE_PACKAGE	= (1 << 3),
+	VCRUISE_GF_USE_SETUP_EXE	= (1 << 4),
 	
-	VCRUISE_GF_BUL_LANGUAGE		= (1 << 4),
-	VCRUISE_GF_STEAM_LANGUAGES	= (1 << 5),
-	VCRUISE_GF_FORCE_LANGUAGE	= (1 << 6),
-	
-	VCRUISE_GF_WANT_MIDI		= (1 << 7),
+	VCRUISE_GF_BUL_LANGUAGE		= (1 << 6),
+	VCRUISE_GF_TWN_LANGUAGE		= (1 << 7),
+	VCRUISE_GF_JPN_LANGUAGE		= (1 << 8),
+	VCRUISE_GF_HUN_LANGUAGE		= (1 << 9),
+	VCRUISE_GF_CHN_LANGUAGE		= (1 << 10),
+	VCRUISE_GF_CZE_LANGUAGE		= (1 << 11),
+
+	VCRUISE_GF_FORCE_LANGUAGE	= (1 << 12),
+
+	VCRUISE_GF_WANT_MIDI		= (1 << 13),
 
+	VCRUISE_GF_STEAM_LANGUAGES = VCRUISE_GF_BUL_LANGUAGE | VCRUISE_GF_TWN_LANGUAGE | VCRUISE_GF_JPN_LANGUAGE
+									| VCRUISE_GF_HUN_LANGUAGE | VCRUISE_GF_CHN_LANGUAGE | VCRUISE_GF_CZE_LANGUAGE,
 };
 
 struct VCruiseGameDescription {
diff --git a/engines/vcruise/detection_tables.h b/engines/vcruise/detection_tables.h
index a6a7d42d07c..7a35f684be5 100644
--- a/engines/vcruise/detection_tables.h
+++ b/engines/vcruise/detection_tables.h
@@ -218,7 +218,8 @@ static const VCruiseGameDescription gameDescriptions[] = {
 		{
 			"schizm",
 			"English DVD",
-			AD_ENTRY1s("setup.pak", "eaaed2f6655342b4c320bdeb6f5ccfb9", 272655597),
+			AD_ENTRY2s("setup.pak", "eaaed2f6655342b4c320bdeb6f5ccfb9", 272655597,
+					   "setup.exe", "62f2ed1b1a6a4ed3e3298c7d6852a495", 63234),
 			Common::UNK_LANG,
 			Common::kPlatformWindows,
 			VCRUISE_GF_WANT_OGG_VORBIS | VCRUISE_GF_NEED_JPEG | VCRUISE_GF_GENTEE_PACKAGE | VCRUISE_GF_BUL_LANGUAGE,
@@ -227,6 +228,21 @@ static const VCruiseGameDescription gameDescriptions[] = {
 		GID_SCHIZM,
 		Common::EN_GRB,
 	},
+	{ // Schizm: Mysterious Journey, Japanese DVD Version, 12-language
+		{
+			"schizm",
+			"Japanese DVD",
+			AD_ENTRY2s("setup.pak", "eaaed2f6655342b4c320bdeb6f5ccfb9", 272655597,
+					   "setup.exe", "62f2ed1b1a6a4ed3e3298c7d6852a495", 66646),
+			Common::UNK_LANG,
+			Common::kPlatformWindows,
+			VCRUISE_GF_WANT_OGG_VORBIS | VCRUISE_GF_NEED_JPEG | VCRUISE_GF_GENTEE_PACKAGE | VCRUISE_GF_USE_SETUP_EXE
+				| VCRUISE_GF_BUL_LANGUAGE | VCRUISE_GF_JPN_LANGUAGE,
+			GUIO1(GAMEOPTION_FAST_VIDEO_DECODER)
+		},
+		GID_SCHIZM,
+		Common::JA_JPN,
+	},
 	{ // Schizm: Mysterious Journey, English DVD Version, unknown variant
 		{
 			"schizm",
diff --git a/engines/vcruise/vcruise.cpp b/engines/vcruise/vcruise.cpp
index 78d798f696e..d615598be4b 100644
--- a/engines/vcruise/vcruise.cpp
+++ b/engines/vcruise/vcruise.cpp
@@ -132,6 +132,19 @@ Common::Error VCruiseEngine::run() {
 		SearchMan.add("VCruiseInstallerPackage", installerPackageArchive);
 	}
 
+	if (_gameDescription->desc.flags & VCRUISE_GF_USE_SETUP_EXE) {
+		Common::File *f = new Common::File();
+
+		if (!f->open(_gameDescription->desc.filesDescriptions[1].fileName))
+			error("Couldn't open installer package '%s'", _gameDescription->desc.filesDescriptions[1].fileName);
+
+		Common::Archive *setupPackageArchive = Common::createGenteeInstallerArchive(f, "#setuppath#/", true, true);
+		if (!setupPackageArchive)
+			error("Couldn't load installer package '%s'", _gameDescription->desc.filesDescriptions[1].fileName);
+
+		SearchMan.add("VCruiseSetupPackage", setupPackageArchive);
+	}
+
 	syncSoundSettings();
 
 	// Figure out screen layout


Commit: a0f13158aff0b0bb13544b1d1445d9f5660d2a81
    https://github.com/scummvm/scummvm/commit/a0f13158aff0b0bb13544b1d1445d9f5660d2a81
Author: elasota (1137273+elasota at users.noreply.github.com)
Date: 2025-04-27T14:25:14-04:00

Commit Message:
NEWS: Mention Schizm CJK fixes

Changed paths:
    NEWS.md


diff --git a/NEWS.md b/NEWS.md
index 42f8da370d0..18c83a50ce0 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -36,6 +36,9 @@ For a more comprehensive changelog of the latest experimental code, see:
    - Activate original bug fixes (FunFrock's HQ door and safe bugs).
    - Fixed normal mode action triggering.
 
+ V-Cruise:
+   - Fixed text rendering in Chinese and Japanese localizations.
+   - Added support for Japanese DVD version of Schizm: Mysterious Journey.
 
 #### 2.9.0 "Close Encounters of the 2.9th Kind" (2024-12-22)
 




More information about the Scummvm-git-logs mailing list