From d3686790e06c81f7cd7a2cedb21495e61c47bc3b Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Thu, 21 Mar 2024 10:24:23 -0400 Subject: [PATCH] Fixes/matches --- .../include/legoeventnotificationparam.h | 18 ++++++++---------- .../src/entity/legocameracontroller.cpp | 4 +++- LEGO1/lego/sources/roi/legoroi.cpp | 7 ++++--- LEGO1/omni/include/mxpoint32.h | 6 +++--- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legoeventnotificationparam.h b/LEGO1/lego/legoomni/include/legoeventnotificationparam.h index 305de0d6..5563a5e9 100644 --- a/LEGO1/lego/legoomni/include/legoeventnotificationparam.h +++ b/LEGO1/lego/legoomni/include/legoeventnotificationparam.h @@ -12,10 +12,10 @@ class LegoEventNotificationParam : public MxNotificationParam { public: enum { - c_lButtonState = 1, - c_rButtonState = 2, - c_modKey1 = 4, - c_modKey2 = 8, + c_lButtonState = 0x01, + c_rButtonState = 0x02, + c_modKey1 = 0x04, + c_modKey2 = 0x08, }; // FUNCTION: LEGO1 0x10028690 @@ -42,7 +42,11 @@ class LegoEventNotificationParam : public MxNotificationParam { inline MxU8 GetModifier() { return m_modifier; } inline MxU8 GetKey() const { return m_key; } + + // FUNCTION: LEGO1 0x10012190 inline MxS32 GetX() const { return m_x; } + + // FUNCTION: LEGO1 0x100121a0 inline MxS32 GetY() const { return m_y; } inline void SetROI(LegoROI* p_roi) { m_roi = p_roi; } @@ -65,10 +69,4 @@ class LegoEventNotificationParam : public MxNotificationParam { // SYNTHETIC: LEGO1 0x100287e0 // LegoEventNotificationParam::~LegoEventNotificationParam -// SYNTHETIC: LEGO1 0x10012190 -// LegoEventNotificationParam::GetX - -// SYNTHETIC: LEGO1 0x100121a0 -// LegoEventNotificationParam::GetY - #endif // LEGOEVENTNOTIFICATIONPARAM_H diff --git a/LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp b/LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp index a75f4f69..ac2e62b4 100644 --- a/LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp +++ b/LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp @@ -67,6 +67,7 @@ MxLong LegoCameraController::Notify(MxParam& p_param) } break; } + return SUCCESS; } @@ -113,8 +114,9 @@ void LegoCameraController::SetWorldTransform(const Vector3& p_at, const Vector3& } // STUB: LEGO1 0x100123e0 -void LegoCameraController::FUN_100123e0(const Matrix4& p_transform, MxU32 p_un) +void LegoCameraController::FUN_100123e0(const Matrix4& p_transform, MxU32) { + // TODO } // FUNCTION: LEGO1 0x10012740 diff --git a/LEGO1/lego/sources/roi/legoroi.cpp b/LEGO1/lego/sources/roi/legoroi.cpp index 4a73d9d0..cc970665 100644 --- a/LEGO1/lego/sources/roi/legoroi.cpp +++ b/LEGO1/lego/sources/roi/legoroi.cpp @@ -481,16 +481,17 @@ TimeROI::TimeROI(Tgl::Renderer* p_renderer, ViewLODList* p_lodList, LegoTime p_t void TimeROI::FUN_100a9b40(Matrix4& p_matrix, LegoTime p_time) { LegoTime time = p_time - m_time; + if (time) { m_time = p_time; Mx3DPointFloat targetPosition(p_matrix[3]); - Vector3 worldPosition(GetWorldPosition()); - targetPosition.Sub(&worldPosition); + // TODO: Figure out how to get type right for the call + ((Vector3&) targetPosition).Sub(&Vector3(m_local2world[3])); float division = time * 0.001; - targetPosition.Div(division); + ((Vector3&) targetPosition).Div(division); FUN_100a5a30(targetPosition); } diff --git a/LEGO1/omni/include/mxpoint32.h b/LEGO1/omni/include/mxpoint32.h index a9321c2c..80aace10 100644 --- a/LEGO1/omni/include/mxpoint32.h +++ b/LEGO1/omni/include/mxpoint32.h @@ -6,7 +6,10 @@ class MxPoint32 { public: MxPoint32() {} + + // FUNCTION: LEGO1 0x10012170 MxPoint32(MxS32 p_x, MxS32 p_y) { CopyFrom(p_x, p_y); } + MxPoint32(const MxPoint32& p_point) { this->m_x = p_point.m_x; @@ -30,7 +33,4 @@ class MxPoint32 { MxS32 m_y; // 0x04 }; -// SYNTHETIC: LEGO1 0x10012170 -// MxPoint32::MxPoint32 - #endif // MXPOINT32_H