Start MxCompositePresenter ctor/dtor (#186)

* Start MxCompositePresenter ctor/dtor

* Add MxUnkList

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Joshua Peisach 2023-10-08 11:25:38 -04:00 committed by GitHub
parent aa516af434
commit 7c674cbb47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 46 additions and 34 deletions

View file

@ -1,17 +1,18 @@
#include "mxcompositepresenter.h"
#include "decomp.h"
#include "mxnotificationmanager.h"
DECOMP_SIZE_ASSERT(MxCompositePresenter, 0x4c);
// OFFSET: LEGO1 0x100b60b0 STUB
// OFFSET: LEGO1 0x100b60b0
MxCompositePresenter::MxCompositePresenter()
{
// TODO
NotificationManager()->Register(this);
}
// OFFSET: LEGO1 0x100b6390 STUB
// OFFSET: LEGO1 0x100b6390
MxCompositePresenter::~MxCompositePresenter()
{
// TODO
NotificationManager()->Unregister(this);
}

View file

@ -2,6 +2,7 @@
#define MXCOMPOSITEPRESENTER_H
#include "mxpresenter.h"
#include "mxunklist.h"
// VTABLE 0x100dc618
// SIZE 0x4c
@ -24,9 +25,7 @@ public:
return !strcmp(name, MxCompositePresenter::ClassName()) || MxPresenter::IsA(name);
}
undefined m_unk40;
undefined4 *m_unk44;
undefined4 m_unk48;
MxUnkList m_list;
};
#endif // MXCOMPOSITEPRESENTER_H

View file

@ -5,6 +5,7 @@
#include "mxstreamprovider.h"
#include "mxthread.h"
#include "mxcriticalsection.h"
#include "mxunklist.h"
class MxDiskStreamProvider;
@ -23,32 +24,6 @@ private:
MxDiskStreamProvider *m_target;
};
// TODO
struct MxDiskStreamListNode {
MxDiskStreamListNode *m_unk00;
MxDiskStreamListNode *m_unk04;
undefined4 m_unk08;
};
// TODO
struct MxDiskStreamList {
inline MxDiskStreamList() {
undefined unk;
this->m_unk00 = unk;
MxDiskStreamListNode *node = new MxDiskStreamListNode();
node->m_unk00 = node;
node->m_unk04 = node;
this->m_head = node;
this->m_count = 0;
}
undefined m_unk00;
MxDiskStreamListNode *m_head;
MxU32 m_count;
};
// VTABLE 0x100dd138
class MxDiskStreamProvider : public MxStreamProvider
{
@ -80,7 +55,7 @@ private:
undefined m_remainingWork; // 0x34
undefined m_unk35; // 0x35
MxCriticalSection m_criticalSection; // 0x38
MxDiskStreamList m_list;
MxUnkList m_list;
};
#endif // MXDISKSTREAMPROVIDER_H

37
LEGO1/mxunklist.h Normal file
View file

@ -0,0 +1,37 @@
#ifndef MXUNKLIST_H
#define MXUNKLIST_H
#include "decomp.h"
#include "mxtypes.h"
/*
* This is an as-of-yet unknown list-like data structure.
* The class hierarchy/structure isn't quite correct yet.
*/
struct MxUnkListNode {
MxUnkListNode *m_unk00;
MxUnkListNode *m_unk04;
undefined4 m_unk08;
};
class MxUnkList {
public:
inline MxUnkList() {
undefined unk;
this->m_unk00 = unk;
MxUnkListNode *node = new MxUnkListNode();
node->m_unk00 = node;
node->m_unk04 = node;
this->m_head = node;
this->m_count = 0;
}
undefined m_unk00;
MxUnkListNode *m_head;
MxU32 m_count;
};
#endif // MXUNKLIST_H