diff --git a/LEGO1/mxcriticalsection.h b/LEGO1/mxcriticalsection.h index 8756853c..8c5f77d6 100644 --- a/LEGO1/mxcriticalsection.h +++ b/LEGO1/mxcriticalsection.h @@ -13,8 +13,8 @@ class MxCriticalSection { void Leave(); private: - CRITICAL_SECTION m_criticalSection; - HANDLE m_mutex; + CRITICAL_SECTION m_criticalSection; // 0x00 + HANDLE m_mutex; // 0x18 }; #endif // MXCRITICALSECTION_H diff --git a/LEGO1/mxdiskstreamprovider.cpp b/LEGO1/mxdiskstreamprovider.cpp index dc2f7f94..c7e311eb 100644 --- a/LEGO1/mxdiskstreamprovider.cpp +++ b/LEGO1/mxdiskstreamprovider.cpp @@ -9,6 +9,7 @@ #include "mxstring.h" #include "mxthread.h" +DECOMP_SIZE_ASSERT(MxDiskStreamProviderThread, 0x1c) DECOMP_SIZE_ASSERT(MxDiskStreamProvider, 0x60); // GLOBAL: LEGO1 0x10102878 diff --git a/LEGO1/mxdiskstreamprovider.h b/LEGO1/mxdiskstreamprovider.h index 6fc92d01..bc73c0e4 100644 --- a/LEGO1/mxdiskstreamprovider.h +++ b/LEGO1/mxdiskstreamprovider.h @@ -13,17 +13,17 @@ class MxDiskStreamProvider; class MxDSStreamingAction; // VTABLE: LEGO1 0x100dd130 +// SIZE 0x1c class MxDiskStreamProviderThread : public MxThread { public: - // Only inlined, no offset inline MxDiskStreamProviderThread() : MxThread() { m_target = NULL; } MxResult Run() override; - MxResult StartWithTarget(MxDiskStreamProvider* p_target); }; // VTABLE: LEGO1 0x100dd138 +// SIZE 0x60 class MxDiskStreamProvider : public MxStreamProvider { public: MxDiskStreamProvider(); diff --git a/LEGO1/mxsemaphore.cpp b/LEGO1/mxsemaphore.cpp index 18637185..5692a888 100644 --- a/LEGO1/mxsemaphore.cpp +++ b/LEGO1/mxsemaphore.cpp @@ -1,6 +1,10 @@ #include "mxsemaphore.h" +#include "decomp.h" + +DECOMP_SIZE_ASSERT(MxSemaphore, 0x08) + // FUNCTION: LEGO1 0x100c87d0 MxSemaphore::MxSemaphore() { diff --git a/LEGO1/mxsemaphore.h b/LEGO1/mxsemaphore.h index 3bc6d66b..ecb6509c 100644 --- a/LEGO1/mxsemaphore.h +++ b/LEGO1/mxsemaphore.h @@ -5,6 +5,7 @@ #include +// SIZE 0x08 class MxSemaphore { public: MxSemaphore(); @@ -18,7 +19,7 @@ class MxSemaphore { void Release(MxU32 p_releaseCount); private: - HANDLE m_hSemaphore; + HANDLE m_hSemaphore; // 0x04 }; #endif // MX_SEMAPHORE_H diff --git a/LEGO1/mxthread.cpp b/LEGO1/mxthread.cpp index 899e959e..401860a1 100644 --- a/LEGO1/mxthread.cpp +++ b/LEGO1/mxthread.cpp @@ -1,11 +1,15 @@ #include "mxthread.h" +#include "decomp.h" #include "mxomni.h" #include "mxtimer.h" #include +DECOMP_SIZE_ASSERT(MxThread, 0x1c) +DECOMP_SIZE_ASSERT(MxTickleThread, 0x20) + // FUNCTION: LEGO1 0x100b8bb0 MxTickleThread::MxTickleThread(MxCore* p_target, MxS32 p_frequencyMS) { diff --git a/LEGO1/mxthread.h b/LEGO1/mxthread.h index fa85b83d..e3af186d 100644 --- a/LEGO1/mxthread.h +++ b/LEGO1/mxthread.h @@ -8,6 +8,7 @@ class MxCore; // VTABLE: LEGO1 0x100dc860 +// SIZE 0x1c class MxThread { public: // Note: Comes before virtual destructor @@ -18,7 +19,6 @@ class MxThread { void Terminate(); void Sleep(MxS32 p_milliseconds); - // Inferred, not in DLL inline MxBool IsRunning() { return m_running; } protected: @@ -30,27 +30,26 @@ class MxThread { private: static unsigned ThreadProc(void* p_thread); - MxULong m_hThread; - MxU32 m_threadId; - MxBool m_running; - MxSemaphore m_semaphore; + MxULong m_hThread; // 0x04 + MxU32 m_threadId; // 0x08 + MxBool m_running; // 0x0c + MxSemaphore m_semaphore; // 0x10 protected: - MxCore* m_target; + MxCore* m_target; // 0x18 }; // VTABLE: LEGO1 0x100dc6d8 +// SIZE 0x20 class MxTickleThread : public MxThread { public: MxTickleThread(MxCore* p_target, MxS32 p_frequencyMS); - - // Only inlined, no offset virtual ~MxTickleThread() {} MxResult Run() override; private: - MxS32 m_frequencyMS; + MxS32 m_frequencyMS; // 0x1c }; #endif // MXTHREAD_H