mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 00:44:21 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user