Implement/match Act3Brickster::FUN_10042300 (#1238)

* Implement/match `Act3Brickster::FUN_10042300`

* Add comment about assignment operator

* Add another comment

* Fix

* add back BETA annotation
This commit is contained in:
Christian Semmler
2024-12-17 15:16:00 -07:00
committed by GitHub
parent 66e3c9a2e1
commit 90c687bde0
7 changed files with 188 additions and 68 deletions

View File

@@ -920,68 +920,6 @@ MxResult LegoPathController::FUN_10048310(
return FAILURE;
}
// FUNCTION: LEGO1 0x10048c40
// FUNCTION: BETA10 0x1001cc90
inline MxU32 LegoPathCtrlEdge::FUN_10048c40(const Vector3& p_position)
{
MxFloat localc, local10;
MxU32 result = FALSE;
if (m_unk0x28[0] > 0.001 || m_unk0x28[0] < -0.001) {
localc = (p_position[0] - (*m_pointA)[0]) / m_unk0x28[0];
if (localc < 0 || localc > 1) {
return FALSE;
}
result = TRUE;
}
else {
if (p_position[0] > (*m_pointA)[0] + 0.001 || p_position[0] < (*m_pointA)[0] - 0.001) {
return FALSE;
}
}
if (m_unk0x28[1] > 0.001 || m_unk0x28[1] < -0.001) {
local10 = (p_position[1] - (*m_pointA)[1]) / m_unk0x28[1];
if (result) {
if (localc > local10 + 0.001 || localc < local10 - 0.001) {
return FALSE;
}
}
else {
result = TRUE;
localc = local10;
}
}
else {
if (p_position[1] > (*m_pointA)[1] + 0.001 || p_position[1] < (*m_pointA)[1] - 0.001) {
return FALSE;
}
}
if (m_unk0x28[2] > 0.001 || m_unk0x28[2] < -0.001) {
local10 = (p_position[2] - (*m_pointA)[2]) / m_unk0x28[2];
if (result) {
if (localc > local10 + 0.001 || localc < local10 - 0.001) {
return FALSE;
}
}
else {
return TRUE;
}
}
else {
if (p_position[2] > (*m_pointA)[2] + 0.001 || p_position[2] < (*m_pointA)[2] - 0.001) {
return FALSE;
}
}
return TRUE;
}
// FUNCTION: LEGO1 0x1004a240
// FUNCTION: BETA10 0x100b9160
MxS32 LegoPathController::FUN_1004a240(