mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-24 08:41:16 +00:00
Match functions
This commit is contained in:
parent
15fc3638e3
commit
7eb5a24236
@ -2,11 +2,8 @@
|
||||
#define CARRACE_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "legoeventnotificationparam.h"
|
||||
#include "legorace.h"
|
||||
|
||||
class MxEndActionNotificationParam;
|
||||
|
||||
// VTABLE: LEGO1 0x100d4b70
|
||||
// SIZE 0x2c
|
||||
class CarRaceState : public RaceState {
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#ifndef JETSKIRACE_H
|
||||
#define JETSKIRACE_H
|
||||
|
||||
#include "legoeventnotificationparam.h"
|
||||
#include "legorace.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100d4fa8
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
#define LEGORACE_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "legoeventnotificationparam.h"
|
||||
#include "legogamestate.h"
|
||||
#include "legostate.h"
|
||||
#include "legoworld.h"
|
||||
@ -10,8 +9,10 @@
|
||||
#include "mxtypes.h"
|
||||
|
||||
class Act1State;
|
||||
class LegoEventNotificationParam;
|
||||
class LegoPathActor;
|
||||
class MxEndActionNotificationParam;
|
||||
class MxNotificationParam;
|
||||
class MxType19NotificationParam;
|
||||
|
||||
// VTABLE: LEGO1 0x100d5e30
|
||||
@ -92,20 +93,27 @@ class LegoRace : public LegoWorld {
|
||||
return !strcmp(p_name, LegoRace::ClassName()) || LegoWorld::IsA(p_name);
|
||||
}
|
||||
|
||||
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
|
||||
MxBool VTable0x5c() override; // vtable+0x5c
|
||||
MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
|
||||
|
||||
// FUNCTION: LEGO1 0x1000dae0
|
||||
MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
|
||||
|
||||
MxBool Escape() override; // vtable+0x64
|
||||
void Enable(MxBool p_enable) override; // vtable+0x68
|
||||
virtual MxLong HandleClick(LegoEventNotificationParam&) = 0; // vtable+0x6c
|
||||
virtual MxLong HandleType19Notification(MxType19NotificationParam&); // vtable+0x70
|
||||
virtual MxLong HandleEndAction(MxEndActionNotificationParam&); // vtable+0x74
|
||||
virtual MxLong HandleType0Notification(MxNotificationParam&); // vtable+0x78
|
||||
virtual void VTable0x7c(undefined4, undefined4); // vtable+0x7c
|
||||
|
||||
// FUNCTION: LEGO1 0x1000dab0
|
||||
virtual MxLong HandleType0Notification(MxNotificationParam&) { return 0; } // vtable+0x78
|
||||
|
||||
// STUB: LEGO1 0x1000dac0
|
||||
virtual void VTable0x7c(undefined4, undefined4) {} // vtable+0x7c
|
||||
|
||||
// SYNTHETIC: LEGO1 0x10015cc0
|
||||
// LegoRace::`scalar deleting destructor'
|
||||
|
||||
private:
|
||||
protected:
|
||||
undefined4 m_unk0xf8; // 0xf8
|
||||
undefined4 m_unk0xfc; // 0xfc
|
||||
undefined4 m_unk0x100; // 0x100
|
||||
@ -120,12 +128,8 @@ class LegoRace : public LegoWorld {
|
||||
Act1State* m_act1State; // 0x124
|
||||
undefined4 m_unk0x128; // 0x128
|
||||
undefined4 m_unk0x12c; // 0x12c
|
||||
|
||||
protected:
|
||||
MxRect32 m_unk0x130; // 0x130
|
||||
|
||||
private:
|
||||
undefined4 m_unk0x140; // 0x140
|
||||
MxRect32 m_unk0x130; // 0x130
|
||||
undefined4 m_unk0x140; // 0x140
|
||||
};
|
||||
|
||||
#endif // LEGORACE_H
|
||||
|
||||
@ -91,7 +91,7 @@ class LegoWorld : public LegoEntity {
|
||||
inline LegoCameraController* GetCamera() { return m_cameraController; }
|
||||
inline LegoEntityList* GetEntityList() { return m_entityList; }
|
||||
inline MxS32 GetScriptIndex() { return m_scriptIndex; }
|
||||
inline MxCoreSet& GetUnknown0xd0() { return m_set0xd0; }
|
||||
inline MxBool GetUnknown0xd0Empty() { return m_set0xd0.empty(); }
|
||||
inline list<LegoROI*>& GetROIList() { return m_roiList; }
|
||||
inline LegoHideAnimPresenter* GetHideAnimPresenter() { return m_hideAnimPresenter; }
|
||||
|
||||
|
||||
@ -780,7 +780,7 @@ inline void LoadIsle()
|
||||
{
|
||||
LegoWorld* world = FindWorld(*g_isleScript, 0);
|
||||
if (world != NULL) {
|
||||
if (!world->GetUnknown0xd0().empty()) {
|
||||
if (!world->GetUnknown0xd0Empty()) {
|
||||
NotificationManager()->Send(world, MxNotificationParam(c_notificationType20, NULL));
|
||||
}
|
||||
}
|
||||
|
||||
@ -225,19 +225,21 @@ void LegoWorld::Destroy(MxBool p_fromDestructor)
|
||||
// FUNCTION: LEGO1 0x1001f5e0
|
||||
MxLong LegoWorld::Notify(MxParam& p_param)
|
||||
{
|
||||
MxLong ret = 0;
|
||||
MxLong result = 0;
|
||||
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
case c_notificationEndAction: {
|
||||
MxPresenter* presenter = (MxPresenter*) ((MxEndActionNotificationParam&) p_param).GetSender();
|
||||
Remove(presenter);
|
||||
ret = 1;
|
||||
result = 1;
|
||||
break;
|
||||
}
|
||||
case c_notificationNewPresenter:
|
||||
TickleManager()->RegisterClient(this, 100);
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1001f630
|
||||
|
||||
@ -14,42 +14,24 @@ DECOMP_SIZE_ASSERT(RaceState, 0x2c)
|
||||
// Defined in legopathstruct.cpp
|
||||
extern MxBool g_unk0x100f119c;
|
||||
|
||||
// FUNCTION: LEGO1 0x1000dab0
|
||||
MxLong LegoRace::HandleType0Notification(MxNotificationParam&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1000dac0
|
||||
void LegoRace::VTable0x7c(undefined4, undefined4)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000dae0
|
||||
MxBool LegoRace::VTable0x5c()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10015aa0
|
||||
LegoRace::LegoRace()
|
||||
{
|
||||
this->m_unk0xf8 = 0;
|
||||
this->m_unk0xfc = 0;
|
||||
this->m_unk0x100 = 0;
|
||||
this->m_unk0x104 = 0;
|
||||
this->m_unk0x108 = 0;
|
||||
this->m_unk0x10c = 0;
|
||||
this->m_unk0x140 = 0;
|
||||
this->m_unk0x110 = 0;
|
||||
this->m_unk0x114 = 0;
|
||||
this->m_unk0x118 = 0;
|
||||
this->m_unk0x128 = 0;
|
||||
this->m_unk0x12c = 0;
|
||||
this->m_pathActor = 0;
|
||||
this->m_act1State = NULL;
|
||||
this->m_destLocation = LegoGameState::e_undefined;
|
||||
m_unk0xf8 = 0;
|
||||
m_unk0xfc = 0;
|
||||
m_unk0x100 = 0;
|
||||
m_unk0x104 = 0;
|
||||
m_unk0x108 = 0;
|
||||
m_unk0x10c = 0;
|
||||
m_unk0x140 = 0;
|
||||
m_unk0x110 = 0;
|
||||
m_unk0x114 = 0;
|
||||
m_unk0x118 = 0;
|
||||
m_unk0x128 = 0;
|
||||
m_unk0x12c = 0;
|
||||
m_pathActor = 0;
|
||||
m_act1State = NULL;
|
||||
m_destLocation = LegoGameState::e_undefined;
|
||||
NotificationManager()->Register(this);
|
||||
}
|
||||
|
||||
@ -75,6 +57,7 @@ MxBool LegoRace::Escape()
|
||||
MxResult LegoRace::Create(MxDSAction& p_dsAction)
|
||||
{
|
||||
MxResult result = LegoWorld::Create(p_dsAction);
|
||||
|
||||
if (result == SUCCESS) {
|
||||
m_act1State = (Act1State*) GameState()->GetState("Act1State");
|
||||
ControlManager()->Register(this);
|
||||
@ -82,6 +65,7 @@ MxResult LegoRace::Create(MxDSAction& p_dsAction)
|
||||
m_pathActor->SetWorldSpeed(0);
|
||||
SetCurrentActor(NULL);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -100,15 +84,16 @@ LegoRace::~LegoRace()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10015e00
|
||||
// FUNCTION: BETA10 0x100c7b3d
|
||||
MxLong LegoRace::Notify(MxParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
LegoWorld::Notify(p_param);
|
||||
|
||||
MxLong result = 0;
|
||||
if (m_worldStarted) {
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
case c_notificationType0:
|
||||
result = HandleType0Notification((MxNotificationParam&) p_param);
|
||||
HandleType0Notification((MxNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationEndAction:
|
||||
result = HandleEndAction((MxEndActionNotificationParam&) p_param);
|
||||
@ -129,9 +114,10 @@ MxLong LegoRace::Notify(MxParam& p_param)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10015ed0
|
||||
// FUNCTION: BETA10 0x100c7c3f
|
||||
void LegoRace::Enable(MxBool p_enable)
|
||||
{
|
||||
if (GetUnknown0xd0().size() == 1 && !p_enable) {
|
||||
if (GetUnknown0xd0Empty() != p_enable && !p_enable) {
|
||||
Remove(CurrentActor());
|
||||
|
||||
MxU8 oldActorId = GameState()->GetActorId();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user