From 7022cf97dc1eda2e5b139f4708bbf6a270877210 Mon Sep 17 00:00:00 2001 From: Misha <106913236+MishaProductions@users.noreply.github.com> Date: Mon, 25 Dec 2023 09:31:32 -0500 Subject: [PATCH] add more functions --- LEGO1/mxdiskstreamcontroller.cpp | 27 +++++++++++++++++++++++++++ LEGO1/mxdiskstreamcontroller.h | 3 +++ LEGO1/mxdiskstreamprovider.cpp | 13 ++++++++++++- LEGO1/mxdiskstreamprovider.h | 1 + 4 files changed, 43 insertions(+), 1 deletion(-) diff --git a/LEGO1/mxdiskstreamcontroller.cpp b/LEGO1/mxdiskstreamcontroller.cpp index b42cc99e..a474ce3d 100644 --- a/LEGO1/mxdiskstreamcontroller.cpp +++ b/LEGO1/mxdiskstreamcontroller.cpp @@ -47,6 +47,20 @@ MxResult MxDiskStreamController::Open(const char* p_filename) return result; } +// FUNCTION: LEGO1 0x100c7890 +MxResult MxDiskStreamController::FUN_100c7890(MxDSStreamingAction* p_action) +{ + MxAutoLocker lock(&this->m_criticalSection); + if (p_action == NULL) { + return FAILURE; + } + else { + m_list0x80.push_back(p_action); + FUN_100c7970(); + return SUCCESS; + } +} + // FUNCTION: LEGO1 0x100c7880 MxResult MxDiskStreamController::VTable0x18(undefined4, undefined4) { @@ -59,6 +73,12 @@ MxResult MxDiskStreamController::VTable0x34(undefined4) return FAILURE; } +// FUNCTION: LEGO1 0x100c7970 +void MxDiskStreamController::FUN_100c7970() +{ + // Empty +} + // FUNCTION: LEGO1 0x100c7980 void MxDiskStreamController::FUN_100c7980() { @@ -358,6 +378,13 @@ MxResult MxDiskStreamController::Tickle() return SUCCESS; } +// FUNCTION: LEGO1 0x100c8670 +void MxDiskStreamController::FUN_100c8670(MxDSStreamingAction* p_streamingAction) +{ + MxAutoLocker lock(&this->m_critical9c); + m_list0xb8.push_back(p_streamingAction); +} + // FUNCTION: LEGO1 0x100c8720 void MxDiskStreamController::FUN_100c8720() { diff --git a/LEGO1/mxdiskstreamcontroller.h b/LEGO1/mxdiskstreamcontroller.h index 1d1cf7d5..a69c28d8 100644 --- a/LEGO1/mxdiskstreamcontroller.h +++ b/LEGO1/mxdiskstreamcontroller.h @@ -50,6 +50,8 @@ class MxDiskStreamController : public MxStreamController { MxStreamListMxDSAction m_list0xb8; // 0xb8 undefined m_unk0xc4; // 0xc4 + MxResult FUN_100c7890(MxDSStreamingAction* p_action); + void FUN_100c7970(); void FUN_100c7cb0(MxDSStreamingAction* p_action); void FUN_100c7ce0(MxDSBuffer* p_buffer); MxResult FUN_100c7d10(); @@ -60,6 +62,7 @@ class MxDiskStreamController : public MxStreamController { void InsertToList74(MxDSBuffer* p_buffer); void FUN_100c8540(); void FUN_100c8720(); + void FUN_100c8670(MxDSStreamingAction* p_streamingAction); }; // TEMPLATE: LEGO1 0x100c7330 diff --git a/LEGO1/mxdiskstreamprovider.cpp b/LEGO1/mxdiskstreamprovider.cpp index ee8a7af2..f762670b 100644 --- a/LEGO1/mxdiskstreamprovider.cpp +++ b/LEGO1/mxdiskstreamprovider.cpp @@ -128,13 +128,24 @@ MxResult MxDiskStreamProvider::FUN_100d1780(MxDSStreamingAction* p_action) return FAILURE; } -// STUB: LEGO1 0x100d18f0 +// FUNCTION: LEGO1 0x100d18f0 void MxDiskStreamProvider::PerformWork() { // TODO OutputDebugStringA("work is not being preformed."); } +// FUNCTION: LEGO1 0x100d1af0 +MxBool MxDiskStreamProvider::FUN_100d1af0(MxDSStreamingAction* p_action) +{ + if (p_action->GetUnknowna0()->GetWriteOffset() == 0x20000) + { + return DAT_10102878 == 0; + } + + return TRUE; +} + // FUNCTION: LEGO1 0x100d1e90 MxU32 MxDiskStreamProvider::GetFileSize() { diff --git a/LEGO1/mxdiskstreamprovider.h b/LEGO1/mxdiskstreamprovider.h index 55d4f0f2..80719ab0 100644 --- a/LEGO1/mxdiskstreamprovider.h +++ b/LEGO1/mxdiskstreamprovider.h @@ -46,6 +46,7 @@ class MxDiskStreamProvider : public MxStreamProvider { MxResult WaitForWorkToComplete(); MxResult FUN_100d1780(MxDSStreamingAction* p_action); void PerformWork(); + static MxBool FUN_100d1af0(MxDSStreamingAction* p_action); virtual MxResult SetResourceToGet(MxStreamController* p_resource) override; // vtable+0x14 virtual MxU32 GetFileSize() override; // vtable+0x18