fix build

This commit is contained in:
Misha 2023-12-17 08:10:52 -05:00
parent 63a8df2374
commit f291380198
No known key found for this signature in database
GPG Key ID: 8441D12AEF33FED8
4 changed files with 56 additions and 53 deletions

View File

@ -115,16 +115,16 @@ MxResult MxDiskStreamController::VTable0x24(MxDSAction* p_action)
return FAILURE; return FAILURE;
} }
// STUB: LEGO1 0x100c8640
MxResult MxDiskStreamController::Tickle()
{
// TODO
return SUCCESS;
}
// FUNCTION: LEGO1 0x100c84a0 // FUNCTION: LEGO1 0x100c84a0
void MxDiskStreamController::InsertToList74(MxDSBuffer* p_buffer) void MxDiskStreamController::InsertToList74(MxDSBuffer* p_buffer)
{ {
MxAutoLocker lock(&this->m_criticalSection); MxAutoLocker lock(&this->m_criticalSection);
m_list0x74.push_back(p_buffer); m_list0x74.push_back(p_buffer);
} }
// STUB: LEGO1 0x100c8640
MxResult MxDiskStreamController::Tickle()
{
// TODO
return SUCCESS;
}

View File

@ -51,7 +51,7 @@ MxResult MxDSBuffer::AllocateBuffer(MxU32 p_bufferSize, MxDSBufferType p_mode)
else if (p_mode == MxDSBufferType_Chunk) { else if (p_mode == MxDSBufferType_Chunk) {
MxStreamer* streamer = Streamer(); MxStreamer* streamer = Streamer();
// I have no clue as to what this does, or even if its correct. Maybe it's related to storing chunks in // I have no clue as to what this does, or even if its correct. Maybe it's related to storing chunks in
// MxRamStreamController? // MxDiskStreamController?
if (p_bufferSize >> 10 == 0x40) { if (p_bufferSize >> 10 == 0x40) {
i = 0; i = 0;
while (i < 22) { while (i < 22) {
@ -121,6 +121,13 @@ MxResult MxDSBuffer::SetBufferPointer(MxU32* p_buffer, MxU32 p_size)
return SUCCESS; return SUCCESS;
} }
// STUB: LEGO1 0x100c67b0
MxResult MxDSBuffer::FUN_100c67b0(MxStreamController* p_controller, MxDSAction* p_action, undefined4*)
{
// TODO STUB
return FAILURE;
}
// FUNCTION: LEGO1 0x100c68a0 // FUNCTION: LEGO1 0x100c68a0
MxResult MxDSBuffer::CreateObject(MxStreamController* p_controller, MxU32* p_data, MxDSAction* p_action, undefined4) MxResult MxDSBuffer::CreateObject(MxStreamController* p_controller, MxU32* p_data, MxDSAction* p_action, undefined4)
{ {
@ -130,56 +137,59 @@ MxResult MxDSBuffer::CreateObject(MxStreamController* p_controller, MxU32* p_dat
MxCore* header = ReadChunk(p_data, p_action->GetUnknown24()); MxCore* header = ReadChunk(p_data, p_action->GetUnknown24());
if (*p_data == FOURCC('M', 'x', 'O', 'b')) { if (header == NULL) {
return StartPresenterFromAction(p_controller, p_action, (MxDSAction*) header); return FAILURE;
} }
if (*p_data == FOURCC('M', 'x', 'C', 'h')) { switch (*p_data) {
if (m_unk0x30->HasId(((MxStreamChunk*) header)->GetUnk0xc()) == 0) { case FOURCC('M', 'x', 'C', 'h'):
if (!m_unk0x30->HasId(((MxStreamChunk*) header)->GetUnk0xc())) {
delete header; delete header;
return SUCCESS; return SUCCESS;
} }
return ParseChunk(p_controller, p_data, p_action, (MxStreamChunk*) header); return ParseChunk(p_controller, p_data, p_action, (MxStreamChunk*) header);
} case FOURCC('M', 'x', 'O', 'b'):
return StartPresenterFromAction(p_controller, p_action, (MxDSAction*) header);
default:
delete header; delete header;
return FAILURE; return FAILURE;
} }
}
// FUNCTION: LEGO1 0x100c6960 // FUNCTION: LEGO1 0x100c6960
MxResult MxDSBuffer::StartPresenterFromAction( MxResult MxDSBuffer::StartPresenterFromAction(
MxStreamController* p_controller, MxStreamController* p_controller,
MxDSAction* p_action1, MxDSAction* p_action1,
MxDSAction* p_object_header MxDSAction* p_objectheader
) )
{ {
if (!m_unk0x30->GetInternalAction()) { if (!m_unk0x30->GetInternalAction()) {
p_object_header->SetAtomId(p_action1->GetAtomId()); p_objectheader->SetAtomId(p_action1->GetAtomId());
p_object_header->SetUnknown28(p_action1->GetUnknown28()); p_objectheader->SetUnknown28(p_action1->GetUnknown28());
p_object_header->SetUnknown84(p_action1->GetUnknown84()); p_objectheader->SetUnknown84(p_action1->GetUnknown84());
p_object_header->SetOrigin(p_action1->GetOrigin()); p_objectheader->SetOrigin(p_action1->GetOrigin());
p_object_header->SetUnknown90(p_action1->GetUnknown90()); p_objectheader->SetUnknown90(p_action1->GetUnknown90());
p_object_header->MergeFrom(*p_action1); p_objectheader->MergeFrom(*p_action1);
m_unk0x30->SetInternalAction(p_object_header->Clone()); m_unk0x30->SetInternalAction(p_objectheader->Clone());
p_controller->InsertActionToList54(p_object_header); p_controller->InsertActionToList54(p_objectheader);
if (MxOmni::GetInstance()->CreatePresenter(p_controller, *p_object_header) != SUCCESS) { if (MxOmni::GetInstance()->CreatePresenter(p_controller, *p_objectheader) != SUCCESS) {
return FAILURE; return FAILURE;
} }
m_unk0x30->SetLoopCount(p_object_header->GetLoopCount()); m_unk0x30->SetLoopCount(p_objectheader->GetLoopCount());
m_unk0x30->SetFlags(p_object_header->GetFlags()); m_unk0x30->SetFlags(p_objectheader->GetFlags());
m_unk0x30->SetDuration(p_object_header->GetDuration()); m_unk0x30->SetDuration(p_objectheader->GetDuration());
if (m_unk0x30->GetInternalAction() == NULL) { if (m_unk0x30->GetInternalAction() == NULL) {
return FAILURE; return FAILURE;
} }
} }
else if (p_object_header) { else if (p_objectheader) {
delete p_object_header; delete p_objectheader;
} }
return SUCCESS; return SUCCESS;
@ -220,13 +230,6 @@ MxCore* MxDSBuffer::ReadChunk(MxU32* p_chunkData, MxU16 p_flags)
return result; return result;
} }
// STUB: LEGO1 0x100c67b0
MxResult MxDSBuffer::FUN_100c67b0(MxStreamController* p_controller, MxDSAction* p_action, undefined4*)
{
// TODO STUB
return FAILURE;
}
// FUNCTION: LEGO1 0x100c6f80 // FUNCTION: LEGO1 0x100c6f80
void MxDSBuffer::FUN_100c6f80(MxU32 p_writeOffset) void MxDSBuffer::FUN_100c6f80(MxU32 p_writeOffset)
{ {

View File

@ -32,11 +32,11 @@ class MxDSBuffer : public MxCore {
MxResult AllocateBuffer(MxU32 p_bufferSize, MxDSBufferType p_mode); MxResult AllocateBuffer(MxU32 p_bufferSize, MxDSBufferType p_mode);
MxResult SetBufferPointer(MxU32* p_buffer, MxU32 p_size); MxResult SetBufferPointer(MxU32* p_buffer, MxU32 p_size);
MxResult FUN_100c67b0(MxStreamController* p_controller, MxDSAction* p_action, undefined4*);
MxResult CreateObject(MxStreamController* p_controller, MxU32* p_data, MxDSAction* p_action, undefined4); MxResult CreateObject(MxStreamController* p_controller, MxU32* p_data, MxDSAction* p_action, undefined4);
MxResult StartPresenterFromAction(MxStreamController* p_controller, MxDSAction* p_action1, MxDSAction* p_action2); MxResult StartPresenterFromAction(MxStreamController* p_controller, MxDSAction* p_action1, MxDSAction* p_action2);
MxResult ParseChunk(MxStreamController* p_controller, MxU32* p_data, MxDSAction* p_action, MxStreamChunk* p_header); MxResult ParseChunk(MxStreamController* p_controller, MxU32* p_data, MxDSAction* p_action, MxStreamChunk* p_header);
MxCore* ReadChunk(MxU32* p_chunkData, MxU16 p_flags); MxCore* ReadChunk(MxU32* p_chunkData, MxU16 p_flags);
MxResult FUN_100c67b0(MxStreamController* p_controller, MxDSAction* p_action, undefined4*);
void FUN_100c6f80(MxU32 p_writeOffset); void FUN_100c6f80(MxU32 p_writeOffset);
inline MxU8* GetBuffer() { return m_pBuffer; } inline MxU8* GetBuffer() { return m_pBuffer; }

View File

@ -133,21 +133,6 @@ MxResult MxStreamController::VTable0x30(MxDSAction* p_action)
return result; return result;
} }
// FUNCTION: LEGO1 0x100c1e70
MxPresenter* MxStreamController::FUN_100c1e70(MxDSAction& p_action)
{
MxAutoLocker locker(&m_criticalSection);
MxPresenter* result = NULL;
if (p_action.GetObjectId() != -1) {
MxDSAction* action = m_unk0x3c.Find(&p_action, FALSE);
if (action != NULL) {
result = action->GetUnknown28();
}
}
return result;
}
// FUNCTION: LEGO1 0x100c1da0 // FUNCTION: LEGO1 0x100c1da0
MxResult MxStreamController::InsertActionToList54(MxDSAction* p_action) MxResult MxStreamController::InsertActionToList54(MxDSAction* p_action)
{ {
@ -163,6 +148,21 @@ MxResult MxStreamController::InsertActionToList54(MxDSAction* p_action)
} }
} }
// FUNCTION: LEGO1 0x100c1e70
MxPresenter* MxStreamController::FUN_100c1e70(MxDSAction& p_action)
{
MxAutoLocker locker(&m_criticalSection);
MxPresenter* result = NULL;
if (p_action.GetObjectId() != -1) {
MxDSAction* action = m_unk0x3c.Find(&p_action, FALSE);
if (action != NULL) {
result = action->GetUnknown28();
}
}
return result;
}
// STUB: LEGO1 0x100c1f00 // STUB: LEGO1 0x100c1f00
MxResult MxStreamController::FUN_100c1f00(MxDSAction* p_action) MxResult MxStreamController::FUN_100c1f00(MxDSAction* p_action)
{ {