From 2a93655f06877adae380cec1b3ab93ef6973d77f Mon Sep 17 00:00:00 2001 From: itsmattkc <34096995+itsmattkc@users.noreply.github.com> Date: Sun, 18 Jun 2023 20:56:55 -0700 Subject: [PATCH] added even more definitions --- LEGO1/legoomni.cpp | 5 ++++- LEGO1/mxcore.cpp | 7 +++++++ LEGO1/mxcriticalsection.cpp | 8 +++++++- LEGO1/mxomni.cpp | 1 + LEGO1/mxomnicreateflags.cpp | 1 + LEGO1/mxomnicreateparam.cpp | 1 + LEGO1/mxstring.cpp | 3 +++ LEGO1/mxtimer.cpp | 7 +++++++ LEGO1/mxvideoparam.cpp | 4 ++++ LEGO1/mxvideoparamflags.cpp | 1 + 10 files changed, 36 insertions(+), 2 deletions(-) diff --git a/LEGO1/legoomni.cpp b/LEGO1/legoomni.cpp index 5ab9e866..07ad6c19 100644 --- a/LEGO1/legoomni.cpp +++ b/LEGO1/legoomni.cpp @@ -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(); -} \ No newline at end of file +} diff --git a/LEGO1/mxcore.cpp b/LEGO1/mxcore.cpp index da8fe0b9..1187cdbe 100644 --- a/LEGO1/mxcore.cpp +++ b/LEGO1/mxcore.cpp @@ -2,33 +2,40 @@ #include +// 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; diff --git a/LEGO1/mxcriticalsection.cpp b/LEGO1/mxcriticalsection.cpp index b94c021c..d0d11f15 100644 --- a/LEGO1/mxcriticalsection.cpp +++ b/LEGO1/mxcriticalsection.cpp @@ -2,8 +2,10 @@ #include +// 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); -} \ No newline at end of file +} diff --git a/LEGO1/mxomni.cpp b/LEGO1/mxomni.cpp index 9ed7b6e1..4e808d0c 100644 --- a/LEGO1/mxomni.cpp +++ b/LEGO1/mxomni.cpp @@ -1,5 +1,6 @@ #include "mxomni.h" +// OFFSET: LEGO1 0x100af0c0 MxResult MxOmni::Create(const MxOmniCreateParam &p) { if (p.CreateFlags().CreateTimer()) diff --git a/LEGO1/mxomnicreateflags.cpp b/LEGO1/mxomnicreateflags.cpp index 46f735d7..ebed554c 100644 --- a/LEGO1/mxomnicreateflags.cpp +++ b/LEGO1/mxomnicreateflags.cpp @@ -1,5 +1,6 @@ #include "mxomnicreateflags.h" +// OFFSET: LEGO1 0x100b0a30 MxOmniCreateFlags::MxOmniCreateFlags() { this->CreateObjectFactory(MX_TRUE); diff --git a/LEGO1/mxomnicreateparam.cpp b/LEGO1/mxomnicreateparam.cpp index 96bd541d..65db5b8d 100644 --- a/LEGO1/mxomnicreateparam.cpp +++ b/LEGO1/mxomnicreateparam.cpp @@ -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; diff --git a/LEGO1/mxstring.cpp b/LEGO1/mxstring.cpp index 66e84c85..81188291 100644 --- a/LEGO1/mxstring.cpp +++ b/LEGO1/mxstring.cpp @@ -2,6 +2,7 @@ #include #include +// 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); diff --git a/LEGO1/mxtimer.cpp b/LEGO1/mxtimer.cpp index 245787aa..ee917218 100644 --- a/LEGO1/mxtimer.cpp +++ b/LEGO1/mxtimer.cpp @@ -2,9 +2,13 @@ #include +// 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(); diff --git a/LEGO1/mxvideoparam.cpp b/LEGO1/mxvideoparam.cpp index 19dbad96..893124b6 100644 --- a/LEGO1/mxvideoparam.cpp +++ b/LEGO1/mxvideoparam.cpp @@ -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) diff --git a/LEGO1/mxvideoparamflags.cpp b/LEGO1/mxvideoparamflags.cpp index 00429e30..97f01515 100644 --- a/LEGO1/mxvideoparamflags.cpp +++ b/LEGO1/mxvideoparamflags.cpp @@ -1,5 +1,6 @@ #include "mxvideoparamflags.h" +// OFFSET: LEGO1 0x100bec40 MxVideoParamFlags::MxVideoParamFlags() { // TODO: convert to EnableXXX function calls