mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-24 00:31:16 +00:00
Update mxdiskstreamprovider.cpp
This commit is contained in:
parent
f3de3db4a2
commit
054616ebf8
@ -1,9 +1,9 @@
|
|||||||
#include "mxdiskstreamprovider.h"
|
#include "mxdiskstreamprovider.h"
|
||||||
|
|
||||||
#include "mxthread.h"
|
|
||||||
#include "mxomni.h"
|
#include "mxomni.h"
|
||||||
#include "mxstring.h"
|
|
||||||
#include "mxstreamcontroller.h"
|
#include "mxstreamcontroller.h"
|
||||||
|
#include "mxstring.h"
|
||||||
|
#include "mxthread.h"
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(MxDiskStreamProvider, 0x60);
|
DECOMP_SIZE_ASSERT(MxDiskStreamProvider, 0x60);
|
||||||
|
|
||||||
@ -52,33 +52,29 @@ void MxDiskStreamProvider::PerformWork()
|
|||||||
// OFFSET: LEGO1 0x100d13d0
|
// OFFSET: LEGO1 0x100d13d0
|
||||||
MxResult MxDiskStreamProvider::SetResourceToGet(MxStreamController* p_resource)
|
MxResult MxDiskStreamProvider::SetResourceToGet(MxStreamController* p_resource)
|
||||||
{
|
{
|
||||||
m_pLookup = p_resource;
|
m_pLookup = p_resource;
|
||||||
MxString path = MxString(MxOmni::GetHD()) + p_resource->GetAtom().GetInternal() + ".si";
|
MxString path = MxString(MxOmni::GetHD()) + p_resource->GetAtom().GetInternal() + ".si";
|
||||||
|
|
||||||
MxDSFile* file = new MxDSFile(path.GetData(), 0);
|
MxDSFile* file = new MxDSFile(path.GetData(), 0);
|
||||||
m_pFile = file;
|
m_pFile = file;
|
||||||
if (file != NULL)
|
if (file != NULL) {
|
||||||
{
|
if (file->Open(0) != 0) {
|
||||||
if (file->Open(0) != 0)
|
path = MxString(MxOmni::GetCD()) + p_resource->GetAtom().GetInternal() + ".si";
|
||||||
{
|
file->SetFileName(path);
|
||||||
path = MxString(MxOmni::GetCD()) + p_resource->GetAtom().GetInternal() + ".si";
|
if (file->Open(0) != 0) {
|
||||||
file->SetFileName(path);
|
return FAILURE;
|
||||||
if (file->Open(0) != 0)
|
}
|
||||||
{
|
}
|
||||||
return FAILURE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
m_remainingWork = 1;
|
m_remainingWork = 1;
|
||||||
MxResult success = m_busySemaphore.Init(0, 100);
|
MxResult success = m_busySemaphore.Init(0, 100);
|
||||||
//m_thread.Start();
|
// m_thread.Start();
|
||||||
|
|
||||||
if (success == SUCCESS && p_resource != NULL)
|
if (success == SUCCESS && p_resource != NULL) {
|
||||||
{
|
return SUCCESS;
|
||||||
return SUCCESS;
|
}
|
||||||
}
|
}
|
||||||
}
|
return FAILURE;
|
||||||
return FAILURE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100d1e90
|
// OFFSET: LEGO1 0x100d1e90
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user