From 28b730529636c1e548e7225063d6200b3ec40434 Mon Sep 17 00:00:00 2001 From: disinvite Date: Sun, 19 Nov 2023 00:05:06 -0500 Subject: [PATCH] Fix member offset comments in collection classes --- LEGO1/legoworld.h | 8 ++++---- LEGO1/mxcollection.h | 4 ++-- LEGO1/mxhashtable.h | 12 ++++++------ LEGO1/mxlist.h | 4 ++-- LEGO1/mxvariabletable.h | 4 ++-- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/LEGO1/legoworld.h b/LEGO1/legoworld.h index 2d77e29e..7f46ff58 100644 --- a/LEGO1/legoworld.h +++ b/LEGO1/legoworld.h @@ -41,11 +41,11 @@ class LegoWorld : public LegoEntity { void EndAction(MxPresenter* p_presenter); protected: - LegoPathControllerList m_list0x68; // +0x68 - MxPresenterList m_list0x80; // +0x80 - LegoCameraController* m_camera; // +0x98 + LegoPathControllerList m_list0x68; // 0x68 + MxPresenterList m_list0x80; // 0x80 + LegoCameraController* m_camera; // 0x98 undefined m_unk9c[0x1c]; - MxPresenterList m_list0xb8; // +0xb8 + MxPresenterList m_list0xb8; // 0xb8 undefined m_unkd0[0x26]; undefined m_unkf6; undefined m_unkf7; diff --git a/LEGO1/mxcollection.h b/LEGO1/mxcollection.h index 0f32a064..903ba8bd 100644 --- a/LEGO1/mxcollection.h +++ b/LEGO1/mxcollection.h @@ -18,8 +18,8 @@ class MxCollection : public MxCore { virtual MxS8 Compare(T, T) { return 0; } protected: - MxU32 m_count; // +0x8 - void (*m_customDestructor)(T); // +0xc + MxU32 m_count; // 0x8 + void (*m_customDestructor)(T); // 0xc }; #endif // MXCOLLECTION_H diff --git a/LEGO1/mxhashtable.h b/LEGO1/mxhashtable.h index 55d4914e..b09bf28c 100644 --- a/LEGO1/mxhashtable.h +++ b/LEGO1/mxhashtable.h @@ -59,16 +59,16 @@ class MxHashTable : protected MxCollection { protected: void _NodeInsert(MxHashTableNode*); - MxHashTableNode** m_slots; // +0x10 - MxU32 m_numSlots; // +0x14 - MxU32 m_autoResizeRatio; // +0x18 - HashTableOpt m_resizeOption; // +0x1c + MxHashTableNode** m_slots; // 0x10 + MxU32 m_numSlots; // 0x14 + MxU32 m_autoResizeRatio; // 0x18 + HashTableOpt m_resizeOption; // 0x1c // FIXME: or FIXME? This qword is used as an integer or double depending // on the value of m_resizeOption. Hard to say whether this is how the devs // did it, but a simple cast in either direction doesn't match. union { - MxU32 m_increaseAmount; // +0x20 - double m_increaseFactor; // +0x20 + MxU32 m_increaseAmount; // 0x20 + double m_increaseFactor; // 0x20 }; }; diff --git a/LEGO1/mxlist.h b/LEGO1/mxlist.h index 7a9ddbcd..d44d6c8f 100644 --- a/LEGO1/mxlist.h +++ b/LEGO1/mxlist.h @@ -67,8 +67,8 @@ class MxList : protected MxCollection { friend class MxListCursor; protected: - MxListEntry* m_first; // +0x10 - MxListEntry* m_last; // +0x14 + MxListEntry* m_first; // 0x10 + MxListEntry* m_last; // 0x14 void _DeleteEntry(MxListEntry* match); MxListEntry* _InsertEntry(T, MxListEntry*, MxListEntry*); diff --git a/LEGO1/mxvariabletable.h b/LEGO1/mxvariabletable.h index 872aa49f..1df02204 100644 --- a/LEGO1/mxvariabletable.h +++ b/LEGO1/mxvariabletable.h @@ -17,8 +17,8 @@ class MxVariableTable : public MxHashTable { // OFFSET: LEGO1 0x100afdb0 static void Destroy(MxVariable* p_obj) { p_obj->Destroy(); } - virtual MxS8 Compare(MxVariable*, MxVariable*) override; // +0x14 - virtual MxU32 Hash(MxVariable*) override; // +0x18 + virtual MxS8 Compare(MxVariable*, MxVariable*) override; // vtable+0x14 + virtual MxU32 Hash(MxVariable*) override; // vtable+0x18 }; // OFFSET: LEGO1 0x100afcd0 TEMPLATE