mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-22 21:09:41 +00:00
Convert all sources eol's to nl (#41)
This commit is contained in:
parent
4f4863af6f
commit
7dbb06eef3
7
.gitattributes
vendored
Normal file
7
.gitattributes
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
*.MD text eol=lf diff=markdown
|
||||
*.cpp text eol=lf diff=cpp
|
||||
*.h text eol=lf diff=cpp
|
||||
*.py text eol=lf diff=python
|
||||
*.html text eol=lf diff=html
|
||||
*.mdp binary
|
||||
*.mak text eol=crlf
|
@ -1,16 +1,16 @@
|
||||
#include "mxautolocker.h"
|
||||
|
||||
// OFFSET: LEGO1 0x100b8ed0
|
||||
MxAutoLocker::MxAutoLocker(MxCriticalSection *critsect)
|
||||
{
|
||||
this->m_criticalSection = critsect;
|
||||
if (this->m_criticalSection != 0)
|
||||
this->m_criticalSection->Enter();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b8ef0
|
||||
MxAutoLocker::~MxAutoLocker()
|
||||
{
|
||||
if (this->m_criticalSection != 0)
|
||||
this->m_criticalSection->Leave();
|
||||
}
|
||||
#include "mxautolocker.h"
|
||||
|
||||
// OFFSET: LEGO1 0x100b8ed0
|
||||
MxAutoLocker::MxAutoLocker(MxCriticalSection *critsect)
|
||||
{
|
||||
this->m_criticalSection = critsect;
|
||||
if (this->m_criticalSection != 0)
|
||||
this->m_criticalSection->Enter();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b8ef0
|
||||
MxAutoLocker::~MxAutoLocker()
|
||||
{
|
||||
if (this->m_criticalSection != 0)
|
||||
this->m_criticalSection->Leave();
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
#ifndef MXAUTOLOCKER_H
|
||||
#define MXAUTOLOCKER_H
|
||||
|
||||
#include "mxcriticalsection.h"
|
||||
|
||||
class MxAutoLocker
|
||||
{
|
||||
public:
|
||||
MxAutoLocker(MxCriticalSection* cs);
|
||||
virtual ~MxAutoLocker();
|
||||
private:
|
||||
MxCriticalSection* m_criticalSection;
|
||||
};
|
||||
|
||||
#endif // MXAUTOLOCKER_H
|
||||
#ifndef MXAUTOLOCKER_H
|
||||
#define MXAUTOLOCKER_H
|
||||
|
||||
#include "mxcriticalsection.h"
|
||||
|
||||
class MxAutoLocker
|
||||
{
|
||||
public:
|
||||
MxAutoLocker(MxCriticalSection* cs);
|
||||
virtual ~MxAutoLocker();
|
||||
private:
|
||||
MxCriticalSection* m_criticalSection;
|
||||
};
|
||||
|
||||
#endif // MXAUTOLOCKER_H
|
||||
|
@ -1,17 +1,17 @@
|
||||
#include "mxomnicreateflags.h"
|
||||
|
||||
// OFFSET: LEGO1 0x100b0a30
|
||||
MxOmniCreateFlags::MxOmniCreateFlags()
|
||||
{
|
||||
this->CreateObjectFactory(MX_TRUE);
|
||||
this->CreateVariableTable(MX_TRUE);
|
||||
this->CreateTickleManager(MX_TRUE);
|
||||
this->CreateNotificationManager(MX_TRUE);
|
||||
this->CreateVideoManager(MX_TRUE);
|
||||
this->CreateSoundManager(MX_TRUE);
|
||||
this->CreateMusicManager(MX_TRUE);
|
||||
this->CreateEventManager(MX_TRUE);
|
||||
|
||||
this->CreateTimer(MX_TRUE);
|
||||
this->CreateStreamer(MX_TRUE);
|
||||
}
|
||||
#include "mxomnicreateflags.h"
|
||||
|
||||
// OFFSET: LEGO1 0x100b0a30
|
||||
MxOmniCreateFlags::MxOmniCreateFlags()
|
||||
{
|
||||
this->CreateObjectFactory(MX_TRUE);
|
||||
this->CreateVariableTable(MX_TRUE);
|
||||
this->CreateTickleManager(MX_TRUE);
|
||||
this->CreateNotificationManager(MX_TRUE);
|
||||
this->CreateVideoManager(MX_TRUE);
|
||||
this->CreateSoundManager(MX_TRUE);
|
||||
this->CreateMusicManager(MX_TRUE);
|
||||
this->CreateEventManager(MX_TRUE);
|
||||
|
||||
this->CreateTimer(MX_TRUE);
|
||||
this->CreateStreamer(MX_TRUE);
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
#include "mxomnicreateparam.h"
|
||||
|
||||
// OFFSET: LEGO1 0x100b0b00
|
||||
MxOmniCreateParam::MxOmniCreateParam(const char *mediaPath, struct HWND__ *windowHandle, MxVideoParam &vparam, MxOmniCreateFlags flags)
|
||||
{
|
||||
this->m_mediaPath = mediaPath;
|
||||
this->m_windowHandle = (HWND) windowHandle;
|
||||
this->m_videoParam = vparam;
|
||||
this->m_createFlags = flags;
|
||||
}
|
||||
#include "mxomnicreateparam.h"
|
||||
|
||||
// OFFSET: LEGO1 0x100b0b00
|
||||
MxOmniCreateParam::MxOmniCreateParam(const char *mediaPath, struct HWND__ *windowHandle, MxVideoParam &vparam, MxOmniCreateFlags flags)
|
||||
{
|
||||
this->m_mediaPath = mediaPath;
|
||||
this->m_windowHandle = (HWND) windowHandle;
|
||||
this->m_videoParam = vparam;
|
||||
this->m_createFlags = flags;
|
||||
}
|
||||
|
@ -1,81 +1,81 @@
|
||||
#include "mxstring.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
// OFFSET: LEGO1 0x100ae200
|
||||
MxString::MxString()
|
||||
{
|
||||
// Set string to one char in length and set that char to null terminator
|
||||
this->m_data = (char *)malloc(1);
|
||||
this->m_data[0] = 0;
|
||||
this->m_length = 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ae2a0
|
||||
MxString::MxString(const MxString &str)
|
||||
{
|
||||
this->m_length = str.m_length;
|
||||
this->m_data = (char *)malloc(this->m_length + 1);
|
||||
strcpy(this->m_data, str.m_data);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ae350
|
||||
MxString::MxString(const char *str)
|
||||
{
|
||||
if (str) {
|
||||
this->m_length = strlen(str);
|
||||
this->m_data = (char *)malloc(this->m_length + 1);
|
||||
strcpy(this->m_data, str);
|
||||
} else {
|
||||
this->m_data = (char *)malloc(1);
|
||||
this->m_data[0] = 0;
|
||||
this->m_length = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ae420
|
||||
MxString::~MxString()
|
||||
{
|
||||
free(this->m_data);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ae490
|
||||
void MxString::ToUpperCase()
|
||||
{
|
||||
strupr(this->m_data);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ae4a0
|
||||
void MxString::ToLowerCase()
|
||||
{
|
||||
strlwr(this->m_data);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ae4b0
|
||||
const MxString &MxString::operator=(MxString *param)
|
||||
{
|
||||
if (this->m_data != param->m_data)
|
||||
{
|
||||
free(this->m_data);
|
||||
this->m_length = param->m_length;
|
||||
this->m_data = (char *)malloc(this->m_length + 1);
|
||||
strcpy(this->m_data, param->m_data);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
// TODO: this *mostly* matches, again weird with the comparison
|
||||
// OFFSET: LEGO1 0x100ae510
|
||||
const MxString &MxString::operator=(const char *param)
|
||||
{
|
||||
if (this->m_data != param)
|
||||
{
|
||||
free(this->m_data);
|
||||
this->m_length = strlen(param);
|
||||
this->m_data = (char *)malloc(this->m_length + 1);
|
||||
strcpy(this->m_data, param);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
#include "mxstring.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
// OFFSET: LEGO1 0x100ae200
|
||||
MxString::MxString()
|
||||
{
|
||||
// Set string to one char in length and set that char to null terminator
|
||||
this->m_data = (char *)malloc(1);
|
||||
this->m_data[0] = 0;
|
||||
this->m_length = 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ae2a0
|
||||
MxString::MxString(const MxString &str)
|
||||
{
|
||||
this->m_length = str.m_length;
|
||||
this->m_data = (char *)malloc(this->m_length + 1);
|
||||
strcpy(this->m_data, str.m_data);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ae350
|
||||
MxString::MxString(const char *str)
|
||||
{
|
||||
if (str) {
|
||||
this->m_length = strlen(str);
|
||||
this->m_data = (char *)malloc(this->m_length + 1);
|
||||
strcpy(this->m_data, str);
|
||||
} else {
|
||||
this->m_data = (char *)malloc(1);
|
||||
this->m_data[0] = 0;
|
||||
this->m_length = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ae420
|
||||
MxString::~MxString()
|
||||
{
|
||||
free(this->m_data);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ae490
|
||||
void MxString::ToUpperCase()
|
||||
{
|
||||
strupr(this->m_data);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ae4a0
|
||||
void MxString::ToLowerCase()
|
||||
{
|
||||
strlwr(this->m_data);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ae4b0
|
||||
const MxString &MxString::operator=(MxString *param)
|
||||
{
|
||||
if (this->m_data != param->m_data)
|
||||
{
|
||||
free(this->m_data);
|
||||
this->m_length = param->m_length;
|
||||
this->m_data = (char *)malloc(this->m_length + 1);
|
||||
strcpy(this->m_data, param->m_data);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
// TODO: this *mostly* matches, again weird with the comparison
|
||||
// OFFSET: LEGO1 0x100ae510
|
||||
const MxString &MxString::operator=(const char *param)
|
||||
{
|
||||
if (this->m_data != param)
|
||||
{
|
||||
free(this->m_data);
|
||||
this->m_length = strlen(param);
|
||||
this->m_data = (char *)malloc(this->m_length + 1);
|
||||
strcpy(this->m_data, param);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -1,42 +1,42 @@
|
||||
#include "mxtimer.h"
|
||||
|
||||
#include "legoinc.h"
|
||||
|
||||
// 0x10101414
|
||||
long MxTimer::s_LastTimeCalculated = 0;
|
||||
|
||||
// 0x10101418
|
||||
long MxTimer::s_LastTimeTimerStarted = 0;
|
||||
|
||||
// OFFSET: LEGO1 0x100ae060
|
||||
MxTimer::MxTimer()
|
||||
#include "mxtimer.h"
|
||||
|
||||
#include "legoinc.h"
|
||||
|
||||
// 0x10101414
|
||||
long MxTimer::s_LastTimeCalculated = 0;
|
||||
|
||||
// 0x10101418
|
||||
long MxTimer::s_LastTimeTimerStarted = 0;
|
||||
|
||||
// OFFSET: LEGO1 0x100ae060
|
||||
MxTimer::MxTimer()
|
||||
{
|
||||
this->m_isRunning = MX_FALSE;
|
||||
m_startTime = timeGetTime();
|
||||
// yeah this is somehow what the asm is
|
||||
s_LastTimeCalculated = m_startTime;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ae160
|
||||
void MxTimer::Start()
|
||||
{
|
||||
s_LastTimeCalculated = m_startTime;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ae160
|
||||
void MxTimer::Start()
|
||||
{
|
||||
s_LastTimeTimerStarted = this->GetRealTime();
|
||||
this->m_isRunning = MX_TRUE;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ae180
|
||||
void MxTimer::Stop()
|
||||
{
|
||||
long elapsed = this->GetRealTime();
|
||||
long startTime = elapsed - MxTimer::s_LastTimeTimerStarted;
|
||||
this->m_isRunning = MX_FALSE;
|
||||
// this feels very stupid but it's what the assembly does
|
||||
this->m_startTime = this->m_startTime + startTime - 5;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ae140
|
||||
long MxTimer::GetRealTime()
|
||||
{
|
||||
MxTimer::s_LastTimeCalculated = timeGetTime();
|
||||
return MxTimer::s_LastTimeCalculated - this->m_startTime;
|
||||
}
|
||||
this->m_isRunning = MX_TRUE;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ae180
|
||||
void MxTimer::Stop()
|
||||
{
|
||||
long elapsed = this->GetRealTime();
|
||||
long startTime = elapsed - MxTimer::s_LastTimeTimerStarted;
|
||||
this->m_isRunning = MX_FALSE;
|
||||
// this feels very stupid but it's what the assembly does
|
||||
this->m_startTime = this->m_startTime + startTime - 5;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ae140
|
||||
long MxTimer::GetRealTime()
|
||||
{
|
||||
MxTimer::s_LastTimeCalculated = timeGetTime();
|
||||
return MxTimer::s_LastTimeCalculated - this->m_startTime;
|
||||
}
|
||||
|
@ -1,88 +1,88 @@
|
||||
#include "mxvideoparam.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
// OFFSET: LEGO1 0x100bec70
|
||||
MxVideoParam::MxVideoParam()
|
||||
{
|
||||
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 0x100beca0
|
||||
MxVideoParam::MxVideoParam(MxRect32 &p_rect, MxPalette *p_pal, unsigned long p_backBuffers, MxVideoParamFlags &p_flags)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bed70
|
||||
void MxVideoParam::SetDeviceName(char *id)
|
||||
{
|
||||
if (this->m_deviceId != 0)
|
||||
free(this->m_deviceId);
|
||||
|
||||
if (id != 0)
|
||||
{
|
||||
this->m_deviceId = (char *)malloc(strlen(id) + 1);
|
||||
|
||||
if (this->m_deviceId != 0) {
|
||||
strcpy(this->m_deviceId, id);
|
||||
}
|
||||
}
|
||||
else {
|
||||
this->m_deviceId = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bed50
|
||||
MxVideoParam::~MxVideoParam()
|
||||
{
|
||||
if (this->m_deviceId != 0)
|
||||
free(this->m_deviceId);
|
||||
}
|
||||
#include "mxvideoparam.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
// OFFSET: LEGO1 0x100bec70
|
||||
MxVideoParam::MxVideoParam()
|
||||
{
|
||||
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 0x100beca0
|
||||
MxVideoParam::MxVideoParam(MxRect32 &p_rect, MxPalette *p_pal, unsigned long p_backBuffers, MxVideoParamFlags &p_flags)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bed70
|
||||
void MxVideoParam::SetDeviceName(char *id)
|
||||
{
|
||||
if (this->m_deviceId != 0)
|
||||
free(this->m_deviceId);
|
||||
|
||||
if (id != 0)
|
||||
{
|
||||
this->m_deviceId = (char *)malloc(strlen(id) + 1);
|
||||
|
||||
if (this->m_deviceId != 0) {
|
||||
strcpy(this->m_deviceId, id);
|
||||
}
|
||||
}
|
||||
else {
|
||||
this->m_deviceId = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bed50
|
||||
MxVideoParam::~MxVideoParam()
|
||||
{
|
||||
if (this->m_deviceId != 0)
|
||||
free(this->m_deviceId);
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
#include "mxvideoparamflags.h"
|
||||
|
||||
// OFFSET: LEGO1 0x100bec40
|
||||
MxVideoParamFlags::MxVideoParamFlags()
|
||||
{
|
||||
this->SetFullScreen(0);
|
||||
this->SetFlipSurfaces(0);
|
||||
this->SetBackBuffers(0);
|
||||
this->Set_f1bit3(0);
|
||||
this->Set_f1bit4(0);
|
||||
this->Set16Bit(0);
|
||||
this->SetWideViewAngle(1);
|
||||
this->Set_f1bit7(1);
|
||||
this->Set_f2bit1(1);
|
||||
}
|
||||
#include "mxvideoparamflags.h"
|
||||
|
||||
// OFFSET: LEGO1 0x100bec40
|
||||
MxVideoParamFlags::MxVideoParamFlags()
|
||||
{
|
||||
this->SetFullScreen(0);
|
||||
this->SetFlipSurfaces(0);
|
||||
this->SetBackBuffers(0);
|
||||
this->Set_f1bit3(0);
|
||||
this->Set_f1bit4(0);
|
||||
this->Set16Bit(0);
|
||||
this->SetWideViewAngle(1);
|
||||
this->Set_f1bit7(1);
|
||||
this->Set_f2bit1(1);
|
||||
}
|
||||
|
@ -1,49 +1,49 @@
|
||||
#ifndef MXVIDEOPARAMFLAGS_H
|
||||
#define MXVIDEOPARAMFLAGS_H
|
||||
|
||||
#include "legoinc.h"
|
||||
|
||||
// Must be union with struct for match.
|
||||
typedef union {
|
||||
struct {
|
||||
BYTE bit0: 1;
|
||||
BYTE bit1: 1;
|
||||
BYTE bit2: 1;
|
||||
BYTE bit3: 1;
|
||||
BYTE bit4: 1;
|
||||
BYTE bit5: 1;
|
||||
BYTE bit6: 1;
|
||||
BYTE bit7: 1;
|
||||
};
|
||||
// BYTE all; // ?
|
||||
} flag_bitfield;
|
||||
|
||||
class MxVideoParamFlags
|
||||
{
|
||||
public:
|
||||
__declspec(dllexport) MxVideoParamFlags();
|
||||
|
||||
inline void SetFullScreen(BOOL e) { m_flags1.bit0 = e; }
|
||||
inline void SetFlipSurfaces(BOOL e) { m_flags1.bit1 = e; }
|
||||
inline void SetBackBuffers(BOOL e) { m_flags1.bit2 = e; }
|
||||
inline void Set_f1bit3(BOOL e) { m_flags1.bit3 = e; }
|
||||
inline void Set_f1bit4(BOOL e) { m_flags1.bit4 = e; }
|
||||
inline void Set16Bit(BYTE e) { m_flags1.bit5 = e; }
|
||||
inline void SetWideViewAngle(BOOL e) { m_flags1.bit6 = e; }
|
||||
inline void Set_f1bit7(BOOL e) { m_flags1.bit7 = e; }
|
||||
inline void Set_f2bit0(BOOL e) { m_flags2.bit0 = e; }
|
||||
inline void Set_f2bit1(BOOL e) { m_flags2.bit1 = e; }
|
||||
inline void Set_f2bit2(BOOL e) { m_flags2.bit2 = e; }
|
||||
inline void Set_f2bit3(BOOL e) { m_flags2.bit3 = e; }
|
||||
inline void Set_f2bit4(BOOL e) { m_flags2.bit4 = e; }
|
||||
inline void Set_f2bit5(BOOL e) { m_flags2.bit5 = e; }
|
||||
inline void Set_f2bit6(BOOL e) { m_flags2.bit6 = e; }
|
||||
inline void Set_f2bit7(BOOL e) { m_flags2.bit7 = e; }
|
||||
|
||||
private:
|
||||
flag_bitfield m_flags1;
|
||||
flag_bitfield m_flags2;
|
||||
|
||||
};
|
||||
|
||||
#endif // MXVIDEOPARAMFLAGS_H
|
||||
#ifndef MXVIDEOPARAMFLAGS_H
|
||||
#define MXVIDEOPARAMFLAGS_H
|
||||
|
||||
#include "legoinc.h"
|
||||
|
||||
// Must be union with struct for match.
|
||||
typedef union {
|
||||
struct {
|
||||
BYTE bit0: 1;
|
||||
BYTE bit1: 1;
|
||||
BYTE bit2: 1;
|
||||
BYTE bit3: 1;
|
||||
BYTE bit4: 1;
|
||||
BYTE bit5: 1;
|
||||
BYTE bit6: 1;
|
||||
BYTE bit7: 1;
|
||||
};
|
||||
// BYTE all; // ?
|
||||
} flag_bitfield;
|
||||
|
||||
class MxVideoParamFlags
|
||||
{
|
||||
public:
|
||||
__declspec(dllexport) MxVideoParamFlags();
|
||||
|
||||
inline void SetFullScreen(BOOL e) { m_flags1.bit0 = e; }
|
||||
inline void SetFlipSurfaces(BOOL e) { m_flags1.bit1 = e; }
|
||||
inline void SetBackBuffers(BOOL e) { m_flags1.bit2 = e; }
|
||||
inline void Set_f1bit3(BOOL e) { m_flags1.bit3 = e; }
|
||||
inline void Set_f1bit4(BOOL e) { m_flags1.bit4 = e; }
|
||||
inline void Set16Bit(BYTE e) { m_flags1.bit5 = e; }
|
||||
inline void SetWideViewAngle(BOOL e) { m_flags1.bit6 = e; }
|
||||
inline void Set_f1bit7(BOOL e) { m_flags1.bit7 = e; }
|
||||
inline void Set_f2bit0(BOOL e) { m_flags2.bit0 = e; }
|
||||
inline void Set_f2bit1(BOOL e) { m_flags2.bit1 = e; }
|
||||
inline void Set_f2bit2(BOOL e) { m_flags2.bit2 = e; }
|
||||
inline void Set_f2bit3(BOOL e) { m_flags2.bit3 = e; }
|
||||
inline void Set_f2bit4(BOOL e) { m_flags2.bit4 = e; }
|
||||
inline void Set_f2bit5(BOOL e) { m_flags2.bit5 = e; }
|
||||
inline void Set_f2bit6(BOOL e) { m_flags2.bit6 = e; }
|
||||
inline void Set_f2bit7(BOOL e) { m_flags2.bit7 = e; }
|
||||
|
||||
private:
|
||||
flag_bitfield m_flags1;
|
||||
flag_bitfield m_flags2;
|
||||
|
||||
};
|
||||
|
||||
#endif // MXVIDEOPARAMFLAGS_H
|
||||
|
Loading…
Reference in New Issue
Block a user