mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-27 01:56:28 -05:00
1ae3b07dc2
* First commit of order tool * More flexible match on module name. Bugfix on blank_or_comment * Report inexact offset comments in verbose mode. Bugfix for exact regex * Refactor checkorder into reusable isledecomp module * Find bad comments in one pass, add awareness of TEMPLATE * Refactor of state machine to prepare for reccmp integration * Use isledecomp lib in reccmp * Build isledecomp in GH actions, fix mypy complaint * Ensure unit test cpp files will be ignored by reccmp * Allow multiple offset markers, pep8 cleanup * Remove unused variable * Code style, remove unneeded module and TODO * Final renaming and type hints * Fix checkorder issues, add GH action and enforce (#2) * Fix checkorder issues * Add GH action * Test error case * Works * Fixes --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
83 lines
1.8 KiB
C++
83 lines
1.8 KiB
C++
#include "mxvideoparam.h"
|
|
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
// OFFSET: LEGO1 0x100bec70
|
|
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_unk1c = 0;
|
|
this->m_deviceId = NULL;
|
|
}
|
|
|
|
// OFFSET: LEGO1 0x100beca0
|
|
MxVideoParam::MxVideoParam(
|
|
COMPAT_CONST MxRect32& p_rect,
|
|
MxPalette* p_pal,
|
|
MxULong p_backBuffers,
|
|
COMPAT_CONST MxVideoParamFlags& p_flags
|
|
)
|
|
{
|
|
this->m_rect = p_rect;
|
|
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 = 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_unk1c = p_videoParam.m_unk1c;
|
|
this->m_deviceId = NULL;
|
|
SetDeviceName(p_videoParam.m_deviceId);
|
|
}
|
|
|
|
// OFFSET: LEGO1 0x100bed50
|
|
MxVideoParam::~MxVideoParam()
|
|
{
|
|
if (this->m_deviceId != NULL)
|
|
delete[] this->m_deviceId;
|
|
}
|
|
|
|
// OFFSET: LEGO1 0x100bed70
|
|
void MxVideoParam::SetDeviceName(char* id)
|
|
{
|
|
if (this->m_deviceId != NULL)
|
|
delete[] this->m_deviceId;
|
|
|
|
if (id != 0) {
|
|
this->m_deviceId = new char[strlen(id) + 1];
|
|
|
|
if (this->m_deviceId != NULL) {
|
|
strcpy(this->m_deviceId, id);
|
|
}
|
|
}
|
|
else {
|
|
this->m_deviceId = NULL;
|
|
}
|
|
}
|
|
|
|
// OFFSET: LEGO1 0x100bede0
|
|
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_unk1c = p_videoParam.m_unk1c;
|
|
SetDeviceName(p_videoParam.m_deviceId);
|
|
|
|
return *this;
|
|
}
|