commit code

This commit is contained in:
Misha 2023-10-22 08:08:08 -04:00
parent 3a21834382
commit 77fe47112a
2 changed files with 28 additions and 5 deletions

View File

@ -1,17 +1,38 @@
#include "mxramstreamcontroller.h"
#include "mxramstreamprovider.h"
#include "mxautolocker.h"
DECOMP_SIZE_ASSERT(MxRAMStreamController, 0x98);
// OFFSET: LEGO1 0x100c6110 STUB
undefined *__cdecl FUN_100d0d80(MxU32 *p_fileSizeBuffer, MxU32 p_fileSize)
{
return NULL;
}
// OFFSET: LEGO1 0x100c6110
MxResult MxRAMStreamController::Open(const char *p_filename)
{
// TODO STUB
return FAILURE;
MxResult result = FAILURE;
MxAutoLocker locker(&m_criticalSection);
if (MxStreamController::Open(p_filename) == 0)
{
MxRAMStreamProvider *provider = new MxRAMStreamProvider();
m_provider = provider;
if (provider != NULL)
{
if (m_provider->SetResourceToGet(this) == SUCCESS)
{
FUN_100d0d80(provider->GetBufferOfFileSize(), provider->GetFileSize());
//m_buffer todo
result = SUCCESS;
}
}
}
return result;
}
// OFFSET: LEGO1 0x100c6210 STUB
MxResult MxRAMStreamController::vtable0x20(MxDSAction* p_action)
MxResult MxRAMStreamController::vtable0x20(MxDSAction *p_action)
{
// TODO STUB
return FAILURE;

View File

@ -16,10 +16,12 @@ class MxRAMStreamProvider : public MxStreamProvider
virtual MxU32 GetLengthInDWords() override; //vtable+0x24
virtual MxU32* GetBufferForDWords() override; //vtable+0x28
inline MxU32* GetBufferOfFileSize() {return m_pBufferOfFileSize;}
protected:
MxU32 m_bufferSize;
MxU32 m_fileSize;
void* m_pBufferOfFileSize;
MxU32* m_pBufferOfFileSize;
MxU32 m_lengthInDWords;
MxU32* m_bufferForDWords;
};