diff --git a/LEGO1/mxrect32.h b/LEGO1/mxrect32.h index 092396f5..8ba5f6d6 100644 --- a/LEGO1/mxrect32.h +++ b/LEGO1/mxrect32.h @@ -4,6 +4,7 @@ class MxRect32 { public: + MxRect32() { } MxRect32(int p_left, int p_top, int p_right, int p_bottom) { this->m_left = p_left; diff --git a/LEGO1/mxvideoparam.cpp b/LEGO1/mxvideoparam.cpp index 2a33736a..063d97f7 100644 --- a/LEGO1/mxvideoparam.cpp +++ b/LEGO1/mxvideoparam.cpp @@ -6,31 +6,57 @@ // OFFSET: LEGO1 0x100bec70 MxVideoParam::MxVideoParam() { - this->m_flags = MxVideoParamFlags(); - this->m_right = 640; - this->m_bottom = 480; - this->m_left = 0; - this->m_top = 0; + this->m_rect.m_right = 640; + this->m_rect.m_bottom = 480; + this->m_rect.m_left = 0; + this->m_rect.m_top = 0; this->m_palette = 0; this->m_backBuffers = 0; this->m_unk1c = 0; this->m_deviceId = 0; } -// OFFSET: LEGO1 0x100becf0 -MxVideoParam &MxVideoParam::operator=(const MxVideoParam &other) +// OFFSET: LEGO1 0x100beca0 +MxVideoParam::MxVideoParam(MxRect32 &p_rect, MxPalette *p_pal, unsigned long p_backBuffers, MxVideoParamFlags &p_flags) { - m_flags = MxVideoParamFlags(); - m_left = other.m_left; - m_top = other.m_top; - m_right = other.m_right; - m_bottom = other.m_bottom; - m_palette = other.m_palette; - m_backBuffers = other.m_backBuffers; - m_flags = other.m_flags; - m_unk1c = other.m_unk1c; - m_deviceId = other.m_deviceId; - SetDeviceName(other.m_deviceId); + this->m_rect.m_left = p_rect.m_left; + this->m_rect.m_top = p_rect.m_top; + this->m_rect.m_right = p_rect.m_right; + this->m_rect.m_bottom = p_rect.m_bottom; + this->m_palette = p_pal; + this->m_backBuffers = p_backBuffers; + this->m_flags = p_flags; + this->m_unk1c = 0; + this->m_deviceId = NULL; +} + +// OFFSET: LEGO1 0x100becf0 +MxVideoParam::MxVideoParam(MxVideoParam &p_videoParam) +{ + this->m_rect.m_left = p_videoParam.m_rect.m_left; + this->m_rect.m_top = p_videoParam.m_rect.m_top; + this->m_rect.m_right = p_videoParam.m_rect.m_right; + this->m_rect.m_bottom = p_videoParam.m_rect.m_bottom; + this->m_palette = p_videoParam.m_palette; + this->m_backBuffers = p_videoParam.m_backBuffers; + this->m_flags = p_videoParam.m_flags; + this->m_unk1c = p_videoParam.m_unk1c; + this->m_deviceId = NULL; + SetDeviceName(p_videoParam.m_deviceId); +} + +// OFFSET: LEGO1 0x100bede0 +MxVideoParam &MxVideoParam::operator=(const MxVideoParam &p_videoParam) +{ + this->m_rect.m_left = p_videoParam.m_rect.m_left; + this->m_rect.m_top = p_videoParam.m_rect.m_top; + this->m_rect.m_right = p_videoParam.m_rect.m_right; + this->m_rect.m_bottom = p_videoParam.m_rect.m_bottom; + this->m_palette = p_videoParam.m_palette; + this->m_backBuffers = p_videoParam.m_backBuffers; + this->m_flags = p_videoParam.m_flags; + this->m_unk1c = p_videoParam.m_unk1c; + SetDeviceName(p_videoParam.m_deviceId); return *this; } diff --git a/LEGO1/mxvideoparam.h b/LEGO1/mxvideoparam.h index eedf3167..aeb50554 100644 --- a/LEGO1/mxvideoparam.h +++ b/LEGO1/mxvideoparam.h @@ -20,16 +20,12 @@ class MxVideoParam inline MxVideoParamFlags &flags() { return m_flags; } private: - int m_left; - int m_top; - int m_right; - int m_bottom; + MxRect32 m_rect; MxPalette *m_palette; - int m_backBuffers; + unsigned int m_backBuffers; MxVideoParamFlags m_flags; int m_unk1c; char *m_deviceId; - }; #endif // MXVIDEOPARAM_H