From 81f5fe9d47eafc2e8264c382a1c49af2a1bfe0e5 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sun, 13 Aug 2023 07:55:35 -0400 Subject: [PATCH] Add remaining functions --- LEGO1/mxdsaction.h | 4 ++++ LEGO1/mxdsstreamingaction.cpp | 21 +++++++++++++++++++++ LEGO1/mxdsstreamingaction.h | 5 ++++- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/LEGO1/mxdsaction.h b/LEGO1/mxdsaction.h index 2d177f8f..843d8275 100644 --- a/LEGO1/mxdsaction.h +++ b/LEGO1/mxdsaction.h @@ -46,8 +46,12 @@ class MxDSAction : public MxDSObject MxU32 m_sizeOnDisk; DWORD m_flags; DWORD m_startTime; + +protected: MxLong m_duration; MxS32 m_loopCount; + +private: MxVector3Data m_location; MxVector3Data m_direction; MxVector3Data m_up; diff --git a/LEGO1/mxdsstreamingaction.cpp b/LEGO1/mxdsstreamingaction.cpp index e04bb56b..699fa0a3 100644 --- a/LEGO1/mxdsstreamingaction.cpp +++ b/LEGO1/mxdsstreamingaction.cpp @@ -47,6 +47,14 @@ MxDSStreamingAction *MxDSStreamingAction::CopyFrom(MxDSStreamingAction &p_dsStre return this; } +// OFFSET: LEGO1 0x100cd090 +MxBool MxDSStreamingAction::HasId(MxU32 p_objectId) +{ + if (this->m_internalAction) + return this->m_internalAction->HasId(p_objectId); + return FALSE; +} + // OFFSET: LEGO1 0x100cd1e0 MxResult MxDSStreamingAction::Init() { @@ -67,4 +75,17 @@ void MxDSStreamingAction::SetInternalAction(MxDSAction *p_dsAction) if (this->m_internalAction) delete this->m_internalAction; this->m_internalAction = p_dsAction; +} + +// OFFSET: LEGO1 0x100cd2d0 +void MxDSStreamingAction::FUN_100CD2D0() +{ + if (this->m_duration == -1) + return; + + MxLong duration = this->m_duration / this->m_loopCount; + this->m_loopCount--; + + this->m_duration -= duration; + this->m_unka8 += duration; } \ No newline at end of file diff --git a/LEGO1/mxdsstreamingaction.h b/LEGO1/mxdsstreamingaction.h index 89a03c5b..942263f9 100644 --- a/LEGO1/mxdsstreamingaction.h +++ b/LEGO1/mxdsstreamingaction.h @@ -16,8 +16,11 @@ class MxDSStreamingAction : public MxDSAction MxDSStreamingAction *CopyFrom(MxDSStreamingAction &p_dsStreamingAction); + virtual MxBool HasId(MxU32 p_objectId); // vtable+34; + MxResult Init(); void SetInternalAction(MxDSAction *p_dsAction); + void FUN_100CD2D0(); private: MxU32 m_unk94; @@ -25,7 +28,7 @@ class MxDSStreamingAction : public MxDSAction MxS32 m_unk9c; MxDSBuffer *m_unka0; MxDSBuffer *m_unka4; - undefined4 m_unka8; + MxLong m_unka8; undefined2 m_unkac; MxDSAction *m_internalAction; };