mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-22 16:04:17 +00:00
Clear unknowns LegoCameraController
(#1647)
This commit is contained in:
@@ -38,17 +38,17 @@ public:
|
|||||||
virtual MxResult Create(); // vtable+0x44
|
virtual MxResult Create(); // vtable+0x44
|
||||||
|
|
||||||
void SetWorldTransform(const Vector3& p_at, const Vector3& p_dir, const Vector3& p_up);
|
void SetWorldTransform(const Vector3& p_at, const Vector3& p_dir, const Vector3& p_up);
|
||||||
void FUN_10012290(float p_angle);
|
void RotateZ(float p_angle);
|
||||||
void FUN_10012320(float p_angle);
|
void RotateY(float p_angle);
|
||||||
MxResult FUN_100123b0(Matrix4& p_matrix);
|
MxResult GetPointOfView(Matrix4& p_matrix);
|
||||||
void FUN_100123e0(const Matrix4& p_transform, MxU32 p_und);
|
void TransformPointOfView(const Matrix4& p_transform, MxU32 p_multiply);
|
||||||
Mx3DPointFloat GetWorldUp();
|
Mx3DPointFloat GetWorldUp();
|
||||||
Mx3DPointFloat GetWorldLocation();
|
Mx3DPointFloat GetWorldLocation();
|
||||||
Mx3DPointFloat GetWorldDirection();
|
Mx3DPointFloat GetWorldDirection();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MxMatrix m_matrix1; // 0x38
|
MxMatrix m_currentTransform; // 0x38
|
||||||
MxMatrix m_matrix2; // 0x80
|
MxMatrix m_originalTransform; // 0x80
|
||||||
};
|
};
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x10011f50
|
// SYNTHETIC: LEGO1 0x10011f50
|
||||||
|
@@ -426,7 +426,7 @@ void Helicopter::Animate(float p_time)
|
|||||||
v2 *= f2;
|
v2 *= f2;
|
||||||
v2 += v1;
|
v2 += v1;
|
||||||
|
|
||||||
m_world->GetCameraController()->FUN_100123e0(mat, 0);
|
m_world->GetCameraController()->TransformPointOfView(mat, 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (m_state->m_unk0x08 == 4) {
|
if (m_state->m_unk0x08 == 4) {
|
||||||
@@ -459,7 +459,7 @@ void Helicopter::FUN_100042a0(const Matrix4& p_matrix)
|
|||||||
// the typecast makes this function match for unknown reasons
|
// the typecast makes this function match for unknown reasons
|
||||||
Vector3 vec6((const float*) m_unk0x1a8[3]); // locala0 // esp+0x28
|
Vector3 vec6((const float*) m_unk0x1a8[3]); // locala0 // esp+0x28
|
||||||
|
|
||||||
m_world->GetCameraController()->FUN_100123b0(local48);
|
m_world->GetCameraController()->GetPointOfView(local48);
|
||||||
m_unk0x1a8.SetIdentity();
|
m_unk0x1a8.SetIdentity();
|
||||||
local90 = p_matrix;
|
local90 = p_matrix;
|
||||||
|
|
||||||
|
@@ -120,28 +120,28 @@ void LegoCameraController::OnMouseMove(MxU8 p_modifier, MxPoint32 p_point)
|
|||||||
// FUNCTION: LEGO1 0x10012260
|
// FUNCTION: LEGO1 0x10012260
|
||||||
void LegoCameraController::SetWorldTransform(const Vector3& p_at, const Vector3& p_dir, const Vector3& p_up)
|
void LegoCameraController::SetWorldTransform(const Vector3& p_at, const Vector3& p_dir, const Vector3& p_up)
|
||||||
{
|
{
|
||||||
CalcLocalTransform(p_at, p_dir, p_up, m_matrix1);
|
CalcLocalTransform(p_at, p_dir, p_up, m_currentTransform);
|
||||||
m_matrix2 = m_matrix1;
|
m_originalTransform = m_currentTransform;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10012290
|
// FUNCTION: LEGO1 0x10012290
|
||||||
// FUNCTION: BETA10 0x10068c34
|
// FUNCTION: BETA10 0x10068c34
|
||||||
void LegoCameraController::FUN_10012290(float p_angle)
|
void LegoCameraController::RotateZ(float p_angle)
|
||||||
{
|
{
|
||||||
m_matrix1 = m_matrix2;
|
m_currentTransform = m_originalTransform;
|
||||||
m_matrix1.RotateZ(p_angle);
|
m_currentTransform.RotateZ(p_angle);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10012320
|
// FUNCTION: LEGO1 0x10012320
|
||||||
// FUNCTION: BETA10 0x10068c73
|
// FUNCTION: BETA10 0x10068c73
|
||||||
void LegoCameraController::FUN_10012320(float p_angle)
|
void LegoCameraController::RotateY(float p_angle)
|
||||||
{
|
{
|
||||||
m_matrix1 = m_matrix2;
|
m_currentTransform = m_originalTransform;
|
||||||
m_matrix1.RotateY(p_angle);
|
m_currentTransform.RotateY(p_angle);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100123b0
|
// FUNCTION: LEGO1 0x100123b0
|
||||||
MxResult LegoCameraController::FUN_100123b0(Matrix4& p_matrix)
|
MxResult LegoCameraController::GetPointOfView(Matrix4& p_matrix)
|
||||||
{
|
{
|
||||||
if (m_lego3DView) {
|
if (m_lego3DView) {
|
||||||
ViewROI* pov = m_lego3DView->GetPointOfView();
|
ViewROI* pov = m_lego3DView->GetPointOfView();
|
||||||
@@ -156,7 +156,7 @@ MxResult LegoCameraController::FUN_100123b0(Matrix4& p_matrix)
|
|||||||
|
|
||||||
// FUNCTION: LEGO1 0x100123e0
|
// FUNCTION: LEGO1 0x100123e0
|
||||||
// FUNCTION: BETA10 0x10068cb2
|
// FUNCTION: BETA10 0x10068cb2
|
||||||
void LegoCameraController::FUN_100123e0(const Matrix4& p_transform, MxU32 p_und)
|
void LegoCameraController::TransformPointOfView(const Matrix4& p_transform, MxU32 p_multiply)
|
||||||
{
|
{
|
||||||
if (m_lego3DView != NULL) {
|
if (m_lego3DView != NULL) {
|
||||||
ViewROI* pov = m_lego3DView->GetPointOfView();
|
ViewROI* pov = m_lego3DView->GetPointOfView();
|
||||||
@@ -164,8 +164,8 @@ void LegoCameraController::FUN_100123e0(const Matrix4& p_transform, MxU32 p_und)
|
|||||||
if (pov != NULL) {
|
if (pov != NULL) {
|
||||||
MxMatrix mat;
|
MxMatrix mat;
|
||||||
|
|
||||||
if (p_und) {
|
if (p_multiply) {
|
||||||
MXM4(mat, m_matrix1, p_transform);
|
MXM4(mat, m_currentTransform, p_transform);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mat = p_transform;
|
mat = p_transform;
|
||||||
|
@@ -194,7 +194,7 @@ void LegoEntity::FUN_10010c30()
|
|||||||
LegoWorld* world = CurrentWorld();
|
LegoWorld* world = CurrentWorld();
|
||||||
|
|
||||||
if (m_cameraFlag && world && world->GetCameraController() && m_roi) {
|
if (m_cameraFlag && world && world->GetCameraController() && m_roi) {
|
||||||
world->GetCameraController()->FUN_100123e0(m_roi->GetLocal2World(), 1);
|
world->GetCameraController()->TransformPointOfView(m_roi->GetLocal2World(), 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -549,7 +549,7 @@ MxResult LegoNavController::ProcessJoystickInput(MxBool& p_und)
|
|||||||
LegoWorld* world = CurrentWorld();
|
LegoWorld* world = CurrentWorld();
|
||||||
|
|
||||||
if (world && world->GetCameraController()) {
|
if (world && world->GetCameraController()) {
|
||||||
world->GetCameraController()->FUN_10012320(DTOR(povPosition));
|
world->GetCameraController()->RotateY(DTOR(povPosition));
|
||||||
p_und = TRUE;
|
p_und = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -439,7 +439,7 @@ void LegoPathActor::Animate(float p_time)
|
|||||||
LegoWorld* world = CurrentWorld();
|
LegoWorld* world = CurrentWorld();
|
||||||
|
|
||||||
if (world) {
|
if (world) {
|
||||||
world->GetCameraController()->FUN_10012290(DTOR(m_unk0x14c));
|
world->GetCameraController()->RotateZ(DTOR(m_unk0x14c));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -340,7 +340,7 @@ void LegoRaceCar::KickCamera(float p_param)
|
|||||||
a->GetAnimTreePtr()->GetCamAnim()->FUN_1009f490(deltaTime, transformationMatrix);
|
a->GetAnimTreePtr()->GetCamAnim()->FUN_1009f490(deltaTime, transformationMatrix);
|
||||||
|
|
||||||
if (r->GetCameraController()) {
|
if (r->GetCameraController()) {
|
||||||
r->GetCameraController()->FUN_100123e0(transformationMatrix, 0);
|
r->GetCameraController()->TransformPointOfView(transformationMatrix, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_roi->SetLocal2World(transformationMatrix);
|
m_roi->SetLocal2World(transformationMatrix);
|
||||||
|
@@ -941,7 +941,7 @@ void LegoAnimPresenter::FUN_1006b9a0(LegoAnim* p_anim, MxLong p_time, Matrix4* p
|
|||||||
p_anim->GetCamAnim()->FUN_1009f490(p_time, transform);
|
p_anim->GetCamAnim()->FUN_1009f490(p_time, transform);
|
||||||
|
|
||||||
if (m_currentWorld != NULL && m_currentWorld->GetCameraController() != NULL) {
|
if (m_currentWorld != NULL && m_currentWorld->GetCameraController() != NULL) {
|
||||||
m_currentWorld->GetCameraController()->FUN_100123e0(transform, 0);
|
m_currentWorld->GetCameraController()->TransformPointOfView(transform, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user