mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-24 08:41:16 +00:00
Refine MxObjectFactory
This commit is contained in:
parent
a24a798c82
commit
016c04c47a
@ -29,17 +29,19 @@ MxObjectFactory::MxObjectFactory()
|
|||||||
MxCore *MxObjectFactory::Create(const char *p_name)
|
MxCore *MxObjectFactory::Create(const char *p_name)
|
||||||
{
|
{
|
||||||
MxAtomId atom(p_name, LookupMode_Exact);
|
MxAtomId atom(p_name, LookupMode_Exact);
|
||||||
|
MxCore* object = NULL;
|
||||||
|
|
||||||
if (0) {
|
if (0) {}
|
||||||
#define X(V) } else if (this->m_id##V == atom) { return new V;
|
#define X(V) else if (this->m_id##V == atom) { object = new V; }
|
||||||
FOR_MXOBJECTFACTORY_OBJECTS(X)
|
FOR_MXOBJECTFACTORY_OBJECTS(X)
|
||||||
#undef X
|
#undef X
|
||||||
} else {
|
else {}
|
||||||
return NULL;
|
|
||||||
}
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100b1a30 STUB
|
// OFFSET: LEGO1 0x100b1a30
|
||||||
void MxObjectFactory::Destroy(void *p_object) {
|
void MxObjectFactory::Destroy(void *p_object)
|
||||||
// FIXME
|
{
|
||||||
|
delete (MxCore*)p_object;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user