Start of helicopter Implementation (#239)

* Start of helicopter Implementation

Mostly Matching, some issues with MxMatrix and/or MxVector4

* Fix some style issues

* Fix some style issues
This commit is contained in:
Nathan M Gilbert
2023-10-24 04:14:45 -04:00
committed by GitHub
parent 587ac7a9d7
commit 1ab29590ee
9 changed files with 87 additions and 14 deletions

View File

@@ -1,13 +1,43 @@
#include "helicopter.h"
#include "act3.h"
#include "legoomni.h"
#include "legocontrolmanager.h"
#include "legogamestate.h"
#include "legoworld.h"
// OFFSET: LEGO1 0x10001e60 STUB
DECOMP_SIZE_ASSERT(Helicopter, 0x230)
// OFFSET: LEGO1 0x10001e60
Helicopter::Helicopter()
{
// TODO
m_unk13c = 60;
}
// OFFSET: LEGO1 0x10003230 STUB
// OFFSET: LEGO1 0x10003230
Helicopter::~Helicopter()
{
// TODO
ControlManager()->Unregister(this);
IslePathActor::Destroy(TRUE);
}
// OFFSET: LEGO1 0x100032c0
MxResult Helicopter::InitFromMxDSObject(MxDSObject &p_dsObject)
{
MxResult result = IslePathActor::InitFromMxDSObject(p_dsObject);
LegoWorld *world = GetCurrentWorld();
SetWorld(world);
if (world->IsA("Act3")) {
((Act3 *)GetWorld())->SetUnkown420c(this);
}
world = GetWorld();
if (world) world->VTable0x58(this);
GetState();
return result;
}
// OFFSET: LEGO1 0x10003320
void Helicopter::GetState()
{
m_state = (HelicopterState *)GameState()->GetState("HelicopterState");
if (!m_state) m_state = (HelicopterState *)GameState()->CreateState("HelicopterState");
}