mirror of
https://github.com/isledecomp/isle.git
synced 2024-12-01 20:07:20 -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
|
class MxRect32
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
MxRect32() { }
|
||||||
MxRect32(int p_left, int p_top, int p_right, int p_bottom)
|
MxRect32(int p_left, int p_top, int p_right, int p_bottom)
|
||||||
{
|
{
|
||||||
this->m_left = p_left;
|
this->m_left = p_left;
|
||||||
|
|
|
@ -6,31 +6,57 @@
|
||||||
// OFFSET: LEGO1 0x100bec70
|
// OFFSET: LEGO1 0x100bec70
|
||||||
MxVideoParam::MxVideoParam()
|
MxVideoParam::MxVideoParam()
|
||||||
{
|
{
|
||||||
this->m_flags = MxVideoParamFlags();
|
this->m_rect.m_right = 640;
|
||||||
this->m_right = 640;
|
this->m_rect.m_bottom = 480;
|
||||||
this->m_bottom = 480;
|
this->m_rect.m_left = 0;
|
||||||
this->m_left = 0;
|
this->m_rect.m_top = 0;
|
||||||
this->m_top = 0;
|
|
||||||
this->m_palette = 0;
|
this->m_palette = 0;
|
||||||
this->m_backBuffers = 0;
|
this->m_backBuffers = 0;
|
||||||
this->m_unk1c = 0;
|
this->m_unk1c = 0;
|
||||||
this->m_deviceId = 0;
|
this->m_deviceId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100becf0
|
// OFFSET: LEGO1 0x100beca0
|
||||||
MxVideoParam &MxVideoParam::operator=(const MxVideoParam &other)
|
MxVideoParam::MxVideoParam(MxRect32 &p_rect, MxPalette *p_pal, unsigned long p_backBuffers, MxVideoParamFlags &p_flags)
|
||||||
{
|
{
|
||||||
m_flags = MxVideoParamFlags();
|
this->m_rect.m_left = p_rect.m_left;
|
||||||
m_left = other.m_left;
|
this->m_rect.m_top = p_rect.m_top;
|
||||||
m_top = other.m_top;
|
this->m_rect.m_right = p_rect.m_right;
|
||||||
m_right = other.m_right;
|
this->m_rect.m_bottom = p_rect.m_bottom;
|
||||||
m_bottom = other.m_bottom;
|
this->m_palette = p_pal;
|
||||||
m_palette = other.m_palette;
|
this->m_backBuffers = p_backBuffers;
|
||||||
m_backBuffers = other.m_backBuffers;
|
this->m_flags = p_flags;
|
||||||
m_flags = other.m_flags;
|
this->m_unk1c = 0;
|
||||||
m_unk1c = other.m_unk1c;
|
this->m_deviceId = NULL;
|
||||||
m_deviceId = other.m_deviceId;
|
}
|
||||||
SetDeviceName(other.m_deviceId);
|
|
||||||
|
// 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;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,16 +20,12 @@ class MxVideoParam
|
||||||
inline MxVideoParamFlags &flags() { return m_flags; }
|
inline MxVideoParamFlags &flags() { return m_flags; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_left;
|
MxRect32 m_rect;
|
||||||
int m_top;
|
|
||||||
int m_right;
|
|
||||||
int m_bottom;
|
|
||||||
MxPalette *m_palette;
|
MxPalette *m_palette;
|
||||||
int m_backBuffers;
|
unsigned int m_backBuffers;
|
||||||
MxVideoParamFlags m_flags;
|
MxVideoParamFlags m_flags;
|
||||||
int m_unk1c;
|
int m_unk1c;
|
||||||
char *m_deviceId;
|
char *m_deviceId;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MXVIDEOPARAM_H
|
#endif // MXVIDEOPARAM_H
|
||||||
|
|
Loading…
Reference in a new issue