[Scummvm-git-logs] scummvm branch-2-9 -> 4c5760b0b0599a687c8fe6cf80e4bbdb26ad6873

mduggan noreply at scummvm.org
Sun Jan 26 07:42:04 UTC 2025


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:
5cf8af157d DGDS: Fix crash if Dragon countdown overlaps hour
4c5760b0b0 DGDS: Clear music and drag item on load game


Commit: 5cf8af157d09ab5b18da2b1cc189b060d5008180
    https://github.com/scummvm/scummvm/commit/5cf8af157d09ab5b18da2b1cc189b060d5008180
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2025-01-26T17:27:21+11:00

Commit Message:
DGDS: Fix crash if Dragon countdown overlaps hour

Changed paths:
    engines/dgds/dragon_native.cpp


diff --git a/engines/dgds/dragon_native.cpp b/engines/dgds/dragon_native.cpp
index ff294fd5949..420a713b6e2 100644
--- a/engines/dgds/dragon_native.cpp
+++ b/engines/dgds/dragon_native.cpp
@@ -33,7 +33,10 @@ void DragonNative::drawCountdown(FontManager::FontType fontType, int16 x, int16
 	int16 countdownEnd = engine->getGameGlobals()->getGlobal(0x22);
 	int16 currentMins = engine->getClock().getMins();
 	const DgdsFont *fnt = engine->getFontMan()->getFont(fontType);
-	Common::String str = Common::String::format("%d", countdownEnd - currentMins);
+	int16 minsLeft = countdownEnd - currentMins;
+	if (minsLeft < 0)
+		minsLeft += 60;
+	Common::String str = Common::String::format("%2d", minsLeft);
 	fnt->drawString(&engine->_compositionBuffer, str, x, y, SCREEN_WIDTH - x, 10);
 }
 


Commit: 4c5760b0b0599a687c8fe6cf80e4bbdb26ad6873
    https://github.com/scummvm/scummvm/commit/4c5760b0b0599a687c8fe6cf80e4bbdb26ad6873
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2025-01-26T18:41:25+11:00

Commit Message:
DGDS: Clear music and drag item on load game

Partial cherry-pick of 3d81248e025203baa1c02c95ed445d77e7bbd447 from master.

Changed paths:
    engines/dgds/dgds.cpp


diff --git a/engines/dgds/dgds.cpp b/engines/dgds/dgds.cpp
index df21875557a..94697129cdc 100644
--- a/engines/dgds/dgds.cpp
+++ b/engines/dgds/dgds.cpp
@@ -810,7 +810,9 @@ Common::Error DgdsEngine::syncGame(Common::Serializer &s) {
 			error("Game references non-existent scene %d", sceneNum);
 
 		_soundPlayer->stopAllSfx();
+		_soundPlayer->stopMusic();
 		_scene->unload();
+		_scene->setDragItem(nullptr);
 		_adsInterp->unload();
 
 		// Clear arcade state completely.




More information about the Scummvm-git-logs mailing list