Various annotations

This commit is contained in:
Christian Semmler 2023-12-25 13:23:48 -05:00
parent b8e77b14a0
commit a3b6934b5f
7 changed files with 23 additions and 14 deletions

View File

@ -13,8 +13,8 @@ class MxCriticalSection {
void Leave(); void Leave();
private: private:
CRITICAL_SECTION m_criticalSection; CRITICAL_SECTION m_criticalSection; // 0x00
HANDLE m_mutex; HANDLE m_mutex; // 0x18
}; };
#endif // MXCRITICALSECTION_H #endif // MXCRITICALSECTION_H

View File

@ -9,6 +9,7 @@
#include "mxstring.h" #include "mxstring.h"
#include "mxthread.h" #include "mxthread.h"
DECOMP_SIZE_ASSERT(MxDiskStreamProviderThread, 0x1c)
DECOMP_SIZE_ASSERT(MxDiskStreamProvider, 0x60); DECOMP_SIZE_ASSERT(MxDiskStreamProvider, 0x60);
// GLOBAL: LEGO1 0x10102878 // GLOBAL: LEGO1 0x10102878

View File

@ -13,17 +13,17 @@ class MxDiskStreamProvider;
class MxDSStreamingAction; class MxDSStreamingAction;
// VTABLE: LEGO1 0x100dd130 // VTABLE: LEGO1 0x100dd130
// SIZE 0x1c
class MxDiskStreamProviderThread : public MxThread { class MxDiskStreamProviderThread : public MxThread {
public: public:
// Only inlined, no offset
inline MxDiskStreamProviderThread() : MxThread() { m_target = NULL; } inline MxDiskStreamProviderThread() : MxThread() { m_target = NULL; }
MxResult Run() override; MxResult Run() override;
MxResult StartWithTarget(MxDiskStreamProvider* p_target); MxResult StartWithTarget(MxDiskStreamProvider* p_target);
}; };
// VTABLE: LEGO1 0x100dd138 // VTABLE: LEGO1 0x100dd138
// SIZE 0x60
class MxDiskStreamProvider : public MxStreamProvider { class MxDiskStreamProvider : public MxStreamProvider {
public: public:
MxDiskStreamProvider(); MxDiskStreamProvider();

View File

@ -1,6 +1,10 @@
#include "mxsemaphore.h" #include "mxsemaphore.h"
#include "decomp.h"
DECOMP_SIZE_ASSERT(MxSemaphore, 0x08)
// FUNCTION: LEGO1 0x100c87d0 // FUNCTION: LEGO1 0x100c87d0
MxSemaphore::MxSemaphore() MxSemaphore::MxSemaphore()
{ {

View File

@ -5,6 +5,7 @@
#include <windows.h> #include <windows.h>
// SIZE 0x08
class MxSemaphore { class MxSemaphore {
public: public:
MxSemaphore(); MxSemaphore();
@ -18,7 +19,7 @@ class MxSemaphore {
void Release(MxU32 p_releaseCount); void Release(MxU32 p_releaseCount);
private: private:
HANDLE m_hSemaphore; HANDLE m_hSemaphore; // 0x04
}; };
#endif // MX_SEMAPHORE_H #endif // MX_SEMAPHORE_H

View File

@ -1,11 +1,15 @@
#include "mxthread.h" #include "mxthread.h"
#include "decomp.h"
#include "mxomni.h" #include "mxomni.h"
#include "mxtimer.h" #include "mxtimer.h"
#include <process.h> #include <process.h>
DECOMP_SIZE_ASSERT(MxThread, 0x1c)
DECOMP_SIZE_ASSERT(MxTickleThread, 0x20)
// FUNCTION: LEGO1 0x100b8bb0 // FUNCTION: LEGO1 0x100b8bb0
MxTickleThread::MxTickleThread(MxCore* p_target, MxS32 p_frequencyMS) MxTickleThread::MxTickleThread(MxCore* p_target, MxS32 p_frequencyMS)
{ {

View File

@ -8,6 +8,7 @@
class MxCore; class MxCore;
// VTABLE: LEGO1 0x100dc860 // VTABLE: LEGO1 0x100dc860
// SIZE 0x1c
class MxThread { class MxThread {
public: public:
// Note: Comes before virtual destructor // Note: Comes before virtual destructor
@ -18,7 +19,6 @@ class MxThread {
void Terminate(); void Terminate();
void Sleep(MxS32 p_milliseconds); void Sleep(MxS32 p_milliseconds);
// Inferred, not in DLL
inline MxBool IsRunning() { return m_running; } inline MxBool IsRunning() { return m_running; }
protected: protected:
@ -30,27 +30,26 @@ class MxThread {
private: private:
static unsigned ThreadProc(void* p_thread); static unsigned ThreadProc(void* p_thread);
MxULong m_hThread; MxULong m_hThread; // 0x04
MxU32 m_threadId; MxU32 m_threadId; // 0x08
MxBool m_running; MxBool m_running; // 0x0c
MxSemaphore m_semaphore; MxSemaphore m_semaphore; // 0x10
protected: protected:
MxCore* m_target; MxCore* m_target; // 0x18
}; };
// VTABLE: LEGO1 0x100dc6d8 // VTABLE: LEGO1 0x100dc6d8
// SIZE 0x20
class MxTickleThread : public MxThread { class MxTickleThread : public MxThread {
public: public:
MxTickleThread(MxCore* p_target, MxS32 p_frequencyMS); MxTickleThread(MxCore* p_target, MxS32 p_frequencyMS);
// Only inlined, no offset
virtual ~MxTickleThread() {} virtual ~MxTickleThread() {}
MxResult Run() override; MxResult Run() override;
private: private:
MxS32 m_frequencyMS; MxS32 m_frequencyMS; // 0x1c
}; };
#endif // MXTHREAD_H #endif // MXTHREAD_H