isle-portable/LEGO1/omni/include/mxstreamcontroller.h

123 lines
4.5 KiB
C
Raw Normal View History

2023-04-27 22:19:39 -04:00
#ifndef MXSTREAMCONTROLLER_H
#define MXSTREAMCONTROLLER_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
#include "decomp.h"
#include "mxatom.h"
#include "mxcore.h"
2023-10-24 19:38:27 -04:00
#include "mxcriticalsection.h"
#include "mxdssubscriber.h"
2023-12-11 16:33:46 -05:00
#include "mxstl/stlcompat.h"
2023-11-28 08:26:39 -05:00
#include "mxstreamlist.h"
class MxDSStreamingAction;
class MxStreamProvider;
(Proposal) Adjustments to "decomp" language (#308) * Adjustments to "decomp" language * Fix a comment * Fix accidental clang-formatting * Fix order * Fix order * Remove junk * Fix OFFSET * Adjustments based on new suggestions * Annotate globals * Globals in ISLE * More globals * Merge from parser2 branch * Allow prepending space for exact marker match * To eliminate noise, require the 0x prefix on offset for marker match * fix test from previous * Count tab stops for indented functions to reduce MISSED_END_OF_FUNCTION noise * FUNCTION to SYNTHETIC where needed * Missed marker conversion on SetAtomId * pylint cleanup, remove unused code * Fix unexpected function end, add more unit tests * Be more strict about synthetic name syntax * Revert "Missed marker conversion on SetAtomId" This reverts commit d87d665127fae7dd6e5bd48d9af14a0a829bf9e2. * Revert "FUNCTION to SYNTHETIC where needed" This reverts commit 8c815418d261ba8c5f67a9a2cae349fe4ac92db8. * Implicit lookup by name for functions * Fix VTABLE SYNTHETIC and other decomp markers * Get vtable class name * Vtable marker should identify struct * No colon for SIZE comment * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update CONTRIBUTING.md * Fix destructor/annotation * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md --------- Co-authored-by: disinvite <disinvite@users.noreply.github.com>
2023-12-06 07:10:45 -05:00
// VTABLE: LEGO1 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();
~MxStreamController() override; // vtable+0x00
2023-10-24 19:38:27 -04:00
(Proposal) Adjustments to "decomp" language (#308) * Adjustments to "decomp" language * Fix a comment * Fix accidental clang-formatting * Fix order * Fix order * Remove junk * Fix OFFSET * Adjustments based on new suggestions * Annotate globals * Globals in ISLE * More globals * Merge from parser2 branch * Allow prepending space for exact marker match * To eliminate noise, require the 0x prefix on offset for marker match * fix test from previous * Count tab stops for indented functions to reduce MISSED_END_OF_FUNCTION noise * FUNCTION to SYNTHETIC where needed * Missed marker conversion on SetAtomId * pylint cleanup, remove unused code * Fix unexpected function end, add more unit tests * Be more strict about synthetic name syntax * Revert "Missed marker conversion on SetAtomId" This reverts commit d87d665127fae7dd6e5bd48d9af14a0a829bf9e2. * Revert "FUNCTION to SYNTHETIC where needed" This reverts commit 8c815418d261ba8c5f67a9a2cae349fe4ac92db8. * Implicit lookup by name for functions * Fix VTABLE SYNTHETIC and other decomp markers * Get vtable class name * Vtable marker should identify struct * No colon for SIZE comment * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update CONTRIBUTING.md * Fix destructor/annotation * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md --------- Co-authored-by: disinvite <disinvite@users.noreply.github.com>
2023-12-06 07:10:45 -05:00
// FUNCTION: LEGO1 0x100c0f10
inline const char* ClassName() const override // vtable+0x0c
2023-10-24 19:38:27 -04:00
{
// STRING: LEGO1 0x10102130
2023-10-24 19:38:27 -04:00
return "MxStreamController";
}
(Proposal) Adjustments to "decomp" language (#308) * Adjustments to "decomp" language * Fix a comment * Fix accidental clang-formatting * Fix order * Fix order * Remove junk * Fix OFFSET * Adjustments based on new suggestions * Annotate globals * Globals in ISLE * More globals * Merge from parser2 branch * Allow prepending space for exact marker match * To eliminate noise, require the 0x prefix on offset for marker match * fix test from previous * Count tab stops for indented functions to reduce MISSED_END_OF_FUNCTION noise * FUNCTION to SYNTHETIC where needed * Missed marker conversion on SetAtomId * pylint cleanup, remove unused code * Fix unexpected function end, add more unit tests * Be more strict about synthetic name syntax * Revert "Missed marker conversion on SetAtomId" This reverts commit d87d665127fae7dd6e5bd48d9af14a0a829bf9e2. * Revert "FUNCTION to SYNTHETIC where needed" This reverts commit 8c815418d261ba8c5f67a9a2cae349fe4ac92db8. * Implicit lookup by name for functions * Fix VTABLE SYNTHETIC and other decomp markers * Get vtable class name * Vtable marker should identify struct * No colon for SIZE comment * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update CONTRIBUTING.md * Fix destructor/annotation * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md --------- Co-authored-by: disinvite <disinvite@users.noreply.github.com>
2023-12-06 07:10:45 -05:00
// FUNCTION: LEGO1 0x100c0f20
inline MxBool IsA(const char* p_name) const override // vtable+0x10
2023-10-24 19:38:27 -04:00
{
return !strcmp(p_name, MxStreamController::ClassName()) || MxCore::IsA(p_name);
2023-10-24 19:38:27 -04:00
}
virtual MxResult Open(const char* p_filename); // vtable+0x14
virtual MxResult VTable0x18(undefined4, undefined4); // vtable+0x18
virtual MxResult VTable0x1c(undefined4, undefined4); // vtable+0x1c
virtual MxResult VTable0x20(MxDSAction* p_action); // vtable+0x20
virtual MxResult VTable0x24(MxDSAction* p_action); // vtable+0x24
virtual MxDSStreamingAction* VTable0x28(); // vtable+0x28
virtual MxResult VTable0x2c(MxDSAction* p_action, MxU32 p_bufferval); // vtable+0x2c
virtual MxResult VTable0x30(MxDSAction* p_action); // vtable+0x30
2023-10-24 19:38:27 -04:00
void AddSubscriber(MxDSSubscriber* p_subscriber);
void RemoveSubscriber(MxDSSubscriber* p_subscriber);
MxResult FUN_100c1800(MxDSAction* p_action, MxU32 p_val);
MxResult FUN_100c1a00(MxDSAction* p_action, MxU32 p_offset);
MxPresenter* FUN_100c1e70(MxDSAction& p_action);
MxResult FUN_100c1f00(MxDSAction* p_action);
2024-07-02 13:46:40 -04:00
MxBool IsStoped(MxDSObject* p_obj);
MxResult InsertActionToList54(MxDSAction* p_action);
MxNextActionDataStart* FindNextActionDataStartFromStreamingAction(MxDSStreamingAction* p_action);
2023-10-24 19:38:27 -04:00
inline MxAtomId& GetAtom() { return m_atom; }
inline MxStreamProvider* GetProvider() { return m_provider; }
inline MxStreamListMxDSAction& GetUnk0x3c() { return m_unk0x3c; }
inline MxStreamListMxDSAction& GetUnk0x54() { return m_unk0x54; }
inline MxStreamListMxDSSubscriber& GetSubscriberList() { return m_subscriberList; }
2023-10-24 19:38:27 -04:00
protected:
MxCriticalSection m_criticalSection; // 0x08
MxAtomId m_atom; // 0x24
2023-11-28 08:26:39 -05:00
MxStreamProvider* m_provider; // 0x28
undefined4* m_unk0x2c; // 0x2c
2023-11-28 08:26:39 -05:00
MxStreamListMxDSSubscriber m_subscriberList; // 0x30
MxStreamListMxDSAction m_unk0x3c; // 0x3c
2023-11-28 08:26:39 -05:00
MxStreamListMxNextActionDataStart m_nextActionList; // 0x48
MxStreamListMxDSAction m_unk0x54; // 0x54
2023-11-28 08:26:39 -05:00
MxDSAction* m_action0x60; // 0x60
2023-04-27 22:19:39 -04:00
};
// TEMPLATE: LEGO1 0x100c0d60
// list<MxDSAction *,allocator<MxDSAction *> >::~list<MxDSAction *,allocator<MxDSAction *> >
// TEMPLATE: LEGO1 0x100c0dd0
// list<MxDSSubscriber *,allocator<MxDSSubscriber *> >::~list<MxDSSubscriber *,allocator<MxDSSubscriber *> >
// TEMPLATE: LEGO1 0x100c0e40
// list<MxDSSubscriber *,allocator<MxDSSubscriber *> >::_Buynode
// clang-format off
// TEMPLATE: LEGO1 0x100c0e70
// list<MxNextActionDataStart *,allocator<MxNextActionDataStart *> >::~list<MxNextActionDataStart *,allocator<MxNextActionDataStart *> >
// clang-format on
// TEMPLATE: LEGO1 0x100c0ee0
// list<MxNextActionDataStart *,allocator<MxNextActionDataStart *> >::_Buynode
2023-12-28 11:56:54 -05:00
// SYNTHETIC: LEGO1 0x100c0fa0
// MxStreamController::`scalar deleting destructor'
// FUNCTION: LEGO1 0x100c0fc0
// MxStreamListMxDSSubscriber::~MxStreamListMxDSSubscriber
// FUNCTION: LEGO1 0x100c1010
// MxStreamListMxDSAction::~MxStreamListMxDSAction
// FUNCTION: LEGO1 0x100c1060
// MxStreamListMxNextActionDataStart::~MxStreamListMxNextActionDataStart
// TEMPLATE: LEGO1 0x100c10b0
// MxStreamList<MxDSSubscriber *>::~MxStreamList<MxDSSubscriber *>
// TEMPLATE: LEGO1 0x100c1100
// MxStreamList<MxDSAction *>::~MxStreamList<MxDSAction *>
// TEMPLATE: LEGO1 0x100c1150
// MxStreamList<MxNextActionDataStart *>::~MxStreamList<MxNextActionDataStart *>
// TEMPLATE: LEGO1 0x100c11a0
// List<MxDSSubscriber *>::~List<MxDSSubscriber *>
// TEMPLATE: LEGO1 0x100c11f0
// List<MxDSAction *>::~List<MxDSAction *>
// TEMPLATE: LEGO1 0x100c1240
// List<MxNextActionDataStart *>::~List<MxNextActionDataStart *>
// TEMPLATE: LEGO1 0x100c1bc0
// list<MxDSAction *,allocator<MxDSAction *> >::insert
2023-04-27 22:19:39 -04:00
#endif // MXSTREAMCONTROLLER_H