Implement/match LegoAct2::FUN_100516b0 and LegoAct2::FUN_100517b0 (#1204)

* Implement/match `LegoAct2::FUN_100516b0` and `LegoAct2::FUN_100517b0`

* Fix
This commit is contained in:
Christian Semmler 2024-12-10 13:49:13 -07:00 committed by GitHub
parent c2ee761f81
commit 59e2aa2804
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 33 additions and 6 deletions

View file

@ -291,7 +291,7 @@ void Act2Actor::VTable0x70(float p_time)
m_unk0x1e = 3;
m_unk0x24 = p_time;
if (!((LegoAct2*) CurrentWorld())->FUN_100516b0()) {
if (((LegoAct2*) CurrentWorld())->FUN_100516b0() == SUCCESS) {
FUN_100199f0(1);
}
#ifdef NDEBUG

View file

@ -659,18 +659,45 @@ MxLong LegoAct2::HandlePathStruct(LegoPathStructNotificationParam& p_param)
return 0;
}
// STUB: LEGO1 0x100516b0
// STUB: BETA10 0x1003bcbc
// FUNCTION: LEGO1 0x100516b0
// FUNCTION: BETA10 0x1003bcbc
MxResult LegoAct2::FUN_100516b0()
{
// TODO
if (m_nextBrick > 4) {
return FAILURE;
}
Act2Brick& brick = m_bricks[m_nextBrick];
brick.Create(m_nextBrick);
MxMatrix local2world = m_ambulance->GetLocal2World();
MxMatrix local2world2 = local2world;
LegoPathBoundary* boundary = m_unk0x1138->GetBoundary();
local2world[3][1] += 1.3;
local2world2[3][1] -= 0.1;
brick.FUN_1007a670(local2world, local2world2, boundary);
m_nextBrick++;
m_unk0x10c4 = 9;
m_unk0x10d0 = 0;
return SUCCESS;
}
// STUB: LEGO1 0x100517b0
// FUNCTION: LEGO1 0x100517b0
void LegoAct2::FUN_100517b0()
{
// TODO
Act2Brick& brick = m_bricks[m_nextBrick];
brick.Create(m_nextBrick);
MxMatrix local2world = m_ambulance->GetLocal2World();
local2world[3][1] += 1.5;
LegoROI* roi = brick.GetROI();
roi->FUN_100a58f0(local2world);
roi->VTable0x14();
brick.PlayWhistleSound();
m_nextBrick++;
}
// FUNCTION: LEGO1 0x10051840