2024-01-13 17:06:13 -05:00
|
|
|
#include "legoactorpresenter.h"
|
|
|
|
|
|
|
|
#include "legoentity.h"
|
|
|
|
#include "legoomni.h"
|
|
|
|
|
|
|
|
// FUNCTION: LEGO1 0x10076c30
|
|
|
|
void LegoActorPresenter::ReadyTickle()
|
|
|
|
{
|
2024-02-02 12:18:46 -05:00
|
|
|
if (CurrentWorld()) {
|
2024-01-14 16:49:11 -05:00
|
|
|
m_entity = (LegoEntity*) CreateEntity("LegoActor");
|
|
|
|
if (m_entity) {
|
|
|
|
SetEntityLocation(m_action->GetLocation(), m_action->GetDirection(), m_action->GetUp());
|
|
|
|
m_entity->Create(*m_action);
|
2024-01-13 17:06:13 -05:00
|
|
|
}
|
2024-01-17 11:53:53 -05:00
|
|
|
ProgressTickleState(e_starting);
|
2024-01-13 17:06:13 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// FUNCTION: LEGO1 0x10076c90
|
|
|
|
void LegoActorPresenter::StartingTickle()
|
|
|
|
{
|
2024-01-14 16:49:11 -05:00
|
|
|
if (m_entity->GetROI()) {
|
2024-01-17 11:53:53 -05:00
|
|
|
ProgressTickleState(e_streaming);
|
2024-01-13 17:06:13 -05:00
|
|
|
ParseExtra();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// FUNCTION: LEGO1 0x10076cc0
|
|
|
|
void LegoActorPresenter::ParseExtra()
|
|
|
|
{
|
2024-02-29 13:15:20 -05:00
|
|
|
MxU16 extraLength;
|
|
|
|
char* extraData;
|
|
|
|
m_action->GetExtra(extraLength, extraData);
|
2024-01-13 17:06:13 -05:00
|
|
|
|
2024-02-29 13:15:20 -05:00
|
|
|
if (extraLength & MAXWORD) {
|
|
|
|
char extraCopy[512];
|
|
|
|
memcpy(extraCopy, extraData, extraLength & MAXWORD);
|
|
|
|
extraCopy[extraLength & MAXWORD] = '\0';
|
|
|
|
|
|
|
|
m_entity->ParseAction(extraCopy);
|
2024-01-13 17:06:13 -05:00
|
|
|
}
|
|
|
|
}
|