added even more definitions

This commit is contained in:
itsmattkc 2023-06-18 20:56:55 -07:00
parent 319b52f248
commit 2a93655f06
10 changed files with 36 additions and 2 deletions

View file

@ -2,16 +2,19 @@
LegoOmni *LegoOmni::m_instance = NULL; LegoOmni *LegoOmni::m_instance = NULL;
// OFFSET: LEGO1 0x1005ad10
LegoOmni *LegoOmni::GetInstance() LegoOmni *LegoOmni::GetInstance()
{ {
return m_instance; return m_instance;
} }
// OFFSET: LEGO1 0x10015700
LegoOmni *Lego() LegoOmni *Lego()
{ {
return LegoOmni::GetInstance(); return LegoOmni::GetInstance();
} }
// OFFSET: LEGO1 0x10015720
LegoVideoManager *VideoManager() LegoVideoManager *VideoManager()
{ {
return LegoOmni::GetInstance()->GetVideoManager(); return LegoOmni::GetInstance()->GetVideoManager();

View file

@ -2,33 +2,40 @@
#include <string.h> #include <string.h>
// 0x1010141c
unsigned int g_mxcoreCount = 0; unsigned int g_mxcoreCount = 0;
// OFFSET: LEGO1 0x100ae1a0
MxCore::MxCore() MxCore::MxCore()
{ {
m_id = g_mxcoreCount; m_id = g_mxcoreCount;
g_mxcoreCount++; g_mxcoreCount++;
} }
// OFFSET: LEGO1 0x100ae1e0
MxCore::~MxCore() MxCore::~MxCore()
{ {
} }
// OFFSET: LEGO1 0x100ae1f0
long MxCore::Notify(MxParam &p) long MxCore::Notify(MxParam &p)
{ {
return 0; return 0;
} }
// OFFSET: LEGO1 0x10001f70
long MxCore::Tickle() long MxCore::Tickle()
{ {
return 0; return 0;
} }
// OFFSET: LEGO1 0x100144c0
const char *MxCore::GetClassName() const const char *MxCore::GetClassName() const
{ {
return "MxCore"; return "MxCore";
} }
// OFFSET: LEGO1 0x100140d0
MxBool MxCore::IsClass(const char *name) const MxBool MxCore::IsClass(const char *name) const
{ {
return strcmp(name, "MxCore") == 0; return strcmp(name, "MxCore") == 0;

View file

@ -2,8 +2,10 @@
#include <stdio.h> #include <stdio.h>
// 0x10101e78
int g_useMutex = 0; int g_useMutex = 0;
// OFFSET: LEGO1 0x100b6d20
MxCriticalSection::MxCriticalSection() MxCriticalSection::MxCriticalSection()
{ {
HANDLE mutex; HANDLE mutex;
@ -19,6 +21,7 @@ MxCriticalSection::MxCriticalSection()
this->m_mutex = NULL; this->m_mutex = NULL;
} }
// OFFSET: LEGO1 0x100b6d60
MxCriticalSection::~MxCriticalSection() MxCriticalSection::~MxCriticalSection()
{ {
if (this->m_mutex != NULL) if (this->m_mutex != NULL)
@ -30,11 +33,13 @@ MxCriticalSection::~MxCriticalSection()
DeleteCriticalSection(&this->m_criticalSection); DeleteCriticalSection(&this->m_criticalSection);
} }
// OFFSET: LEGO1 0x100b6e00
void MxCriticalSection::SetDoMutex() void MxCriticalSection::SetDoMutex()
{ {
g_useMutex = 1; g_useMutex = 1;
} }
// OFFSET: LEGO1 0x100b6d80
void MxCriticalSection::Enter() void MxCriticalSection::Enter()
{ {
DWORD result; DWORD result;
@ -61,6 +66,7 @@ void MxCriticalSection::Enter()
} }
} }
// OFFSET: LEGO1 0x100b6de0
void MxCriticalSection::Leave() void MxCriticalSection::Leave()
{ {
if (this->m_mutex != NULL) if (this->m_mutex != NULL)

View file

@ -1,5 +1,6 @@
#include "mxomni.h" #include "mxomni.h"
// OFFSET: LEGO1 0x100af0c0
MxResult MxOmni::Create(const MxOmniCreateParam &p) MxResult MxOmni::Create(const MxOmniCreateParam &p)
{ {
if (p.CreateFlags().CreateTimer()) if (p.CreateFlags().CreateTimer())

View file

@ -1,5 +1,6 @@
#include "mxomnicreateflags.h" #include "mxomnicreateflags.h"
// OFFSET: LEGO1 0x100b0a30
MxOmniCreateFlags::MxOmniCreateFlags() MxOmniCreateFlags::MxOmniCreateFlags()
{ {
this->CreateObjectFactory(MX_TRUE); this->CreateObjectFactory(MX_TRUE);

View file

@ -1,5 +1,6 @@
#include "mxomnicreateparam.h" #include "mxomnicreateparam.h"
// OFFSET: LEGO1 0x100b0b00
MxOmniCreateParam::MxOmniCreateParam(const char *mediaPath, struct HWND__ *windowHandle, MxVideoParam &vparam, MxOmniCreateFlags flags) MxOmniCreateParam::MxOmniCreateParam(const char *mediaPath, struct HWND__ *windowHandle, MxVideoParam &vparam, MxOmniCreateFlags flags)
{ {
this->m_mediaPath = mediaPath; this->m_mediaPath = mediaPath;

View file

@ -2,6 +2,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
// OFFSET: LEGO1 0x100ae200
MxString::MxString() MxString::MxString()
{ {
// Set string to one char in length and set that char to null terminator // Set string to one char in length and set that char to null terminator
@ -11,6 +12,7 @@ MxString::MxString()
} }
// TODO: this *mostly* matches, again weird with the comparison // TODO: this *mostly* matches, again weird with the comparison
// OFFSET: LEGO1 0x100ae510
const MxString &MxString::operator=(const char *param) const MxString &MxString::operator=(const char *param)
{ {
if (this->m_data != param) if (this->m_data != param)
@ -24,6 +26,7 @@ const MxString &MxString::operator=(const char *param)
return *this; return *this;
} }
// OFFSET: LEGO1 0x100ae420
MxString::~MxString() MxString::~MxString()
{ {
free(this->m_data); free(this->m_data);

View file

@ -2,9 +2,13 @@
#include <windows.h> #include <windows.h>
// 0x10101414
long MxTimer::s_LastTimeCalculated = 0; long MxTimer::s_LastTimeCalculated = 0;
// 0x10101418
long MxTimer::s_LastTimeTimerStarted = 0; long MxTimer::s_LastTimeTimerStarted = 0;
// OFFSET: LEGO1 0x100ae060
MxTimer::MxTimer() MxTimer::MxTimer()
{ {
this->m_isRunning = MX_FALSE; this->m_isRunning = MX_FALSE;
@ -12,12 +16,14 @@ MxTimer::MxTimer()
this->m_startTime = MxTimer::s_LastTimeCalculated; this->m_startTime = MxTimer::s_LastTimeCalculated;
} }
// OFFSET: LEGO1 0x100ae160
void MxTimer::Start() void MxTimer::Start()
{ {
this->m_isRunning = MX_TRUE; this->m_isRunning = MX_TRUE;
MxTimer::s_LastTimeTimerStarted = timeGetTime(); MxTimer::s_LastTimeTimerStarted = timeGetTime();
} }
// OFFSET: LEGO1 0x100ae180
void MxTimer::Stop() void MxTimer::Stop()
{ {
long elapsed = this->GetRealTime(); long elapsed = this->GetRealTime();
@ -27,6 +33,7 @@ void MxTimer::Stop()
this->m_startTime = this->m_startTime + startTime - 5; this->m_startTime = this->m_startTime + startTime - 5;
} }
// OFFSET: LEGO1 0x100ae140
long MxTimer::GetRealTime() long MxTimer::GetRealTime()
{ {
MxTimer::s_LastTimeCalculated = timeGetTime(); MxTimer::s_LastTimeCalculated = timeGetTime();

View file

@ -1,5 +1,6 @@
#include "mxvideoparam.h" #include "mxvideoparam.h"
// OFFSET: LEGO1 0x100bec70
MxVideoParam::MxVideoParam() MxVideoParam::MxVideoParam()
{ {
this->m_flags = MxVideoParamFlags(); this->m_flags = MxVideoParamFlags();
@ -13,6 +14,7 @@ MxVideoParam::MxVideoParam()
this->m_deviceId = 0; this->m_deviceId = 0;
} }
// OFFSET: LEGO1 0x100becf0
MxVideoParam &MxVideoParam::operator=(const MxVideoParam &other) MxVideoParam &MxVideoParam::operator=(const MxVideoParam &other)
{ {
m_flags = MxVideoParamFlags(); m_flags = MxVideoParamFlags();
@ -30,6 +32,7 @@ MxVideoParam &MxVideoParam::operator=(const MxVideoParam &other)
return *this; return *this;
} }
// OFFSET: LEGO1 0x100bed70
void MxVideoParam::SetDeviceName(char *id) void MxVideoParam::SetDeviceName(char *id)
{ {
if (this->m_deviceId != 0) if (this->m_deviceId != 0)
@ -48,6 +51,7 @@ void MxVideoParam::SetDeviceName(char *id)
} }
} }
// OFFSET: LEGO1 0x100bed50
MxVideoParam::~MxVideoParam() MxVideoParam::~MxVideoParam()
{ {
if (this->m_deviceId != 0) if (this->m_deviceId != 0)

View file

@ -1,5 +1,6 @@
#include "mxvideoparamflags.h" #include "mxvideoparamflags.h"
// OFFSET: LEGO1 0x100bec40
MxVideoParamFlags::MxVideoParamFlags() MxVideoParamFlags::MxVideoParamFlags()
{ {
// TODO: convert to EnableXXX function calls // TODO: convert to EnableXXX function calls