diff --git a/LEGO1/lego/legoomni/include/legoworldlist.h b/LEGO1/lego/legoomni/include/legoworldlist.h index dc88a88c..e83574e7 100644 --- a/LEGO1/lego/legoomni/include/legoworldlist.h +++ b/LEGO1/lego/legoomni/include/legoworldlist.h @@ -28,10 +28,17 @@ class LegoWorldList : public MxPtrList { }; // vtable+0x14 }; +// VTABLE: LEGO1 0x100d75b8 +// MxListCursor + +// VTABLE: LEGO1 0x100d7588 +// MxPtrListCursor + // VTABLE: LEGO1 0x100d75a0 -class LegoWorldListCursor : public MxListCursor { +// SIZE 0x10 +class LegoWorldListCursor : public MxPtrListCursor { public: - LegoWorldListCursor(LegoWorldList* p_list) : MxListCursor(p_list){}; + LegoWorldListCursor(LegoWorldList* p_list) : MxPtrListCursor(p_list){}; }; // TEMPLATE: LEGO1 0x100598f0 @@ -61,4 +68,13 @@ class LegoWorldListCursor : public MxListCursor { // SYNTHETIC: LEGO1 0x1003e870 // LegoWorldListCursor::`scalar deleting destructor' +// FUNCTION: LEGO1 0x1003e8e0 +// MxPtrListCursor::~MxPtrListCursor + +// FUNCTION: LEGO1 0x1003ea10 +// MxListCursor::~MxListCursor + +// FUNCTION: LEGO1 0x1003ea60 +// LegoWorldListCursor::~LegoWorldListCursor + #endif // LEGOWORLDLIST_H diff --git a/LEGO1/lego/legoomni/src/main/legoomni.cpp b/LEGO1/lego/legoomni/src/main/legoomni.cpp index 3c7b4327..5bb47d0c 100644 --- a/LEGO1/lego/legoomni/src/main/legoomni.cpp +++ b/LEGO1/lego/legoomni/src/main/legoomni.cpp @@ -23,6 +23,7 @@ #include "mxtransitionmanager.h" DECOMP_SIZE_ASSERT(LegoWorldList, 0x18); +DECOMP_SIZE_ASSERT(LegoWorldListCursor, 0x10); // GLOBAL: LEGO1 0x100f451c MxAtomId* g_copterScript = NULL; @@ -604,18 +605,14 @@ LegoEntity* LegoOmni::FindByEntityIdOrAtomId(const MxAtomId& p_atom, MxS32 p_ent LegoWorld* world; LegoWorldListCursor cursor(m_worldList); - while (cursor.Next()) { - if ((p_entityid != -1 && world->GetEntityId() == p_entityid) || - (p_atom.GetInternal() && world->GetAtom() == p_atom)) { + while (cursor.Next(world)) { + if ((p_entityid == -1 || world->GetEntityId() == p_entityid) && + (!p_atom.GetInternal() || world->GetAtom() == p_atom)) return world; - } } + } - return NULL; - } - else { - return NULL; - } + return NULL; } // STUB: LEGO1 0x1005b1d0 diff --git a/LEGO1/omni/include/mxdsactionlist.h b/LEGO1/omni/include/mxdsactionlist.h index fbccd5cf..60c3db6d 100644 --- a/LEGO1/omni/include/mxdsactionlist.h +++ b/LEGO1/omni/include/mxdsactionlist.h @@ -35,6 +35,7 @@ class MxDSActionList : public MxList { // class MxListCursor // VTABLE: LEGO1 0x100d7e50 +// SIZE 0x10 class MxDSActionListCursor : public MxListCursor { public: MxDSActionListCursor(MxDSActionList* p_list) : MxListCursor(p_list){}; diff --git a/LEGO1/omni/include/mxlist.h b/LEGO1/omni/include/mxlist.h index 911d5a36..99330975 100644 --- a/LEGO1/omni/include/mxlist.h +++ b/LEGO1/omni/include/mxlist.h @@ -69,6 +69,7 @@ class MxList : protected MxCollection { MxListEntry* InsertEntry(T, MxListEntry*, MxListEntry*); }; +// SIZE 0x18 template class MxPtrList : public MxList { public: @@ -82,6 +83,7 @@ class MxPtrList : public MxList { } }; +// SIZE 0x10 template class MxListCursor : public MxCore { public: @@ -128,6 +130,7 @@ class MxListCursor : public MxCore { MxListEntry* m_match; // 0x0c }; +// SIZE 0x10 template class MxPtrListCursor : public MxListCursor { public: diff --git a/LEGO1/omni/include/mxstreamchunklist.h b/LEGO1/omni/include/mxstreamchunklist.h index 02dcd2d9..12507961 100644 --- a/LEGO1/omni/include/mxstreamchunklist.h +++ b/LEGO1/omni/include/mxstreamchunklist.h @@ -29,6 +29,7 @@ class MxStreamChunkList : public MxList { }; // VTABLE: LEGO1 0x100dc510 +// SIZE 0x10 class MxStreamChunkListCursor : public MxListCursor { public: MxStreamChunkListCursor(MxStreamChunkList* p_list) : MxListCursor(p_list){}; diff --git a/LEGO1/omni/include/mxstringlist.h b/LEGO1/omni/include/mxstringlist.h index 6e75683d..8651f4c4 100644 --- a/LEGO1/omni/include/mxstringlist.h +++ b/LEGO1/omni/include/mxstringlist.h @@ -9,6 +9,7 @@ class MxStringList : public MxList {}; // VTABLE: LEGO1 0x100dd058 +// SIZE 0x10 class MxStringListCursor : public MxListCursor { public: MxStringListCursor(MxStringList* p_list) : MxListCursor(p_list){}; diff --git a/LEGO1/omni/src/action/mxdsselectaction.cpp b/LEGO1/omni/src/action/mxdsselectaction.cpp index 27f3a9cf..e2db17e2 100644 --- a/LEGO1/omni/src/action/mxdsselectaction.cpp +++ b/LEGO1/omni/src/action/mxdsselectaction.cpp @@ -5,6 +5,8 @@ #include "mxvariabletable.h" DECOMP_SIZE_ASSERT(MxDSSelectAction, 0xb0) +DECOMP_SIZE_ASSERT(MxStringList, 0x18) +DECOMP_SIZE_ASSERT(MxStringListCursor, 0x10) DECOMP_SIZE_ASSERT(MxListEntry, 0x18) // FUNCTION: LEGO1 0x100cb2b0