diff --git a/LEGO1/mxrect32.h b/LEGO1/mxrect32.h index 37574a4d..42e3672b 100644 --- a/LEGO1/mxrect32.h +++ b/LEGO1/mxrect32.h @@ -1,9 +1,6 @@ #ifndef MXRECT32_H #define MXRECT32_H -#define MxRect32GetWidth(rect) (rect.m_right - rect.m_left) + 1 -#define MxRect32GetHeight(rect) (rect.m_bottom - rect.m_top) + 1 - class MxRect32 { public: @@ -20,6 +17,16 @@ class MxRect32 MxS32 m_top; MxS32 m_right; MxS32 m_bottom; + + inline MxS32 GetWidth() + { + return (m_right - m_left) + 1; + } + + inline MxS32 GetHeight() + { + return (m_bottom - m_top) + 1; + } }; #endif // MXRECT32_H diff --git a/LEGO1/mxvideopresenter.cpp b/LEGO1/mxvideopresenter.cpp index 4e6eaeb6..ce7e9287 100644 --- a/LEGO1/mxvideopresenter.cpp +++ b/LEGO1/mxvideopresenter.cpp @@ -109,7 +109,7 @@ void MxVideoPresenter::Destroy(MxBool p_reinit) rect.m_top = GetLocationY(); MVideoManager()->InvalidateRect(rect); - MVideoManager()->vtable0x34(rect.m_left, rect.m_top, MxRect32GetWidth(rect), MxRect32GetHeight(rect)); + MVideoManager()->vtable0x34(rect.m_left, rect.m_top, rect.GetWidth(), rect.GetHeight()); } delete m_bitmap;