From 4aa5a17a19f1d33878df0091d4290d5a6e55765e Mon Sep 17 00:00:00 2001 From: disinvite Date: Wed, 29 May 2024 10:38:59 -0400 Subject: [PATCH] New MxRect16 header, offsets and size annotations --- .../legoomni/include/legometerpresenter.h | 46 ++----------------- LEGO1/omni/include/mxrect16.h | 45 ++++++++++++++++++ 2 files changed, 49 insertions(+), 42 deletions(-) create mode 100644 LEGO1/omni/include/mxrect16.h diff --git a/LEGO1/lego/legoomni/include/legometerpresenter.h b/LEGO1/lego/legoomni/include/legometerpresenter.h index 8e84d516..9a8b7acd 100644 --- a/LEGO1/lego/legoomni/include/legometerpresenter.h +++ b/LEGO1/lego/legoomni/include/legometerpresenter.h @@ -1,52 +1,14 @@ #ifndef LEGOMETERPRESENTER_H #define LEGOMETERPRESENTER_H +#include "mxrect16.h" #include "mxstillpresenter.h" #include "mxstring.h" -struct Rect16 { - // FUNCTION: BETA10 0x10097ee0 - Rect16(){}; - - // FUNCTION: BETA10 0x100981f0 - inline void SetLeft(MxS16 p_value) { m_left = p_value; } - - // FUNCTION: BETA10 0x10098220 - inline void SetTop(MxS16 p_value) { m_top = p_value; } - - // FUNCTION: BETA10 0x10098250 - inline void SetRight(MxS16 p_value) { m_right = p_value; } - - // FUNCTION: BETA10 0x10098280 - inline void SetBottom(MxS16 p_value) { m_bottom = p_value; } - - // FUNCTION: BETA10 0x10098300 - inline MxS16 GetLeft() const { return m_left; } - - // FUNCTION: BETA10 0x10098330 - inline MxS16 GetTop() const { return m_top; } - - // There is no GetRight() - - // FUNCTION: BETA10 0x10098360 - inline MxS16 GetBottom() const { return m_bottom; } - - // FUNCTION: BETA10 0x10098390 - inline MxS16 GetWidth() const { return m_right - m_left + 1; } - - // FUNCTION: BETA10 0x100983c0 - inline MxS16 GetHeight() const { return m_bottom - m_top + 1; } - -private: - MxS16 m_left; - MxS16 m_top; - MxS16 m_right; - MxS16 m_bottom; -}; - -struct MeterRect : public Rect16 { +// SIZE 0x08 +struct MeterRect : public MxRect16 { // FUNCTION: BETA10 0x10097eb0 - MeterRect(){}; + MeterRect() {} }; // VTABLE: LEGO1 0x100d7ac8 diff --git a/LEGO1/omni/include/mxrect16.h b/LEGO1/omni/include/mxrect16.h new file mode 100644 index 00000000..4e923f2a --- /dev/null +++ b/LEGO1/omni/include/mxrect16.h @@ -0,0 +1,45 @@ +#ifndef MXRECT16_H +#define MXRECT16_H + +// SIZE 0x08 +struct MxRect16 { + // FUNCTION: BETA10 0x10097ee0 + MxRect16() {} + + // FUNCTION: BETA10 0x100981f0 + inline void SetLeft(MxS16 p_left) { m_left = p_left; } + + // FUNCTION: BETA10 0x10098220 + inline void SetTop(MxS16 p_top) { m_top = p_top; } + + // FUNCTION: BETA10 0x10098250 + inline void SetRight(MxS16 p_right) { m_right = p_right; } + + // FUNCTION: BETA10 0x10098280 + inline void SetBottom(MxS16 p_bottom) { m_bottom = p_bottom; } + + // FUNCTION: BETA10 0x10098300 + inline MxS16 GetLeft() const { return m_left; } + + // FUNCTION: BETA10 0x10098330 + inline MxS16 GetTop() const { return m_top; } + + // There is no GetRight() + + // FUNCTION: BETA10 0x10098360 + inline MxS16 GetBottom() const { return m_bottom; } + + // FUNCTION: BETA10 0x10098390 + inline MxS16 GetWidth() const { return m_right - m_left + 1; } + + // FUNCTION: BETA10 0x100983c0 + inline MxS16 GetHeight() const { return m_bottom - m_top + 1; } + +private: + MxS16 m_left; // 0x00 + MxS16 m_top; // 0x02 + MxS16 m_right; // 0x04 + MxS16 m_bottom; // 0x06 +}; + +#endif // MXRECT16_H