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