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,17 +2,20 @@
LegoOmni *LegoOmni::m_instance = NULL;
// OFFSET: LEGO1 0x1005ad10
LegoOmni *LegoOmni::GetInstance()
{
return m_instance;
}
// OFFSET: LEGO1 0x10015700
LegoOmni *Lego()
{
return LegoOmni::GetInstance();
}
// OFFSET: LEGO1 0x10015720
LegoVideoManager *VideoManager()
{
return LegoOmni::GetInstance()->GetVideoManager();
}
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -2,6 +2,7 @@
#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
@ -11,6 +12,7 @@ MxString::MxString()
}
// TODO: this *mostly* matches, again weird with the comparison
// OFFSET: LEGO1 0x100ae510
const MxString &MxString::operator=(const char *param)
{
if (this->m_data != param)
@ -24,6 +26,7 @@ const MxString &MxString::operator=(const char *param)
return *this;
}
// OFFSET: LEGO1 0x100ae420
MxString::~MxString()
{
free(this->m_data);

View file

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

View file

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

View file

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