[Scummvm-git-logs] scummvm master -> 797e293027982c24d642a96c8fa818f4e78d4fb2

neuromancer noreply at scummvm.org
Mon Jun 15 20:29:49 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:
797e293027 SCUMM: RA2: use correct font for high resolution


Commit: 797e293027982c24d642a96c8fa818f4e78d4fb2
    https://github.com/scummvm/scummvm/commit/797e293027982c24d642a96c8fa818f4e78d4fb2
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-06-15T22:28:58+02:00

Commit Message:
SCUMM: RA2: use correct font for high resolution

Changed paths:
    engines/scumm/smush/rebel/smush_multi_font.cpp
    engines/scumm/smush/rebel/smush_player_ra2.cpp


diff --git a/engines/scumm/smush/rebel/smush_multi_font.cpp b/engines/scumm/smush/rebel/smush_multi_font.cpp
index 88b5bd30b46..07af9cb1b43 100644
--- a/engines/scumm/smush/rebel/smush_multi_font.cpp
+++ b/engines/scumm/smush/rebel/smush_multi_font.cpp
@@ -51,19 +51,31 @@ NutRenderer *SmushMultiFont::getCurrentFont() const {
 }
 
 Rebel2FontSet SmushMultiFont::getRebel2FontSet() {
-	static const char *ra2Fonts[] = {
+	// High-res mode uses dedicated larger-glyph font assets, not scaled low-res ones (matches getGameFont()).
+	static const char *ra2FontsLo[] = {
 		"SYSTM/TALKFONT.NUT",
 		"SYSTM/SMALFONT.NUT",
 		"SYSTM/TITLFONT.NUT",
 		"SYSTM/POVFONT.NUT"
 	};
+	static const char *ra2FontsHi[] = {
+		"SYSTM/TKHIFONT.NUT",
+		"SYSTM/SMHIFONT.NUT",
+		"SYSTM/TIHIFONT.NUT",
+		"SYSTM/POHIFONT.NUT"
+	};
+	const bool highRes = _vm->_screenWidth >= 640 && _vm->_screenHeight >= 400;
+	const char *const *ra2Fonts = highRes ? ra2FontsHi : ra2FontsLo;
 
 	Rebel2FontSet fontSet;
-	fontSet.numFonts = ARRAYSIZE(ra2Fonts);
+	fontSet.numFonts = ARRAYSIZE(ra2FontsLo);
 	fontSet.defaultFont = CLIP<int>(_defaultFont, 0, fontSet.numFonts - 1);
 	for (int i = 0; i < fontSet.numFonts; i++) {
-		if (!_rebel2Fonts[i])
+		if (!_rebel2Fonts[i]) {
 			_rebel2Fonts[i] = makeRebel2Font(_vm, ra2Fonts[i]);
+			debugC(DEBUG_SMUSH, "SmushMultiFont::getRebel2FontSet: loaded RA2 font[%d]=%s (highRes=%d)",
+				i, ra2Fonts[i], (int)highRes);
+		}
 		fontSet.fonts[i] = _rebel2Fonts[i];
 	}
 	return fontSet;
diff --git a/engines/scumm/smush/rebel/smush_player_ra2.cpp b/engines/scumm/smush/rebel/smush_player_ra2.cpp
index e44fe21ba11..339b2101206 100644
--- a/engines/scumm/smush/rebel/smush_player_ra2.cpp
+++ b/engines/scumm/smush/rebel/smush_player_ra2.cpp
@@ -841,9 +841,14 @@ void SmushPlayerRebel2::handleLoad(int32 subSize, Common::SeekableReadStream &b)
 void SmushPlayerRebel2::ra2HandleTextResource(const char *str, int fontId, int color,
 										int pos_x, int pos_y, int left, int top,
 										int width, int height, TextStyleFlags flg) {
+	// Promote the native 320x200 frame to the 640x400 screen before drawing, else 2x-scaled text lands off-buffer.
+	const bool hiRes = ra2IsHighResMode() && !isRebel2GameplayActive(_insane);
+	if (hiRes)
+		ra2PromoteCurrentFrameToHiRes(0, 0);
+
 	ensureMultiFont();
 	_multiFont->setDefaultFont(fontId);
-	const int scale = (_vm->_screenWidth >= 640 && _vm->_screenHeight >= 400) ? 2 : 1;
+	const int scale = hiRes ? 2 : 1;
 	pos_x *= scale;
 	pos_y *= scale;
 	left *= scale;




More information about the Scummvm-git-logs mailing list