mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-25 09:24:17 +00:00
Implement/match Motocycle, consistent notification names (#1037)
* Implement/match Motocycle, consistent notification names * Format * Fix * Fix return types * Fix return type * Fix annotations * Rename function
This commit is contained in:
committed by
GitHub
parent
68023379d8
commit
e4e0f4e4d3
@@ -62,7 +62,7 @@
|
||||
#include "legoworld.h"
|
||||
#include "legoworldpresenter.h"
|
||||
#include "misc.h"
|
||||
#include "motocycle.h"
|
||||
#include "motorcycle.h"
|
||||
#include "mxcompositemediapresenter.h"
|
||||
#include "mxcontrolpresenter.h"
|
||||
#include "pizza.h"
|
||||
|
||||
@@ -367,7 +367,7 @@ void PlayCamAnim(LegoPathActor* p_actor, MxBool p_unused, MxU32 p_location, MxBo
|
||||
MxLong result = 0;
|
||||
|
||||
if (world != NULL) {
|
||||
LegoPathStructEvent param(c_notificationPathStruct, p_actor, LegoPathStruct::c_camAnim, p_location);
|
||||
LegoPathStructNotificationParam param(c_notificationPathStruct, p_actor, LegoPathStruct::c_camAnim, p_location);
|
||||
result = world->Notify(param);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,14 @@ DECOMP_SIZE_ASSERT(CursorVariable, 0x24)
|
||||
DECOMP_SIZE_ASSERT(WhoAmIVariable, 0x24)
|
||||
DECOMP_SIZE_ASSERT(CustomizeAnimFileVariable, 0x24)
|
||||
|
||||
// GLOBAL: LEGO1 0x100f3994
|
||||
// STRING: LEGO1 0x100f3988
|
||||
const char* g_varMOTOSPEED = "motoSPEED";
|
||||
|
||||
// GLOBAL: LEGO1 0x100f3998
|
||||
// STRING: LEGO1 0x100f397c
|
||||
const char* g_varMOTOFUEL = "motoFUEL";
|
||||
|
||||
// GLOBAL: LEGO1 0x100f39b8
|
||||
// STRING: LEGO1 0x100f39ac
|
||||
const char* g_varAMBULSPEED = "ambulSPEED";
|
||||
|
||||
@@ -175,27 +175,27 @@ MxBool MxControlPresenter::FUN_10044270(MxS32 p_x, MxS32 p_y, MxVideoPresenter*
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10044480
|
||||
MxBool MxControlPresenter::FUN_10044480(LegoControlManagerEvent* p_event, MxPresenter* p_presenter)
|
||||
MxBool MxControlPresenter::FUN_10044480(LegoControlManagerNotificationParam* p_param, MxPresenter* p_presenter)
|
||||
{
|
||||
if (IsEnabled()) {
|
||||
switch (p_event->GetNotification()) {
|
||||
switch (p_param->GetNotification()) {
|
||||
case c_notificationButtonUp:
|
||||
if (m_unk0x4c == 0 || m_unk0x4c == 2 || m_unk0x4c == 3) {
|
||||
p_event->SetClickedObjectId(m_action->GetObjectId());
|
||||
p_event->SetClickedAtom(m_action->GetAtomId().GetInternal());
|
||||
p_param->SetClickedObjectId(m_action->GetObjectId());
|
||||
p_param->SetClickedAtom(m_action->GetAtomId().GetInternal());
|
||||
VTable0x6c(0);
|
||||
p_event->SetNotification(c_notificationControl);
|
||||
p_event->SetUnknown0x28(m_unk0x4e);
|
||||
p_param->SetNotification(c_notificationControl);
|
||||
p_param->SetUnknown0x28(m_unk0x4e);
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
case c_notificationButtonDown:
|
||||
if (FUN_10044270(p_event->GetX(), p_event->GetY(), (MxVideoPresenter*) p_presenter)) {
|
||||
p_event->SetClickedObjectId(m_action->GetObjectId());
|
||||
p_event->SetClickedAtom(m_action->GetAtomId().GetInternal());
|
||||
if (FUN_10044270(p_param->GetX(), p_param->GetY(), (MxVideoPresenter*) p_presenter)) {
|
||||
p_param->SetClickedObjectId(m_action->GetObjectId());
|
||||
p_param->SetClickedAtom(m_action->GetAtomId().GetInternal());
|
||||
VTable0x6c(m_unk0x56);
|
||||
p_event->SetNotification(c_notificationControl);
|
||||
p_event->SetUnknown0x28(m_unk0x4e);
|
||||
p_param->SetNotification(c_notificationControl);
|
||||
p_param->SetUnknown0x28(m_unk0x4e);
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user