[Scummvm-git-logs] scummvm master -> acf09ac3365062333ff8cc059a37549942d4f2c1
dreammaster
noreply at scummvm.org
Thu Feb 19 10:08:00 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:
acf09ac336 BAGEL: METAGAME: Hopeful fix for ocassional store dialog crashes
Commit: acf09ac3365062333ff8cc059a37549942d4f2c1
https://github.com/scummvm/scummvm/commit/acf09ac3365062333ff8cc059a37549942d4f2c1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-02-19T21:05:04+11:00
Commit Message:
BAGEL: METAGAME: Hopeful fix for ocassional store dialog crashes
Changed paths:
NEWS.md
engines/bagel/hodjnpodj/metagame/bgen/backpack.cpp
engines/bagel/hodjnpodj/metagame/bgen/backpack.h
engines/bagel/hodjnpodj/metagame/bgen/bsutl.cpp
engines/bagel/hodjnpodj/metagame/bgen/bsutl.h
engines/bagel/hodjnpodj/metagame/bgen/notebook.cpp
engines/bagel/hodjnpodj/metagame/bgen/notebook.h
engines/bagel/hodjnpodj/metagame/gtl/gtldat.h
engines/bagel/hodjnpodj/metagame/gtl/gtlmve.cpp
engines/bagel/hodjnpodj/metagame/gtl/pawn.cpp
engines/bagel/hodjnpodj/metagame/gtl/pawn.h
engines/bagel/hodjnpodj/metagame/gtl/store.cpp
engines/bagel/hodjnpodj/metagame/gtl/store.h
diff --git a/NEWS.md b/NEWS.md
index fb80d5e40e3..c00e19a4609 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -12,6 +12,7 @@ For a more comprehensive changelog of the latest experimental code, see:
- Fix using Enter key to close info dialogs.
- Fix shell animations in Mankala minigame.
- Fixed incorrect evolution logic in Game of Life.
+ - Hopeful fix for occasional crash entering boardgame stores.
M4:
- Added music support in Ripley.
diff --git a/engines/bagel/hodjnpodj/metagame/bgen/backpack.cpp b/engines/bagel/hodjnpodj/metagame/bgen/backpack.cpp
index bf5bc487f0e..48d75eab876 100644
--- a/engines/bagel/hodjnpodj/metagame/bgen/backpack.cpp
+++ b/engines/bagel/hodjnpodj/metagame/bgen/backpack.cpp
@@ -81,7 +81,6 @@ static CFont *pFont = nullptr; // font to use for displaying b
//static char chPathName[128]; // buffer to hold path name of the backpack file
static bool bActiveWindow = false; // whether our window is active
-static bool bFirstTime = true; // flag for first time information is displayed
static int nBackpack_DX, nBackpack_DY; // size of useable backpack background
static int nItem_DDX, nItem_DDY; // space separation between inventory items
static int nItemsPerColumn, nItemsPerRow; // span of items that fit on the background
@@ -270,6 +269,7 @@ void CBackpack::OnDestroy() {
pItemText = nullptr;
}
+ bFirstTime = true;
CDialog::OnDestroy();
}
diff --git a/engines/bagel/hodjnpodj/metagame/bgen/backpack.h b/engines/bagel/hodjnpodj/metagame/bgen/backpack.h
index c357ef98f66..df8c93a94c6 100644
--- a/engines/bagel/hodjnpodj/metagame/bgen/backpack.h
+++ b/engines/bagel/hodjnpodj/metagame/bgen/backpack.h
@@ -61,7 +61,9 @@ namespace Gtl {
class CBackpack : public CDialog {
- // Construction
+private:
+ bool bFirstTime = true; // flag for first time information is displayed
+
public:
CBackpack(CWnd *pParent, CPalette *pPalette,
CInventory *pInventory);
diff --git a/engines/bagel/hodjnpodj/metagame/bgen/bsutl.cpp b/engines/bagel/hodjnpodj/metagame/bgen/bsutl.cpp
index 7c32614bea3..837b3b8d4b1 100644
--- a/engines/bagel/hodjnpodj/metagame/bgen/bsutl.cpp
+++ b/engines/bagel/hodjnpodj/metagame/bgen/bsutl.cpp
@@ -465,7 +465,6 @@ bool CBsuSet::ScrollWindowToPoint(CPoint cScrollPosition, bool bScrollWindow)
CRect cHPaintRect, cVPaintRect; // more rects for uncovered region
CBsuSet *xpSet;
CScrollBar *xpScrollBar;
- static bool bFirstTime = true;
AfxGetApp()->DoWaitCursor(1);
diff --git a/engines/bagel/hodjnpodj/metagame/bgen/bsutl.h b/engines/bagel/hodjnpodj/metagame/bgen/bsutl.h
index 37e525d4743..dd494ab9f5b 100644
--- a/engines/bagel/hodjnpodj/metagame/bgen/bsutl.h
+++ b/engines/bagel/hodjnpodj/metagame/bgen/bsutl.h
@@ -72,6 +72,7 @@ class CRRect;
class CBsuSet {
public:
class CBsuBar *m_xpBarChain = nullptr; // chain of scroll bar objects
+ bool bFirstTime = true;
bool m_bInUpdateBars = false; // prevent UpdateBars recursion
CDialog *m_xpDlg = nullptr; // dialog to be updated
CWnd *m_xpWnd = nullptr; // window to be scrolled
diff --git a/engines/bagel/hodjnpodj/metagame/bgen/notebook.cpp b/engines/bagel/hodjnpodj/metagame/bgen/notebook.cpp
index 2b51164ce0b..c0921f7e979 100644
--- a/engines/bagel/hodjnpodj/metagame/bgen/notebook.cpp
+++ b/engines/bagel/hodjnpodj/metagame/bgen/notebook.cpp
@@ -87,7 +87,6 @@ static CFont *pNoteFont = nullptr; // font to use for displaying n
//static bool bInfoEOF = false; // whether end-of-file has been reached
static bool bActiveWindow = false; // whether our window is active
-static bool bFirstTime = true; // flag for first time information is displayed
//static int nNotebook_DX, nNotebook_DY; // size of useable notebook background
//static int nItem_DDX, nItem_DDY; // space separation between inventory items
//static int nItemsPerColumn, nItemsPerRow; // span of items that fit on the background
@@ -291,6 +290,7 @@ void CNotebook::OnDestroy() {
}
*/
+ bFirstTime = true;
CDialog::OnDestroy();
}
diff --git a/engines/bagel/hodjnpodj/metagame/bgen/notebook.h b/engines/bagel/hodjnpodj/metagame/bgen/notebook.h
index dec96c4d7d5..221082a4d34 100644
--- a/engines/bagel/hodjnpodj/metagame/bgen/notebook.h
+++ b/engines/bagel/hodjnpodj/metagame/bgen/notebook.h
@@ -82,7 +82,9 @@ namespace Gtl {
class CNotebook : public CDialog {
- // Construction
+private:
+ bool bFirstTime = true; // flag for first time information is displayed
+
public:
CNotebook(CWnd *pParent, CPalette *pPalette, CNote *pNoteList, CNote *pNote);
diff --git a/engines/bagel/hodjnpodj/metagame/gtl/gtldat.h b/engines/bagel/hodjnpodj/metagame/gtl/gtldat.h
index bb409a818b4..fbdacad0764 100644
--- a/engines/bagel/hodjnpodj/metagame/gtl/gtldat.h
+++ b/engines/bagel/hodjnpodj/metagame/gtl/gtldat.h
@@ -338,6 +338,7 @@ public:
class CGtlDoc *m_xpcGtlDoc = nullptr; // document pointer
private:
+ bool bFirstTime = true;
CGenUtil m_cGenUtil; // general utility object
CBgbMgr m_cBgbMgr; // Boffo Game Object manager
CBbtMgr m_cBbtMgr; // Boffo Games button manager
diff --git a/engines/bagel/hodjnpodj/metagame/gtl/gtlmve.cpp b/engines/bagel/hodjnpodj/metagame/gtl/gtlmve.cpp
index 4af0567b737..16716735c0a 100644
--- a/engines/bagel/hodjnpodj/metagame/gtl/gtlmve.cpp
+++ b/engines/bagel/hodjnpodj/metagame/gtl/gtlmve.cpp
@@ -463,7 +463,6 @@ bool CGtlData::EndMoveProcessing()
const CLocTable * xpLocTable = CMgStatic::cLocTable, *xpLocEntry ;
int iLocFunctionCode ; // MG_GAME_xxxx or MG_VISIT_xxxx
bool bExitDll = false ;
- static bool bFirstTime = true;
CSound *pSound;
if (xpXodj && xpXodj->m_iCharNode >= 0 && xpXodj->m_iCharNode < m_iNodes && !(lpNode = m_lpNodes + xpXodj->m_iCharNode)->m_bDeleted && lpNode->m_bRelocatable) {
@@ -1544,7 +1543,6 @@ bool CGtlData::InitInterface(int iCode, bool & bExitDll)
CDC *pDC = nullptr;
if ((pDC = gpMyView->GetDC()) != nullptr) {
-
m_cBgbMgr.m_xpBsuSet->PrepareDc(pDC, true);
if ((pSpinner = new CSpinner(xpGtlView, pDC, 0, 0, m_xpCurXodj->m_bHodj)) != nullptr) {
point = pDC->GetViewportOrg();
diff --git a/engines/bagel/hodjnpodj/metagame/gtl/pawn.cpp b/engines/bagel/hodjnpodj/metagame/gtl/pawn.cpp
index 7f1365a3290..d02608d4ee3 100644
--- a/engines/bagel/hodjnpodj/metagame/gtl/pawn.cpp
+++ b/engines/bagel/hodjnpodj/metagame/gtl/pawn.cpp
@@ -86,7 +86,6 @@ static CFont *pFont = nullptr; // font to use for displa
//static char chPathName[128]; // buffer to hold path name of the pawn file
static bool bActiveWindow = false; // whether our window is active
-static bool bFirstTime = true; // flag for first time information is displayed
static int nPawn_DX, nPawn_DY; // size of useable pawn background
static int nItem_DDX, nItem_DDY; // space separation between inventory items
static int nItemsPerColumn, nItemsPerRow; // span of items that fit on the background
@@ -282,6 +281,7 @@ void CPawnShop::OnDestroy() {
pTitleText = nullptr;
}
+ bFirstTime = true;
CDialog::OnDestroy();
}
diff --git a/engines/bagel/hodjnpodj/metagame/gtl/pawn.h b/engines/bagel/hodjnpodj/metagame/gtl/pawn.h
index d9fe06e06ef..45cc22ae3fa 100644
--- a/engines/bagel/hodjnpodj/metagame/gtl/pawn.h
+++ b/engines/bagel/hodjnpodj/metagame/gtl/pawn.h
@@ -67,7 +67,9 @@ namespace Gtl {
#define PAWN_BLURB_COLOR RGB(0,0,255)
class CPawnShop : public CDialog {
-// Construction
+private:
+ bool bFirstTime = true; // flag for first time information is displayed
+
public:
CPawnShop(CWnd* pParent, CPalette *pPalette, CInventory *pGeneralStore, CInventory *pInventory);
diff --git a/engines/bagel/hodjnpodj/metagame/gtl/store.cpp b/engines/bagel/hodjnpodj/metagame/gtl/store.cpp
index 880a1e242d7..0ae2c2a9252 100644
--- a/engines/bagel/hodjnpodj/metagame/gtl/store.cpp
+++ b/engines/bagel/hodjnpodj/metagame/gtl/store.cpp
@@ -89,7 +89,6 @@ static CFont *pFont = nullptr; // font to use for displa
//static char chPathName[128]; // buffer to hold path name of the store file
static bool bActiveWindow = false; // whether our window is active
-static bool bFirstTime = true; // flag for first time information is displayed
static int nStore_DX, nStore_DY; // size of useable store background
static int nItem_DDX, nItem_DDY; // space separation between inventory items
static int nItemsPerColumn, nItemsPerRow; // span of items that fit on the background
@@ -232,11 +231,10 @@ void CGeneralStore::OnCancel() {
void CGeneralStore::OnDestroy() {
bool bUpdateNeeded;
- if (pFont != nullptr)
- delete pFont; // release the font file
-
- if (pOKButton != nullptr) // release the button
- delete pOKButton;
+ delete pFont; // release the font file
+ delete pOKButton;
+ pFont = nullptr;
+ pOKButton = nullptr;
if (m_bKeyboardHook) // remove keyboard hook, if present
RemoveKeyboardHook();
@@ -284,6 +282,7 @@ void CGeneralStore::OnDestroy() {
pTitleText = nullptr;
}
+ bFirstTime = true;
CDialog::OnDestroy();
}
diff --git a/engines/bagel/hodjnpodj/metagame/gtl/store.h b/engines/bagel/hodjnpodj/metagame/gtl/store.h
index 0b674a0f8f8..871093aaf8d 100644
--- a/engines/bagel/hodjnpodj/metagame/gtl/store.h
+++ b/engines/bagel/hodjnpodj/metagame/gtl/store.h
@@ -69,6 +69,9 @@ namespace Gtl {
class CGeneralStore : public CDialog {
// Construction
+private:
+ bool bFirstTime = true;
+
public:
CGeneralStore(CWnd* pParent, CPalette *pPalette, CInventory *pStore, CInventory *pInventory);
More information about the Scummvm-git-logs
mailing list