[Scummvm-git-logs] scummvm master -> f5d8c5437e63d4a0862bcf9034257838ba7639b6
dreammaster
noreply at scummvm.org
Mon Sep 8 01:01:30 UTC 2025
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
0792493115 BAGEL: DEMO: Beginning of Hodj n Podj Demo support
f5d8c5437e BAGEL: DEMO: Implemented demo video playback
Commit: 079249311543e82401a4179d305c1005c2ef21dd
https://github.com/scummvm/scummvm/commit/079249311543e82401a4179d305c1005c2ef21dd
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-09-07T18:01:21-07:00
Commit Message:
BAGEL: DEMO: Beginning of Hodj n Podj Demo support
Changed paths:
A engines/bagel/hodjnpodj/metagame/demo/app.cpp
A engines/bagel/hodjnpodj/metagame/demo/app.h
engines/bagel/detection_tables.h
engines/bagel/hodjnpodj/hodjnpodj.cpp
engines/bagel/hodjnpodj/metagame/frame/app.cpp
engines/bagel/module.mk
diff --git a/engines/bagel/detection_tables.h b/engines/bagel/detection_tables.h
index 8ec841f5496..286a846f841 100644
--- a/engines/bagel/detection_tables.h
+++ b/engines/bagel/detection_tables.h
@@ -117,6 +117,16 @@ const ADGameDescription gameDescriptions[] = {
GUIO1(GUIO_NONE)
},
+ {
+ "hodjnpodj",
+ "Demo",
+ AD_ENTRY1s("hnpdemo.exe", "5200631d37e258651ee0037f32262b49", 147040),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_DEMO | ADGF_UNSTABLE,
+ GUIO1(GUIO_NONE)
+ },
+
AD_TABLE_END_MARKER
};
diff --git a/engines/bagel/hodjnpodj/hodjnpodj.cpp b/engines/bagel/hodjnpodj/hodjnpodj.cpp
index 552fdcf76cf..8c9a401197b 100644
--- a/engines/bagel/hodjnpodj/hodjnpodj.cpp
+++ b/engines/bagel/hodjnpodj/hodjnpodj.cpp
@@ -29,6 +29,7 @@
#include "bagel/hodjnpodj/hodjnpodj.h"
#include "bagel/hodjnpodj/console.h"
#include "bagel/hodjnpodj/globals.h"
+#include "bagel/hodjnpodj/metagame/demo/app.h"
#include "bagel/hodjnpodj/metagame/frame/app.h"
#include "bagel/hodjnpodj/metagame/frame/hodjpodj.h"
#include "bagel/hodjnpodj/metagame/gtl/init.h"
@@ -60,26 +61,35 @@ Common::Error HodjNPodjEngine::run() {
// Run the game
BagelMetaEngine::setKeybindingMode(KBMODE_NORMAL);
- Metagame::Frame::CTheApp app;
- app.InitApplication();
- app.InitInstance();
- app.setKeybinder(KeybindToKeycode);
+ if (getGameId() == "hodjnpodj" && isDemo()) {
+ Metagame::Demo::CTheApp app;
+ app.InitApplication();
+ app.InitInstance();
+ app.setKeybinder(KeybindToKeycode);
+ app.Run();
- if (getGameId() == "mazeodoom") {
- app.setStartupMinigame("mazedoom_demo");
- } else if (ConfMan.getBool("metagame")) {
- Metagame::Frame::InitBFCInfo(&_bfcMgr);
- Metagame::Gtl::RunMeta(nullptr, &_bfcMgr, false);
-
- return Common::kNoError;
} else {
- Common::String minigame = ConfMan.get("minigame");
- if (!minigame.empty())
- app.setStartupMinigame(minigame);
+ Metagame::Frame::CTheApp app;
+ app.InitApplication();
+ app.InitInstance();
+ app.setKeybinder(KeybindToKeycode);
+
+ if (getGameId() == "mazeodoom") {
+ app.setStartupMinigame("mazedoom_demo");
+ } else if (ConfMan.getBool("metagame")) {
+ Metagame::Frame::InitBFCInfo(&_bfcMgr);
+ Metagame::Gtl::RunMeta(nullptr, &_bfcMgr, false);
+
+ return Common::kNoError;
+ } else {
+ Common::String minigame = ConfMan.get("minigame");
+ if (!minigame.empty())
+ app.setStartupMinigame(minigame);
+ }
+
+ app.Run();
}
- app.Run();
-
return Common::kNoError;
}
diff --git a/engines/bagel/hodjnpodj/metagame/demo/app.cpp b/engines/bagel/hodjnpodj/metagame/demo/app.cpp
new file mode 100644
index 00000000000..b41aa137d40
--- /dev/null
+++ b/engines/bagel/hodjnpodj/metagame/demo/app.cpp
@@ -0,0 +1,64 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "bagel/hodjnpodj/metagame/demo/app.h"
+#include "bagel/hodjnpodj/metagame/bgen/mgstat.h"
+#include "bagel/boflib/sound.h"
+
+namespace Bagel {
+namespace HodjNPodj {
+namespace Metagame {
+namespace Demo {
+
+CTheApp::CTheApp() {
+}
+
+bool CTheApp::InitApplication() {
+ addResources("hnpdemo.exe");
+ addFontResource("msserif.fon");
+
+ return CWinApp::InitApplication();
+}
+
+bool CTheApp::InitInstance() {
+#if 0
+ // Main demo
+ m_pMainWnd = new CHodjPodjWindow();
+ m_pMainWnd->ShowWindow(SW_SHOWNORMAL);
+ m_pMainWnd->UpdateWindow();
+#endif
+ return true;
+}
+
+int CTheApp::ExitInstance() {
+
+ return 0;
+}
+
+bool CTheApp::OnIdle(long lCount) {
+ CBofSound::audioTask();
+ return true;
+}
+
+} // namespace Demo
+} // namespace Metagame
+} // namespace HodjNPodj
+} // namespace Bagel
diff --git a/engines/bagel/hodjnpodj/metagame/demo/app.h b/engines/bagel/hodjnpodj/metagame/demo/app.h
new file mode 100644
index 00000000000..8a18ea93d5e
--- /dev/null
+++ b/engines/bagel/hodjnpodj/metagame/demo/app.h
@@ -0,0 +1,63 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef BAGEL_METAGAME_DEMO_APP_H
+#define BAGEL_METAGAME_DEMO_APP_H
+
+#include "bagel/afxwin.h"
+
+namespace Bagel {
+namespace HodjNPodj {
+namespace Metagame {
+namespace Demo {
+
+/**
+ * Main app class for the demo
+ */
+class CTheApp : public CWinApp {
+public:
+ CTheApp();
+
+ /**
+ * Called when the application starts
+ */
+ bool InitApplication() override;
+
+ /**
+ * This routine is automatically called when the application is started.
+ */
+ bool InitInstance() override;
+
+ /**
+ * This routine is automatically called when the application is
+ * being terminated.
+ */
+ int ExitInstance() override;
+
+ bool OnIdle(long lCount) override;
+};
+
+} // namespace Demo
+} // namespace Metagame
+} // namespace HodjNPodj
+} // namespace Bagel
+
+#endif
diff --git a/engines/bagel/hodjnpodj/metagame/frame/app.cpp b/engines/bagel/hodjnpodj/metagame/frame/app.cpp
index 0619d086d5a..b4ced03f075 100644
--- a/engines/bagel/hodjnpodj/metagame/frame/app.cpp
+++ b/engines/bagel/hodjnpodj/metagame/frame/app.cpp
@@ -22,6 +22,7 @@
#include "bagel/hodjnpodj/metagame/frame/app.h"
#include "bagel/hodjnpodj/metagame/frame/hodjpodj.h"
#include "bagel/hodjnpodj/metagame/bgen/mgstat.h"
+#include "bagel/hodjnpodj/hodjnpodj.h"
#include "bagel/boflib/sound.h"
#include "bagel/metaengine.h"
@@ -43,14 +44,16 @@ CTheApp::CTheApp() {
}
bool CTheApp::InitApplication() {
- if (_startupMinigame.empty()) {
+ if (_startupMinigame == "mazedoom_demo") {
+ addResources("mod.exe");
+ } else if (g_engine->isDemo()) {
+ addResources("hnpdemo.exe");
+ } else if (_startupMinigame.empty()) {
// Main game
addResources("meta/hodjpodj.exe");
addResources("meta/hnpmeta.dll");
setDirectory("meta");
- } else if (_startupMinigame == "mazedoom_demo") {
- addResources("mod.exe");
- }
+ } else
addFontResource("msserif.fon");
setFocusChangeProc(focusChange);
diff --git a/engines/bagel/module.mk b/engines/bagel/module.mk
index ba09f651cdb..bfe19d268d2 100644
--- a/engines/bagel/module.mk
+++ b/engines/bagel/module.mk
@@ -183,6 +183,7 @@ MODULE_OBJS = \
hodjnpodj/metagame/bgen/mgstat.o \
hodjnpodj/metagame/bgen/note.o \
hodjnpodj/metagame/bgen/notebook.o \
+ hodjnpodj/metagame/demo/app.o \
hodjnpodj/metagame/frame/app.o \
hodjnpodj/metagame/frame/hodjpodj.o \
hodjnpodj/metagame/frame/maindlg.o \
Commit: f5d8c5437e63d4a0862bcf9034257838ba7639b6
https://github.com/scummvm/scummvm/commit/f5d8c5437e63d4a0862bcf9034257838ba7639b6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-09-07T18:01:21-07:00
Commit Message:
BAGEL: DEMO: Implemented demo video playback
Changed paths:
A engines/bagel/hodjnpodj/metagame/demo/hodjpodj.cpp
A engines/bagel/hodjnpodj/metagame/demo/hodjpodj.h
engines/bagel/hodjnpodj/metagame/demo/app.cpp
engines/bagel/module.mk
diff --git a/engines/bagel/hodjnpodj/metagame/demo/app.cpp b/engines/bagel/hodjnpodj/metagame/demo/app.cpp
index b41aa137d40..746aed82322 100644
--- a/engines/bagel/hodjnpodj/metagame/demo/app.cpp
+++ b/engines/bagel/hodjnpodj/metagame/demo/app.cpp
@@ -20,6 +20,7 @@
*/
#include "bagel/hodjnpodj/metagame/demo/app.h"
+#include "bagel/hodjnpodj/metagame/demo/hodjpodj.h"
#include "bagel/hodjnpodj/metagame/bgen/mgstat.h"
#include "bagel/boflib/sound.h"
@@ -39,17 +40,15 @@ bool CTheApp::InitApplication() {
}
bool CTheApp::InitInstance() {
-#if 0
// Main demo
m_pMainWnd = new CHodjPodjWindow();
m_pMainWnd->ShowWindow(SW_SHOWNORMAL);
m_pMainWnd->UpdateWindow();
-#endif
+
return true;
}
int CTheApp::ExitInstance() {
-
return 0;
}
diff --git a/engines/bagel/hodjnpodj/metagame/demo/hodjpodj.cpp b/engines/bagel/hodjnpodj/metagame/demo/hodjpodj.cpp
new file mode 100644
index 00000000000..c0e6c466f08
--- /dev/null
+++ b/engines/bagel/hodjnpodj/metagame/demo/hodjpodj.cpp
@@ -0,0 +1,141 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "bagel/hodjnpodj/metagame/demo/hodjpodj.h"
+#include "bagel/hodjnpodj/metagame/zoom/init.h"
+#include "bagel/hodjnpodj/hodjnpodj.h"
+#include "bagel/boflib/sound.h"
+
+namespace Bagel {
+namespace HodjNPodj {
+namespace Metagame {
+namespace Demo {
+
+#define IDC_PLAY_DEMO_MOVIE 9999
+#define IDC_ZOOM 888
+#define MOVIE_ID_INTRO 1
+#define MOVIE_INTRO "art/demovid.avi"
+
+BEGIN_MESSAGE_MAP(CHodjPodjWindow, CFrameWnd)
+END_MESSAGE_MAP()
+
+CHodjPodjWindow::CHodjPodjWindow() {
+ CString WndClass;
+ CRect MainRect;
+ bool bTestDibDoc;
+ CDC *pDC;
+ CBitmap *pBitmap;
+
+ WndClass = AfxRegisterWndClass(CS_DBLCLKS | CS_BYTEALIGNWINDOW | CS_OWNDC, nullptr, nullptr, nullptr);
+
+ MainRect.left = 0;
+ MainRect.top = 0;
+ MainRect.right = GAME_WIDTH;
+ MainRect.bottom = GAME_HEIGHT;
+ bTestDibDoc = Create(WndClass, "Boffo Games - Hodj 'n' Podj Demo", WS_POPUP, MainRect, nullptr, 0);
+ ASSERT(bTestDibDoc);
+
+ BeginWaitCursor();
+ ShowWindow(SW_SHOWNORMAL);
+ BlackScreen();
+ EndWaitCursor();
+
+ pDC = GetDC(); // get a device context for our window
+
+ pBitmap = FetchBitmap(pDC, &pGamePalette, "art/oscroll.bmp");
+ delete pBitmap;
+ ReleaseDC(pDC);
+
+ // Play the demo intro movie
+ PostMessage(WM_COMMAND, IDC_PLAY_DEMO_MOVIE);
+}
+
+bool CHodjPodjWindow::OnCommand(WPARAM wParam, LPARAM lParam) {
+ switch (wParam) {
+ case IDC_PLAY_DEMO_MOVIE:
+ PlayMovie(MOVIE_ID_INTRO, MOVIE_INTRO, false);
+ break;
+
+ case MOVIE_OVER:
+ // Switch to Zoom map
+ ShowCursor(true);
+ BlackScreen();
+ PostMessage(WM_COMMAND, IDC_ZOOM);
+ break;
+
+ case IDC_ZOOM:
+ BlackScreen();
+
+ Metagame::Zoom::RunZoomMap(m_hWnd, true);
+ break;
+
+ default:
+ break;
+ }
+
+ return true;
+}
+
+void CHodjPodjWindow::BlackScreen() {
+ CDC *pDC;
+ CBrush Brush(RGB(0, 0, 0));
+ CPalette *pPalOld = nullptr;
+ CRect MainRect;
+
+ ValidateRect(nullptr);
+ pDC = GetDC();
+
+ MainRect.left = MainRect.top = 0;
+ MainRect.right = GAME_WIDTH;
+ MainRect.bottom = GAME_HEIGHT;
+ pDC->FillRect(&MainRect, &Brush);
+
+ if (pGamePalette != nullptr) { // map in color palette to be used
+ pPalOld = (*pDC).SelectPalette(pGamePalette, false);
+ (*pDC).RealizePalette();
+ }
+
+ pDC->FillRect(&MainRect, &Brush);
+
+ if (pPalOld != nullptr) // relinquish the resources we built
+ (*pDC).SelectPalette(pPalOld, false);
+
+ ReleaseDC(pDC);
+}
+
+
+void CHodjPodjWindow::PlayMovie(const int nMovieId, const char *pszMovie, bool bScroll) {
+ POINT ptMovie;
+
+ BlackScreen();
+
+ pMovie.nMovieId = nMovieId;
+
+ ptMovie.x = (GAME_WIDTH / 2) - (MOVIE_WIDTH / 2);
+ ptMovie.y = (GAME_HEIGHT / 2) - (MOVIE_HEIGHT / 2);
+
+ pMovie.BlowWindow((CWnd *)this, bScroll, pszMovie, ptMovie.x, ptMovie.y);
+}
+
+} // namespace Demo
+} // namespace Metagame
+} // namespace HodjNPodj
+} // namespace Bagel
diff --git a/engines/bagel/hodjnpodj/metagame/demo/hodjpodj.h b/engines/bagel/hodjnpodj/metagame/demo/hodjpodj.h
new file mode 100644
index 00000000000..24a41076f7a
--- /dev/null
+++ b/engines/bagel/hodjnpodj/metagame/demo/hodjpodj.h
@@ -0,0 +1,66 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef BAGEL_METAGAME_DEMO_HODJPODJ_H
+#define BAGEL_METAGAME_DEMO_HODJPODJ_H
+
+#include "bagel/hodjnpodj/globals.h"
+#include "bagel/boflib/error.h"
+#include "bagel/hodjnpodj/hnplibs/bitmaps.h"
+#include "bagel/hodjnpodj/hnplibs/dibdoc.h"
+#include "bagel/hodjnpodj/hnplibs/dibapi.h"
+#include "bagel/hodjnpodj/hnplibs/gamedll.h"
+#include "bagel/hodjnpodj/hnplibs/stdinc.h"
+#include "bagel/hodjnpodj/hnplibs/text.h"
+#include "bagel/hodjnpodj/metagame/frame/resource.h"
+#include "bagel/hodjnpodj/metagame/frame/movytmpl.h"
+#include "bagel/hodjnpodj/metagame/bgen/bfc.h"
+
+namespace Bagel {
+namespace HodjNPodj {
+namespace Metagame {
+namespace Demo {
+
+class CHodjPodjWindow : public CFrameWnd {
+private:
+ Frame::CMovieWindow pMovie;
+ CPalette *pGamePalette = nullptr;
+
+public:
+ CHodjPodjWindow();
+
+ void BlackScreen();
+
+ void PlayMovie(const int, const char *, bool);
+
+protected:
+ bool OnCommand(WPARAM wParam, LPARAM lParam) override;
+ void OnPaint();
+
+ DECLARE_MESSAGE_MAP()
+};
+
+} // namespace Demo
+} // namespace Metagame
+} // namespace HodjNPodj
+} // namespace Bagel
+
+#endif
diff --git a/engines/bagel/module.mk b/engines/bagel/module.mk
index bfe19d268d2..ec2a3d19450 100644
--- a/engines/bagel/module.mk
+++ b/engines/bagel/module.mk
@@ -184,6 +184,7 @@ MODULE_OBJS = \
hodjnpodj/metagame/bgen/note.o \
hodjnpodj/metagame/bgen/notebook.o \
hodjnpodj/metagame/demo/app.o \
+ hodjnpodj/metagame/demo/hodjpodj.o \
hodjnpodj/metagame/frame/app.o \
hodjnpodj/metagame/frame/hodjpodj.o \
hodjnpodj/metagame/frame/maindlg.o \
More information about the Scummvm-git-logs
mailing list