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

mduggan noreply at scummvm.org
Mon Mar 31 09:14:33 UTC 2025


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

Summary:
9f08ec5372 DGDS: Skip CDS draw op if head shape was freed
6a5916cf6c DGDS: Map menu ids in DE version of Heart of China
d3ed56f4ad DGDS: Better font load debug message


Commit: 9f08ec5372d6cbafa3fe3b6da9e317953fd454a3
    https://github.com/scummvm/scummvm/commit/9f08ec5372d6cbafa3fe3b6da9e317953fd454a3
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2025-03-31T20:12:07+11:00

Commit Message:
DGDS: Skip CDS draw op if head shape was freed

This fixes #15829.

Changed paths:
    engines/dgds/head.cpp


diff --git a/engines/dgds/head.cpp b/engines/dgds/head.cpp
index 6d1ea4faa81..177b6eb46cf 100644
--- a/engines/dgds/head.cpp
+++ b/engines/dgds/head.cpp
@@ -257,6 +257,10 @@ void CDSTTMInterpreter::handleOperation(TTMEnviro &env_, TTMSeq &seq, uint16 op,
 	case 0xa510:   // DRAW SPRITE FLIP V x,y:int
 	case 0xa520:   // DRAW SPRITE FLIP H: x,y:int
 	case 0xa530: { // DRAW SPRITE FLIP HV: x,y,frameno,bmpno:int	[-n,+n]
+		if (!env._scriptShapes[0]) {
+			warning("CDS: Trying to draw after script shape freed");
+			break;
+		}
 		ImageFlipMode flip = Conversation::_lastHeadFrameFlipMode;
 		int16 x = ivals[0] + env._xOff;
 		int16 y = ivals[1] + env._yOff;


Commit: 6a5916cf6cb35fd0443ace6d787a2cc3e957ff63
    https://github.com/scummvm/scummvm/commit/6a5916cf6cb35fd0443ace6d787a2cc3e957ff63
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2025-03-31T20:12:07+11:00

Commit Message:
DGDS: Map menu ids in DE version of Heart of China

Most games use the same menu IDs for the same menus, but this version uses some
different IDs to the others.  To avoid having to redo too much for a single
game variant, just map the menu IDs.

This fixes #15818.

Changed paths:
    engines/dgds/menu.cpp
    engines/dgds/menu.h


diff --git a/engines/dgds/menu.cpp b/engines/dgds/menu.cpp
index 7976e346631..3cf36f66f5b 100644
--- a/engines/dgds/menu.cpp
+++ b/engines/dgds/menu.cpp
@@ -151,9 +151,26 @@ Menu::~Menu() {
 	_screenBuffer.free();
 }
 
+uint16 Menu::mapMenuNum(uint16 num) const {
+	// The DE version of Heart of China used different menu IDs for some things.
+	// Instead of putting mappings all through the game, just translate them on
+	// load to match the other game versions.
+	DgdsEngine *engine = DgdsEngine::getInstance();
+	if (engine->getGameId() == GID_HOC && engine->getGameLang() == Common::DE_DEU) {
+		switch (num) {
+		case 50: return kMenuMain;
+		case 80: return kMenuSkipPlayIntro;
+		case 82: return kMenuSkipArcade;
+		default: return num;
+		}
+	} else {
+		return num;
+	}
+}
+
 void Menu::setRequestData(const REQFileData &data) {
 	for (auto &req : data._requests) {
-		_menuRequests[req._fileNum] = req;
+		_menuRequests[mapMenuNum(req._fileNum)] = req;
 	}
 }
 
diff --git a/engines/dgds/menu.h b/engines/dgds/menu.h
index abceb9360bd..57e64cdcbb5 100644
--- a/engines/dgds/menu.h
+++ b/engines/dgds/menu.h
@@ -97,6 +97,7 @@ private:
 	void loadCredits();
 	void startVcrHelp();
 	void doVcrHelp(int16 button);
+	uint16 mapMenuNum(uint16 num) const;
 
 	void putMouseOnSelectedItem();
 	Gadget *getSelectedItem();


Commit: d3ed56f4ad07633800d4cb8236accca8dcac12f1
    https://github.com/scummvm/scummvm/commit/d3ed56f4ad07633800d4cb8236accca8dcac12f1
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2025-03-31T20:12:07+11:00

Commit Message:
DGDS: Better font load debug message

Changed paths:
    engines/dgds/font.cpp


diff --git a/engines/dgds/font.cpp b/engines/dgds/font.cpp
index ff0e19ca62e..9fd353f2cb8 100644
--- a/engines/dgds/font.cpp
+++ b/engines/dgds/font.cpp
@@ -52,7 +52,7 @@ DgdsFont *DgdsFont::load(const Common::String &filename, ResourceManager *resour
 		if (chunk.isSection(ID_FNT)) {
 			byte magic = stream->readByte();
 			stream->seek(-1, SEEK_CUR);
-			debug(1, "    magic: %u", magic);
+			debug(10, "Load font %s magic: %u", filename.c_str(), magic);
 
 			if (magic != 0xFF)
 				font = FFont::load(*stream);




More information about the Scummvm-git-logs mailing list