Annotations

This commit is contained in:
Christian Semmler 2024-12-06 09:23:25 -07:00
parent c568846611
commit 174a7aa5b0
5 changed files with 82 additions and 30 deletions

View File

@ -223,14 +223,71 @@ class LegoPathController : public MxCore {
// SYNTHETIC: LEGO1 0x10047ae0 // SYNTHETIC: LEGO1 0x10047ae0
// LegoUnknown100db7f4::~LegoUnknown100db7f4 // LegoUnknown100db7f4::~LegoUnknown100db7f4
// TEMPLATE: LEGO1 0x10048f00
// list<LegoBoundaryEdge,allocator<LegoBoundaryEdge> >::begin
// TEMPLATE: LEGO1 0x10048f10
// list<LegoBoundaryEdge,allocator<LegoBoundaryEdge> >::insert
// TEMPLATE: LEGO1 0x10048f70 // TEMPLATE: LEGO1 0x10048f70
// list<LegoBoundaryEdge,allocator<LegoBoundaryEdge> >::erase // list<LegoBoundaryEdge,allocator<LegoBoundaryEdge> >::erase
// TEMPLATE: LEGO1 0x10048fc0
// _Tree<LegoPathCtrlEdge *,LegoPathCtrlEdge *,set<LegoPathCtrlEdge *,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Kfn,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Tree<LegoPathCtrlEdge *,LegoPathCtrlEdge *,set<LegoPathCtrlEdge *,Le
// TEMPLATE: LEGO1 0x10049160
// _Tree<LegoPathCtrlEdge *,LegoPathCtrlEdge *,set<LegoPathCtrlEdge *,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Kfn,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::erase
// TEMPLATE: LEGO1 0x10049290
// _Tree<LegoPathCtrlEdge *,LegoPathCtrlEdge *,set<LegoPathCtrlEdge *,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Kfn,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::find
// TEMPLATE: LEGO1 0x100492f0
// _Tree<LegoPathCtrlEdge *,LegoPathCtrlEdge *,set<LegoPathCtrlEdge *,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Kfn,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Copy
// TEMPLATE: LEGO1 0x10049410
// list<LegoBEWithFloat,allocator<LegoBEWithFloat> >::insert
// TEMPLATE: LEGO1 0x10049470
// list<LegoBEWithFloat,allocator<LegoBEWithFloat> >::_Buynode
// TEMPLATE: LEGO1 0x100494a0
// _Tree<LegoBEWithFloat *,LegoBEWithFloat *,multiset<LegoBEWithFloat *,LegoBEWithFloatComparator,allocator<LegoBEWithFloat *> >::_Kfn,LegoBEWithFloatComparator,allocator<LegoBEWithFloat *> >::iterator::_Inc
// TEMPLATE: LEGO1 0x100495b0
// _Tree<LegoBEWithFloat *,LegoBEWithFloat *,multiset<LegoBEWithFloat *,LegoBEWithFloatComparator,allocator<LegoBEWithFloat *> >::_Kfn,LegoBEWithFloatComparator,allocator<LegoBEWithFloat *> >::insert
// TEMPLATE: LEGO1 0x10049840
// _Tree<LegoBEWithFloat *,LegoBEWithFloat *,multiset<LegoBEWithFloat *,LegoBEWithFloatComparator,allocator<LegoBEWithFloat *> >::_Kfn,LegoBEWithFloatComparator,allocator<LegoBEWithFloat *> >::iterator::_Dec
// TEMPLATE: LEGO1 0x10049890
// _Tree<LegoBEWithFloat *,LegoBEWithFloat *,multiset<LegoBEWithFloat *,LegoBEWithFloatComparator,allocator<LegoBEWithFloat *> >::_Kfn,LegoBEWithFloatComparator,allocator<LegoBEWithFloat *> >::erase
// TEMPLATE: LEGO1 0x10049cf0
// _Tree<LegoBEWithFloat *,LegoBEWithFloat *,multiset<LegoBEWithFloat *,LegoBEWithFloatComparator,allocator<LegoBEWithFloat *> >::_Kfn,LegoBEWithFloatComparator,allocator<LegoBEWithFloat *> >::_Buynode
// TEMPLATE: LEGO1 0x10049d50
// _Tree<LegoBEWithFloat *,LegoBEWithFloat *,multiset<LegoBEWithFloat *,LegoBEWithFloatComparator,allocator<LegoBEWithFloat *> >::_Kfn,LegoBEWithFloatComparator,allocator<LegoBEWithFloat *> >::_Init
// TEMPLATE: LEGO1 0x10049e00
// _Tree<LegoBEWithFloat *,LegoBEWithFloat *,multiset<LegoBEWithFloat *,LegoBEWithFloatComparator,allocator<LegoBEWithFloat *> >::_Kfn,LegoBEWithFloatComparator,allocator<LegoBEWithFloat *> >::_Insert
// TEMPLATE: LEGO1 0x1004a090
// _Tree<LegoBEWithFloat *,LegoBEWithFloat *,multiset<LegoBEWithFloat *,LegoBEWithFloatComparator,allocator<LegoBEWithFloat *> >::_Kfn,LegoBEWithFloatComparator,allocator<LegoBEWithFloat *> >::_Lrotate
// TEMPLATE: LEGO1 0x1004a0f0
// _Tree<LegoBEWithFloat *,LegoBEWithFloat *,multiset<LegoBEWithFloat *,LegoBEWithFloatComparator,allocator<LegoBEWithFloat *> >::_Kfn,LegoBEWithFloatComparator,allocator<LegoBEWithFloat *> >::_Rrotate
// TEMPLATE: LEGO1 0x1004a760
// _Construct
// TEMPLATE: LEGO1 0x1004a780 // TEMPLATE: LEGO1 0x1004a780
// _Construct // _Construct
// GLOBAL: LEGO1 0x100f4360 // GLOBAL: LEGO1 0x100f4360
// _Tree<LegoPathCtrlEdge *,LegoPathCtrlEdge *,set<LegoPathCtrlEdge *,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Kfn,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Nil // _Tree<LegoPathCtrlEdge *,LegoPathCtrlEdge *,set<LegoPathCtrlEdge *,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Kfn,LegoPathCtrlEdgeCompare,allocator<LegoPathCtrlEdge *> >::_Nil
// GLOBAL: LEGO1 0x100f4364
// _Tree<LegoBEWithFloat *,LegoBEWithFloat *,multiset<LegoBEWithFloat *,LegoBEWithFloatComparator,allocator<LegoBEWithFloat *> >::_Kfn,LegoBEWithFloatComparator,allocator<LegoBEWithFloat *> >::_Nil
// clang-format on // clang-format on
#endif // LEGOPATHCONTROLLER_H #endif // LEGOPATHCONTROLLER_H

View File

@ -27,8 +27,8 @@ struct LegoBoundaryEdge {
}; };
// SIZE 0x10 // SIZE 0x10
struct LegoBoundaryEdgeWithFloat { struct LegoBEWithFloat {
LegoBoundaryEdgeWithFloat() LegoBEWithFloat()
{ {
m_edge = NULL; m_edge = NULL;
m_boundary = NULL; m_boundary = NULL;
@ -37,7 +37,7 @@ struct LegoBoundaryEdgeWithFloat {
} }
// FUNCTION: BETA10 0x100bd9a0 // FUNCTION: BETA10 0x100bd9a0
LegoBoundaryEdgeWithFloat(LegoPathCtrlEdge* p_edge, LegoPathBoundary* p_boundary, MxFloat p_unk0x0c) LegoBEWithFloat(LegoPathCtrlEdge* p_edge, LegoPathBoundary* p_boundary, MxFloat p_unk0x0c)
{ {
m_edge = p_edge; m_edge = p_edge;
m_boundary = p_boundary; m_boundary = p_boundary;
@ -46,12 +46,7 @@ struct LegoBoundaryEdgeWithFloat {
} }
// FUNCTION: BETA10 0x100bd9f0 // FUNCTION: BETA10 0x100bd9f0
LegoBoundaryEdgeWithFloat( LegoBEWithFloat(LegoPathCtrlEdge* p_edge, LegoPathBoundary* p_boundary, LegoBEWithFloat* p_next, MxFloat p_unk0x0c)
LegoPathCtrlEdge* p_edge,
LegoPathBoundary* p_boundary,
LegoBoundaryEdgeWithFloat* p_next,
MxFloat p_unk0x0c
)
{ {
m_edge = p_edge; m_edge = p_edge;
m_boundary = p_boundary; m_boundary = p_boundary;
@ -59,24 +54,24 @@ struct LegoBoundaryEdgeWithFloat {
m_unk0x0c = p_unk0x0c; m_unk0x0c = p_unk0x0c;
} }
LegoPathCtrlEdge* m_edge; // 0x00 LegoPathCtrlEdge* m_edge; // 0x00
LegoPathBoundary* m_boundary; // 0x04 LegoPathBoundary* m_boundary; // 0x04
LegoBoundaryEdgeWithFloat* m_next; // 0x08 LegoBEWithFloat* m_next; // 0x08
MxFloat m_unk0x0c; // 0x0c MxFloat m_unk0x0c; // 0x0c
int operator==(LegoBoundaryEdgeWithFloat) const { return 0; } int operator==(LegoBEWithFloat) const { return 0; }
int operator<(LegoBoundaryEdgeWithFloat) const { return 0; } int operator<(LegoBEWithFloat) const { return 0; }
}; };
struct LegoBoundaryEdgeWithFloatComparator { struct LegoBEWithFloatComparator {
// FUNCTION: BETA10 0x100bef80 // FUNCTION: BETA10 0x100bef80
bool operator()(LegoBoundaryEdgeWithFloat* const& p_a, LegoBoundaryEdgeWithFloat* const& p_b) const bool operator()(LegoBEWithFloat* const& p_a, LegoBEWithFloat* const& p_b) const
{ {
return p_a->m_unk0x0c < p_b->m_unk0x0c; return p_a->m_unk0x0c < p_b->m_unk0x0c;
} }
}; };
typedef multiset<LegoBoundaryEdgeWithFloat*, LegoBoundaryEdgeWithFloatComparator> LegoBoundaryEdgeWithFloatSet; typedef multiset<LegoBEWithFloat*, LegoBEWithFloatComparator> LegoBEWithFloatSet;
// SIZE 0x3c // SIZE 0x3c
struct LegoPathEdgeContainer : public list<LegoBoundaryEdge> { struct LegoPathEdgeContainer : public list<LegoBoundaryEdge> {

View File

@ -755,12 +755,12 @@ MxResult LegoPathController::FUN_10048310(
p_grec->SetBit1(TRUE); p_grec->SetBit1(TRUE);
} }
else { else {
list<LegoBoundaryEdgeWithFloat> boundaryList; list<LegoBEWithFloat> boundaryList;
list<LegoBoundaryEdgeWithFloat>::iterator boundaryListIt; list<LegoBEWithFloat>::iterator boundaryListIt;
LegoBoundaryEdgeWithFloatSet boundarySet; LegoBEWithFloatSet boundarySet;
LegoBoundaryEdgeWithFloatSet::iterator boundarySetItA; LegoBEWithFloatSet::iterator boundarySetItA;
LegoBoundaryEdgeWithFloatSet::iterator boundarySetItB; LegoBEWithFloatSet::iterator boundarySetItB;
LegoPathCtrlEdgeSet pathCtrlEdgeSet(m_pfsE); LegoPathCtrlEdgeSet pathCtrlEdgeSet(m_pfsE);
@ -787,7 +787,7 @@ MxResult LegoPathController::FUN_10048310(
} }
else { else {
boundaryList.push_back( boundaryList.push_back(
LegoBoundaryEdgeWithFloat(edge, p_oldBoundary, edge->DistanceToMidpoint(p_oldPosition)) LegoBEWithFloat(edge, p_oldBoundary, edge->DistanceToMidpoint(p_oldPosition))
); );
boundarySet.insert(&boundaryList.back()); boundarySet.insert(&boundaryList.back());
} }
@ -798,8 +798,8 @@ MxResult LegoPathController::FUN_10048310(
} }
if (!p_grec->GetBit1()) { if (!p_grec->GetBit1()) {
while (pathCtrlEdgeSet.size() != 0) { while (pathCtrlEdgeSet.size() > 0) {
LegoBoundaryEdgeWithFloat edgeWithFloat; LegoBEWithFloat edgeWithFloat;
MxFloat local70 = 999999.0f; MxFloat local70 = 999999.0f;
boundarySetItA = boundarySetItB = boundarySet.begin(); boundarySetItA = boundarySetItB = boundarySet.begin();
@ -822,7 +822,7 @@ MxResult LegoPathController::FUN_10048310(
if (bOther == p_newBoundary) { if (bOther == p_newBoundary) {
shouldRemove = FALSE; shouldRemove = FALSE;
LegoBoundaryEdgeWithFloat* pfs = *boundarySetItA; LegoBEWithFloat* pfs = *boundarySetItA;
assert(pfs); assert(pfs);
float dist = pfs->m_edge->DistanceToMidpoint(p_newPosition) + pfs->m_unk0x0c; float dist = pfs->m_edge->DistanceToMidpoint(p_newPosition) + pfs->m_unk0x0c;
@ -855,8 +855,7 @@ MxResult LegoPathController::FUN_10048310(
if (dist < local70) { if (dist < local70) {
local70 = dist; local70 = dist;
edgeWithFloat = edgeWithFloat = LegoBEWithFloat(edge, bOther, *boundarySetItA, dist);
LegoBoundaryEdgeWithFloat(edge, bOther, *boundarySetItA, dist);
} }
} }
} }

View File

@ -81,7 +81,7 @@ struct LegoUnknown100db7f4 : public LegoEdge {
Mx3DPointFloat point2(*p_other.m_pointA); Mx3DPointFloat point2(*p_other.m_pointA);
((Vector3&) point1).Add(*m_pointB); ((Vector3&) point1).Add(*m_pointB);
((Vector3&) point1).Mul(0.5f); ((Vector3&) point1).Mul(0.5f);
((Vector3&) point2).Add(*m_pointB); ((Vector3&) point2).Add(*p_other.m_pointB);
((Vector3&) point2).Mul(0.5f); ((Vector3&) point2).Mul(0.5f);
((Vector3&) point1).Sub(point2); ((Vector3&) point1).Sub(point2);
return sqrt(point1.LenSquared()); return sqrt(point1.LenSquared());

View File

@ -26,6 +26,7 @@ class Mx3DPointFloat : public Vector3 {
// FUNCTION: BETA10 0x10011600 // FUNCTION: BETA10 0x10011600
Mx3DPointFloat(const Mx3DPointFloat& p_other) : Vector3(m_elements) { EqualsImpl(p_other.m_data); } Mx3DPointFloat(const Mx3DPointFloat& p_other) : Vector3(m_elements) { EqualsImpl(p_other.m_data); }
// FUNCTION: LEGO1 0x10048ed0
// FUNCTION: BETA10 0x100151e0 // FUNCTION: BETA10 0x100151e0
Mx3DPointFloat(const Vector3& p_other) : Vector3(m_elements) { EqualsImpl(p_other.m_data); } Mx3DPointFloat(const Vector3& p_other) : Vector3(m_elements) { EqualsImpl(p_other.m_data); }