mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 08:24:16 +00:00
Streamline MxVideoParamFlags (#999)
* Streamline MxVideoParamFlags * Remove this-> from MxOmniCreateFlags
This commit is contained in:
@@ -8,15 +8,15 @@ DECOMP_SIZE_ASSERT(MxOmniCreateFlags, 0x02)
|
||||
// FUNCTION: BETA10 0x10130a1c
|
||||
MxOmniCreateFlags::MxOmniCreateFlags()
|
||||
{
|
||||
this->m_flags1.m_bit0 = TRUE; // CreateObjectFactory
|
||||
this->m_flags1.m_bit1 = TRUE; // CreateVariableTable
|
||||
this->m_flags1.m_bit2 = TRUE; // CreateTickleManager
|
||||
this->m_flags1.m_bit3 = TRUE; // CreateNotificationManager
|
||||
this->m_flags1.m_bit4 = TRUE; // CreateVideoManager
|
||||
this->m_flags1.m_bit5 = TRUE; // CreateSoundManager
|
||||
this->m_flags1.m_bit6 = TRUE; // CreateMusicManager
|
||||
this->m_flags1.m_bit7 = TRUE; // CreateEventManager
|
||||
m_flags1.m_bit0 = TRUE; // CreateObjectFactory
|
||||
m_flags1.m_bit1 = TRUE; // CreateVariableTable
|
||||
m_flags1.m_bit2 = TRUE; // CreateTickleManager
|
||||
m_flags1.m_bit3 = TRUE; // CreateNotificationManager
|
||||
m_flags1.m_bit4 = TRUE; // CreateVideoManager
|
||||
m_flags1.m_bit5 = TRUE; // CreateSoundManager
|
||||
m_flags1.m_bit6 = TRUE; // CreateMusicManager
|
||||
m_flags1.m_bit7 = TRUE; // CreateEventManager
|
||||
|
||||
this->m_flags2.m_bit1 = TRUE; // CreateTimer
|
||||
this->m_flags2.m_bit2 = TRUE; // CreateStreamer
|
||||
m_flags2.m_bit1 = TRUE; // CreateTimer
|
||||
m_flags2.m_bit2 = TRUE; // CreateStreamer
|
||||
}
|
||||
|
@@ -5,79 +5,82 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxVideoParam, 0x24);
|
||||
DECOMP_SIZE_ASSERT(MxVideoParam, 0x24)
|
||||
|
||||
// FUNCTION: LEGO1 0x100bec70
|
||||
// FUNCTION: BETA10 0x1012db3e
|
||||
MxVideoParam::MxVideoParam()
|
||||
{
|
||||
this->m_rect.SetRight(640);
|
||||
this->m_rect.SetBottom(480);
|
||||
this->m_rect.SetLeft(0);
|
||||
this->m_rect.SetTop(0);
|
||||
this->m_palette = NULL;
|
||||
this->m_backBuffers = 0;
|
||||
this->m_unk0x1c = 0;
|
||||
this->m_deviceId = NULL;
|
||||
m_rect = MxRect32(0, 0, 640, 480);
|
||||
m_palette = NULL;
|
||||
m_backBuffers = 0;
|
||||
m_unk0x1c = 0;
|
||||
m_deviceId = NULL;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100beca0
|
||||
// FUNCTION: BETA10 0x1012dbb1
|
||||
MxVideoParam::MxVideoParam(MxRect32& p_rect, MxPalette* p_palette, MxULong p_backBuffers, MxVideoParamFlags& p_flags)
|
||||
{
|
||||
this->m_rect = p_rect;
|
||||
this->m_palette = p_palette;
|
||||
this->m_backBuffers = p_backBuffers;
|
||||
this->m_flags = p_flags;
|
||||
this->m_unk0x1c = 0;
|
||||
this->m_deviceId = NULL;
|
||||
m_rect = p_rect;
|
||||
m_palette = p_palette;
|
||||
m_backBuffers = p_backBuffers;
|
||||
m_flags = p_flags;
|
||||
m_unk0x1c = 0;
|
||||
m_deviceId = NULL;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100becf0
|
||||
// FUNCTION: BETA10 0x1012dc1e
|
||||
MxVideoParam::MxVideoParam(MxVideoParam& p_videoParam)
|
||||
{
|
||||
this->m_rect = p_videoParam.m_rect;
|
||||
this->m_palette = p_videoParam.m_palette;
|
||||
this->m_backBuffers = p_videoParam.m_backBuffers;
|
||||
this->m_flags = p_videoParam.m_flags;
|
||||
this->m_unk0x1c = p_videoParam.m_unk0x1c;
|
||||
this->m_deviceId = NULL;
|
||||
m_rect = p_videoParam.m_rect;
|
||||
m_palette = p_videoParam.m_palette;
|
||||
m_backBuffers = p_videoParam.m_backBuffers;
|
||||
m_flags = p_videoParam.m_flags;
|
||||
m_unk0x1c = p_videoParam.m_unk0x1c;
|
||||
m_deviceId = NULL;
|
||||
SetDeviceName(p_videoParam.m_deviceId);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100bed50
|
||||
// FUNCTION: BETA10 0x1012dca3
|
||||
MxVideoParam::~MxVideoParam()
|
||||
{
|
||||
if (this->m_deviceId != NULL) {
|
||||
delete[] this->m_deviceId;
|
||||
if (m_deviceId != NULL) {
|
||||
delete[] m_deviceId;
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100bed70
|
||||
// FUNCTION: BETA10 0x1012dce1
|
||||
void MxVideoParam::SetDeviceName(char* p_deviceId)
|
||||
{
|
||||
if (this->m_deviceId != NULL) {
|
||||
delete[] this->m_deviceId;
|
||||
if (m_deviceId != NULL) {
|
||||
delete[] m_deviceId;
|
||||
}
|
||||
|
||||
if (p_deviceId != NULL) {
|
||||
this->m_deviceId = new char[strlen(p_deviceId) + 1];
|
||||
m_deviceId = new char[strlen(p_deviceId) + 1];
|
||||
|
||||
if (this->m_deviceId != NULL) {
|
||||
strcpy(this->m_deviceId, p_deviceId);
|
||||
if (m_deviceId != NULL) {
|
||||
strcpy(m_deviceId, p_deviceId);
|
||||
}
|
||||
}
|
||||
else {
|
||||
this->m_deviceId = NULL;
|
||||
m_deviceId = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100bede0
|
||||
// FUNCTION: BETA10 0x1012dd76
|
||||
MxVideoParam& MxVideoParam::operator=(const MxVideoParam& p_videoParam)
|
||||
{
|
||||
this->m_rect = p_videoParam.m_rect;
|
||||
this->m_palette = p_videoParam.m_palette;
|
||||
this->m_backBuffers = p_videoParam.m_backBuffers;
|
||||
this->m_flags = p_videoParam.m_flags;
|
||||
this->m_unk0x1c = p_videoParam.m_unk0x1c;
|
||||
m_rect = p_videoParam.m_rect;
|
||||
m_palette = p_videoParam.m_palette;
|
||||
m_backBuffers = p_videoParam.m_backBuffers;
|
||||
m_flags = p_videoParam.m_flags;
|
||||
m_unk0x1c = p_videoParam.m_unk0x1c;
|
||||
SetDeviceName(p_videoParam.m_deviceId);
|
||||
|
||||
return *this;
|
||||
|
@@ -1,15 +1,21 @@
|
||||
#include "mxvideoparamflags.h"
|
||||
|
||||
#include "decomp.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxVideoParamFlags, 0x02)
|
||||
|
||||
// FUNCTION: LEGO1 0x100bec40
|
||||
// FUNCTION: BETA10 0x1012dadb
|
||||
MxVideoParamFlags::MxVideoParamFlags()
|
||||
{
|
||||
this->SetFullScreen(0);
|
||||
this->SetFlipSurfaces(0);
|
||||
this->SetBackBuffers(0);
|
||||
this->SetF1bit3(0);
|
||||
this->SetF1bit4(0);
|
||||
this->Set16Bit(0);
|
||||
this->SetWideViewAngle(1);
|
||||
this->SetF1bit7(1);
|
||||
this->SetF2bit1(1);
|
||||
m_flags1.m_bit0 = FALSE; // FullScreen
|
||||
m_flags1.m_bit1 = FALSE; // FlipSurfaces
|
||||
m_flags1.m_bit2 = FALSE; // BackBuffers
|
||||
m_flags1.m_bit3 = FALSE;
|
||||
m_flags1.m_bit4 = FALSE;
|
||||
m_flags1.m_bit5 = FALSE; // 16Bit
|
||||
m_flags1.m_bit6 = TRUE; // WideViewAngle
|
||||
m_flags1.m_bit7 = TRUE;
|
||||
|
||||
m_flags2.m_bit1 = TRUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user