Add BETA annotations

This commit is contained in:
Christian Semmler 2025-02-26 19:21:31 -07:00
parent a2325a9cb2
commit 2703bac451
2 changed files with 34 additions and 8 deletions

View File

@ -13,13 +13,19 @@ class MxSegment {
MxS32 m_max; // 0x04 MxS32 m_max; // 0x04
public: public:
// FUNCTION: BETA10 0x1014c360
MxSegment(MxS32 p_min, MxS32 p_max) MxSegment(MxS32 p_min, MxS32 p_max)
{ {
m_min = p_min; m_min = p_min;
m_max = p_max; m_max = p_max;
} }
// FUNCTION: BETA10 0x1014b910
MxS32 GetMin() { return m_min; } MxS32 GetMin() { return m_min; }
// FUNCTION: BETA10 0x1014b930
MxS32 GetMax() { return m_max; } MxS32 GetMax() { return m_max; }
MxSegment* Clone() { return new MxSegment(m_min, m_max); } MxSegment* Clone() { return new MxSegment(m_min, m_max); }
MxBool Combine(MxSegment& p_seg); MxBool Combine(MxSegment& p_seg);
MxBool Adjacent(MxSegment& p_seg) { return m_max == p_seg.m_min || m_min == p_seg.m_max; } MxBool Adjacent(MxSegment& p_seg) { return m_max == p_seg.m_min || m_min == p_seg.m_max; }
@ -79,10 +85,18 @@ class MxSpan {
public: public:
MxSpan(MxS32 p_min, MxS32 p_max); MxSpan(MxS32 p_min, MxS32 p_max);
MxSpan(MxRect32& p_rect); MxSpan(MxRect32& p_rect);
// FUNCTION: BETA10 0x1014b0f0
~MxSpan() { delete m_segList; } ~MxSpan() { delete m_segList; }
// FUNCTION: BETA10 0x1014b3b0
MxS32 GetMin() { return m_min; } MxS32 GetMin() { return m_min; }
void SetMin(MxS32 p_min) { m_min = p_min; } void SetMin(MxS32 p_min) { m_min = p_min; }
// FUNCTION: BETA10 0x1014b3f0
MxS32 GetMax() { return m_max; } MxS32 GetMax() { return m_max; }
void SetMax(MxS32 p_max) { m_max = p_max; } void SetMax(MxS32 p_max) { m_max = p_max; }
MxSpan* Clone(); MxSpan* Clone();
void Compact(); void Compact();
@ -98,6 +112,9 @@ class MxSpan {
} }
MxBool operator!=(MxSpan& p_span) { return !operator==(p_span); } MxBool operator!=(MxSpan& p_span) { return !operator==(p_span); }
friend class MxRegionCursor; friend class MxRegionCursor;
// SYNTHETIC: BETA10 0x1014b0b0
// MxSpan::`scalar deleting destructor'
}; };
// VTABLE: LEGO1 0x100dcb10 // VTABLE: LEGO1 0x100dcb10
@ -162,12 +179,14 @@ class MxRegion : public MxCore {
virtual MxBool Intersects(MxRect32& p_rect); // vtable+0x1c virtual MxBool Intersects(MxRect32& p_rect); // vtable+0x1c
// FUNCTION: LEGO1 0x100c3660 // FUNCTION: LEGO1 0x100c3660
// FUNCTION: BETA10 0x1014b1d0
virtual MxBool IsEmpty() { return m_spanList->GetNumElements() == 0; } // vtable+0x20 virtual MxBool IsEmpty() { return m_spanList->GetNumElements() == 0; } // vtable+0x20
void Compact(); void Compact();
friend class MxRegionCursor; friend class MxRegionCursor;
// SYNTHETIC: LEGO1 0x100c3670 // SYNTHETIC: LEGO1 0x100c3670
// SYNTHETIC: BETA10 0x1014b230
// MxRegion::`scalar deleting destructor' // MxRegion::`scalar deleting destructor'
}; };
@ -531,4 +550,10 @@ class MxRegionSanityCheck {
// TEMPLATE: BETA10 0x1014d200 // TEMPLATE: BETA10 0x1014d200
// MxList<MxSpan *>::DeleteEntry // MxList<MxSpan *>::DeleteEntry
// TEMPLATE: BETA10 0x1014b210
// MxList<MxSpan *>::GetNumElements
// TEMPLATE: BETA10 0x1014c910
// ?Next@?$MxListCursor@PAVMxSegment@@@@QAEEXZ
#endif // __MXREGION_H #endif // __MXREGION_H

View File

@ -16,12 +16,11 @@ MxRegion::MxRegion()
} }
// FUNCTION: LEGO1 0x100c3690 // FUNCTION: LEGO1 0x100c3690
// FUNCTION: BETA10 0x10148fe8
MxRegion::~MxRegion() MxRegion::~MxRegion()
{ {
if (m_spanList) {
delete m_spanList; delete m_spanList;
} }
}
// FUNCTION: LEGO1 0x100c3700 // FUNCTION: LEGO1 0x100c3700
// FUNCTION: BETA10 0x1014907a // FUNCTION: BETA10 0x1014907a
@ -85,6 +84,7 @@ void MxRegion::AddRect(MxRect32& p_rect)
} }
// FUNCTION: LEGO1 0x100c3e20 // FUNCTION: LEGO1 0x100c3e20
// FUNCTION: BETA10 0x10149535
MxBool MxRegion::Intersects(MxRect32& p_rect) MxBool MxRegion::Intersects(MxRect32& p_rect)
{ {
if (!m_boundingRect.IntersectsWith(p_rect)) { if (!m_boundingRect.IntersectsWith(p_rect)) {
@ -424,11 +424,7 @@ void MxSpan::AddSegment(MxS32 p_min, MxS32 p_max)
; ;
} }
if (!a.HasMatch()) { if (a.HasMatch()) {
MxSegment* copy = new MxSegment(p_min, p_max);
m_segList->Append(copy);
}
else {
if (p_min > segment->GetMin()) { if (p_min > segment->GetMin()) {
p_min = segment->GetMin(); p_min = segment->GetMin();
} }
@ -458,6 +454,10 @@ void MxSpan::AddSegment(MxS32 p_min, MxS32 p_max)
m_segList->Append(copy); m_segList->Append(copy);
} }
} }
else {
MxSegment* copy = new MxSegment(p_min, p_max);
m_segList->Append(copy);
}
} }
// FUNCTION: LEGO1 0x100c55d0 // FUNCTION: LEGO1 0x100c55d0
@ -476,6 +476,7 @@ MxSpan* MxSpan::Clone()
} }
// FUNCTION: LEGO1 0x100c57b0 // FUNCTION: LEGO1 0x100c57b0
// FUNCTION: BETA10 0x1014aa46
MxBool MxSpan::IntersectsH(MxRect32& p_rect) MxBool MxSpan::IntersectsH(MxRect32& p_rect)
{ {
MxSegmentListCursor cursor(m_segList); MxSegmentListCursor cursor(m_segList);