Implement/match more functions

This commit is contained in:
Christian Semmler
2023-10-19 16:31:26 -04:00
parent fe40cbb772
commit b77b3b3568
3 changed files with 31 additions and 6 deletions

View File

@@ -105,6 +105,14 @@ void MxRegion::vtable1c()
// TODO
}
// OFFSET: LEGO1 0x100c4c90
MxRegionTopBottom::MxRegionTopBottom(MxS32 p_top, MxS32 p_bottom)
{
m_top = p_top;
m_bottom = p_bottom;
m_leftRightList = new MxRegionLeftRightList;
}
// OFFSET: LEGO1 0x100c50e0
MxRegionTopBottom::MxRegionTopBottom(MxRect32 &p_rect)
{
@@ -122,8 +130,16 @@ void MxRegionTopBottom::FUN_100c5280(MxS32 p_left, MxS32 p_right)
}
// OFFSET: LEGO1 0x100c55d0 STUB
// OFFSET: LEGO1 0x100c55d0
MxRegionTopBottom *MxRegionTopBottom::Clone()
{
return new MxRegionTopBottom(MxRect32());
MxRegionTopBottom *clone = new MxRegionTopBottom(m_top, m_bottom);
MxRegionLeftRightListCursor cursor(m_leftRightList);
MxRegionLeftRight *leftRight;
while (cursor.Next(leftRight))
clone->m_leftRightList->Append(leftRight->Clone());
return clone;
}

View File

@@ -9,14 +9,15 @@
// SIZE 0x0c
struct MxRegionTopBottom
{
MxS32 m_top;
MxS32 m_bottom;
MxRegionLeftRightList *m_leftRightList;
MxRegionTopBottom(MxRect32 &p_rect);
MxRegionTopBottom(MxS32 m_top, MxS32 m_bottom);
MxRegionTopBottom *Clone();
void FUN_100c5280(MxS32 p_left, MxS32 p_right);
MxS32 m_top;
MxS32 m_bottom;
MxRegionLeftRightList *m_leftRightList;
};
// SIZE 0x08
@@ -28,6 +29,11 @@ struct MxRegionLeftRight
m_right = p_right;
}
MxRegionLeftRight *Clone()
{
return new MxRegionLeftRight(m_left, m_right);
}
MxS32 m_left;
MxS32 m_right;
};

View File

@@ -47,4 +47,7 @@ public:
// SIZE 0x18
class MxRegionLeftRightList : public MxRegionLeftRightListParent {};
// VTABLE 0x100dcc10
typedef MxListCursorChildChild<MxRegionLeftRight*> MxRegionLeftRightListCursor;
#endif // MXREGIONLIST_H