isle/LEGO1/mxramstreamcontroller.cpp

55 lines
1.2 KiB
C++
Raw Normal View History

Implement some MxStreamer functions (#130) * Implement some MxStreamer stuff * Implement/match MxVideoManager::Tickle (#128) * Implement/match MxPresenter::StartAction * Update mxpoint32.h * Implement/match MxVideoManager::Tickle * Update mxlist.h * Update mxpresenter.cpp * MxFlcPresenter ctor/dtor (#132) * MxFlcPresenter ctor/dtor * Match constructor --------- Co-authored-by: Christian Semmler <mail@csemmler.com> * LegoOmni::CreateStreamObject and related (#129) * LegoOmni::CreateStreamObject and related * Revert change to MxDSSource/MxDSFile Read export * Bootstrap MxDSMultiAction (#133) * Bootstrap MxDSMultiAction * Move destroy function to list class * Fix unk14 call * Quick patch for EqualsDataProduct (#134) * MxLong Tickle() -> MxResult Tickle() (#135) * MxLong Tickle() -> MxResult Tickle() * Remove garbage * Fix implementations * PresenterNameDispatch (#137) * PresenterNameDispatch * Use reference for PresenterNameDispatch param - fix or add const markers so we can use a const reference * Implement/match remaining MxDSMultiAction functions (#136) * Implement/match MxDSMultiAction::Deserialize * Implement remaining functions of MxDSMultiAction * Remove space * Implement/match MxDSParallelAction (#138) * Implement/match MxDSParallelAction * Fix type * Remove space * Add neccessary MxDSMultiAction functions * Implement/match MxDSSerialAction (#139) * Implement/match MxDSSerialAction * Add neccessary MxDSMultiAction functions * Fix LegoOmni vtable (#140) * matched GetOpenStream * matched MakeSourceName * add MxDSBuffer stub * add MxRAMStreamController stub * add stubbed functions for MxStreamController used by MxStreamer * implement AddStreamControllerToOpenList * implement most of MxStreamer::Open * add note for MxStreamerSubclass1 * fix compiler issue * implement MxStreamer::Notify --------- Co-authored-by: Christian Semmler <mail@csemmler.com> Co-authored-by: Joshua Peisach <itzswirlz2020@outlook.com> Co-authored-by: MS <disinvite@users.noreply.github.com>
2023-09-25 22:30:56 -04:00
#include "mxramstreamcontroller.h"
2023-10-24 19:38:27 -04:00
#include "mxautolocker.h"
#include "mxramstreamprovider.h"
Implement some MxStreamer functions (#130) * Implement some MxStreamer stuff * Implement/match MxVideoManager::Tickle (#128) * Implement/match MxPresenter::StartAction * Update mxpoint32.h * Implement/match MxVideoManager::Tickle * Update mxlist.h * Update mxpresenter.cpp * MxFlcPresenter ctor/dtor (#132) * MxFlcPresenter ctor/dtor * Match constructor --------- Co-authored-by: Christian Semmler <mail@csemmler.com> * LegoOmni::CreateStreamObject and related (#129) * LegoOmni::CreateStreamObject and related * Revert change to MxDSSource/MxDSFile Read export * Bootstrap MxDSMultiAction (#133) * Bootstrap MxDSMultiAction * Move destroy function to list class * Fix unk14 call * Quick patch for EqualsDataProduct (#134) * MxLong Tickle() -> MxResult Tickle() (#135) * MxLong Tickle() -> MxResult Tickle() * Remove garbage * Fix implementations * PresenterNameDispatch (#137) * PresenterNameDispatch * Use reference for PresenterNameDispatch param - fix or add const markers so we can use a const reference * Implement/match remaining MxDSMultiAction functions (#136) * Implement/match MxDSMultiAction::Deserialize * Implement remaining functions of MxDSMultiAction * Remove space * Implement/match MxDSParallelAction (#138) * Implement/match MxDSParallelAction * Fix type * Remove space * Add neccessary MxDSMultiAction functions * Implement/match MxDSSerialAction (#139) * Implement/match MxDSSerialAction * Add neccessary MxDSMultiAction functions * Fix LegoOmni vtable (#140) * matched GetOpenStream * matched MakeSourceName * add MxDSBuffer stub * add MxRAMStreamController stub * add stubbed functions for MxStreamController used by MxStreamer * implement AddStreamControllerToOpenList * implement most of MxStreamer::Open * add note for MxStreamerSubclass1 * fix compiler issue * implement MxStreamer::Notify --------- Co-authored-by: Christian Semmler <mail@csemmler.com> Co-authored-by: Joshua Peisach <itzswirlz2020@outlook.com> Co-authored-by: MS <disinvite@users.noreply.github.com>
2023-09-25 22:30:56 -04:00
DECOMP_SIZE_ASSERT(MxRAMStreamController, 0x98);
// 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)
{
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.SetBufferPointer(
((MxRAMStreamProvider*) m_provider)->GetBufferOfFileSize(),
((MxRAMStreamProvider*) m_provider)->GetFileSize()
);
return SUCCESS;
}
2023-10-24 19:38:27 -04:00
return FAILURE;
}
// OFFSET: LEGO1 0x100c6210 STUB
MxResult MxRAMStreamController::vtable0x20(MxDSAction* p_action)
{
2023-10-24 19:38:27 -04:00
// TODO STUB
return FAILURE;
}
// OFFSET: LEGO1 0x100c6320 STUB
MxResult MxRAMStreamController::vtable0x24(undefined4 p_unknown)
{
2023-10-24 19:38:27 -04:00
// TODO STUB
return FAILURE;
}