mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-25 01:14:19 +00:00
WIP
This commit is contained in:
@@ -92,6 +92,7 @@ public:
|
|||||||
void SetValue(T p_obj);
|
void SetValue(T p_obj);
|
||||||
void Head() { m_match = m_list->m_first; }
|
void Head() { m_match = m_list->m_first; }
|
||||||
void Reset() { m_match = NULL; }
|
void Reset() { m_match = NULL; }
|
||||||
|
void Prepend(T p_newobj);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MxList<T> *m_list;
|
MxList<T> *m_list;
|
||||||
@@ -229,4 +230,11 @@ inline void MxListCursor<T>::SetValue(T p_obj)
|
|||||||
m_match->m_obj = p_obj;
|
m_match->m_obj = p_obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
inline void MxListCursor<T>::Prepend(T p_newobj)
|
||||||
|
{
|
||||||
|
if (m_match)
|
||||||
|
m_list->_InsertEntry(p_newobj, m_match->m_prev, m_match);
|
||||||
|
}
|
||||||
|
|
||||||
#endif // MXLIST_H
|
#endif // MXLIST_H
|
||||||
|
|||||||
@@ -35,10 +35,69 @@ void MxRegion::Reset()
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100c3750 STUB
|
// OFFSET: LEGO1 0x100c3750
|
||||||
void MxRegion::vtable18(MxRect32 &p_rect)
|
void MxRegion::vtable18(MxRect32 &p_rect)
|
||||||
{
|
{
|
||||||
// TODO
|
MxRect32 rectCopy;
|
||||||
|
rectCopy.m_top = p_rect.m_top;
|
||||||
|
rectCopy.m_left = p_rect.m_left;
|
||||||
|
rectCopy.m_bottom = p_rect.m_bottom;
|
||||||
|
rectCopy.m_right = p_rect.m_right;
|
||||||
|
|
||||||
|
MxRegionListCursor cursor(m_list);
|
||||||
|
|
||||||
|
if (rectCopy.m_left < rectCopy.m_right) {
|
||||||
|
MxRegionTopBottom *topBottom;
|
||||||
|
while (rectCopy.m_top < rectCopy.m_bottom && cursor.Next(topBottom)) {
|
||||||
|
if (topBottom->m_top >= rectCopy.m_bottom) {
|
||||||
|
MxRegionTopBottom *newTopBottom = new MxRegionTopBottom(rectCopy);
|
||||||
|
cursor.Prepend(newTopBottom);
|
||||||
|
rectCopy.m_top = rectCopy.m_bottom;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (rectCopy.m_top < topBottom->m_bottom) {
|
||||||
|
if (rectCopy.m_top < topBottom->m_top) {
|
||||||
|
MxRect32 topBottomRect(rectCopy.m_left, rectCopy.m_top, rectCopy.m_right, topBottom->m_top);
|
||||||
|
MxRegionTopBottom *newTopBottom = new MxRegionTopBottom(topBottomRect);
|
||||||
|
cursor.Prepend(newTopBottom);
|
||||||
|
rectCopy.m_top = topBottom->m_top;
|
||||||
|
}
|
||||||
|
else if (topBottom->m_top < rectCopy.m_top) {
|
||||||
|
MxRegionTopBottom *newTopBottom = topBottom->Clone();
|
||||||
|
newTopBottom->m_bottom = rectCopy.m_top;
|
||||||
|
topBottom->m_top = rectCopy.m_top;
|
||||||
|
cursor.Prepend(newTopBottom);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rectCopy.m_bottom < topBottom->m_top) {
|
||||||
|
MxRegionTopBottom *newTopBottom = topBottom->Clone();
|
||||||
|
newTopBottom->m_bottom = rectCopy.m_bottom;
|
||||||
|
topBottom->m_top = rectCopy.m_bottom;
|
||||||
|
newTopBottom->FUN_100c5280(rectCopy.m_left, rectCopy.m_right);
|
||||||
|
cursor.Prepend(newTopBottom);
|
||||||
|
rectCopy.m_top = rectCopy.m_bottom;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
topBottom->FUN_100c5280(rectCopy.m_left, rectCopy.m_right);
|
||||||
|
rectCopy.m_top = topBottom->m_top;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rectCopy.m_right <= rectCopy.m_left)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rectCopy.m_left < rectCopy.m_right && rectCopy.m_top < rectCopy.m_bottom) {
|
||||||
|
MxRegionTopBottom *newTopBottom = new MxRegionTopBottom(rectCopy);
|
||||||
|
m_list->OtherAppend(newTopBottom);
|
||||||
|
}
|
||||||
|
|
||||||
|
m_rect.m_left = m_rect.m_left <= p_rect.m_left ? m_rect.m_left : p_rect.m_left;
|
||||||
|
m_rect.m_top = m_rect.m_top <= p_rect.m_top ? m_rect.m_top : p_rect.m_top;
|
||||||
|
m_rect.m_right = m_rect.m_right <= p_rect.m_right ? p_rect.m_right : m_rect.m_right;
|
||||||
|
m_rect.m_bottom = m_rect.m_bottom <= p_rect.m_bottom ? p_rect.m_bottom : m_rect.m_bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100c3e20 STUB
|
// OFFSET: LEGO1 0x100c3e20 STUB
|
||||||
@@ -46,3 +105,22 @@ void MxRegion::vtable1c()
|
|||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100c50e0 STUB
|
||||||
|
MxRegionTopBottom::MxRegionTopBottom(MxRect32 &p_rect)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100c5280 STUB
|
||||||
|
void MxRegionTopBottom::FUN_100c5280(MxS32 p_left, MxS32 p_right)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100c55d0 STUB
|
||||||
|
MxRegionTopBottom *MxRegionTopBottom::Clone()
|
||||||
|
{
|
||||||
|
return new MxRegionTopBottom(MxRect32());
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,11 @@ struct MxRegionTopBottom
|
|||||||
MxS32 m_top;
|
MxS32 m_top;
|
||||||
MxS32 m_bottom;
|
MxS32 m_bottom;
|
||||||
MxRegionLeftRightList *m_leftRightList;
|
MxRegionLeftRightList *m_leftRightList;
|
||||||
|
|
||||||
|
MxRegionTopBottom(MxRect32 &p_rect);
|
||||||
|
|
||||||
|
MxRegionTopBottom *Clone();
|
||||||
|
void FUN_100c5280(MxS32 p_left, MxS32 p_right);
|
||||||
};
|
};
|
||||||
|
|
||||||
// SIZE 0x08
|
// SIZE 0x08
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ public:
|
|||||||
// SIZE 0x18
|
// SIZE 0x18
|
||||||
class MxRegionList : public MxRegionListParent {};
|
class MxRegionList : public MxRegionListParent {};
|
||||||
|
|
||||||
|
// VTABLE 0x100dcb88
|
||||||
|
typedef MxListCursorChildChild<MxRegionTopBottom*> MxRegionListCursor;
|
||||||
|
|
||||||
// VTABLE 0x100dcc70
|
// VTABLE 0x100dcc70
|
||||||
// SIZE 0x18
|
// SIZE 0x18
|
||||||
class MxRegionLeftRightListParent : public MxList<MxRegionLeftRight*>
|
class MxRegionLeftRightListParent : public MxList<MxRegionLeftRight*>
|
||||||
|
|||||||
Reference in New Issue
Block a user