2023-07-02 03:00:28 -04:00
|
|
|
#include "mxobjectfactory.h"
|
|
|
|
|
|
|
|
#include "mxpresenter.h"
|
|
|
|
#include "mxcompositepresenter.h"
|
|
|
|
#include "mxvideopresenter.h"
|
|
|
|
#include "mxflcpresenter.h"
|
|
|
|
#include "mxsmkpresenter.h"
|
|
|
|
#include "mxstillpresenter.h"
|
|
|
|
#include "mxwavepresenter.h"
|
|
|
|
#include "mxmidipresenter.h"
|
|
|
|
#include "mxeventpresenter.h"
|
|
|
|
#include "mxloopingflcpresenter.h"
|
|
|
|
#include "mxloopingsmkpresenter.h"
|
|
|
|
#include "mxloopingmidipresenter.h"
|
|
|
|
|
|
|
|
#include "decomp.h"
|
|
|
|
|
|
|
|
DECOMP_SIZE_ASSERT(MxObjectFactory, 0x38); // 100af1db
|
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100b0d80
|
|
|
|
MxObjectFactory::MxObjectFactory()
|
|
|
|
{
|
|
|
|
#define X(V) this->m_id##V = MxAtomId(#V, LookupMode_Exact);
|
|
|
|
FOR_MXOBJECTFACTORY_OBJECTS(X)
|
|
|
|
#undef X
|
|
|
|
}
|
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100b12c0
|
2023-10-12 12:18:24 -04:00
|
|
|
MxCore *MxObjectFactory::Create(const char *p_name)
|
2023-07-02 03:00:28 -04:00
|
|
|
{
|
2023-10-12 12:18:24 -04:00
|
|
|
MxAtomId atom(p_name, LookupMode_Exact);
|
2023-10-14 08:59:06 -04:00
|
|
|
MxCore* object = NULL;
|
2023-07-02 03:00:28 -04:00
|
|
|
|
2023-10-14 08:59:06 -04:00
|
|
|
if (0) {}
|
|
|
|
#define X(V) else if (this->m_id##V == atom) { object = new V; }
|
2023-07-02 03:00:28 -04:00
|
|
|
FOR_MXOBJECTFACTORY_OBJECTS(X)
|
|
|
|
#undef X
|
2023-10-14 08:59:06 -04:00
|
|
|
else {}
|
|
|
|
|
|
|
|
return object;
|
2023-07-02 03:00:28 -04:00
|
|
|
}
|
|
|
|
|
2023-10-14 08:59:06 -04:00
|
|
|
// OFFSET: LEGO1 0x100b1a30
|
|
|
|
void MxObjectFactory::Destroy(MxCore *p_object)
|
|
|
|
{
|
|
|
|
delete p_object;
|
2023-07-02 03:00:28 -04:00
|
|
|
}
|