mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 08:24:16 +00:00
Refine MxObjectFactory (#205)
* Refine MxObjectFactory * Change interface of Destroy --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
@@ -29,17 +29,19 @@ MxObjectFactory::MxObjectFactory()
|
||||
MxCore *MxObjectFactory::Create(const char *p_name)
|
||||
{
|
||||
MxAtomId atom(p_name, LookupMode_Exact);
|
||||
MxCore* object = NULL;
|
||||
|
||||
if (0) {
|
||||
#define X(V) } else if (this->m_id##V == atom) { return new V;
|
||||
if (0) {}
|
||||
#define X(V) else if (this->m_id##V == atom) { object = new V; }
|
||||
FOR_MXOBJECTFACTORY_OBJECTS(X)
|
||||
#undef X
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
else {}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b1a30 STUB
|
||||
void MxObjectFactory::Destroy(void *p_object) {
|
||||
// FIXME
|
||||
// OFFSET: LEGO1 0x100b1a30
|
||||
void MxObjectFactory::Destroy(MxCore *p_object)
|
||||
{
|
||||
delete p_object;
|
||||
}
|
||||
|
Reference in New Issue
Block a user