mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 16:34:06 +00:00
Finish LegoEntityPresenter (#363)
* Lego entity implementation * Finish LegoEntityPresenter::ReadyTickle * Update legoentitypresenter.h * use empty * Formatting --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
@@ -2,12 +2,14 @@
|
||||
|
||||
#include "decomp.h"
|
||||
#include "define.h"
|
||||
#include "legoobjectfactory.h"
|
||||
#include "legoomni.h"
|
||||
#include "mxactionnotificationparam.h"
|
||||
#include "mxautolocker.h"
|
||||
#include "mxcompositepresenter.h"
|
||||
#include "mxdsanim.h"
|
||||
#include "mxdssound.h"
|
||||
#include "mxentity.h"
|
||||
#include "mxnotificationmanager.h"
|
||||
#include "mxparam.h"
|
||||
#include "mxstreamer.h"
|
||||
@@ -304,6 +306,27 @@ const char* PresenterNameDispatch(const MxDSAction& p_action)
|
||||
return name;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b5410
|
||||
MxEntity* MxPresenter::CreateEntityBackend(const char* p_name)
|
||||
{
|
||||
char buffer[512];
|
||||
char buffer2[512];
|
||||
strcpy(buffer, p_name);
|
||||
|
||||
MxU16 extraLen = m_action->GetExtraLength();
|
||||
|
||||
buffer[0] = extraLen;
|
||||
buffer[1] = extraLen >> 8;
|
||||
if (extraLen) {
|
||||
extraLen &= MAXWORD;
|
||||
memcpy(buffer2 + 2, m_action->GetExtraData(), extraLen);
|
||||
buffer2[extraLen + 2] = 0;
|
||||
KeyValueStringParse(buffer, g_strOBJECT, buffer2 + 2);
|
||||
}
|
||||
|
||||
return (MxEntity*) ObjectFactory()->Create(buffer);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b54c0
|
||||
MxBool MxPresenter::IsEnabled()
|
||||
{
|
||||
|
Reference in New Issue
Block a user