mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 08:24:16 +00:00
Refactor various operator[]
based on BETA10 (#1110)
* Tidy up `operator[]` code * Add weird index operator for `FUN_1002ddc0` * Cleanup * Add Matrix4 BETA10 annotations, fix typo --------- Co-authored-by: jonschz <jonschz@users.noreply.github.com>
This commit is contained in:
@@ -163,14 +163,6 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
// There is another candidate for `Vector2::operator[]` at BETA10 0x10010890, which is called from only three
|
||||
// functions in BETA10:
|
||||
// - `Matrix4::FromQuaternion()`
|
||||
// - `Matrix4::ToQuaternion()`
|
||||
// - `UnknownMx4DPointFloat::FUN_100040a0()`
|
||||
// Maybe there is another subclass of `Vector4` involved that has the same VTABLE but a different `operator[]`.
|
||||
// It is also interesting that `Matrix4::operator[]` is located right above at BETA10 0x10010860.
|
||||
|
||||
// FUNCTION: BETA10 0x1001d140
|
||||
float& operator[](int idx) { return m_data[idx]; }
|
||||
|
||||
@@ -416,6 +408,11 @@ public:
|
||||
m_data[3] = p_value;
|
||||
} // vtable+0x84
|
||||
|
||||
float& operator[](int idx) { return m_data[idx]; }
|
||||
|
||||
// FUNCTION: BETA10 0x10010890
|
||||
const float& operator[](int idx) const { return m_data[idx]; }
|
||||
|
||||
friend class Mx4DPointFloat;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user