1
0
Fork 0
mirror of https://github.com/isledecomp/isle.git synced 2025-03-31 09:00:07 -04:00

implement Isle::Notify ()

* 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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 82 additions and 3 deletions

View file

@ -23,6 +23,7 @@ public:
};
inline void SetUnknown18(MxU32 p_unk0x18) { m_unk0x18 = p_unk0x18; }
inline MxU32 GetUnknown18() { return m_unk0x18; }
protected:
undefined m_unk0x8[0x10]; // 0x8

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)
{

View file

@ -25,7 +25,6 @@ class Isle : public LegoWorld {
public:
Isle();
virtual ~Isle() override;
virtual MxLong Notify(MxParam& p_param) override; // vtable+0x4
// FUNCTION: LEGO1 0x10030910
@ -40,6 +39,7 @@ public:
{
return !strcmp(p_name, Isle::ClassName()) || LegoWorld::IsA(p_name);
}
virtual MxResult Create(MxDSObject& p_dsObject) override; // vtable+0x18
virtual void Stop() override; // vtable+50
virtual void VTable0x58(MxCore* p_object) override; // vtable+58
@ -53,6 +53,11 @@ public:
inline void SetUnknown13c(MxU32 p_unk0x13c) { m_unk0x13c = p_unk0x13c; }
MxLong StopAction(MxParam& p_param);
MxLong HandleType17Notification(MxParam& p_param);
MxLong HandleType19Notification(MxParam& p_param);
MxLong HandleTransitionEnd();
protected:
Act1State* m_act1state; // 0xf8
Pizza* m_pizza; // 0xfc