mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-21 15:21:15 +00:00
Implement MxObjectFactory::{MxObjectFactory,Create}
Matching of MxObjectFactory::Create is not good, because none of the other objects have been implemented.
This commit is contained in:
parent
4d31ca4d1d
commit
fe64453c34
@ -127,6 +127,7 @@ add_library(lego1 SHARED
|
|||||||
LEGO1/mxmidipresenter.cpp
|
LEGO1/mxmidipresenter.cpp
|
||||||
LEGO1/mxmusicpresenter.cpp
|
LEGO1/mxmusicpresenter.cpp
|
||||||
LEGO1/mxnotificationmanager.cpp
|
LEGO1/mxnotificationmanager.cpp
|
||||||
|
LEGO1/mxobjectfactory.cpp
|
||||||
LEGO1/mxomni.cpp
|
LEGO1/mxomni.cpp
|
||||||
LEGO1/mxomnicreateflags.cpp
|
LEGO1/mxomnicreateflags.cpp
|
||||||
LEGO1/mxomnicreateparam.cpp
|
LEGO1/mxomnicreateparam.cpp
|
||||||
|
|||||||
45
LEGO1/mxobjectfactory.cpp
Normal file
45
LEGO1/mxobjectfactory.cpp
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
#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_STATIC_ASSERT(sizeof(MxObjectFactory) == 56); // 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
|
||||||
|
MxCore *MxObjectFactory::Create(const char *name)
|
||||||
|
{
|
||||||
|
MxAtomId atom(name, LookupMode_Exact);
|
||||||
|
|
||||||
|
if (0) {
|
||||||
|
#define X(V) } else if (this->m_id##V == atom) { return new V;
|
||||||
|
FOR_MXOBJECTFACTORY_OBJECTS(X)
|
||||||
|
#undef X
|
||||||
|
} else {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100b1a30 STUB
|
||||||
|
void MxObjectFactory::vtable18(void *) {
|
||||||
|
// FIXME
|
||||||
|
}
|
||||||
@ -2,11 +2,33 @@
|
|||||||
#define MXOBJECTFACTORY_H
|
#define MXOBJECTFACTORY_H
|
||||||
|
|
||||||
#include "mxcore.h"
|
#include "mxcore.h"
|
||||||
|
#include "mxatomid.h"
|
||||||
|
|
||||||
|
#define FOR_MXOBJECTFACTORY_OBJECTS(X) \
|
||||||
|
X(MxPresenter) \
|
||||||
|
X(MxCompositePresenter) \
|
||||||
|
X(MxVideoPresenter) \
|
||||||
|
X(MxFlcPresenter) \
|
||||||
|
X(MxSmkPresenter) \
|
||||||
|
X(MxStillPresenter) \
|
||||||
|
X(MxWavePresenter) \
|
||||||
|
X(MxMIDIPresenter) \
|
||||||
|
X(MxEventPresenter) \
|
||||||
|
X(MxLoopingFlcPresenter) \
|
||||||
|
X(MxLoopingSmkPresenter) \
|
||||||
|
X(MxLoopingMIDIPresenter)
|
||||||
|
|
||||||
// VTABLE 0x100dc220
|
// VTABLE 0x100dc220
|
||||||
class MxObjectFactory : public MxCore
|
class MxObjectFactory : public MxCore
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
MxObjectFactor();
|
||||||
|
virtual MxCore *Create(const char *name); // vtable 0x14
|
||||||
|
virtual void vtable18(void *); // vtable 0x18
|
||||||
|
private:
|
||||||
|
#define X(V) MxAtomId m_id##V;
|
||||||
|
FOR_MXOBJECTFACTORY_OBJECTS(X)
|
||||||
|
#undef X
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MXOBJECTFACTORY_H
|
#endif // MXOBJECTFACTORY_H
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user