mirror of
https://github.com/isledecomp/isle.git
synced 2025-04-21 02:50:52 -04:00
Implement/match LegoCameraController::FUN_10012290 and FUN_10012320 (#969)
This commit is contained in:
parent
085bdbe74b
commit
689178f689
3 changed files with 26 additions and 7 deletions
LEGO1
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue