isle-portable/LEGO1/lego/legoomni/src/entity/legoactorpresenter.cpp
Nathan M Gilbert fca8f74bd8
Fix Annotations and LegoAnimActor class structure. (#710)
* Fix size annotations for legoomni
Fix structure and add placeholder annotations for LegoAnimActor and subclasses

* Fix LegoCarRaceActor constructor
Fix function name in LegoRaceCar

* Add size assertions for legoomni and fix sizes

* Various style fixes

* Use other marker so vtable.py doesn't compare

* Revert "Use other marker so vtable.py doesn't compare"

This reverts commit 608985cd73856598b95c15aed9f8f022645e9e7a.

* Fix copy/paste error

* Remove stale comment.

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-03-22 21:30:58 -04:00

44 lines
963 B
C++

#include "legoactorpresenter.h"
#include "legoentity.h"
#include "misc.h"
DECOMP_SIZE_ASSERT(LegoActorPresenter, 0x50)
// FUNCTION: LEGO1 0x10076c30
void LegoActorPresenter::ReadyTickle()
{
if (CurrentWorld()) {
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()
{
if (m_entity->GetROI()) {
ProgressTickleState(e_streaming);
ParseExtra();
}
}
// FUNCTION: LEGO1 0x10076cc0
void LegoActorPresenter::ParseExtra()
{
MxU16 extraLength;
char* extraData;
m_action->GetExtra(extraLength, extraData);
if (extraLength & MAXWORD) {
char extraCopy[512];
memcpy(extraCopy, extraData, extraLength & MAXWORD);
extraCopy[extraLength & MAXWORD] = '\0';
m_entity->ParseAction(extraCopy);
}
}