Implement LegoCarBuildAnimPresenter::StreamingTickle() (#1109)

* Implement LegoCarBuildAnimPresenter::StreamingTickle and dependents

* Fix naming issue

* Address review comment

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
This commit is contained in:
jonschz
2024-10-06 01:20:45 +02:00
committed by GitHub
parent e6474b7fcd
commit 1a15981324
20 changed files with 216 additions and 15 deletions

View File

@@ -183,6 +183,7 @@ protected:
};
// FUNCTION: LEGO1 0x10002550
// FUNCTION: BETA10 0x100101c0
inline void Matrix4::ToQuaternion(Vector4& p_outQuat)
{
float trace = m_data[0][0] + m_data[1][1] + m_data[2][2];
@@ -223,6 +224,7 @@ inline void Matrix4::ToQuaternion(Vector4& p_outQuat)
}
// FUNCTION: LEGO1 0x10002710
// FUNCTION: BETA10 0x10010550
inline int Matrix4::FromQuaternion(const Vector4& p_vec)
{
float len = p_vec.LenSquared();

View File

@@ -48,7 +48,9 @@ public:
// FUNCTION: BETA10 0x10011780
const float* GetWorldDirection() const { return m_local2world[2]; }
// FUNCTION: BETA10 0x1004aa70
const float* GetWorldUp() const { return m_local2world[1]; }
OrientableROI* GetParentROI() const { return m_parentROI; }
void SetParentROI(OrientableROI* p_parentROI) { m_parentROI = p_parentROI; }

View File

@@ -3,6 +3,7 @@
#include <vec.h>
// FUNCTION: LEGO1 0x100a5b40
// FUNCTION: BETA10 0x10168127
void CalcLocalTransform(const Vector3& p_posVec, const Vector3& p_dirVec, const Vector3& p_upVec, Matrix4& p_outMatrix)
{
float x_axis[3], y_axis[3], z_axis[3];

View File

@@ -163,13 +163,18 @@ public:
return *this;
}
// SYNTHETIC: BETA10 0x10013460
// Vector3::operator[]
// FUNCTION: BETA10 0x10010890
float& operator[](int idx) { return m_data[idx]; }
// 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]; }
// FUNCTION: BETA10 0x1001d170
const float& operator[](int idx) const { return m_data[idx]; }
protected:
@@ -189,6 +194,8 @@ public:
// Example: LegoCameraController::GetWorldUp
// Vector3 however is a class that can mutate its underlying source, making
// initialization with a const source fundamentally incompatible.
// FUNCTION: BETA10 0x100109a0
Vector3(const float* p_data) : Vector2((float*) p_data) {}
// Note: virtual function overloads appear in the virtual table