Add Act3Ammo, match Act3::Act3 (#1196)

* Implement `Act3Ammo`, match `Act3::Act3`

* Move

* Fix match
This commit is contained in:
Christian Semmler
2024-12-07 11:57:59 -07:00
committed by GitHub
parent 5be00e1799
commit 97fb6e4f15
7 changed files with 159 additions and 9 deletions

View File

@@ -0,0 +1,44 @@
#include "act3ammo.h"
#include "legocharactermanager.h"
#include "misc.h"
#include "roi/legoroi.h"
#include <assert.h>
DECOMP_SIZE_ASSERT(Act3Ammo, 0x1a0)
// FUNCTION: LEGO1 0x100537f0
// FUNCTION: BETA10 0x1001d648
Act3Ammo::Act3Ammo()
{
m_unk0x154 = 0;
m_unk0x15c = 0;
}
// FUNCTION: LEGO1 0x100538a0
// FUNCTION: BETA10 0x1001d6e7
Act3Ammo::~Act3Ammo()
{
Destroy(TRUE);
}
// FUNCTION: LEGO1 0x10053900
// FUNCTION: BETA10 0x1001d759
void Act3Ammo::Destroy(MxBool p_fromDestructor)
{
if (!p_fromDestructor) {
assert(0);
}
else if (m_roi != NULL) {
CharacterManager()->ReleaseActor(m_roi->GetName());
m_roi = NULL;
}
}
// STUB: LEGO1 0x10054050
// STUB: BETA10 0x1001e362
void Act3Ammo::VTable0x70(float p_time)
{
// TODO
}

View File

@@ -42,7 +42,7 @@ MxResult Helicopter::Create(MxDSAction& p_dsAction)
m_world = CurrentWorld();
if (m_world->IsA("Act3")) {
((Act3*) m_world)->SetUnknown420c(this);
((Act3*) m_world)->SetHelicopter(this);
}
if (m_world != NULL) {

View File

@@ -1,12 +1,34 @@
#include "act3.h"
#include "legonavcontroller.h"
#include "misc.h"
#include "mxmisc.h"
#include "mxnotificationmanager.h"
DECOMP_SIZE_ASSERT(Act3, 0x4274)
DECOMP_SIZE_ASSERT(Act3State, 0x0c)
DECOMP_SIZE_ASSERT(Act3ListElement, 0x0c)
DECOMP_SIZE_ASSERT(Act3List, 0x10)
// STUB: LEGO1 0x10072270
// FUNCTION: LEGO1 0x10072270
// FUNCTION: BETA10 0x10015470
Act3::Act3()
{
// TODO
m_unk0xf8 = 0;
m_unk0x41fc = 0;
m_unk0x4200 = 0;
m_unk0x4204 = 0;
m_unk0x4208 = 0;
m_helicopter = NULL;
m_unk0x4210 = 0;
m_unk0x4214 = -1;
m_unk0x421e = 0;
memset(m_unk0x4230, 0, sizeof(m_unk0x4230));
NavController()->ResetMaxLinearAccel(NavController()->GetMaxLinearAccel() * 30.0f);
NavController()->ResetMaxLinearDeccel(NavController()->GetMaxLinearDeccel() * 30.0f);
NotificationManager()->Register(this);
}
// FUNCTION: LEGO1 0x10072500