2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-14 18:06:10 +00:00

Initial collision testing and CStateManager work

This commit is contained in:
Jack Andersen
2017-03-30 12:36:18 -10:00
parent a0549cd82b
commit 2530163a8c
38 changed files with 1056 additions and 263 deletions

View File

@@ -125,6 +125,30 @@ class CGameArea : public IGameArea
public:
class CChainIterator
{
CGameArea* m_area;
public:
CChainIterator(CGameArea* area) : m_area(area) {}
CGameArea& operator*() const { return *m_area; }
CGameArea* operator->() const { return m_area; }
CChainIterator& operator++() { m_area = m_area->GetNext(); return *this; }
bool operator!=(const CChainIterator& other) const { return m_area != other.m_area; }
bool operator==(const CChainIterator& other) const { return m_area == other.m_area; }
};
class CConstChainIterator
{
const CGameArea* m_area;
public:
CConstChainIterator(const CGameArea* area) : m_area(area) {}
const CGameArea& operator*() const { return *m_area; }
const CGameArea* operator->() const { return m_area; }
CConstChainIterator& operator++() { m_area = m_area->GetNext(); return *this; }
bool operator!=(const CConstChainIterator& other) const { return m_area != other.m_area; }
bool operator==(const CConstChainIterator& other) const { return m_area == other.m_area; }
};
class CAreaObjectList : public CObjectList
{
private: