mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
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:

committed by
GitHub

parent
66e3c9a2e1
commit
90c687bde0
@@ -19,6 +19,12 @@ struct LegoEdge {
|
||||
|
||||
LegoResult FUN_1002ddc0(LegoWEEdge& p_face, Vector3& p_point);
|
||||
|
||||
// FUNCTION: BETA10 0x1001cb80
|
||||
Vector3* GetPointA() { return m_pointA; }
|
||||
|
||||
// FUNCTION: BETA10 0x1001cbb0
|
||||
Vector3* GetPointB() { return m_pointB; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1009a4a0
|
||||
// LegoEdge::`scalar deleting destructor'
|
||||
|
||||
|
@@ -93,6 +93,8 @@ public:
|
||||
// FUNCTION: BETA10 0x1001cc60
|
||||
LegoU32 GetMask0x03() { return m_flags & (c_bit1 | c_bit2); }
|
||||
|
||||
inline LegoU32 FUN_10048c40(const Vector3& p_position);
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1009a6c0
|
||||
// LegoUnknown100db7f4::`scalar deleting destructor'
|
||||
|
||||
@@ -101,4 +103,66 @@ public:
|
||||
float m_unk0x3c; // 0x3c
|
||||
};
|
||||
|
||||
// FUNCTION: LEGO1 0x10048c40
|
||||
// FUNCTION: BETA10 0x1001cc90
|
||||
inline LegoU32 LegoUnknown100db7f4::FUN_10048c40(const Vector3& p_position)
|
||||
{
|
||||
LegoFloat localc, local10;
|
||||
LegoU32 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;
|
||||
}
|
||||
|
||||
#endif // __LEGOUNKNOWN100DB7F4_H
|
||||
|
Reference in New Issue
Block a user