[Scummvm-git-logs] scummvm master -> 81cb6290b279eed0e312a5cc1c3ce468b0ff8060

dreammaster noreply at scummvm.org
Sat Feb 15 02:12:21 UTC 2025


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

Summary:
81cb6290b2 M4: RIDDLE: Added hotspots command to list hotspot details


Commit: 81cb6290b279eed0e312a5cc1c3ce468b0ff8060
    https://github.com/scummvm/scummvm/commit/81cb6290b279eed0e312a5cc1c3ce468b0ff8060
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-02-14T18:12:12-08:00

Commit Message:
M4: RIDDLE: Added hotspots command to list hotspot details

Changed paths:
    engines/m4/console.cpp
    engines/m4/console.h


diff --git a/engines/m4/console.cpp b/engines/m4/console.cpp
index 89a6a40bee8..a2b91141cdb 100644
--- a/engines/m4/console.cpp
+++ b/engines/m4/console.cpp
@@ -36,6 +36,7 @@ Console::Console() : ::GUI::Debugger() {
 	registerCmd("cel",       WRAP_METHOD(Console, cmdCel));
 	registerCmd("interface", WRAP_METHOD(Console, cmdInterface));
 	registerCmd("music",     WRAP_METHOD(Console, cmdMusic));
+	registerCmd("hotspots",  WRAP_METHOD(Console, cmdHotspots));
 }
 
 bool Console::cmdTeleport(int argc, const char **argv) {
@@ -158,4 +159,18 @@ bool Console::cmdMusic(int argc, const char **argv) {
 	}
 }
 
+bool Console::cmdHotspots(int argc, const char **argv) {
+	for (HotSpotRec *hs = _G(currentSceneDef).hotspots;
+			hs; hs = hs->next) {
+		debugPrintf("vocab=%s, verb=%s, prep=%s, pos=(%d,%d,%d,%d), feet=(%d,%d)\n",
+			hs->vocab ? hs->vocab : "",
+			hs->verb ? hs->verb : "",
+			hs->prep ? hs->prep : "",
+			hs->ul_x, hs->ul_y, hs->lr_x, hs->lr_y,
+			hs->feet_x, hs->feet_y);
+	}
+
+	return true;
+}
+
 } // End of namespace M4
diff --git a/engines/m4/console.h b/engines/m4/console.h
index 401bc9a9225..def6a71ee2b 100644
--- a/engines/m4/console.h
+++ b/engines/m4/console.h
@@ -38,6 +38,7 @@ private:
 	bool cmdCel(int argc, const char **argv);
 	bool cmdInterface(int argc, const char **argv);
 	bool cmdMusic(int argc, const char **argv);
+	bool cmdHotspots(int argc, const char **argv);
 
 public:
 	Console();




More information about the Scummvm-git-logs mailing list