isle-portable/LEGO1/mxstreamcontroller.h

63 lines
2.3 KiB
C
Raw Normal View History

2023-04-27 22:19:39 -04:00
#ifndef MXSTREAMCONTROLLER_H
#define MXSTREAMCONTROLLER_H
2023-11-28 08:26:39 -05:00
#include "compat.h" // STL
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 "decomp.h"
#include "mxatomid.h"
#include "mxcore.h"
2023-10-24 19:38:27 -04:00
#include "mxcriticalsection.h"
#include "mxdsaction.h"
2023-10-24 19:38:27 -04:00
#include "mxdsobject.h"
2023-11-28 08:26:39 -05:00
#include "mxstreamlist.h"
#include "mxstreamprovider.h"
// VTABLE 0x100dc968
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
// SIZE 0x64
2023-10-24 19:38:27 -04:00
class MxStreamController : public MxCore {
2023-04-27 22:19:39 -04:00
public:
2023-10-24 19:38:27 -04:00
MxStreamController();
virtual ~MxStreamController() override; // vtable+0x0
// OFFSET: LEGO1 0x100c0f10
inline virtual const char* ClassName() const override // vtable+0xc
{
// 0x10102130
return "MxStreamController";
}
// OFFSET: LEGO1 0x100c0f20
inline virtual MxBool IsA(const char* name) const override // vtable+0x10
{
return !strcmp(name, MxStreamController::ClassName()) || MxCore::IsA(name);
}
virtual MxResult Open(const char* p_filename); // vtable+0x14
virtual MxResult vtable0x18(undefined4 p_unknown, undefined4 p_unknown2); // vtable+0x18
virtual MxResult vtable0x1C(undefined4 p_unknown, undefined4 p_unknown2); // vtable+0x1c
virtual MxResult vtable0x20(MxDSAction* p_action); // vtable+0x20
virtual MxResult vtable0x24(undefined4 p_unknown); // vtable+0x24
MxResult FUN_100c1800(MxDSAction* p_action, MxU32 p_val);
virtual MxResult vtable0x28(); // vtable+0x28
virtual MxResult vtable0x2c(MxDSAction* p_action, MxU32 p_bufferval); // vtable+0x2c
virtual MxResult vtable0x30(undefined4 p_unknown); // vtable+0x30
2023-10-24 19:38:27 -04:00
MxBool FUN_100c20d0(MxDSObject& p_obj);
MxResult FUN_100c1a00(MxDSAction* p_action, MxU32 p_bufferval);
2023-10-24 19:38:27 -04:00
inline MxAtomId& GetAtom() { return atom; };
protected:
2023-11-28 08:26:39 -05:00
MxCriticalSection m_criticalSection; // 0x8
MxAtomId atom; // 0x24
MxStreamProvider* m_provider; // 0x28
undefined4 m_unk2c; // 0x2c
MxStreamListMxDSSubscriber m_subscriberList; // 0x30
MxStreamListMxDSAction m_unkList0x3c; // 0x3c
MxStreamListMxNextActionDataStart m_nextActionList; // 0x48
MxStreamListMxDSAction m_unkList0x54; // 0x54
MxDSAction* m_action0x60; // 0x60
2023-04-27 22:19:39 -04:00
};
#endif // MXSTREAMCONTROLLER_H