Bike::Create, Bike::VTable0xe4 (#576)

* Bike::Create, Bike::VTable0xe4

* Readability

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Joshua Peisach 2024-02-17 14:26:29 -05:00 committed by GitHub
parent 4a7ab43b45
commit 35a566c243
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 25 additions and 5 deletions

View file

@ -1,5 +1,11 @@
#include "bike.h"
#include "legocontrolmanager.h"
#include "legogamestate.h"
#include "legoomni.h"
#include "legoutil.h"
#include "legoworld.h"
DECOMP_SIZE_ASSERT(Bike, 0x164);
// FUNCTION: LEGO1 0x10076670
@ -10,17 +16,30 @@ Bike::Bike()
this->m_unk0x148 = 1;
}
// STUB: LEGO1 0x100768f0
// FUNCTION: LEGO1 0x100768f0
MxResult Bike::Create(MxDSAction& p_dsAction)
{
// TODO
return SUCCESS;
MxResult result = IslePathActor::Create(p_dsAction);
m_world = CurrentWorld();
if (m_world) {
m_world->Add(this);
}
return result;
}
// STUB: LEGO1 0x10076920
// FUNCTION: LEGO1 0x10076920
void Bike::VTable0xe4()
{
// TODO
IslePathActor::VTable0xe4();
GameState()->SetCurrentArea(LegoGameState::Area::e_unk57);
FUN_1003ee00(*g_isleScript, 11);
FUN_1003ee00(*g_isleScript, 12);
FUN_1003ee00(*g_isleScript, 15);
FUN_1003ee00(*g_isleScript, 14);
FUN_1003ee00(*g_isleScript, 13);
ControlManager()->Unregister(this);
}
// STUB: LEGO1 0x100769a0

View file

@ -45,6 +45,7 @@ MxResult HistoryBook::Create(MxDSAction& p_dsAction)
MxLong HistoryBook::Notify(MxParam& p_param)
{
LegoWorld::Notify(p_param);
if (m_worldStarted) {
switch (((MxNotificationParam&) p_param).GetNotification()) {
case c_notificationButtonUp: