mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-22 16:04:17 +00:00
Implement/match LegoCameraController::FUN_10012290 and FUN_10012320 (#969)
This commit is contained in:

committed by
GitHub

parent
085bdbe74b
commit
689178f689
@@ -36,8 +36,8 @@ public:
|
||||
virtual MxResult Create(); // vtable+0x44
|
||||
|
||||
void SetWorldTransform(const Vector3& p_at, const Vector3& p_dir, const Vector3& p_up);
|
||||
void FUN_10012290(float);
|
||||
void FUN_10012320(MxFloat);
|
||||
void FUN_10012290(float p_angle);
|
||||
void FUN_10012320(float p_angle);
|
||||
void FUN_100123e0(const Matrix4& p_transform, MxU32 p_und);
|
||||
Mx3DPointFloat GetWorldUp();
|
||||
Mx3DPointFloat GetWorldLocation();
|
||||
|
@@ -124,15 +124,20 @@ void LegoCameraController::SetWorldTransform(const Vector3& p_at, const Vector3&
|
||||
m_matrix2 = m_matrix1;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10012290
|
||||
void LegoCameraController::FUN_10012290(float)
|
||||
// FUNCTION: LEGO1 0x10012290
|
||||
// FUNCTION: BETA10 0x10068c34
|
||||
void LegoCameraController::FUN_10012290(float p_angle)
|
||||
{
|
||||
m_matrix1 = m_matrix2;
|
||||
m_matrix1.RotateZ(p_angle);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10012320
|
||||
void LegoCameraController::FUN_10012320(MxFloat)
|
||||
// FUNCTION: LEGO1 0x10012320
|
||||
// FUNCTION: BETA10 0x10068c73
|
||||
void LegoCameraController::FUN_10012320(float p_angle)
|
||||
{
|
||||
// TODO
|
||||
m_matrix1 = m_matrix2;
|
||||
m_matrix1.RotateY(p_angle);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100123e0
|
||||
|
@@ -133,6 +133,20 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: BETA10 0x1001fd60
|
||||
inline void RotateY(const float& p_angle)
|
||||
{
|
||||
float s = sin(p_angle);
|
||||
float c = cos(p_angle);
|
||||
float matrix[4][4];
|
||||
memcpy(matrix, m_data, sizeof(float) * 16);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
m_data[i][0] = matrix[i][0] * c + matrix[i][2] * s;
|
||||
m_data[i][2] = matrix[i][2] * c - matrix[i][0] * s;
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: BETA10 0x1006ab10
|
||||
inline void RotateZ(const float& p_angle)
|
||||
{
|
||||
float s = sin(p_angle);
|
||||
|
Reference in New Issue
Block a user