2023-09-25 22:30:56 -04:00
|
|
|
#include "mxramstreamcontroller.h"
|
2023-10-24 19:38:27 -04:00
|
|
|
|
2023-10-29 10:01:14 -04:00
|
|
|
#include "mxautolocker.h"
|
2023-10-08 16:41:34 -04:00
|
|
|
#include "mxramstreamprovider.h"
|
2023-09-25 22:30:56 -04:00
|
|
|
|
|
|
|
DECOMP_SIZE_ASSERT(MxRAMStreamController, 0x98);
|
2023-10-08 16:41:34 -04:00
|
|
|
|
2023-10-29 10:01:14 -04:00
|
|
|
// OFFSET: LEGO1 0x100d0d80 STUB
|
|
|
|
undefined* __cdecl FUN_100d0d80(MxU32* p_fileSizeBuffer, MxU32 p_fileSize)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100c6110
|
2023-10-24 19:38:27 -04:00
|
|
|
MxResult MxRAMStreamController::Open(const char* p_filename)
|
2023-10-08 16:41:34 -04:00
|
|
|
{
|
2023-10-29 10:01:14 -04:00
|
|
|
MxAutoLocker locker(&m_criticalSection);
|
|
|
|
if (MxStreamController::Open(p_filename) != SUCCESS) {
|
|
|
|
return FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
m_provider = new MxRAMStreamProvider();
|
|
|
|
if (((MxRAMStreamProvider*) m_provider) != NULL) {
|
|
|
|
if (m_provider->SetResourceToGet(this) != SUCCESS) {
|
|
|
|
return FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
FUN_100d0d80(
|
|
|
|
((MxRAMStreamProvider*) m_provider)->GetBufferOfFileSize(),
|
|
|
|
((MxRAMStreamProvider*) m_provider)->GetFileSize()
|
|
|
|
);
|
|
|
|
m_buffer.FUN_100c6780(
|
|
|
|
((MxRAMStreamProvider*) m_provider)->GetBufferOfFileSize(),
|
|
|
|
((MxRAMStreamProvider*) m_provider)->GetFileSize()
|
|
|
|
);
|
|
|
|
return SUCCESS;
|
|
|
|
}
|
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
return FAILURE;
|
2023-10-08 16:41:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100c6210 STUB
|
|
|
|
MxResult MxRAMStreamController::vtable0x20(MxDSAction* p_action)
|
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
// TODO STUB
|
|
|
|
return FAILURE;
|
2023-10-08 16:41:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100c6320 STUB
|
|
|
|
MxResult MxRAMStreamController::vtable0x24(undefined4 p_unknown)
|
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
// TODO STUB
|
|
|
|
return FAILURE;
|
2023-10-08 16:41:34 -04:00
|
|
|
}
|