Add weird index operator for FUN_1002ddc0

This commit is contained in:
jonschz 2024-10-06 13:58:12 +02:00
parent 8960d8fa5b
commit e1491ae407
2 changed files with 8 additions and 4 deletions

View File

@ -25,9 +25,9 @@ struct LegoUnknown100db7f4 : public LegoEdge {
LegoResult FUN_1002ddc0(LegoWEEdge& p_f, Vector3& p_point)
{
if (p_f.IsEqual(*m_faceA)) {
p_point[0] = -m_unk0x28[0];
p_point[1] = -m_unk0x28[1];
p_point[2] = -m_unk0x28[2];
p_point[0] = -m_unk0x28.index_operator(0);
p_point[1] = -m_unk0x28.index_operator(1);
p_point[2] = -m_unk0x28.index_operator(2);
}
else {
// clang-format off

View File

@ -35,8 +35,12 @@ class Mx3DPointFloat : public Vector3 {
// FUNCTION: BETA10 0x10013460
float& operator[](int idx) { return m_data[idx]; }
// According to the PDB, BETA10 will not link this one if it is never used
// const float& operator[](int idx) const { return m_data[idx]; }
// only used by LegoUnknown100db7f4::FUN_1002ddc0() for some unknown reason
// FUNCTION: BETA10 0x100373c0
const float& operator[](int idx) const { return m_data[idx]; }
float& index_operator(int idx) { return m_data[idx]; }
// SYNTHETIC: LEGO1 0x10010c00
// Mx3DPointFloat::operator=