[Scummvm-git-logs] scummvm master -> f85a43163ee64e7244e5eb5f4de72396d03036b8
dreammaster
noreply at scummvm.org
Fri Sep 12 11:35:23 UTC 2025
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:
f85a43163e BAGEL: Revert Hopefully fix CRect TopLeft/BottomRight casts
Commit: f85a43163ee64e7244e5eb5f4de72396d03036b8
https://github.com/scummvm/scummvm/commit/f85a43163ee64e7244e5eb5f4de72396d03036b8
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-09-12T04:33:33-07:00
Commit Message:
BAGEL: Revert Hopefully fix CRect TopLeft/BottomRight casts
This reverts commit a840d7e33c940e98811c6eff9ae56af9cc9ebd88.
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 449b589d8cd..d8f6309e0a7 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<int>(m_cPosition.x, 0);
- m_cPosition.y = MAX<int>(m_cPosition.y, 0);
+ m_cPosition.x = MAX(m_cPosition.x, 0);
+ m_cPosition.y = MAX(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 06bbb30bef8..c5b5deef4a0 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 *)&right);
+ return *((CPoint *)this + 1);
}
};
diff --git a/engines/bagel/mfc/minwindef.h b/engines/bagel/mfc/minwindef.h
index 4d578058734..49ebbd22c13 100644
--- a/engines/bagel/mfc/minwindef.h
+++ b/engines/bagel/mfc/minwindef.h
@@ -157,32 +157,39 @@ DECLARE_HANDLE(HTASK);
DECLARE_HANDLE(HWINSTA);
DECLARE_HANDLE(HKL);
-#include "common/pack-start.h" // START STRUCT PACKING
+typedef struct tagPOINT {
+ int x;
+ int y;
+} POINT, *PPOINT, NEAR *NPPOINT, FAR *LPPOINT;
-struct tagPOINT {
- int x;
- int y;
-} PACKED_STRUCT;
-typedef tagPOINT POINT, *PPOINT, NEAR *NPPOINT, FAR *LPPOINT;
+typedef struct _POINTL { /* ptl */
+ long x;
+ long y;
+} POINTL, *PPOINTL;
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 {
- SHORT x;
- SHORT y;
+ #ifndef _MAC
+ SHORT x;
+ SHORT y;
+ #else
+ SHORT y;
+ SHORT x;
+ #endif
} POINTS, *PPOINTS, *LPPOINTS;
-struct tagRECT {
- int left;
- int top;
- int right;
- int bottom;
+typedef struct tagRECT {
+ long left;
+ long top;
+ long right;
+ long bottom;
operator Common::Rect() const {
return Common::Rect(left, top, right, bottom);
@@ -195,12 +202,9 @@ struct tagRECT {
Common::Rect r = *this;
return r.contains(pt.x, pt.y);
}
-} PACKED_STRUCT;
-typedef tagRECT RECT, *PRECT, NEAR *NPRECT, FAR *LPRECT;
+} 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 27fd2d760dc..5f295df472f 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 {
- int bmType;
- int bmWidth;
- int bmHeight;
- int bmWidthBytes;
- uint16 bmPlanes;
- uint16 bmBitsPixel;
+ long bmType;
+ long bmWidth;
+ long bmHeight;
+ long bmWidthBytes;
+ uint16 bmPlanes;
+ uint16 bmBitsPixel;
void * bmBits;
} BITMAP, *PBITMAP, NEAR *NPBITMAP, FAR *LPBITMAP;
More information about the Scummvm-git-logs
mailing list