[Scummvm-git-logs] scummvm master -> 6902e95edb1d0f779d811cf6e1fc40f4e13a20b6
dreammaster
noreply at scummvm.org
Thu Mar 5 06:20:38 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
6902e95edb BAGEL: METAGAME: Added clicks console command
Commit: 6902e95edb1d0f779d811cf6e1fc40f4e13a20b6
https://github.com/scummvm/scummvm/commit/6902e95edb1d0f779d811cf6e1fc40f4e13a20b6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-03-05T17:20:28+11:00
Commit Message:
BAGEL: METAGAME: Added clicks console command
Changed paths:
engines/bagel/hodjnpodj/console.cpp
engines/bagel/hodjnpodj/console.h
engines/bagel/hodjnpodj/hodjnpodj.h
engines/bagel/hodjnpodj/metagame/gtl/gtlview.cpp
diff --git a/engines/bagel/hodjnpodj/console.cpp b/engines/bagel/hodjnpodj/console.cpp
index 16ab7865d2f..f7545a214b6 100644
--- a/engines/bagel/hodjnpodj/console.cpp
+++ b/engines/bagel/hodjnpodj/console.cpp
@@ -28,6 +28,9 @@ namespace HodjNPodj {
Console::Console() : GUI::Debugger() {
registerCmd("dumpres", WRAP_METHOD(Console, cmdDumpRes));
+#ifndef RELEASE_BUILD
+ registerCmd("clicks", WRAP_METHOD(Console, cmdClicks));
+#endif
}
Console::~Console() {
@@ -74,5 +77,22 @@ bool Console::cmdDumpRes(int argc, const char **argv) {
return true;
}
+#ifndef RELEASE_BUILD
+bool Console::cmdClicks(int argc, const char **argv) {
+ debugPrintf("Initial seed: %u\n", g_engine->getRandomSeed());
+
+ auto &clicks = g_engine->_metagameClicks;
+ if (clicks.empty()) {
+ debugPrintf("No boardgame clicks yet.\n");
+ } else {
+ debugPrintf("Boardgame clicks:\n");
+ for (const Common::Point &pt : clicks)
+ debugPrintf("(%d, %d)\n", pt.x, pt.y);
+ }
+
+ return true;
+}
+#endif
+
} // namespace HodjNPodj
} // namespace Bagel
diff --git a/engines/bagel/hodjnpodj/console.h b/engines/bagel/hodjnpodj/console.h
index a23a9fa0a68..afe5b044dee 100644
--- a/engines/bagel/hodjnpodj/console.h
+++ b/engines/bagel/hodjnpodj/console.h
@@ -31,6 +31,9 @@ namespace HodjNPodj {
class Console : public GUI::Debugger {
private:
bool cmdDumpRes(int argc, const char **argv);
+#ifndef RELEASE_BUILD
+ bool cmdClicks(int argc, const char **argv);
+#endif
public:
Console();
diff --git a/engines/bagel/hodjnpodj/hodjnpodj.h b/engines/bagel/hodjnpodj/hodjnpodj.h
index 5a67aab21d1..64db8ada403 100644
--- a/engines/bagel/hodjnpodj/hodjnpodj.h
+++ b/engines/bagel/hodjnpodj/hodjnpodj.h
@@ -41,6 +41,9 @@ public:
Common::String _gameId;
Metagame::CBfcMgr _bfcMgr;
Graphics::Surface _boardgameThumbnail;
+#ifndef RELEASE_BUILD
+ Common::Array<Common::Point> _metagameClicks;
+#endif
public:
HodjNPodjEngine(OSystem *syst, const ADGameDescription *gameDesc);
@@ -54,6 +57,9 @@ public:
uint32 getRandomNumber(uint maxNum) {
return BagelEngine::getRandomNumber(maxNum);
}
+ uint32 getRandomSeed() const {
+ return _randomSource.getSeed();
+ }
bool hasFeature(EngineFeature f) const override {
return
diff --git a/engines/bagel/hodjnpodj/metagame/gtl/gtlview.cpp b/engines/bagel/hodjnpodj/metagame/gtl/gtlview.cpp
index b886cf1408c..7b62ef435a2 100644
--- a/engines/bagel/hodjnpodj/metagame/gtl/gtlview.cpp
+++ b/engines/bagel/hodjnpodj/metagame/gtl/gtlview.cpp
@@ -26,6 +26,7 @@
#include "bagel/hodjnpodj/metagame/gtl/gtlview.h"
#include "bagel/hodjnpodj/metagame/gtl/gtlfrm.h"
#include "bagel/hodjnpodj/hnplibs/rules.h"
+#include "bagel/hodjnpodj/hodjnpodj.h"
#include "bagel/detection.h"
namespace Bagel {
@@ -75,6 +76,10 @@ CGtlView::CGtlView() {
if (GetDocument())
GetDocument()->FixChecks() ;
+#ifndef RELEASE_BUILD
+ g_engine->_metagameClicks.clear();
+#endif
+
gpMyView = this;
}
@@ -413,7 +418,11 @@ void CGtlView::OnKeyDown(unsigned int nChar, unsigned int nRepCnt, unsigned int
void CGtlView::OnLButtonDown(unsigned int nFlags, CPoint cMousePoint) {
CGtlDoc* xpDoc = GetDocument() ;
- debugC(2, kDebugRandom, "Mouse click (%d, %d)", cMousePoint.x, cMousePoint.y);
+#ifndef RELEASE_BUILD
+ if (g_engine->_metagameClicks.size() < 20)
+ g_engine->_metagameClicks.push_back(Common::Point(cMousePoint.x, cMousePoint.y));
+#endif
+
xpDoc->m_xpGtlData->AcceptClick(this, cMousePoint, CLICK_LDOWN) ;
if (bExitMetaDLL)
More information about the Scummvm-git-logs
mailing list