Match and add annotations

This commit is contained in:
Christian Semmler 2024-01-13 20:30:12 -05:00
parent c6dc8021b6
commit 2223fb6079
7 changed files with 32 additions and 11 deletions

View File

@ -28,10 +28,17 @@ class LegoWorldList : public MxPtrList<LegoWorld> {
}; // vtable+0x14
};
// VTABLE: LEGO1 0x100d75b8
// MxListCursor<LegoWorld *>
// VTABLE: LEGO1 0x100d7588
// MxPtrListCursor<LegoWorld>
// VTABLE: LEGO1 0x100d75a0
class LegoWorldListCursor : public MxListCursor<LegoWorld*> {
// SIZE 0x10
class LegoWorldListCursor : public MxPtrListCursor<LegoWorld> {
public:
LegoWorldListCursor(LegoWorldList* p_list) : MxListCursor<LegoWorld*>(p_list){};
LegoWorldListCursor(LegoWorldList* p_list) : MxPtrListCursor<LegoWorld>(p_list){};
};
// TEMPLATE: LEGO1 0x100598f0
@ -61,4 +68,13 @@ class LegoWorldListCursor : public MxListCursor<LegoWorld*> {
// SYNTHETIC: LEGO1 0x1003e870
// LegoWorldListCursor::`scalar deleting destructor'
// FUNCTION: LEGO1 0x1003e8e0
// MxPtrListCursor<LegoWorld>::~MxPtrListCursor<LegoWorld>
// FUNCTION: LEGO1 0x1003ea10
// MxListCursor<LegoWorld *>::~MxListCursor<LegoWorld *>
// FUNCTION: LEGO1 0x1003ea60
// LegoWorldListCursor::~LegoWorldListCursor
#endif // LEGOWORLDLIST_H

View File

@ -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

View File

@ -35,6 +35,7 @@ class MxDSActionList : public MxList<MxDSAction*> {
// class MxListCursor<MxDSAction *>
// VTABLE: LEGO1 0x100d7e50
// SIZE 0x10
class MxDSActionListCursor : public MxListCursor<MxDSAction*> {
public:
MxDSActionListCursor(MxDSActionList* p_list) : MxListCursor<MxDSAction*>(p_list){};

View File

@ -69,6 +69,7 @@ class MxList : protected MxCollection<T> {
MxListEntry<T>* InsertEntry(T, MxListEntry<T>*, MxListEntry<T>*);
};
// SIZE 0x18
template <class T>
class MxPtrList : public MxList<T*> {
public:
@ -82,6 +83,7 @@ class MxPtrList : public MxList<T*> {
}
};
// SIZE 0x10
template <class T>
class MxListCursor : public MxCore {
public:
@ -128,6 +130,7 @@ class MxListCursor : public MxCore {
MxListEntry<T>* m_match; // 0x0c
};
// SIZE 0x10
template <class T>
class MxPtrListCursor : public MxListCursor<T*> {
public:

View File

@ -29,6 +29,7 @@ class MxStreamChunkList : public MxList<MxStreamChunk*> {
};
// VTABLE: LEGO1 0x100dc510
// SIZE 0x10
class MxStreamChunkListCursor : public MxListCursor<MxStreamChunk*> {
public:
MxStreamChunkListCursor(MxStreamChunkList* p_list) : MxListCursor<MxStreamChunk*>(p_list){};

View File

@ -9,6 +9,7 @@
class MxStringList : public MxList<MxString> {};
// VTABLE: LEGO1 0x100dd058
// SIZE 0x10
class MxStringListCursor : public MxListCursor<MxString> {
public:
MxStringListCursor(MxStringList* p_list) : MxListCursor<MxString>(p_list){};

View File

@ -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<MxString>, 0x18)
// FUNCTION: LEGO1 0x100cb2b0