mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-22 23:57:54 -05:00
889fd886f0
* Add MxSemphore + MxThread and the two implementations I could find of MxThread (consumers extend it and override the Run method). * Implement a function in MxDiskStreamProvider which uses thread and semaphore to confirm correct layout / size of those classes. * All 100% match except two functions with a pair of registers swapped.
44 lines
No EOL
840 B
C++
44 lines
No EOL
840 B
C++
#include "mxdiskstreamprovider.h"
|
|
|
|
#include "mxthread.h"
|
|
|
|
// OFFSET: LEGO1 0x100d0f30
|
|
MxResult MxDiskStreamProviderThread::Run()
|
|
{
|
|
if (m_target != NULL)
|
|
m_target->WaitForWorkToComplete();
|
|
MxThread::Run();
|
|
// They should probably have writen "return MxThread::Run()" but they didn't.
|
|
return SUCCESS;
|
|
}
|
|
|
|
// OFFSET: LEGO1 0x100d0f70
|
|
MxDiskStreamProvider::MxDiskStreamProvider()
|
|
{
|
|
// TODO
|
|
}
|
|
|
|
// OFFSET: LEGO1 0x100d1240
|
|
MxDiskStreamProvider::~MxDiskStreamProvider()
|
|
{
|
|
// TODO
|
|
}
|
|
|
|
// Matching but with esi / edi swapped
|
|
// OFFSET: LEGO1 0x100d1750
|
|
MxResult MxDiskStreamProvider::WaitForWorkToComplete()
|
|
{
|
|
while (m_remainingWork != 0)
|
|
{
|
|
m_busySemaphore.Wait(INFINITE);
|
|
if (m_unk1 != 0)
|
|
PerformWork();
|
|
}
|
|
return SUCCESS;
|
|
}
|
|
|
|
// OFFSET: LEGO1 0x100d1760 STUB
|
|
void MxDiskStreamProvider::PerformWork()
|
|
{
|
|
// TODO
|
|
} |