mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-24 00:31:16 +00:00
commit code
This commit is contained in:
parent
3a21834382
commit
77fe47112a
@ -1,17 +1,38 @@
|
|||||||
#include "mxramstreamcontroller.h"
|
#include "mxramstreamcontroller.h"
|
||||||
#include "mxramstreamprovider.h"
|
#include "mxramstreamprovider.h"
|
||||||
|
#include "mxautolocker.h"
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(MxRAMStreamController, 0x98);
|
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)
|
MxResult MxRAMStreamController::Open(const char *p_filename)
|
||||||
{
|
{
|
||||||
// TODO STUB
|
MxResult result = FAILURE;
|
||||||
return 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
|
// OFFSET: LEGO1 0x100c6210 STUB
|
||||||
MxResult MxRAMStreamController::vtable0x20(MxDSAction* p_action)
|
MxResult MxRAMStreamController::vtable0x20(MxDSAction *p_action)
|
||||||
{
|
{
|
||||||
// TODO STUB
|
// TODO STUB
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
|
|||||||
@ -16,10 +16,12 @@ class MxRAMStreamProvider : public MxStreamProvider
|
|||||||
virtual MxU32 GetLengthInDWords() override; //vtable+0x24
|
virtual MxU32 GetLengthInDWords() override; //vtable+0x24
|
||||||
virtual MxU32* GetBufferForDWords() override; //vtable+0x28
|
virtual MxU32* GetBufferForDWords() override; //vtable+0x28
|
||||||
|
|
||||||
|
inline MxU32* GetBufferOfFileSize() {return m_pBufferOfFileSize;}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
MxU32 m_bufferSize;
|
MxU32 m_bufferSize;
|
||||||
MxU32 m_fileSize;
|
MxU32 m_fileSize;
|
||||||
void* m_pBufferOfFileSize;
|
MxU32* m_pBufferOfFileSize;
|
||||||
MxU32 m_lengthInDWords;
|
MxU32 m_lengthInDWords;
|
||||||
MxU32* m_bufferForDWords;
|
MxU32* m_bufferForDWords;
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user