Implement/match LegoPathController::Read (#904)

* Implement/match LegoPathController::Read

* Add size asserts
This commit is contained in:
Christian Semmler
2024-05-11 12:23:18 -04:00
committed by GitHub
parent 5df947dbb9
commit f442f1a2f7
11 changed files with 276 additions and 27 deletions

View File

@@ -70,9 +70,9 @@ void LegoPathPresenter::Destroy()
// FUNCTION: LEGO1 0x10044c20
void LegoPathPresenter::ReadyTickle()
{
LegoWorld* currentWorld = CurrentWorld();
LegoWorld* world = CurrentWorld();
if (currentWorld) {
if (world) {
MxStreamChunk* chunk = m_subscriber->PopData();
if (chunk) {
@@ -84,8 +84,8 @@ void LegoPathPresenter::ReadyTickle()
else {
ParseExtra();
controller->VTable0x14(chunk->GetData(), m_action->GetLocation(), m_trigger);
currentWorld->AddPath(controller);
controller->Create(chunk->GetData(), m_action->GetLocation(), m_trigger);
world->AddPath(controller);
m_subscriber->FreeDataChunk(chunk);
ProgressTickleState(MxPresenter::e_starting);