mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-24 08:41:16 +00:00
Mostly match MxDiskStreamController::FUN_100c8540
This commit is contained in:
parent
06b92fa924
commit
d403ff70b5
@ -60,11 +60,10 @@ MxResult MxDiskStreamController::FUN_100c7890(MxDSStreamingAction* p_action)
|
|||||||
if (p_action == NULL) {
|
if (p_action == NULL) {
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
m_list0x80.push_back(p_action);
|
m_list0x80.push_back(p_action);
|
||||||
FUN_100c7970();
|
FUN_100c7970();
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c7960
|
// FUNCTION: LEGO1 0x100c7960
|
||||||
@ -216,6 +215,7 @@ MxDSStreamingAction* MxDiskStreamController::FUN_100c7db0()
|
|||||||
streamingAction->GetUnknown24() == data->GetUnknown24() &&
|
streamingAction->GetUnknown24() == data->GetUnknown24() &&
|
||||||
streamingAction->GetBufferOffset() == data->GetData()) {
|
streamingAction->GetBufferOffset() == data->GetData()) {
|
||||||
m_nextActionList.erase(it);
|
m_nextActionList.erase(it);
|
||||||
|
|
||||||
data->SetData(m_provider->GetFileSize() + data->GetData());
|
data->SetData(m_provider->GetFileSize() + data->GetData());
|
||||||
m_nextActionList.push_back(data);
|
m_nextActionList.push_back(data);
|
||||||
|
|
||||||
@ -339,21 +339,22 @@ void MxDiskStreamController::InsertToList74(MxDSBuffer* p_buffer)
|
|||||||
void MxDiskStreamController::FUN_100c8540()
|
void MxDiskStreamController::FUN_100c8540()
|
||||||
{
|
{
|
||||||
MxAutoLocker lock(&this->m_criticalSection);
|
MxAutoLocker lock(&this->m_criticalSection);
|
||||||
for (list<MxDSBuffer*>::iterator it = m_list0x74.begin(); it != m_list0x74.end(); it++) {
|
for (list<MxDSBuffer*>::iterator it = m_list0x74.begin(); it != m_list0x74.end();) {
|
||||||
MxDSBuffer* buf = *it;
|
MxDSBuffer* buf = *it;
|
||||||
if (buf->GetRefCount() == 0) {
|
if (buf->GetRefCount() == 0) {
|
||||||
m_list0x74.erase(it);
|
m_list0x74.erase(it++);
|
||||||
FUN_100c7ce0(buf);
|
FUN_100c7ce0(buf);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
it++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_nextActionList.size() == 0 && m_list0x64.size() != 0) {
|
if (m_nextActionList.empty()) {
|
||||||
do {
|
while (!m_list0x64.empty()) {
|
||||||
MxDSStreamingAction* action = (MxDSStreamingAction*) m_list0x64.front();
|
MxDSStreamingAction* action = (MxDSStreamingAction*) m_list0x64.front();
|
||||||
m_list0xb8.pop_front();
|
m_list0x64.pop_front();
|
||||||
|
|
||||||
FUN_100c7cb0(action);
|
FUN_100c7cb0(action);
|
||||||
} while (m_list0x64.size() != 0);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -34,9 +34,9 @@ class MxNextActionDataStart : public MxCore {
|
|||||||
inline void SetData(MxU32 p_data) { m_data = p_data; }
|
inline void SetData(MxU32 p_data) { m_data = p_data; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MxU32 m_objectId;
|
MxU32 m_objectId; // 0x8
|
||||||
MxS16 m_unk0x24;
|
MxS16 m_unk0x24; // 0xc
|
||||||
MxU32 m_data;
|
MxU32 m_data; // 0x10
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MXNEXTACTIONDATASTART_H
|
#endif // MXNEXTACTIONDATASTART_H
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user