diff --git a/LEGO1/mxdiskstreamcontroller.cpp b/LEGO1/mxdiskstreamcontroller.cpp index fef2864e..b42cc99e 100644 --- a/LEGO1/mxdiskstreamcontroller.cpp +++ b/LEGO1/mxdiskstreamcontroller.cpp @@ -190,10 +190,10 @@ MxDSStreamingAction* MxDiskStreamController::FUN_100c7db0() for (MxStreamListMxNextActionDataStart::iterator it = m_nextActionList.begin(); it != m_nextActionList.end(); it++) { MxNextActionDataStart* data = *it; - - for (MxStreamListMxDSAction::iterator it2 = m_list0x64.begin(); it2 != m_list0x64.end(); it++) { + OutputDebugStringA("found data action start\n"); + for (MxStreamListMxDSAction::iterator it2 = m_list0x64.begin(); it2 != m_list0x64.end(); it2++) { MxDSStreamingAction* streamingAction = (MxDSStreamingAction*) *it2; - + OutputDebugStringA("found streaming action\n"); if (streamingAction->GetObjectId() == data->GetObjectId() && streamingAction->GetUnknown24() == data->GetUnknown24() && streamingAction->GetBufferOffset() == data->GetData()) { @@ -224,8 +224,9 @@ MxResult MxDiskStreamController::VTable0x20(MxDSAction* p_action) MxAutoLocker lock(&this->m_criticalSection); MxDSStreamingAction* entry = (MxDSStreamingAction*) m_list0x80.Find(p_action, FALSE); // TODO: is this a seperate class? - + OutputDebugStringA("MxDiskStreamController::VTable0x20\n"); if (entry) { + OutputDebugStringA("MxDiskStreamController::VTable0x20 no entry\n"); MxDSStreamingAction* action = new MxDSStreamingAction(*p_action, 0); action->SetUnknown28(entry->GetUnknown28()); action->SetUnknown84(entry->GetUnknown84()); @@ -329,10 +330,10 @@ void MxDiskStreamController::FUN_100c8540() FUN_100c7ce0(buf); } } - MxDSStreamingAction* action; - if (m_nextActionList.size() == 0 && m_list0x64.size() == 0) { + + if (m_nextActionList.size() == 0 && m_list0x64.size() != 0) { do { - action = (MxDSStreamingAction*)m_list0x64.front(); + MxDSStreamingAction* action = (MxDSStreamingAction*) m_list0x64.front(); m_list0xb8.pop_front(); FUN_100c7cb0(action); diff --git a/LEGO1/mxdiskstreamprovider.cpp b/LEGO1/mxdiskstreamprovider.cpp index 6bd25215..ee8a7af2 100644 --- a/LEGO1/mxdiskstreamprovider.cpp +++ b/LEGO1/mxdiskstreamprovider.cpp @@ -78,24 +78,27 @@ MxResult MxDiskStreamProvider::SetResourceToGet(MxStreamController* p_resource) // STUB: LEGO1 0x100d15e0 void MxDiskStreamProvider::VTable0x20(MxDSAction* p_action) { + OutputDebugStringA("MxDiskStreamProvider::VTable0x20"); // TODO } // FUNCTION: LEGO1 0x100d1750 MxResult MxDiskStreamProvider::WaitForWorkToComplete() { + OutputDebugStringA("WaitForWorkToComplete\n"); while (m_remainingWork != 0) { m_busySemaphore.Wait(INFINITE); if (m_unk0x35 != 0) PerformWork(); } + OutputDebugStringA("Work is completed\n"); return SUCCESS; } // FUNCTION: LEGO1 0x100d1780 MxResult MxDiskStreamProvider::FUN_100d1780(MxDSStreamingAction* p_action) { - if (m_remainingWork == 0) { + if (m_remainingWork != 0) { if (p_action->GetUnknown94() > 0 && !p_action->GetUnknowna0()) { MxDSBuffer* buffer = new MxDSBuffer(); if (buffer) { @@ -129,6 +132,7 @@ MxResult MxDiskStreamProvider::FUN_100d1780(MxDSStreamingAction* p_action) void MxDiskStreamProvider::PerformWork() { // TODO + OutputDebugStringA("work is not being preformed."); } // FUNCTION: LEGO1 0x100d1e90