mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 18:24:55 +00:00
CScriptTrigger work
This commit is contained in:
@@ -27,14 +27,13 @@ class CObjectList
|
||||
struct SObjectListEntry
|
||||
{
|
||||
CEntity* entity = nullptr;
|
||||
TUniqueId next = -1;
|
||||
TUniqueId prev = -1;
|
||||
TUniqueId next = kInvalidUniqueId;
|
||||
TUniqueId prev = kInvalidUniqueId;
|
||||
};
|
||||
SObjectListEntry m_list[1024];
|
||||
EGameObjectList m_listEnum;
|
||||
TUniqueId m_firstId = kInvalidUniqueId;
|
||||
u16 m_count = 0;
|
||||
int m_areaIdx = 0;
|
||||
SObjectListEntry x0_list[1024];
|
||||
EGameObjectList x2004_listEnum;
|
||||
TUniqueId x2008_firstId = kInvalidUniqueId;
|
||||
u16 x200a_count = 0;
|
||||
public:
|
||||
class iterator
|
||||
{
|
||||
@@ -47,7 +46,7 @@ public:
|
||||
bool operator!=(const iterator& other) const { return m_id != other.m_id; }
|
||||
CEntity* operator*() const { return m_list.GetObjectById(m_id); }
|
||||
};
|
||||
iterator begin() { return iterator(*this, m_firstId); }
|
||||
iterator begin() { return iterator(*this, x2008_firstId); }
|
||||
iterator end() { return iterator(*this, kInvalidUniqueId); }
|
||||
|
||||
CObjectList(EGameObjectList listEnum);
|
||||
@@ -55,9 +54,10 @@ public:
|
||||
void AddObject(CEntity& entity);
|
||||
void RemoveObject(TUniqueId uid);
|
||||
const CEntity* GetObjectById(TUniqueId uid) const;
|
||||
const CEntity* GetObjectByIndex(s32 index) const { return x0_list[index].entity; }
|
||||
CEntity* GetObjectById(TUniqueId uid);
|
||||
TUniqueId GetFirstObjectIndex() const { return m_firstId; }
|
||||
TUniqueId GetNextObjectIndex(TUniqueId prev) const { return m_list[prev].next; }
|
||||
TUniqueId GetFirstObjectIndex() const { return x2008_firstId; }
|
||||
TUniqueId GetNextObjectIndex(TUniqueId prev) const { return x0_list[prev & 0x3ff].next; }
|
||||
virtual bool IsQualified(const CEntity&);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user