implement Isle::Notify (#338)

* isle::notify

* Match Isle::Notify

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Misha
2023-12-16 11:01:22 -05:00
committed by GitHub
parent 412dda3e99
commit 72c34949e5
3 changed files with 82 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
#include "isle.h"
#include "act1state.h"
#include "ambulance.h"
#include "islepathactor.h"
#include "legocontrolmanager.h"
#include "legogamestate.h"
@@ -9,6 +10,8 @@
#include "legoutil.h"
#include "mxnotificationmanager.h"
#include "mxtransitionmanager.h"
#include "pizza.h"
#include "towtrack.h"
DECOMP_SIZE_ASSERT(Isle, 0x140);
@@ -90,10 +93,62 @@ MxResult Isle::Create(MxDSObject& p_dsObject)
return result;
}
// STUB: LEGO1 0x10030c10
// FUNCTION: LEGO1 0x10030c10
MxLong Isle::Notify(MxParam& p_param)
{
// TODO
MxLong result = 0;
LegoWorld::Notify(p_param);
if (m_unk0xf6) {
switch (((MxNotificationParam&) p_param).GetNotification()) {
case c_notificationEndAction:
result = StopAction(p_param);
break;
case c_notificationButtonUp:
case c_notificationButtonDown:
switch (m_act1state->GetUnknown18()) {
case 3:
result = m_pizza->Notify(p_param);
break;
case 10:
result = m_ambulance->Notify(p_param);
break;
}
break;
case TYPE17:
result = HandleType17Notification(p_param);
break;
case TYPE18:
switch (m_act1state->GetUnknown18()) {
case 4:
result = GetCurrentVehicle()->Notify(p_param);
break;
case 8:
result = m_towtrack->Notify(p_param);
break;
case 10:
result = m_ambulance->Notify(p_param);
break;
}
break;
case TYPE19:
result = HandleType19Notification(p_param);
break;
case TYPE20:
VTable0x68(TRUE);
break;
case MXTRANSITIONMANAGER_TRANSITIONENDED:
result = HandleTransitionEnd();
break;
}
}
return result;
}
// STUB: LEGO1 0x10030d90
MxLong Isle::StopAction(MxParam& p_param)
{
return 0;
}
@@ -103,12 +158,30 @@ void Isle::Stop()
// TODO
}
// STUB: LGEO1 0x10031030
MxLong Isle::HandleType17Notification(MxParam& p_param)
{
return 0;
}
// STUB: LEGO1 0x100315f0
MxLong Isle::HandleType19Notification(MxParam& p_param)
{
return 0;
}
// STUB: LEGO1 0x10031820
void Isle::VTable0x68(MxBool p_add)
{
// TODO
}
// STUB: LEGO1 0x10031820
MxLong Isle::HandleTransitionEnd()
{
return 0;
}
// FUNCTION: LEGO1 0x10032f10
void Isle::VTable0x58(MxCore* p_object)
{