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

athrxx noreply at scummvm.org
Wed May 1 14:07:01 UTC 2024


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

Summary:
55f1bbd47d SCUMM: (FM-Towns) - add menu option to force 640 x 480 mode
b6171112da SCUMM: (HE) - silence some warnings


Commit: 55f1bbd47db843475a741dcb3294f731157b2731
    https://github.com/scummvm/scummvm/commit/55f1bbd47db843475a741dcb3294f731157b2731
Author: athrxx (athrxx at scummvm.org)
Date: 2024-05-01T16:06:11+02:00

Commit Message:
SCUMM: (FM-Towns) - add menu option to force 640 x 480 mode

English versions usually run in a 320 x 240 resolution in ScummVM.
The original interpreter uses 640 x 480. It has a unique pause/restart
banner that we cannot display in 320 x 240. So that is really the only
reason for adding this option.

Changed paths:
    engines/scumm/charset.cpp
    engines/scumm/input.cpp
    engines/scumm/metaengine.cpp
    engines/scumm/saveload.cpp
    engines/scumm/scumm.cpp
    engines/scumm/scumm.h


diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index e2c113d774a..6aa3ec9e3fd 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -1485,7 +1485,7 @@ void CharsetRendererTownsV3::drawBits1(Graphics::Surface &dest, int x, int y, co
 		return;
 	}
 #endif
-	bool scale2x = ((&dest == &_vm->_textSurface) && (_vm->_textSurfaceMultiplier == 2) && !(_sjisCurChar >= 256 && _vm->_useCJKMode));
+	bool scale2x = (_vm->_textSurfaceMultiplier == 2 && !(_sjisCurChar >= 256 && _vm->_useCJKMode) && (&dest == &_vm->_textSurface || &dest == &_vm->_virtscr[kBannerVirtScreen]));
 #endif
 
 	byte bits = 0;
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index be8abdcc90a..28c1938b89d 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -244,7 +244,7 @@ void ScummEngine::parseEvent(Common::Event event) {
 				_mouse.y = _mouse.y * 4 / 7;
 			}
 
-		} else if (_macScreen || (_useCJKMode && _textSurfaceMultiplier == 2) || _renderMode == Common::kRenderCGA_BW || _enableEGADithering) {
+		} else if (_textSurfaceMultiplier == 2 || _renderMode == Common::kRenderCGA_BW || _enableEGADithering) {
 			_mouse.x >>= 1;
 			_mouse.y >>= 1;
 		}
diff --git a/engines/scumm/metaengine.cpp b/engines/scumm/metaengine.cpp
index 59c10742881..17fa8cad4ff 100644
--- a/engines/scumm/metaengine.cpp
+++ b/engines/scumm/metaengine.cpp
@@ -656,6 +656,14 @@ static const ExtraGuiOption fmtownsTrimTo200 = {
 	0
 };
 
+static const ExtraGuiOption fmtownsForceHiResMode = {
+	_s("Run in original 640 x 480 resolution"),
+	_s("This allows more accurate pause/restart banners, but might impact performance or shader/scaler usage."),
+	"force_fmtowns_hires_mode",
+	false,
+	0,
+	0};
+
 static const ExtraGuiOption macV3LowQualityMusic = {
 	_s("Play simplified music"),
 	_s("This music was intended for low-end Macs, and uses only one channel."),
@@ -769,6 +777,10 @@ const ExtraGuiOptions ScummMetaEngine::getExtraGuiOptions(const Common::String &
 			options.push_back(semiSmoothScrolling);
 		if (guiOptions.contains(GUIO_TRIM_FMTOWNS_TO_200_PIXELS))
 			options.push_back(fmtownsTrimTo200);
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
+		if (platform == Common::kPlatformFMTowns && Common::parseLanguage(language) != Common::JA_JPN)
+			options.push_back(fmtownsForceHiResMode);
+#endif
 	}
 
 	// The Steam Mac versions of Loom and Indy 3 are more akin to the VGA
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 66eeadfdc4e..2c0c2cd0693 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -1674,7 +1674,7 @@ void ScummEngine::saveLoadWithSerializer(Common::Serializer &s) {
 			x *= 2;
 			x += (kHercWidth - _screenWidth * 2) / 2;
 			y = y * 7 / 4;
-		} else if (_macScreen || (_useCJKMode && _textSurfaceMultiplier == 2) || _renderMode == Common::kRenderCGA_BW || _enableEGADithering) {
+		} else if (_textSurfaceMultiplier == 2 || _renderMode == Common::kRenderCGA_BW || _enableEGADithering) {
 			x *= 2;
 			y *= 2;
 		}
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 8adbd9f9f0f..f37a7142e23 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -367,6 +367,9 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
 
 #ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
 	if (_game.platform == Common::kPlatformFMTowns) {
+		ConfMan.registerDefault("force_fmtowns_hires_mode", false);
+		if (ConfMan.hasKey("force_fmtowns_hires_mode"))
+			_forceFMTownsHiResMode = ConfMan.getBool("force_fmtowns_hires_mode");
 		ConfMan.registerDefault("smooth_scroll", true);
 		if (ConfMan.hasKey("smooth_scroll"))
 			_enableSmoothScrolling = ConfMan.getBool("smooth_scroll");
@@ -1149,6 +1152,11 @@ Common::Error ScummEngine::init() {
 	// Load it earlier so _useCJKMode variable could be set
 	loadCJKFont();
 
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
+	if (_game.platform == Common::kPlatformFMTowns && _forceFMTownsHiResMode)
+		_textSurfaceMultiplier = 2;
+#endif
+
 	Common::Path macResourceFile;
 
 	if (_game.platform == Common::kPlatformMacintosh) {
@@ -1256,14 +1264,9 @@ Common::Error ScummEngine::init() {
 	} else if (_renderMode == Common::kRenderCGA_BW || (_renderMode == Common::kRenderEGA && _supportsEGADithering)) {
 		initGraphics(_screenWidth * 2, _screenHeight * 2);
 	} else {
-		int screenWidth = _screenWidth;
-		int screenHeight = _screenHeight;
-		if (_useCJKMode || _macScreen) {
-			// CJK FT and DIG use usual NUT fonts, not FM-TOWNS ROM, so
-			// there is no text surface for them. This takes that into account
-			screenWidth *= _textSurfaceMultiplier;
-			screenHeight *= _textSurfaceMultiplier;
-		}
+		int screenWidth = _screenWidth * _textSurfaceMultiplier;
+		int screenHeight = _screenHeight * _textSurfaceMultiplier;
+
 		if (_game.features & GF_16BIT_COLOR
 #ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
 			|| _game.platform == Common::kPlatformFMTowns
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index bb020fd4d3a..7d13ec783b5 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -1893,6 +1893,7 @@ protected:
 	int _refreshArrayPos = 0;
 	bool _refreshNeedCatchUp = false;
 	bool _enableSmoothScrolling = false;
+	bool _forceFMTownsHiResMode = false;
 	uint32 _scrollTimer = 0;
 	uint32 _scrollDestOffset = 0;
 	uint16 _scrollFeedStrips[3];


Commit: b6171112da36cd4cd48003d1ca524ba3d2d39042
    https://github.com/scummvm/scummvm/commit/b6171112da36cd4cd48003d1ca524ba3d2d39042
Author: athrxx (athrxx at scummvm.org)
Date: 2024-05-01T16:06:11+02:00

Commit Message:
SCUMM: (HE) - silence some warnings

Changed paths:
    engines/scumm/he/wiz_he.h


diff --git a/engines/scumm/he/wiz_he.h b/engines/scumm/he/wiz_he.h
index 394f323b2e7..256663fbb21 100644
--- a/engines/scumm/he/wiz_he.h
+++ b/engines/scumm/he/wiz_he.h
@@ -269,7 +269,7 @@ struct WizSimpleBitmap {
 	int32 bitmapWidth;
 	int32 bitmapHeight;
 
-	WizSimpleBitmap() {
+	WizSimpleBitmap() : bufferPtr(nullptr), bitmapWidth(0), bitmapHeight(0) {
 
 	}
 };
@@ -373,7 +373,7 @@ struct WarpWizOneSpanTable {
 	int spanCount;
 };
 
-enum WizRenderingFlags {
+enum WizRenderingFlags : uint {
 	// Standard rendering flags
 	kWRFUsePalette = 0x00000001,
 	kWRFRemap      = 0x00000002,




More information about the Scummvm-git-logs mailing list