Implement chunk parsing (#362)

* partial parsechunk implementation

* fix format

* param name fix

* rename functions

* match MxStreamController::RemoveSubscriber

* implement rest of MxDSBuffer

* Fixes and better matches

* Matche ParseChunk 100%

* Match MxDiskStreamProvider::VTable0x20

* Match MxDSBuffer::CalcBytesRemaining

* Minor stuff

* Minor improvements

* Refactor functions

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Misha
2023-12-26 16:27:54 -05:00
committed by GitHub
parent 17522b98d4
commit e824e321e8
10 changed files with 265 additions and 22 deletions

View File

@@ -77,10 +77,47 @@ done:
return result;
}
// STUB: LEGO1 0x100d15e0
// FUNCTION: LEGO1 0x100d15e0
void MxDiskStreamProvider::VTable0x20(MxDSAction* p_action)
{
// TODO
MxDSStreamingAction* action;
if (p_action->GetObjectId() == -1) {
m_unk0x35 = FALSE;
do {
action = NULL;
{
MxAutoLocker lock(&m_criticalSection);
m_list.PopFrontStreamingAction(action);
}
if (!action)
return;
if (action->GetUnknowna0()->GetWriteOffset() < 0x20000)
g_unk0x10102878--;
((MxDiskStreamController*) m_pLookup)->FUN_100c8670(action);
} while (action);
}
else {
do {
{
MxAutoLocker lock(&m_criticalSection);
action = (MxDSStreamingAction*) m_list.Find(p_action, TRUE);
}
if (!action)
return;
if (action->GetUnknowna0()->GetWriteOffset() < 0x20000)
g_unk0x10102878--;
((MxDiskStreamController*) m_pLookup)->FUN_100c8670(action);
} while (action);
}
}
// FUNCTION: LEGO1 0x100d1750