mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-23 16:21:15 +00:00
use inline getter for rectange width/height
This commit is contained in:
parent
f3b7df111e
commit
d0066d9068
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user