lego: implement/match MxVideoParam exported functions (#36)

Co-authored-by: itsmattkc <itsmattkc@gmail.com>
This commit is contained in:
Christian Semmler
2023-06-22 18:19:48 +02:00
committed by GitHub
parent 749a1f419b
commit a0fac56d4c
3 changed files with 47 additions and 24 deletions

View File

@@ -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;
}