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

dreammaster noreply at scummvm.org
Fri Sep 12 10:20:25 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:
ad85b5d9ff BAGEL: DEMO: Data to be used for initial Zoom map message
a840d7e33c BAGEL: Hopefully fix CRect TopLeft/BottomRight casts


Commit: ad85b5d9ffbe2988d63989ffb17b822793df23b9
    https://github.com/scummvm/scummvm/commit/ad85b5d9ffbe2988d63989ffb17b822793df23b9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-09-12T03:20:15-07:00

Commit Message:
BAGEL: DEMO: Data to be used for initial Zoom map message

Changed paths:
    engines/bagel/hodjnpodj/metagame/zoom/zoommap.cpp


diff --git a/engines/bagel/hodjnpodj/metagame/zoom/zoommap.cpp b/engines/bagel/hodjnpodj/metagame/zoom/zoommap.cpp
index 7a6c6f7d9cd..5ccee34293f 100644
--- a/engines/bagel/hodjnpodj/metagame/zoom/zoommap.cpp
+++ b/engines/bagel/hodjnpodj/metagame/zoom/zoommap.cpp
@@ -181,13 +181,22 @@ static const char *DEMO_DESC[30] = {
 	"I'm convinced!  Where can I buy Hodj 'n Podj"
 };
 
+static const char *DEMO_INTRO1_STR = "Move your cursor around the screen to locate";
+static const RECT DEMO_INTRO1_RECT = { 100, 425, 540, 440 };
+static const char *DEMO_INTRO2_STR = "the mini-games and shameless marketing hype.";
+static const RECT DEMO_INTRO2_RECT = { 100, 440, 540, 455 };
+
+
 int             nLastRect;      // the last gaem rect passed over
 CText           *pText = nullptr;   // the game name display
 
-static  bool    bActiveWindow = false;          // whether our window is activesho
-CBitmap         *pSplashScreen = nullptr;
+static  bool bActiveWindow = false;          // whether our window is activesho
+static CBitmap *pSplashScreen = nullptr;
 
-CColorButton    *pReturnButton = nullptr;
+static CColorButton *pReturnButton = nullptr;
+static CColorButton *pSlideshowBUtton = nullptr;
+static CText *pDemoMsg1 = nullptr;
+static CText *pDemoMsg2 = nullptr;
 
 BEGIN_MESSAGE_MAP(CMainZoomWindow, CFrameWnd)
 	//{{AFX_MSG_MAP( CMainZoomWindow )


Commit: a840d7e33c940e98811c6eff9ae56af9cc9ebd88
    https://github.com/scummvm/scummvm/commit/a840d7e33c940e98811c6eff9ae56af9cc9ebd88
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-09-12T03:20:15-07:00

Commit Message:
BAGEL: Hopefully fix CRect TopLeft/BottomRight casts

I settled on using int for both RECT and POINT since
they resulted in the fewest errors in the client code.
Plus, I wrapped both classes in a PACKED_STRUCT,
just to ensure any casts won't be affected by field
alignment issues.

Changed paths:
    engines/bagel/hodjnpodj/hnplibs/text.cpp
    engines/bagel/mfc/atltypes.h
    engines/bagel/mfc/minwindef.h
    engines/bagel/mfc/wingdi.h


diff --git a/engines/bagel/hodjnpodj/hnplibs/text.cpp b/engines/bagel/hodjnpodj/hnplibs/text.cpp
index d8f6309e0a7..449b589d8cd 100644
--- a/engines/bagel/hodjnpodj/hnplibs/text.cpp
+++ b/engines/bagel/hodjnpodj/hnplibs/text.cpp
@@ -395,8 +395,8 @@ bool CText::DisplayText(CDC *pDC, const char *pszText, const int nSize, const in
 		m_cPosition.x = m_cSize.cx - textInfo.cx;
 	}
 
-	m_cPosition.x = MAX(m_cPosition.x, 0);
-	m_cPosition.y = MAX(m_cPosition.y, 0);
+	m_cPosition.x = MAX<int>(m_cPosition.x, 0);
+	m_cPosition.y = MAX<int>(m_cPosition.y, 0);
 
 	if (bShadowed) {
 		(*m_pWorkDC).SetTextColor(m_cShadowColor);      // set the color of the shadow
diff --git a/engines/bagel/mfc/atltypes.h b/engines/bagel/mfc/atltypes.h
index c5b5deef4a0..06bbb30bef8 100644
--- a/engines/bagel/mfc/atltypes.h
+++ b/engines/bagel/mfc/atltypes.h
@@ -285,7 +285,7 @@ public:
 		return *((CPoint *)this);
 	}
 	CPoint &BottomRight() {
-		return *((CPoint *)this + 1);
+		return *((CPoint *)&right);
 	}
 };
 
diff --git a/engines/bagel/mfc/minwindef.h b/engines/bagel/mfc/minwindef.h
index 49ebbd22c13..4d578058734 100644
--- a/engines/bagel/mfc/minwindef.h
+++ b/engines/bagel/mfc/minwindef.h
@@ -157,39 +157,32 @@ DECLARE_HANDLE(HTASK);
 DECLARE_HANDLE(HWINSTA);
 DECLARE_HANDLE(HKL);
 
-typedef struct tagPOINT {
-	int  x;
-	int  y;
-} POINT, *PPOINT, NEAR *NPPOINT, FAR *LPPOINT;
+#include "common/pack-start.h"  // START STRUCT PACKING
 
-typedef struct _POINTL {    /* ptl  */
-	long  x;
-	long  y;
-} POINTL, *PPOINTL;
+struct tagPOINT {
+	int x;
+	int y;
+} PACKED_STRUCT;
+typedef tagPOINT POINT, *PPOINT, NEAR *NPPOINT, FAR *LPPOINT;
 
 typedef struct tagSIZE {
-	int        cx;
-	int        cy;
+	int cx;
+	int cy;
 } SIZE, *PSIZE, *LPSIZE;
 
-typedef SIZE               SIZEL;
+typedef SIZE SIZEL;
 typedef SIZE *PSIZEL, *LPSIZEL;
 
 typedef struct tagPOINTS {
-	#ifndef _MAC
-	SHORT   x;
-	SHORT   y;
-	#else
-	SHORT   y;
-	SHORT   x;
-	#endif
+	SHORT x;
+	SHORT y;
 } POINTS, *PPOINTS, *LPPOINTS;
 
-typedef struct tagRECT {
-	long    left;
-	long    top;
-	long    right;
-	long    bottom;
+struct tagRECT {
+	int left;
+	int top;
+	int right;
+	int bottom;
 
 	operator Common::Rect() const {
 		return Common::Rect(left, top, right, bottom);
@@ -202,9 +195,12 @@ typedef struct tagRECT {
 		Common::Rect r = *this;
 		return r.contains(pt.x, pt.y);
 	}
-} RECT, *PRECT, NEAR *NPRECT, FAR *LPRECT;
+} PACKED_STRUCT;
+typedef tagRECT RECT, *PRECT, NEAR *NPRECT, FAR *LPRECT;
 typedef const RECT FAR *LPCRECT;
 
+#include "common/pack-end.h"    // END STRUCT PACKING
+
 inline Common::Rect RECTtoRect(const RECT &src) {
 	return src;
 }
diff --git a/engines/bagel/mfc/wingdi.h b/engines/bagel/mfc/wingdi.h
index 5f295df472f..27fd2d760dc 100644
--- a/engines/bagel/mfc/wingdi.h
+++ b/engines/bagel/mfc/wingdi.h
@@ -654,12 +654,12 @@ typedef struct tagBITMAPINFO {
 
 /* Bitmap Header Definition */
 typedef struct tagBITMAP {
-	long        bmType;
-	long        bmWidth;
-	long        bmHeight;
-	long        bmWidthBytes;
-	uint16        bmPlanes;
-	uint16        bmBitsPixel;
+	int bmType;
+	int bmWidth;
+	int bmHeight;
+	int bmWidthBytes;
+	uint16 bmPlanes;
+	uint16 bmBitsPixel;
 	void *     bmBits;
 } BITMAP, *PBITMAP, NEAR *NPBITMAP, FAR *LPBITMAP;
 




More information about the Scummvm-git-logs mailing list