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

mduggan noreply at scummvm.org
Sat Jul 27 00:44:23 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:
071a7cc5fa DGDS: Fix rendering of bet in HoC shell game
d772d34306 DGDS: Clean up debug frame dump a little


Commit: 071a7cc5faede40da1e1d018bf0542d09455f12e
    https://github.com/scummvm/scummvm/commit/071a7cc5faede40da1e1d018bf0542d09455f12e
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2024-07-27T10:44:13+10:00

Commit Message:
DGDS: Fix rendering of bet in HoC shell game

Changed paths:
    engines/dgds/shell_game.cpp


diff --git a/engines/dgds/shell_game.cpp b/engines/dgds/shell_game.cpp
index e138674f54e..9aeea38c51c 100644
--- a/engines/dgds/shell_game.cpp
+++ b/engines/dgds/shell_game.cpp
@@ -73,8 +73,8 @@ static void _setPeaPosition(int16 val) {
 void ShellGame::drawShellGameStr(int16 count, int16 x, int16 y) const {
 	const Common::String countStr = Common::String::format("%d", count);
 	DgdsEngine *engine = DgdsEngine::getInstance();
-	const DgdsFont *fnt = engine->getFontMan()->getFont(FontManager::k6x6Font);
-	fnt->drawString(&engine->getStoredAreaBuffer(), countStr, x, y, 50, 0);
+	const DgdsFont *fnt = engine->getFontMan()->getFont(FontManager::k4x5Font);
+	fnt->drawString(&engine->getStoredAreaBuffer(), countStr, x, y, 50, 13);
 }
 
 void ShellGame::drawShells() const {


Commit: d772d3430694d967e0fceaf06eee8a5097aaca3b
    https://github.com/scummvm/scummvm/commit/d772d3430694d967e0fceaf06eee8a5097aaca3b
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2024-07-27T10:44:13+10:00

Commit Message:
DGDS: Clean up debug frame dump a little

Changed paths:
    engines/dgds/dgds.cpp


diff --git a/engines/dgds/dgds.cpp b/engines/dgds/dgds.cpp
index f931d9a751b..51d608cf2b0 100644
--- a/engines/dgds/dgds.cpp
+++ b/engines/dgds/dgds.cpp
@@ -435,6 +435,23 @@ void DgdsEngine::loadRestartFile() {
 	_gdsScene->loadRestart(_rstFileName, _resource, _decompressor);
 }
 
+static void _dumpFrame(const Graphics::ManagedSurface &surf, const char *name) {
+#ifdef DUMP_FRAME_DATA
+	/* For debugging, dump the frame contents.. */
+	Common::DumpFile outf;
+	uint32 now = g_engine->getTotalPlayTime();
+
+	byte palbuf[768];
+	g_system->getPaletteManager()->grabPalette(palbuf, 0, 256);
+
+	outf.open(Common::Path(Common::String::format("/tmp/%07d-%s.png", now, name)));
+	// Operator magic - convert ManagedSurface reg to Surface ref.
+	::Image::writePNG(outf, *(&surf), palbuf);
+	outf.close();
+#endif
+}
+
+
 Common::Error DgdsEngine::run() {
 	_isLoading = true;
 	init(false);
@@ -620,28 +637,9 @@ Common::Error DgdsEngine::run() {
 		_scene->runPostTickOps();
 		_scene->checkTriggers();
 
-#ifdef DUMP_FRAME_DATA
-		/* For debugging, dump the frame contents.. */
-		{
-			Common::DumpFile outf;
-			uint32 now = g_engine->getTotalPlayTime();
-
-			byte palbuf[768];
-			g_system->getPaletteManager()->grabPalette(palbuf, 0, 256);
-
-			outf.open(Common::Path(Common::String::format("/tmp/%07d-back.png", now)));
-			::Image::writePNG(outf, *_backgroundBuffer.surfacePtr(), palbuf);
-			outf.close();
-
-			outf.open(Common::Path(Common::String::format("/tmp/%07d-stor.png", now)));
-			::Image::writePNG(outf, *_storedAreaBuffer.surfacePtr(), palbuf);
-			outf.close();
-
-			outf.open(Common::Path(Common::String::format("/tmp/%07d-comp.png", now)));
-			::Image::writePNG(outf, *_compositionBuffer.surfacePtr(), palbuf);
-			outf.close();
-		}
-#endif
+		_dumpFrame(_backgroundBuffer, "back");
+		_dumpFrame(_storedAreaBuffer, "stor");
+		_dumpFrame(_compositionBuffer, "comp");
 
 		if (!_inventory->isOpen()) {
 			_gdsScene->drawItems(_compositionBuffer);
@@ -656,6 +654,8 @@ Common::Error DgdsEngine::run() {
 		_scene->drawAndUpdateDialogs(&_compositionBuffer);
 		_scene->drawVisibleHeads(&_compositionBuffer);
 
+		_dumpFrame(_compositionBuffer, "comp-with-dlg");
+
 		bool gameRunning = (!haveActiveDialog && _gameGlobals->getGlobal(0x57) /* TODO: && _dragItem == nullptr*/);
 		_clock.update(gameRunning);
 




More information about the Scummvm-git-logs mailing list