2023-09-25 22:30:56 -04:00
|
|
|
#include "mxstreamcontroller.h"
|
|
|
|
|
2023-10-07 14:05:45 -04:00
|
|
|
#include "legoomni.h"
|
2023-10-24 19:38:27 -04:00
|
|
|
#include "mxautolocker.h"
|
2023-09-25 22:30:56 -04:00
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100c0b90 STUB
|
|
|
|
MxStreamController::MxStreamController()
|
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
// TODO
|
2023-09-25 22:30:56 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100c1290 STUB
|
|
|
|
MxStreamController::~MxStreamController()
|
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
// TODO
|
2023-09-25 22:30:56 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100c20d0 STUB
|
2023-10-24 19:38:27 -04:00
|
|
|
MxBool MxStreamController::FUN_100c20d0(MxDSObject& p_obj)
|
2023-09-25 22:30:56 -04:00
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
// TODO
|
|
|
|
return TRUE;
|
2023-09-25 22:30:56 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100c1520
|
2023-10-24 19:38:27 -04:00
|
|
|
MxResult MxStreamController::Open(const char* p_filename)
|
2023-09-25 22:30:56 -04:00
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
char sourceName[256];
|
|
|
|
MxAutoLocker locker(&m_criticalSection);
|
2023-09-25 22:30:56 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
MakeSourceName(sourceName, p_filename);
|
|
|
|
this->atom = MxAtomId(sourceName, LookupMode_LowerCase2);
|
|
|
|
return SUCCESS;
|
2023-09-25 22:30:56 -04:00
|
|
|
}
|
2023-10-07 09:05:44 -04:00
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100b9400
|
|
|
|
MxResult MxStreamController::vtable0x18(undefined4 p_unknown, undefined4 p_unknown2)
|
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
return FAILURE;
|
2023-10-07 09:05:44 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100b9410
|
|
|
|
MxResult MxStreamController::vtable0x1C(undefined4 p_unknown, undefined4 p_unknown2)
|
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
return FAILURE;
|
2023-10-07 09:05:44 -04:00
|
|
|
}
|
|
|
|
|
2023-10-10 04:27:00 -04:00
|
|
|
// OFFSET: LEGO1 0x100c1690
|
2023-10-08 16:41:34 -04:00
|
|
|
MxResult MxStreamController::vtable0x20(MxDSAction* p_action)
|
2023-10-07 09:05:44 -04:00
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
MxAutoLocker locker(&m_criticalSection);
|
2023-10-10 04:27:00 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
MxResult result;
|
|
|
|
MxU32 offset = 0;
|
2023-10-10 04:27:00 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
MxS32 objectId = p_action->GetObjectId();
|
|
|
|
MxStreamProvider* provider = m_provider;
|
2023-10-10 04:27:00 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
if ((MxS32) provider->GetLengthInDWords() > objectId)
|
|
|
|
offset = provider->GetBufferForDWords()[objectId];
|
2023-10-10 04:27:00 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
if (offset)
|
|
|
|
result = vtable0x2c(p_action, offset);
|
|
|
|
else
|
|
|
|
result = FAILURE;
|
2023-10-10 04:27:00 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
return result;
|
2023-10-07 09:05:44 -04:00
|
|
|
}
|
2023-10-08 16:41:34 -04:00
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100c1740 STUB
|
|
|
|
MxResult MxStreamController::vtable0x24(undefined4 p_unknown)
|
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
// TODO STUB
|
|
|
|
return FAILURE;
|
2023-10-08 16:41:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100b9420
|
|
|
|
MxResult MxStreamController::vtable0x28()
|
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
return SUCCESS;
|
2023-10-08 16:41:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100c1c10 STUB
|
2023-10-10 04:27:00 -04:00
|
|
|
MxResult MxStreamController::vtable0x2c(MxDSAction* p_action, MxU32 p_bufferval)
|
2023-10-08 16:41:34 -04:00
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
return FAILURE;
|
2023-10-08 16:41:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100c1ce0 STUB
|
|
|
|
MxResult MxStreamController::vtable0x30(undefined4 p_unknown)
|
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
return FAILURE;
|
2023-10-08 16:41:34 -04:00
|
|
|
}
|