mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 08:24:16 +00:00
100% match of many functions in the LegoGameState::Save codepath (#86)
* Only include decomps * One more function * Add offset to endOfVariables * Remove leftover header * Use undefined where applicable * Fixes, refactorings * Fixes * Fix calling convention * Added offset comment --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
35
LEGO1/legoobjectfactory.cpp
Normal file
35
LEGO1/legoobjectfactory.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#include "legoobjectfactory.h"
|
||||
|
||||
#include "infocenterstate.h"
|
||||
#include "decomp.h"
|
||||
|
||||
// TODO: Uncomment once we have all the relevant types ready
|
||||
// DECOMP_SIZE_ASSERT(LegoObjectFactory, 0x1c8);
|
||||
|
||||
// OFFSET: LEGO1 0x10006e40
|
||||
LegoObjectFactory::LegoObjectFactory()
|
||||
{
|
||||
#define X(V) this->m_id##V = MxAtomId(#V, LookupMode_Exact);
|
||||
FOR_LEGOOBJECTFACTORY_OBJECTS(X)
|
||||
#undef X
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10009a90
|
||||
MxCore *LegoObjectFactory::Create(const char *p_name)
|
||||
{
|
||||
MxAtomId atom(p_name, LookupMode_Exact);
|
||||
|
||||
if (0) {
|
||||
#define X(V) } else if (this->m_id##V == atom) { return new V;
|
||||
FOR_LEGOOBJECTFACTORY_OBJECTS(X)
|
||||
#undef X
|
||||
} else {
|
||||
return MxObjectFactory::Create(p_name);
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1000fb30 STUB
|
||||
void LegoObjectFactory::Destroy(void *p_object)
|
||||
{
|
||||
// TODO
|
||||
}
|
Reference in New Issue
Block a user