mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-26 09:38:14 -05:00
Bootstrap MxDSSubscriber (#352)
* Bootstrap MxDSSubscriber * Fix offset comment
This commit is contained in:
parent
b2c730e1df
commit
9eefc82c8c
5 changed files with 78 additions and 13 deletions
|
@ -1,24 +1,61 @@
|
|||
#include "mxdssubscriber.h"
|
||||
|
||||
#include "mxstreamcontroller.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxDSSubscriber, 0x4c);
|
||||
|
||||
// STUB: LEGO1 0x100b7bb0
|
||||
// FUNCTION: LEGO1 0x100b7bb0
|
||||
MxDSSubscriber::MxDSSubscriber()
|
||||
{
|
||||
// TODO
|
||||
m_unk0x48 = -1;
|
||||
m_objectId = -1;
|
||||
m_unk0x20 = NULL;
|
||||
m_unk0x3c = NULL;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100b7e00
|
||||
// FUNCTION: LEGO1 0x100b7e00
|
||||
MxDSSubscriber::~MxDSSubscriber()
|
||||
{
|
||||
// TODO
|
||||
if (m_controller)
|
||||
m_controller->FUN_100c1620(this);
|
||||
|
||||
FUN_100b8030();
|
||||
|
||||
if (m_unk0x20)
|
||||
delete m_unk0x20;
|
||||
m_unk0x20 = NULL;
|
||||
|
||||
if (m_unk0x3c)
|
||||
delete m_unk0x3c;
|
||||
m_unk0x3c = NULL;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100b7ed0
|
||||
MxResult MxDSSubscriber::FUN_100b7ed0(MxStreamController*, MxU32, MxS16)
|
||||
// FUNCTION: LEGO1 0x100b7ed0
|
||||
MxResult MxDSSubscriber::Create(MxStreamController* p_controller, MxU32 p_objectId, MxS16 p_unk0x48)
|
||||
{
|
||||
m_objectId = p_objectId;
|
||||
m_unk0x48 = p_unk0x48;
|
||||
|
||||
if (!p_controller)
|
||||
return FAILURE;
|
||||
m_controller = p_controller;
|
||||
|
||||
m_unk0x20 = new MxStreamChunkListCursor(&m_unk0x08);
|
||||
if (!m_unk0x20)
|
||||
return FAILURE;
|
||||
|
||||
m_unk0x3c = new MxStreamChunkListCursor(&m_unk0x24);
|
||||
if (!m_unk0x3c)
|
||||
return FAILURE;
|
||||
|
||||
m_controller->FUN_100c15d0(this);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100b8030
|
||||
void MxDSSubscriber::FUN_100b8030()
|
||||
{
|
||||
// TODO
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100b8250
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "mxcore.h"
|
||||
#include "mxdschunk.h"
|
||||
#include "mxstreamchunk.h"
|
||||
#include "mxstreamchunklist.h"
|
||||
|
||||
class MxStreamController;
|
||||
|
||||
|
@ -28,13 +29,26 @@ class MxDSSubscriber : public MxCore {
|
|||
return !strcmp(p_name, MxDSSubscriber::ClassName()) || MxCore::IsA(p_name);
|
||||
}
|
||||
|
||||
MxResult FUN_100b7ed0(MxStreamController*, MxU32, MxS16);
|
||||
MxResult Create(MxStreamController* p_controller, MxU32 p_objectId, MxS16 p_unk0x48);
|
||||
void FUN_100b8030();
|
||||
MxStreamChunk* FUN_100b8250();
|
||||
MxStreamChunk* FUN_100b8360();
|
||||
void FUN_100b8390(MxStreamChunk*);
|
||||
|
||||
private:
|
||||
undefined m_pad[0x44]; // 0x8
|
||||
MxStreamChunkList m_unk0x08; // 0x08
|
||||
MxStreamChunkListCursor* m_unk0x20; // 0x20
|
||||
MxStreamChunkList m_unk0x24; // 0x24
|
||||
MxStreamChunkListCursor* m_unk0x3c; // 0x3c
|
||||
MxStreamController* m_controller; // 0x40
|
||||
MxU32 m_objectId; // 0x44
|
||||
MxS16 m_unk0x48; // 0x48
|
||||
};
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100b7de0
|
||||
// MxDSSubscriber::`scalar deleting destructor'
|
||||
|
||||
// TEMPLATE: LEGO1 0x100b7d00
|
||||
// MxStreamChunkList::~MxStreamChunkList
|
||||
|
||||
#endif // MXDSSUBSCRIBER_H
|
||||
|
|
|
@ -124,7 +124,7 @@ MxResult MxMediaPresenter::StartAction(MxStreamController* p_controller, MxDSAct
|
|||
m_subscriber = new MxDSSubscriber;
|
||||
|
||||
if (!m_subscriber ||
|
||||
m_subscriber->FUN_100b7ed0(p_controller, p_action->GetObjectId(), p_action->GetUnknown24()) != SUCCESS)
|
||||
m_subscriber->Create(p_controller, p_action->GetObjectId(), p_action->GetUnknown24()) != SUCCESS)
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,6 +52,18 @@ MxResult MxStreamController::Open(const char* p_filename)
|
|||
return SUCCESS;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100c15d0
|
||||
void MxStreamController::FUN_100c15d0(MxDSSubscriber* p_subscriber)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100c1620
|
||||
void MxStreamController::FUN_100c1620(MxDSSubscriber* p_subscriber)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c1690
|
||||
MxResult MxStreamController::VTable0x20(MxDSAction* p_action)
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "mxcriticalsection.h"
|
||||
#include "mxdsaction.h"
|
||||
#include "mxdsobject.h"
|
||||
#include "mxdssubscriber.h"
|
||||
#include "mxstl/stlcompat.h"
|
||||
#include "mxstreamlist.h"
|
||||
#include "mxstreamprovider.h"
|
||||
|
@ -18,7 +19,6 @@ class MxDSStreamingAction;
|
|||
class MxStreamController : public MxCore {
|
||||
public:
|
||||
MxStreamController();
|
||||
|
||||
virtual ~MxStreamController() override; // vtable+0x0
|
||||
|
||||
// FUNCTION: LEGO1 0x100c0f10
|
||||
|
@ -43,12 +43,14 @@ class MxStreamController : public MxCore {
|
|||
virtual MxResult VTable0x2c(MxDSAction* p_action, MxU32 p_bufferval); // vtable+0x2c
|
||||
virtual MxResult VTable0x30(MxDSAction* p_action); // vtable+0x30
|
||||
|
||||
void FUN_100c15d0(MxDSSubscriber* p_subscriber);
|
||||
void FUN_100c1620(MxDSSubscriber* p_subscriber);
|
||||
MxResult FUN_100c1800(MxDSAction* p_action, MxU32 p_val);
|
||||
MxBool FUN_100c20d0(MxDSObject& p_obj);
|
||||
MxResult FUN_100c1a00(MxDSAction* p_action, MxU32 p_bufferval);
|
||||
MxPresenter* FUN_100c1e70(MxDSAction& p_action);
|
||||
MxResult InsertActionToList54(MxDSAction* p_action);
|
||||
MxResult FUN_100c1f00(MxDSAction* p_action);
|
||||
MxBool FUN_100c20d0(MxDSObject& p_obj);
|
||||
MxResult InsertActionToList54(MxDSAction* p_action);
|
||||
|
||||
inline MxAtomId& GetAtom() { return m_atom; };
|
||||
inline MxStreamListMxDSAction& GetUnk0x54() { return m_unk0x54; };
|
||||
|
|
Loading…
Reference in a new issue