[Scummvm-git-logs] scummvm branch-3-0 -> e6ad3a63319ab0ce2978ba0b0f429f9a9dfdba89

sluicebox noreply at scummvm.org
Sun Nov 16 16:07:44 UTC 2025


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

Summary:
39afbb32a7 PRIVATE: Cleanup symbol name code
c96ef1a269 PRIVATE: Run kListenToPhone when using phone
2cf49fc397 PRIVATE: Fix view screen flicker
e6ad3a6331 SCI: Fix Unintended Fallthrough GCC Compiler Warning


Commit: 39afbb32a7aba384aeaa349c97d8446448636563
    https://github.com/scummvm/scummvm/commit/39afbb32a7aba384aeaa349c97d8446448636563
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-11-16T08:06:59-08:00

Commit Message:
PRIVATE: Cleanup symbol name code

Changed paths:
    engines/private/private.cpp
    engines/private/private.h


diff --git a/engines/private/private.cpp b/engines/private/private.cpp
index 782815bd014..e365bbcab37 100644
--- a/engines/private/private.cpp
+++ b/engines/private/private.cpp
@@ -670,97 +670,72 @@ bool PrivateEngine::cursorPauseMovie(Common::Point mousePos) {
 }
 
 Common::String PrivateEngine::getPauseMovieSetting() {
-	if ((_language == Common::EN_USA || _language == Common::RU_RUS || _language == Common::KO_KOR) && _platform != Common::kPlatformMacintosh)
-		return "kPauseMovie";
-
-	return "k3";
+	return getSymbolName("kPauseMovie", "k3");
 }
 
 Common::String PrivateEngine::getGoIntroSetting() {
-	if ((_language == Common::EN_USA || _language == Common::RU_RUS || _language == Common::KO_KOR || _language == Common::JA_JPN) && _platform != Common::kPlatformMacintosh)
-		return "kGoIntro";
-
-	return "k1";
+	return getSymbolName("kGoIntro", "k1");
 }
 
 Common::String PrivateEngine::getAlternateGameVariable() {
-	if ((_language == Common::EN_USA || _language == Common::RU_RUS || _language == Common::KO_KOR) && _platform != Common::kPlatformMacintosh)
-		return "kAlternateGame";
-
-	return "k2";
+	return getSymbolName("kAlternateGame", "k2");
 }
 
 Common::String PrivateEngine::getMainDesktopSetting() {
-	if ((_language == Common::EN_USA || _language == Common::RU_RUS || _language == Common::KO_KOR) && _platform != Common::kPlatformMacintosh)
-		return "kMainDesktop";
-
-	if (isDemo())
-		return "k45";
-
-	return "k183";
+	return getSymbolName("kMainDesktop", "k183", "k45");
 }
 
 Common::String PrivateEngine::getDiaryTOCSetting() {
-	if ((_language == Common::EN_USA || _language == Common::RU_RUS || _language == Common::KO_KOR) && _platform != Common::kPlatformMacintosh)
-		return "kDiaryTOC";
-
-	return "k185";
+	return getSymbolName("kDiaryTOC", "k185");
 }
 
 Common::String PrivateEngine::getDiaryMiddleSetting() {
-	if ((_language == Common::EN_USA || _language == Common::RU_RUS || _language == Common::KO_KOR) && _platform != Common::kPlatformMacintosh)
-		return "kDiaryMiddle";
-
-	return "k186";
+	return getSymbolName("kDiaryMiddle", "k186");
 }
 
 Common::String PrivateEngine::getDiaryLastPageSetting() {
-	if ((_language == Common::EN_USA || _language == Common::RU_RUS || _language == Common::KO_KOR) && _platform != Common::kPlatformMacintosh)
-		return "kDiaryLastPage";
-
-	return "k187";
+	return getSymbolName("kDiaryLastPage", "k187");
 }
 
 Common::String PrivateEngine::getPoliceIndexVariable() {
-	if ((_language == Common::EN_USA || _language == Common::RU_RUS || _language == Common::KO_KOR) && _platform != Common::kPlatformMacintosh)
-		return "kPoliceIndex";
-
-	return "k0";
+	return getSymbolName("kPoliceIndex", "k0");
 }
 
 Common::String PrivateEngine::getPOGoBustMovieSetting() {
-	if ((_language == Common::EN_USA || _language == Common::RU_RUS || _language == Common::KO_KOR) && _platform != Common::kPlatformMacintosh)
-		return "kPOGoBustMovie";
-
-	return "k7";
+	return getSymbolName("kPOGoBustMovie", "k7");
 }
 
 Common::String PrivateEngine::getPoliceBustFromMOSetting() {
-	if ((_language == Common::EN_USA || _language == Common::RU_RUS || _language == Common::KO_KOR) && _platform != Common::kPlatformMacintosh)
-		return "kPoliceBustFromMO";
-
-	return "k6";
+	return getSymbolName("kPoliceBustFromMO", "k6");
 }
 
 Common::String PrivateEngine::getWallSafeValueVariable() {
-	if ((_language == Common::EN_USA || _language == Common::RU_RUS || _language == Common::KO_KOR) && _platform != Common::kPlatformMacintosh)
-		return "kWallSafeValue";
-
-	return "k3";
+	return getSymbolName("kWallSafeValue", "k3");
 }
 
 Common::String PrivateEngine::getExitCursor() {
-	if ((_language == Common::EN_USA || _language == Common::RU_RUS || _language == Common::KO_KOR) && _platform != Common::kPlatformMacintosh)
-		return "kExit";
-
-	return "k5";
+	return getSymbolName("kExit", "k5");
 }
 
 Common::String PrivateEngine::getInventoryCursor() {
-	if ((_language == Common::EN_USA || _language == Common::RU_RUS || _language == Common::KO_KOR) && _platform != Common::kPlatformMacintosh)
-		return "kInventory";
+	return getSymbolName("kInventory", "k7");
+}
+
+const char *PrivateEngine::getSymbolName(const char *name, const char *strippedName, const char *demoName) {
+	if (_platform == Common::kPlatformWindows) {
+		if (_language == Common::EN_USA ||
+			_language == Common::JA_JPN ||
+			_language == Common::KO_KOR ||
+			_language == Common::RU_RUS) {
+			return name;
+		}
+	}
+
+	if (demoName != nullptr && isDemo()) {
+		return demoName;
+	}
 
-	return "k7";
+	return strippedName;
 }
 
 void PrivateEngine::selectPauseGame(Common::Point mousePos) {
diff --git a/engines/private/private.h b/engines/private/private.h
index 90494cb42aa..ca401ab8e97 100644
--- a/engines/private/private.h
+++ b/engines/private/private.h
@@ -300,6 +300,7 @@ public:
 	Common::String getAlternateGameVariable();
 	Common::String getPoliceIndexVariable();
 	Common::String getWallSafeValueVariable();
+	const char *getSymbolName(const char *name, const char *strippedName, const char *demoName = nullptr);
 
 	// movies
 	Common::String _nextMovie;


Commit: c96ef1a269ff2184595038b66c0405e6b32b7c7b
    https://github.com/scummvm/scummvm/commit/c96ef1a269ff2184595038b66c0405e6b32b7c7b
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-11-16T08:07:06-08:00

Commit Message:
PRIVATE: Run kListenToPhone when using phone

Fixes the police station never appearing on the map.
Fixes the doctor not appearing in the dossier.

Changed paths:
    engines/private/private.cpp
    engines/private/private.h


diff --git a/engines/private/private.cpp b/engines/private/private.cpp
index e365bbcab37..29f3ad195ad 100644
--- a/engines/private/private.cpp
+++ b/engines/private/private.cpp
@@ -709,6 +709,10 @@ Common::String PrivateEngine::getPoliceBustFromMOSetting() {
 	return getSymbolName("kPoliceBustFromMO", "k6");
 }
 
+Common::String PrivateEngine::getListenToPhoneSetting() {
+	return getSymbolName("kListenToPhone", "k9");
+}
+
 Common::String PrivateEngine::getWallSafeValueVariable() {
 	return getSymbolName("kWallSafeValue", "k3");
 }
@@ -1100,6 +1104,7 @@ void PrivateEngine::selectPhoneArea(Common::Point mousePos) {
 		Common::String sound = _phonePrefix + i.sound + ".wav";
 		playSound(sound, 1, true, false);
 		_phone.pop_front();
+		_nextSetting = getListenToPhoneSetting();
 	}
 }
 
diff --git a/engines/private/private.h b/engines/private/private.h
index ca401ab8e97..b6d542a179a 100644
--- a/engines/private/private.h
+++ b/engines/private/private.h
@@ -297,6 +297,7 @@ public:
 	Common::String getDiaryLastPageSetting();
 	Common::String getPOGoBustMovieSetting();
 	Common::String getPoliceBustFromMOSetting();
+	Common::String getListenToPhoneSetting();
 	Common::String getAlternateGameVariable();
 	Common::String getPoliceIndexVariable();
 	Common::String getWallSafeValueVariable();


Commit: 2cf49fc397ffa219fe841d5138c2e0208cfe5be2
    https://github.com/scummvm/scummvm/commit/2cf49fc397ffa219fe841d5138c2e0208cfe5be2
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-11-16T08:07:13-08:00

Commit Message:
PRIVATE: Fix view screen flicker

Now that the engine runs kListenToPhone like the original, the view
screen picture flickers when answering the phone.

As with the other recent flicker fixes, now we only call drawScreen when
the script is finished executing.

Changed paths:
    engines/private/private.cpp


diff --git a/engines/private/private.cpp b/engines/private/private.cpp
index 29f3ad195ad..61ae24f10a1 100644
--- a/engines/private/private.cpp
+++ b/engines/private/private.cpp
@@ -420,13 +420,6 @@ Common::Error PrivateEngine::run() {
 			_currentMovie = _nextMovie;
 			_nextMovie = "";
 			updateCursor(mousePos);
-			continue;
-		}
-
-		if (!_nextVS.empty() && _currentVS.empty() && (_currentSetting == getMainDesktopSetting())) {
-			loadImage(_nextVS, 160, 120);
-			drawScreen();
-			_currentVS = _nextVS;
 		}
 
 		if (_videoDecoder && !_videoDecoder->isPaused()) {
@@ -467,6 +460,11 @@ Common::Error PrivateEngine::run() {
 			// are executed. Fixes the previous screen from being displayed
 			// when a video finishes playing.
 			if (_nextSetting.empty()) {
+				if (!_nextVS.empty() && _currentVS.empty() && _currentSetting == getMainDesktopSetting()) {
+					loadImage(_nextVS, 160, 120);
+					_currentVS = _nextVS;
+				}
+
 				updateCursor(mousePos);
 				drawScreen();
 			}


Commit: e6ad3a63319ab0ce2978ba0b0f429f9a9dfdba89
    https://github.com/scummvm/scummvm/commit/e6ad3a63319ab0ce2978ba0b0f429f9a9dfdba89
Author: D G Turner (digitall at scummvm.org)
Date: 2025-11-16T08:07:21-08:00

Commit Message:
SCI: Fix Unintended Fallthrough GCC Compiler Warning

Changed paths:
    engines/sci/graphics/text16.cpp


diff --git a/engines/sci/graphics/text16.cpp b/engines/sci/graphics/text16.cpp
index 515e4562256..9e5647f3d6e 100644
--- a/engines/sci/graphics/text16.cpp
+++ b/engines/sci/graphics/text16.cpp
@@ -242,7 +242,8 @@ int16 GfxText16::GetLongest(const char *&textPtr, int16 maxWidth, GuiResourceId
 			if ((*(const byte *)(textPtr + 1)) == 0xA) {
 				curCharCount++; textPtr++;
 			}
-			// fall through'J'
+			// 'J'
+			// fall through
 		case 0xA:
 		case 0x9781: // this one is used by SQ4/japanese as line break as well (was added for SCI1/PC98)
 			curCharCount++; textPtr++;




More information about the Scummvm-git-logs mailing list