isle-portable/LEGO1/lego/legoomni/src/entity/legoactorpresenter.cpp

40 lines
881 B
C++
Raw Normal View History

#include "legoactorpresenter.h"
#include "legoentity.h"
#include "legoomni.h"
// FUNCTION: LEGO1 0x10076c30
void LegoActorPresenter::ReadyTickle()
{
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);
}
ProgressTickleState(e_starting);
}
}
// FUNCTION: LEGO1 0x10076c90
void LegoActorPresenter::StartingTickle()
{
2024-01-14 16:49:11 -05:00
if (m_entity->GetROI()) {
ProgressTickleState(e_streaming);
ParseExtra();
}
}
// FUNCTION: LEGO1 0x10076cc0
void LegoActorPresenter::ParseExtra()
{
char buffer[512];
char* extraData = m_action->GetExtraData();
if (m_action->GetExtraLength()) {
memcpy(buffer, extraData, m_action->GetExtraLength());
buffer[m_action->GetExtraLength()] = 0;
2024-01-14 16:49:11 -05:00
m_entity->ParseAction(buffer);
}
}