diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c7f466f..d70c0626 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,7 +84,6 @@ add_library(lego1 SHARED LEGO1/legopartpresenter.cpp LEGO1/legopathactor.cpp LEGO1/legopathcontroller.cpp - LEGO1/legopathcontrollerlist.cpp LEGO1/legopathpresenter.cpp LEGO1/legophonemepresenter.cpp LEGO1/legoplantmanager.cpp @@ -99,7 +98,6 @@ add_library(lego1 SHARED LEGO1/legovehiclebuildstate.cpp LEGO1/legovideomanager.cpp LEGO1/legoworld.cpp - LEGO1/legoworldlist.cpp LEGO1/legoworldpresenter.cpp LEGO1/motorcycle.cpp LEGO1/mxactionnotificationparam.cpp @@ -121,7 +119,6 @@ add_library(lego1 SHARED LEGO1/mxdiskstreamprovider.cpp LEGO1/mxdisplaysurface.cpp LEGO1/mxdsaction.cpp - LEGO1/mxdsactionlist.cpp LEGO1/mxdsanim.cpp LEGO1/mxdsbuffer.cpp LEGO1/mxdschunk.cpp @@ -161,11 +158,9 @@ add_library(lego1 SHARED LEGO1/mxpalette.cpp LEGO1/mxparam.cpp LEGO1/mxpresenter.cpp - LEGO1/mxpresenterlist.cpp LEGO1/mxramstreamcontroller.cpp LEGO1/mxramstreamprovider.cpp LEGO1/mxregion.cpp - LEGO1/mxregionlist.cpp LEGO1/mxscheduler.cpp LEGO1/mxsemaphore.cpp LEGO1/mxsmack.cpp @@ -174,13 +169,11 @@ add_library(lego1 SHARED LEGO1/mxsoundpresenter.cpp LEGO1/mxstillpresenter.cpp LEGO1/mxstreamchunk.cpp - LEGO1/mxstreamchunklist.cpp LEGO1/mxstreamcontroller.cpp LEGO1/mxstreamer.cpp LEGO1/mxstreamlist.cpp LEGO1/mxstreamprovider.cpp LEGO1/mxstring.cpp - LEGO1/mxstringlist.cpp LEGO1/mxthread.cpp LEGO1/mxticklemanager.cpp LEGO1/mxtimer.cpp diff --git a/LEGO1/legoomni.cpp b/LEGO1/legoomni.cpp index e401f51a..53bb07ef 100644 --- a/LEGO1/legoomni.cpp +++ b/LEGO1/legoomni.cpp @@ -22,6 +22,8 @@ #include "mxticklemanager.h" #include "mxtransitionmanager.h" +DECOMP_SIZE_ASSERT(LegoWorldList, 0x18); + // GLOBAL: LEGO1 0x100f451c MxAtomId* g_copterScript = NULL; @@ -527,7 +529,7 @@ MxResult LegoOmni::Create(MxOmniCreateParam& p_param) m_animationManager = new LegoAnimationManager(); m_buildingManager = new LegoBuildingManager(); m_gameState = new LegoGameState(); - m_worldList = new LegoWorldList(); + m_worldList = new LegoWorldList(TRUE); if (m_unk0x6c && m_gifManager && m_worldList && m_plantManager && m_animationManager && m_buildingManager) { // TODO: initialize a bunch of MxVariables diff --git a/LEGO1/legopathcontrollerlist.cpp b/LEGO1/legopathcontrollerlist.cpp deleted file mode 100644 index 18cf7b0e..00000000 --- a/LEGO1/legopathcontrollerlist.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include "legopathcontrollerlist.h" - -#include "decomp.h" -#include "legopathcontroller.h" - -DECOMP_SIZE_ASSERT(LegoPathControllerList, 0x18); - -// FUNCTION: LEGO1 0x1001d210 -MxS8 LegoPathControllerList::Compare(LegoPathController* p_a, LegoPathController* p_b) -{ - return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; -} - -// FUNCTION: LEGO1 0x1001d3c0 -void LegoPathControllerList::Destroy(LegoPathController* p_controller) -{ - delete p_controller; -} diff --git a/LEGO1/legopathcontrollerlist.h b/LEGO1/legopathcontrollerlist.h index ac22b53d..db31c2c4 100644 --- a/LEGO1/legopathcontrollerlist.h +++ b/LEGO1/legopathcontrollerlist.h @@ -12,9 +12,13 @@ // SIZE 0x18 class LegoPathControllerList : public MxPtrList { public: - LegoPathControllerList() : MxPtrList(Destroy) {} - virtual MxS8 Compare(LegoPathController*, LegoPathController*) override; // vtable+0x14 - static void Destroy(LegoPathController*); + LegoPathControllerList(MxBool p_ownership = FALSE) : MxPtrList(p_ownership) {} + + // FUNCTION: LEGO1 0x1001d210 + virtual MxS8 Compare(LegoPathController* p_a, LegoPathController* p_b) override + { + return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; + } // vtable+0x14 }; // VTABLE: LEGO1 0x100d6380 @@ -38,6 +42,9 @@ class LegoPathControllerList : public MxPtrList { // TEMPLATE: LEGO1 0x1001d330 // MxList::~MxList +// TEMPLATE: LEGO1 0x1001d3c0 +// MxPtrList::Destroy + // SYNTHETIC: LEGO1 0x1001d490 // MxCollection::`scalar deleting destructor' diff --git a/LEGO1/legoworld.cpp b/LEGO1/legoworld.cpp index 48c95c4f..03139566 100644 --- a/LEGO1/legoworld.cpp +++ b/LEGO1/legoworld.cpp @@ -10,7 +10,7 @@ DECOMP_SIZE_ASSERT(LegoWorld, 0xf8); // STUB: LEGO1 0x1001ca40 -LegoWorld::LegoWorld() +LegoWorld::LegoWorld() : m_list0x68(TRUE) { // TODO } diff --git a/LEGO1/legoworldlist.cpp b/LEGO1/legoworldlist.cpp deleted file mode 100644 index 3c43744d..00000000 --- a/LEGO1/legoworldlist.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include "legoworldlist.h" - -#include "legoworld.h" - -// FUNCTION: LEGO1 0x100598d0 -MxS8 LegoWorldList::Compare(LegoWorld* p_a, LegoWorld* p_b) -{ - return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; -} - -// FUNCTION: LEGO1 0x100599f0 -void LegoWorldList::Destroy(LegoWorld* p_world) -{ - delete p_world; -} diff --git a/LEGO1/legoworldlist.h b/LEGO1/legoworldlist.h index 0185ceee..22cf5838 100644 --- a/LEGO1/legoworldlist.h +++ b/LEGO1/legoworldlist.h @@ -19,9 +19,13 @@ class LegoWorld; // SIZE 0x18 class LegoWorldList : public MxPtrList { public: - LegoWorldList() : MxPtrList(Destroy) {} - virtual MxS8 Compare(LegoWorld*, LegoWorld*) override; // vtable+0x14 - static void Destroy(LegoWorld*); + LegoWorldList(MxBool p_ownership = FALSE) : MxPtrList(p_ownership) {} + + // FUNCTION: LEGO1 0x100598d0 + virtual MxS8 Compare(LegoWorld* p_a, LegoWorld* p_b) override + { + return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; + }; // vtable+0x14 }; // TEMPLATE: LEGO1 0x100598f0 @@ -36,6 +40,9 @@ class LegoWorldList : public MxPtrList { // TEMPLATE: LEGO1 0x10059960 // MxList::~MxList +// TEMPLATE: LEGO1 0x100599f0 +// MxPtrList::Destroy + // SYNTHETIC: LEGO1 0x10059ac0 // MxCollection::`scalar deleting destructor' diff --git a/LEGO1/mxcollection.h b/LEGO1/mxcollection.h index 903ba8bd..b0b4da88 100644 --- a/LEGO1/mxcollection.h +++ b/LEGO1/mxcollection.h @@ -9,12 +9,14 @@ class MxCollection : public MxCore { MxCollection() { m_count = 0; - m_customDestructor = Destroy; + SetDestroy(Destroy); } - virtual ~MxCollection() {} - static void Destroy(T){}; + + void SetDestroy(void (*p_customDestructor)(T)) { this->m_customDestructor = p_customDestructor; } + + virtual ~MxCollection() {} virtual MxS8 Compare(T, T) { return 0; } protected: diff --git a/LEGO1/mxdsactionlist.cpp b/LEGO1/mxdsactionlist.cpp deleted file mode 100644 index 2cfe4a59..00000000 --- a/LEGO1/mxdsactionlist.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "mxdsactionlist.h" - -#include "mxdsaction.h" - -DECOMP_SIZE_ASSERT(MxDSActionList, 0x1c); -DECOMP_SIZE_ASSERT(MxDSActionListCursor, 0x10); - -// FUNCTION: LEGO1 0x100c9c90 -MxS8 MxDSActionList::Compare(MxDSAction* p_a, MxDSAction* p_b) -{ - return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; -} - -// FUNCTION: LEGO1 0x100c9cb0 -void MxDSActionList::Destroy(MxDSAction* p_action) -{ - if (p_action) - delete p_action; -} diff --git a/LEGO1/mxdsactionlist.h b/LEGO1/mxdsactionlist.h index 73252d9d..fbccd5cf 100644 --- a/LEGO1/mxdsactionlist.h +++ b/LEGO1/mxdsactionlist.h @@ -18,9 +18,14 @@ class MxDSActionList : public MxList { public: MxDSActionList() { this->m_unk0x18 = 0; } - virtual MxS8 Compare(MxDSAction*, MxDSAction*) override; // vtable+0x14 + // FUNCTION: LEGO1 0x100c9c90 + virtual MxS8 Compare(MxDSAction* p_a, MxDSAction* p_b) override + { + return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; + } // vtable+0x14 - static void Destroy(MxDSAction* p_action); + // FUNCTION: LEGO1 0x100c9cb0 + static void Destroy(MxDSAction* p_action) { delete p_action; } private: undefined m_unk0x18; diff --git a/LEGO1/mxdsmultiaction.cpp b/LEGO1/mxdsmultiaction.cpp index 9108837d..b986c23d 100644 --- a/LEGO1/mxdsmultiaction.cpp +++ b/LEGO1/mxdsmultiaction.cpp @@ -1,6 +1,8 @@ #include "mxdsmultiaction.h" DECOMP_SIZE_ASSERT(MxDSMultiAction, 0x9c) +DECOMP_SIZE_ASSERT(MxDSActionList, 0x1c); +DECOMP_SIZE_ASSERT(MxDSActionListCursor, 0x10); // FUNCTION: LEGO1 0x100c9b90 MxDSMultiAction::MxDSMultiAction() diff --git a/LEGO1/mxdsselectaction.cpp b/LEGO1/mxdsselectaction.cpp index d064b0f3..27f3a9cf 100644 --- a/LEGO1/mxdsselectaction.cpp +++ b/LEGO1/mxdsselectaction.cpp @@ -5,6 +5,7 @@ #include "mxvariabletable.h" DECOMP_SIZE_ASSERT(MxDSSelectAction, 0xb0) +DECOMP_SIZE_ASSERT(MxListEntry, 0x18) // FUNCTION: LEGO1 0x100cb2b0 MxDSSelectAction::MxDSSelectAction() diff --git a/LEGO1/mxlist.h b/LEGO1/mxlist.h index d88b6f64..afdeadf4 100644 --- a/LEGO1/mxlist.h +++ b/LEGO1/mxlist.h @@ -10,12 +10,6 @@ class MxList; template class MxListCursor; -template -class MxPtrList : public MxList { -public: - MxPtrList(void (*p_destroy)(T*) = Destroy) { m_customDestructor = p_destroy; } -}; - template class MxListEntry { public: @@ -62,9 +56,9 @@ class MxList : protected MxCollection { void Append(T p_obj) { InsertEntry(p_obj, this->m_last, NULL); }; void DeleteAll(MxBool p_destroy = TRUE); MxU32 GetCount() { return this->m_count; } - void SetDestroy(void (*p_customDestructor)(T)) { this->m_customDestructor = p_customDestructor; } friend class MxListCursor; + using MxCollection::SetDestroy; protected: MxListEntry* m_first; // 0x10 @@ -74,6 +68,16 @@ class MxList : protected MxCollection { MxListEntry* InsertEntry(T, MxListEntry*, MxListEntry*); }; +template +class MxPtrList : public MxList { +public: + MxPtrList(MxBool p_ownership) { SetOwnership(p_ownership); } + + static void Destroy(T* p_obj) { delete p_obj; }; + + void SetOwnership(MxBool p_ownership) { SetDestroy(p_ownership ? Destroy : MxCollection::Destroy); } +}; + template class MxListCursor : public MxCore { public: diff --git a/LEGO1/mxmediamanager.cpp b/LEGO1/mxmediamanager.cpp index 47993fe8..e9b4fe6d 100644 --- a/LEGO1/mxmediamanager.cpp +++ b/LEGO1/mxmediamanager.cpp @@ -7,6 +7,8 @@ #include "mxticklemanager.h" DECOMP_SIZE_ASSERT(MxMediaManager, 0x2c); +DECOMP_SIZE_ASSERT(MxPresenterList, 0x18); +DECOMP_SIZE_ASSERT(MxPresenterListCursor, 0x10); // FUNCTION: LEGO1 0x100b84c0 MxMediaManager::MxMediaManager() diff --git a/LEGO1/mxmediapresenter.cpp b/LEGO1/mxmediapresenter.cpp index 2826781c..9a13adf5 100644 --- a/LEGO1/mxmediapresenter.cpp +++ b/LEGO1/mxmediapresenter.cpp @@ -8,6 +8,8 @@ #include "mxtimer.h" DECOMP_SIZE_ASSERT(MxMediaPresenter, 0x50); +DECOMP_SIZE_ASSERT(MxStreamChunkList, 0x18); +DECOMP_SIZE_ASSERT(MxStreamChunkListCursor, 0x10); // FUNCTION: LEGO1 0x1000c550 MxMediaPresenter::~MxMediaPresenter() diff --git a/LEGO1/mxpresenter.h b/LEGO1/mxpresenter.h index 41b255dc..fae7021a 100644 --- a/LEGO1/mxpresenter.h +++ b/LEGO1/mxpresenter.h @@ -10,7 +10,6 @@ class MxCompositePresenter; class MxStreamController; -class MxPresenter; // VTABLE: LEGO1 0x100d4d38 // SIZE 0x40 diff --git a/LEGO1/mxpresenterlist.cpp b/LEGO1/mxpresenterlist.cpp deleted file mode 100644 index adf48262..00000000 --- a/LEGO1/mxpresenterlist.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "mxpresenterlist.h" - -#include "mxpresenter.h" - -DECOMP_SIZE_ASSERT(MxPresenterList, 0x18); -DECOMP_SIZE_ASSERT(MxPresenterListCursor, 0x10); - -// FUNCTION: LEGO1 0x1001cd00 -MxS8 MxPresenterList::Compare(MxPresenter* p_a, MxPresenter* p_b) -{ - return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; -} diff --git a/LEGO1/mxpresenterlist.h b/LEGO1/mxpresenterlist.h index e9ffc398..d8b74a3f 100644 --- a/LEGO1/mxpresenterlist.h +++ b/LEGO1/mxpresenterlist.h @@ -2,8 +2,7 @@ #define MXPRESENTERLIST_H #include "mxlist.h" - -class MxPresenter; +#include "mxpresenter.h" // VTABLE: LEGO1 0x100d62f0 // class MxPtrList @@ -12,7 +11,13 @@ class MxPresenter; // SIZE 0x18 class MxPresenterList : public MxPtrList { public: - virtual MxS8 Compare(MxPresenter*, MxPresenter*) override; // vtable+0x14 + MxPresenterList(MxBool p_ownership = FALSE) : MxPtrList(p_ownership) {} + + // FUNCTION: LEGO1 0x1001cd00 + virtual MxS8 Compare(MxPresenter* p_a, MxPresenter* p_b) override + { + return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; + }; // vtable+0x14 }; // VTABLE: LEGO1 0x100d6488 diff --git a/LEGO1/mxregion.h b/LEGO1/mxregion.h index 169eb705..be15a672 100644 --- a/LEGO1/mxregion.h +++ b/LEGO1/mxregion.h @@ -6,50 +6,6 @@ #include "mxrect32.h" #include "mxregionlist.h" -// SIZE 0x0c -struct MxRegionTopBottom { - MxRegionTopBottom(MxRect32& p_rect); - MxRegionTopBottom(MxS32 p_top, MxS32 p_bottom); - - MxRegionTopBottom* Clone(); - void FUN_100c5280(MxS32 p_left, MxS32 p_right); - MxBool FUN_100c57b0(MxRect32& p_rect); - - inline MxS32 GetTop() { return m_top; } - inline MxS32 GetBottom() { return m_bottom; } - - inline void SetTop(MxS32 p_top) { m_top = p_top; } - inline void SetBottom(MxS32 p_bottom) { m_bottom = p_bottom; } - - friend class MxRegionList; - -private: - MxS32 m_top; - MxS32 m_bottom; - MxRegionLeftRightList* m_leftRightList; -}; - -// SIZE 0x08 -struct MxRegionLeftRight { - MxRegionLeftRight(MxS32 p_left, MxS32 p_right) - { - m_left = p_left; - m_right = p_right; - } - - MxRegionLeftRight* Clone() { return new MxRegionLeftRight(m_left, m_right); } - - inline MxS32 GetLeft() { return m_left; } - inline MxS32 GetRight() { return m_right; } - - inline void SetLeft(MxS32 p_left) { m_left = p_left; } - inline void SetRight(MxS32 p_right) { m_right = p_right; } - -private: - MxS32 m_left; - MxS32 m_right; -}; - // VTABLE: LEGO1 0x100dcae8 // SIZE 0x1c class MxRegion : public MxCore { diff --git a/LEGO1/mxregionlist.cpp b/LEGO1/mxregionlist.cpp deleted file mode 100644 index f2ae0d29..00000000 --- a/LEGO1/mxregionlist.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "mxregionlist.h" - -#include "mxregion.h" - -// FUNCTION: LEGO1 0x100c33e0 -void MxRegionList::Destroy(MxRegionTopBottom* p_topBottom) -{ - if (p_topBottom) { - if (p_topBottom->m_leftRightList) - delete p_topBottom->m_leftRightList; - delete p_topBottom; - } -} - -// FUNCTION: LEGO1 0x100c4e80 -void MxRegionLeftRightList::Destroy(MxRegionLeftRight* p_leftRight) -{ - delete p_leftRight; -} diff --git a/LEGO1/mxregionlist.h b/LEGO1/mxregionlist.h index 79860475..ef3712cb 100644 --- a/LEGO1/mxregionlist.h +++ b/LEGO1/mxregionlist.h @@ -3,8 +3,78 @@ #include "mxlist.h" -struct MxRegionTopBottom; -struct MxRegionLeftRight; +// SIZE 0x08 +struct MxRegionLeftRight { + MxRegionLeftRight(MxS32 p_left, MxS32 p_right) + { + m_left = p_left; + m_right = p_right; + } + + MxRegionLeftRight* Clone() { return new MxRegionLeftRight(m_left, m_right); } + + inline MxS32 GetLeft() { return m_left; } + inline MxS32 GetRight() { return m_right; } + + inline void SetLeft(MxS32 p_left) { m_left = p_left; } + inline void SetRight(MxS32 p_right) { m_right = p_right; } + +private: + MxS32 m_left; + MxS32 m_right; +}; + +// VTABLE: LEGO1 0x100dcc40 +// class MxCollection + +// VTABLE: LEGO1 0x100dcc58 +// class MxList + +// VTABLE: LEGO1 0x100dcc70 +// class MxPtrList + +// VTABLE: LEGO1 0x100dcc88 +// SIZE 0x18 +class MxRegionLeftRightList : public MxPtrList { +public: + MxRegionLeftRightList() : MxPtrList(TRUE) {} +}; + +// VTABLE: LEGO1 0x100dcbf8 +// class MxPtrListCursor + +// VTABLE: LEGO1 0x100dcc28 +// class MxListCursor + +// VTABLE: LEGO1 0x100dcc10 +class MxRegionLeftRightListCursor : public MxPtrListCursor { +public: + MxRegionLeftRightListCursor(MxRegionLeftRightList* p_list) : MxPtrListCursor(p_list){}; +}; + +// SIZE 0x0c +struct MxRegionTopBottom { + MxRegionTopBottom(MxRect32& p_rect); + MxRegionTopBottom(MxS32 p_top, MxS32 p_bottom); + ~MxRegionTopBottom() { delete m_leftRightList; } + + MxRegionTopBottom* Clone(); + void FUN_100c5280(MxS32 p_left, MxS32 p_right); + MxBool FUN_100c57b0(MxRect32& p_rect); + + inline MxS32 GetTop() { return m_top; } + inline MxS32 GetBottom() { return m_bottom; } + + inline void SetTop(MxS32 p_top) { m_top = p_top; } + inline void SetBottom(MxS32 p_bottom) { m_bottom = p_bottom; } + + friend class MxRegionList; + +private: + MxS32 m_top; + MxS32 m_bottom; + MxRegionLeftRightList* m_leftRightList; +}; // VTABLE: LEGO1 0x100dcb10 // class MxCollection @@ -19,8 +89,7 @@ struct MxRegionLeftRight; // SIZE 0x18 class MxRegionList : public MxPtrList { public: - MxRegionList() : MxPtrList(Destroy) {} - static void Destroy(MxRegionTopBottom*); + MxRegionList() : MxPtrList(TRUE) {} }; // VTABLE: LEGO1 0x100dcb70 @@ -39,41 +108,15 @@ class MxRegionListCursor : public MxPtrListCursor { MxRegionListCursor(MxPtrList* p_list) : MxPtrListCursor(p_list){}; }; -// VTABLE: LEGO1 0x100dcc40 -// class MxCollection - -// VTABLE: LEGO1 0x100dcc58 -// class MxList - -// VTABLE: LEGO1 0x100dcc70 -// class MxPtrList - -// VTABLE: LEGO1 0x100dcc88 -// SIZE 0x18 -class MxRegionLeftRightList : public MxPtrList { -public: - MxRegionLeftRightList() : MxPtrList(Destroy) {} - static void Destroy(MxRegionLeftRight*); -}; - -// VTABLE: LEGO1 0x100dcbf8 -// class MxPtrListCursor - -// VTABLE: LEGO1 0x100dcc28 -// class MxListCursor - -// VTABLE: LEGO1 0x100dcc10 -class MxRegionLeftRightListCursor : public MxPtrListCursor { -public: - MxRegionLeftRightListCursor(MxRegionLeftRightList* p_list) : MxPtrListCursor(p_list){}; -}; - // TEMPLATE: LEGO1 0x100c32e0 // MxCollection::Compare // TEMPLATE: LEGO1 0x100c3340 // MxCollection::Destroy +// TEMPLATE: LEGO1 0x100c33e0 +// MxPtrList::Destroy + // SYNTHETIC: LEGO1 0x100c34d0 // MxCollection::`scalar deleting destructor' @@ -125,6 +168,9 @@ class MxRegionLeftRightListCursor : public MxPtrListCursor { // SYNTHETIC: LEGO1 0x100c4f50 // MxCollection::`scalar deleting destructor' +// TEMPLATE: LEGO1 0x100c4e80 +// MxPtrList::Destroy + // SYNTHETIC: LEGO1 0x100c4fc0 // MxList::`scalar deleting destructor' diff --git a/LEGO1/mxstreamchunklist.cpp b/LEGO1/mxstreamchunklist.cpp deleted file mode 100644 index b268c4ad..00000000 --- a/LEGO1/mxstreamchunklist.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "mxstreamchunklist.h" - -#include "mxstreamchunk.h" - -DECOMP_SIZE_ASSERT(MxStreamChunkList, 0x18); -DECOMP_SIZE_ASSERT(MxStreamChunkListCursor, 0x10); - -// FUNCTION: LEGO1 0x100b5900 -MxS8 MxStreamChunkList::Compare(MxStreamChunk* p_a, MxStreamChunk* p_b) -{ - return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; -} - -// FUNCTION: LEGO1 0x100b5920 -void MxStreamChunkList::Destroy(MxStreamChunk* p_chunk) -{ - if (p_chunk) - delete p_chunk; -} diff --git a/LEGO1/mxstreamchunklist.h b/LEGO1/mxstreamchunklist.h index 154a091b..02dcd2d9 100644 --- a/LEGO1/mxstreamchunklist.h +++ b/LEGO1/mxstreamchunklist.h @@ -18,9 +18,14 @@ class MxStreamChunkList : public MxList { public: MxStreamChunkList() { m_customDestructor = Destroy; } - virtual MxS8 Compare(MxStreamChunk*, MxStreamChunk*) override; // vtable+0x14 + // FUNCTION: LEGO1 0x100b5900 + virtual MxS8 Compare(MxStreamChunk* p_a, MxStreamChunk* p_b) override + { + return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; + } // vtable+0x14 - static void Destroy(MxStreamChunk* p_chunk); + // FUNCTION: LEGO1 0x100b5920 + static void Destroy(MxStreamChunk* p_chunk) { delete p_chunk; } }; // VTABLE: LEGO1 0x100dc510 diff --git a/LEGO1/mxstringlist.cpp b/LEGO1/mxstringlist.cpp deleted file mode 100644 index 8a0a2ddc..00000000 --- a/LEGO1/mxstringlist.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include "mxstringlist.h" - -#include "decomp.h" - -DECOMP_SIZE_ASSERT(MxListEntry, 0x18)