mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-26 01:28:30 -05:00
lego: implement/match MxVideoParam exported functions (#36)
Co-authored-by: itsmattkc <itsmattkc@gmail.com>
This commit is contained in:
parent
749a1f419b
commit
a0fac56d4c
3 changed files with 47 additions and 24 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue