mirror of
https://github.com/isledecomp/isle-portable.git
synced 2025-05-09 12:40:41 -04:00
implement Isle::Notify (#338)
* isle::notify * Match Isle::Notify --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
parent
412dda3e99
commit
72c34949e5
3 changed files with 82 additions and 3 deletions
|
@ -23,6 +23,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
inline void SetUnknown18(MxU32 p_unk0x18) { m_unk0x18 = p_unk0x18; }
|
inline void SetUnknown18(MxU32 p_unk0x18) { m_unk0x18 = p_unk0x18; }
|
||||||
|
inline MxU32 GetUnknown18() { return m_unk0x18; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
undefined m_unk0x8[0x10]; // 0x8
|
undefined m_unk0x8[0x10]; // 0x8
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "isle.h"
|
#include "isle.h"
|
||||||
|
|
||||||
#include "act1state.h"
|
#include "act1state.h"
|
||||||
|
#include "ambulance.h"
|
||||||
#include "islepathactor.h"
|
#include "islepathactor.h"
|
||||||
#include "legocontrolmanager.h"
|
#include "legocontrolmanager.h"
|
||||||
#include "legogamestate.h"
|
#include "legogamestate.h"
|
||||||
|
@ -9,6 +10,8 @@
|
||||||
#include "legoutil.h"
|
#include "legoutil.h"
|
||||||
#include "mxnotificationmanager.h"
|
#include "mxnotificationmanager.h"
|
||||||
#include "mxtransitionmanager.h"
|
#include "mxtransitionmanager.h"
|
||||||
|
#include "pizza.h"
|
||||||
|
#include "towtrack.h"
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(Isle, 0x140);
|
DECOMP_SIZE_ASSERT(Isle, 0x140);
|
||||||
|
|
||||||
|
@ -90,10 +93,62 @@ MxResult Isle::Create(MxDSObject& p_dsObject)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10030c10
|
// FUNCTION: LEGO1 0x10030c10
|
||||||
MxLong Isle::Notify(MxParam& p_param)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,12 +158,30 @@ void Isle::Stop()
|
||||||
// TODO
|
// 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
|
// STUB: LEGO1 0x10031820
|
||||||
void Isle::VTable0x68(MxBool p_add)
|
void Isle::VTable0x68(MxBool p_add)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x10031820
|
||||||
|
MxLong Isle::HandleTransitionEnd()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10032f10
|
// FUNCTION: LEGO1 0x10032f10
|
||||||
void Isle::VTable0x58(MxCore* p_object)
|
void Isle::VTable0x58(MxCore* p_object)
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,7 +25,6 @@ class Isle : public LegoWorld {
|
||||||
public:
|
public:
|
||||||
Isle();
|
Isle();
|
||||||
virtual ~Isle() override;
|
virtual ~Isle() override;
|
||||||
|
|
||||||
virtual MxLong Notify(MxParam& p_param) override; // vtable+0x4
|
virtual MxLong Notify(MxParam& p_param) override; // vtable+0x4
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10030910
|
// FUNCTION: LEGO1 0x10030910
|
||||||
|
@ -40,6 +39,7 @@ public:
|
||||||
{
|
{
|
||||||
return !strcmp(p_name, Isle::ClassName()) || LegoWorld::IsA(p_name);
|
return !strcmp(p_name, Isle::ClassName()) || LegoWorld::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual MxResult Create(MxDSObject& p_dsObject) override; // vtable+0x18
|
virtual MxResult Create(MxDSObject& p_dsObject) override; // vtable+0x18
|
||||||
virtual void Stop() override; // vtable+50
|
virtual void Stop() override; // vtable+50
|
||||||
virtual void VTable0x58(MxCore* p_object) override; // vtable+58
|
virtual void VTable0x58(MxCore* p_object) override; // vtable+58
|
||||||
|
@ -53,6 +53,11 @@ public:
|
||||||
|
|
||||||
inline void SetUnknown13c(MxU32 p_unk0x13c) { m_unk0x13c = p_unk0x13c; }
|
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:
|
protected:
|
||||||
Act1State* m_act1state; // 0xf8
|
Act1State* m_act1state; // 0xf8
|
||||||
Pizza* m_pizza; // 0xfc
|
Pizza* m_pizza; // 0xfc
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue