mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-26 17:36:12 -05:00
implement LegoOmni::FindByEntityIdOrAtomId (#435)
* push changes * Match and add annotations * Fix annotations --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
parent
8b34b38ac0
commit
7f7e6e37dd
8 changed files with 49 additions and 2 deletions
|
@ -28,6 +28,19 @@ class LegoWorldList : public MxPtrList<LegoWorld> {
|
|||
}; // vtable+0x14
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d75b8
|
||||
// class MxListCursor<LegoWorld *>
|
||||
|
||||
// VTABLE: LEGO1 0x100d7588
|
||||
// class MxPtrListCursor<LegoWorld>
|
||||
|
||||
// VTABLE: LEGO1 0x100d75a0
|
||||
// SIZE 0x10
|
||||
class LegoWorldListCursor : public MxPtrListCursor<LegoWorld> {
|
||||
public:
|
||||
LegoWorldListCursor(LegoWorldList* p_list) : MxPtrListCursor<LegoWorld>(p_list){};
|
||||
};
|
||||
|
||||
// TEMPLATE: LEGO1 0x100598f0
|
||||
// MxCollection<LegoWorld *>::Compare
|
||||
|
||||
|
@ -52,4 +65,16 @@ class LegoWorldList : public MxPtrList<LegoWorld> {
|
|||
// SYNTHETIC: LEGO1 0x10059be0
|
||||
// MxPtrList<LegoWorld>::`scalar deleting destructor'
|
||||
|
||||
// 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
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "mxtransitionmanager.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoWorldList, 0x18);
|
||||
DECOMP_SIZE_ASSERT(LegoWorldListCursor, 0x10);
|
||||
|
||||
// GLOBAL: LEGO1 0x100f451c
|
||||
MxAtomId* g_copterScript = NULL;
|
||||
|
@ -597,10 +598,20 @@ void LegoOmni::RemoveWorld(const MxAtomId&, MxLong)
|
|||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1005b0c0
|
||||
// FUNCTION: LEGO1 0x1005b0c0
|
||||
LegoEntity* LegoOmni::FindByEntityIdOrAtomId(const MxAtomId& p_atom, MxS32 p_entityid)
|
||||
{
|
||||
// TODO
|
||||
if (m_worldList) {
|
||||
LegoWorld* world;
|
||||
LegoWorldListCursor cursor(m_worldList);
|
||||
|
||||
while (cursor.Next(world)) {
|
||||
if ((p_entityid == -1 || world->GetEntityId() == p_entityid) &&
|
||||
(!p_atom.GetInternal() || world->GetAtom() == p_atom))
|
||||
return world;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -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){};
|
||||
|
|
|
@ -45,6 +45,9 @@ class MxEntity : public MxCore {
|
|||
return SUCCESS;
|
||||
}
|
||||
|
||||
inline MxS32 GetEntityId() { return m_mxEntityId; }
|
||||
inline MxAtomId& GetAtom() { return m_atom; }
|
||||
|
||||
protected:
|
||||
MxS32 m_mxEntityId; // 0x8
|
||||
MxAtomId m_atom; // 0xc
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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){};
|
||||
|
|
|
@ -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){};
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue