mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-29 11:06:05 -05:00
Implement/match Ambulance::HandlePathStruct (#1029)
* Implement/match Ambulance::HandlePathStruct * Add annotation
This commit is contained in:
parent
cf7246ac6c
commit
bbc304ce46
41 changed files with 371 additions and 224 deletions
|
@ -27,39 +27,76 @@ class AmbulanceMissionState : public LegoState {
|
||||||
|
|
||||||
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
|
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
|
||||||
|
|
||||||
inline MxU16 GetScore(MxU8 p_id)
|
inline MxS16 GetHighScore(MxU8 p_actorId)
|
||||||
{
|
{
|
||||||
switch (p_id) {
|
switch (p_actorId) {
|
||||||
case 1:
|
case LegoActor::c_pepper:
|
||||||
return m_score1;
|
return m_peHighScore;
|
||||||
case 2:
|
case LegoActor::c_mama:
|
||||||
return m_score2;
|
return m_maHighScore;
|
||||||
case 3:
|
case LegoActor::c_papa:
|
||||||
return m_score3;
|
return m_paHighScore;
|
||||||
case 4:
|
case LegoActor::c_nick:
|
||||||
return m_score4;
|
return m_niHighScore;
|
||||||
case 5:
|
case LegoActor::c_laura:
|
||||||
return m_score5;
|
return m_laHighScore;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x100242d0
|
||||||
|
inline void UpdateScore(ScoreColor p_score, MxS16 p_actorId)
|
||||||
|
{
|
||||||
|
switch (p_actorId) {
|
||||||
|
case LegoActor::c_pepper:
|
||||||
|
m_peScore = p_score;
|
||||||
|
if (m_peHighScore < p_score) {
|
||||||
|
m_peHighScore = p_score;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case LegoActor::c_mama:
|
||||||
|
m_maScore = p_score;
|
||||||
|
if (m_maHighScore < p_score) {
|
||||||
|
m_maHighScore = p_score;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case LegoActor::c_papa:
|
||||||
|
m_paScore = p_score;
|
||||||
|
if (m_paHighScore < p_score) {
|
||||||
|
m_paHighScore = p_score;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case LegoActor::c_nick:
|
||||||
|
m_niScore = p_score;
|
||||||
|
if (m_niHighScore < p_score) {
|
||||||
|
m_niHighScore = p_score;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case LegoActor::c_laura:
|
||||||
|
m_laScore = p_score;
|
||||||
|
if (m_laHighScore < p_score) {
|
||||||
|
m_laHighScore = p_score;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100376c0
|
// SYNTHETIC: LEGO1 0x100376c0
|
||||||
// AmbulanceMissionState::`scalar deleting destructor'
|
// AmbulanceMissionState::`scalar deleting destructor'
|
||||||
|
|
||||||
undefined4 m_unk0x08; // 0x08
|
undefined4 m_unk0x08; // 0x08
|
||||||
MxLong m_unk0x0c; // 0x0c
|
MxLong m_unk0x0c; // 0x0c
|
||||||
MxU16 m_unk0x10; // 0x10
|
MxS16 m_peScore; // 0x10
|
||||||
MxU16 m_unk0x12; // 0x12
|
MxS16 m_maScore; // 0x12
|
||||||
MxU16 m_unk0x14; // 0x14
|
MxS16 m_paScore; // 0x14
|
||||||
MxU16 m_unk0x16; // 0x16
|
MxS16 m_niScore; // 0x16
|
||||||
MxU16 m_unk0x18; // 0x18
|
MxS16 m_laScore; // 0x18
|
||||||
MxU16 m_score1; // 0x1a
|
MxS16 m_peHighScore; // 0x1a
|
||||||
MxU16 m_score2; // 0x1c
|
MxS16 m_maHighScore; // 0x1c
|
||||||
MxU16 m_score3; // 0x1e
|
MxS16 m_paHighScore; // 0x1e
|
||||||
MxU16 m_score4; // 0x20
|
MxS16 m_niHighScore; // 0x20
|
||||||
MxU16 m_score5; // 0x22
|
MxS16 m_laHighScore; // 0x22
|
||||||
};
|
};
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d71a8
|
// VTABLE: LEGO1 0x100d71a8
|
||||||
|
@ -90,7 +127,7 @@ class Ambulance : public IslePathActor {
|
||||||
void VTable0x70(float p_time) override; // vtable+0x70
|
void VTable0x70(float p_time) override; // vtable+0x70
|
||||||
MxLong HandleClick() override; // vtable+0xcc
|
MxLong HandleClick() override; // vtable+0xcc
|
||||||
MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
|
MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
|
||||||
MxLong HandleNotification19(MxType19NotificationParam& p_param) override; // vtable+0xdc
|
MxLong HandlePathStruct(LegoPathStructEvent& p_param) override; // vtable+0xdc
|
||||||
void Exit() override; // vtable+0xe4
|
void Exit() override; // vtable+0xe4
|
||||||
virtual MxLong HandleButtonDown(LegoControlManagerEvent& p_param); // vtable+0xf0
|
virtual MxLong HandleButtonDown(LegoControlManagerEvent& p_param); // vtable+0xf0
|
||||||
virtual MxLong HandleEndAction(MxEndActionNotificationParam& p_param); // vtable+0xf4
|
virtual MxLong HandleEndAction(MxEndActionNotificationParam& p_param); // vtable+0xf4
|
||||||
|
@ -106,13 +143,15 @@ class Ambulance : public IslePathActor {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void PlayAnimation(IsleScript::Script p_objectId);
|
void PlayAnimation(IsleScript::Script p_objectId);
|
||||||
|
void PlayFinalAnimation(IsleScript::Script p_objectId);
|
||||||
void StopAction(IsleScript::Script p_objectId);
|
void StopAction(IsleScript::Script p_objectId);
|
||||||
void PlayAction(IsleScript::Script p_objectId);
|
void PlayAction(IsleScript::Script p_objectId);
|
||||||
|
void FUN_10036ec0();
|
||||||
|
|
||||||
undefined m_unk0x160[4]; // 0x160
|
undefined m_unk0x160[4]; // 0x160
|
||||||
AmbulanceMissionState* m_state; // 0x164
|
AmbulanceMissionState* m_state; // 0x164
|
||||||
MxS16 m_unk0x168; // 0x168
|
MxS16 m_unk0x168; // 0x168
|
||||||
MxS16 m_unk0x16a; // 0x16a
|
MxS16 m_actorId; // 0x16a
|
||||||
MxS16 m_unk0x16c; // 0x16c
|
MxS16 m_unk0x16c; // 0x16c
|
||||||
MxS16 m_unk0x16e; // 0x16e
|
MxS16 m_unk0x16e; // 0x16e
|
||||||
MxS16 m_unk0x170; // 0x170
|
MxS16 m_unk0x170; // 0x170
|
||||||
|
|
|
@ -48,7 +48,7 @@ class CarRace : public LegoRace {
|
||||||
void ReadyWorld() override; // vtable+0x50
|
void ReadyWorld() override; // vtable+0x50
|
||||||
MxBool Escape() override; // vtable+0x64
|
MxBool Escape() override; // vtable+0x64
|
||||||
MxLong HandleClick(LegoEventNotificationParam&) override; // vtable+0x6c
|
MxLong HandleClick(LegoEventNotificationParam&) override; // vtable+0x6c
|
||||||
MxLong HandleType19Notification(MxType19NotificationParam&) override; // vtable+0x70
|
MxLong HandlePathStruct(LegoPathStructEvent&) override; // vtable+0x70
|
||||||
MxLong HandleEndAction(MxEndActionNotificationParam&) override; // vtable+0x74
|
MxLong HandleEndAction(MxEndActionNotificationParam&) override; // vtable+0x74
|
||||||
MxLong HandleType0Notification(MxNotificationParam&) override; // vtable+0x78
|
MxLong HandleType0Notification(MxNotificationParam&) override; // vtable+0x78
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ class DuneBuggy : public IslePathActor {
|
||||||
void VTable0x70(float p_float) override; // vtable+0x70
|
void VTable0x70(float p_float) override; // vtable+0x70
|
||||||
MxLong HandleClick() override; // vtable+0xcc
|
MxLong HandleClick() override; // vtable+0xcc
|
||||||
MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
|
MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
|
||||||
MxLong HandleNotification19(MxType19NotificationParam& p_param) override; // vtable+0xdc
|
MxLong HandlePathStruct(LegoPathStructEvent& p_param) override; // vtable+0xdc
|
||||||
void Exit() override; // vtable+0xe4
|
void Exit() override; // vtable+0xe4
|
||||||
|
|
||||||
void FUN_10068350();
|
void FUN_10068350();
|
||||||
|
|
|
@ -15,7 +15,7 @@ class Jetski;
|
||||||
class JukeBoxEntity;
|
class JukeBoxEntity;
|
||||||
class LegoNamedTexture;
|
class LegoNamedTexture;
|
||||||
class Motocycle;
|
class Motocycle;
|
||||||
class MxType19NotificationParam;
|
class LegoPathStructEvent;
|
||||||
class Pizza;
|
class Pizza;
|
||||||
class Pizzeria;
|
class Pizzeria;
|
||||||
class RaceCar;
|
class RaceCar;
|
||||||
|
@ -199,7 +199,7 @@ class Isle : public LegoWorld {
|
||||||
protected:
|
protected:
|
||||||
MxLong HandleEndAction(MxEndActionNotificationParam& p_param);
|
MxLong HandleEndAction(MxEndActionNotificationParam& p_param);
|
||||||
MxLong HandleControl(LegoControlManagerEvent& p_param);
|
MxLong HandleControl(LegoControlManagerEvent& p_param);
|
||||||
MxLong HandleType19Notification(MxType19NotificationParam& p_param);
|
MxLong HandlePathStruct(LegoPathStructEvent& p_param);
|
||||||
MxLong HandleTransitionEnd();
|
MxLong HandleTransitionEnd();
|
||||||
void HandleElevatorEndAction();
|
void HandleElevatorEndAction();
|
||||||
void UpdateGlobe();
|
void UpdateGlobe();
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
class LegoControlManagerEvent;
|
class LegoControlManagerEvent;
|
||||||
class LegoEndAnimNotificationParam;
|
class LegoEndAnimNotificationParam;
|
||||||
class LegoWorld;
|
class LegoWorld;
|
||||||
class MxType19NotificationParam;
|
class LegoPathStructEvent;
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d4398
|
// VTABLE: LEGO1 0x100d4398
|
||||||
// SIZE 0x160
|
// SIZE 0x160
|
||||||
|
@ -119,7 +119,7 @@ class IslePathActor : public LegoPathActor {
|
||||||
virtual MxLong HandleEndAnim(LegoEndAnimNotificationParam&) { return 0; } // vtable+0xd8
|
virtual MxLong HandleEndAnim(LegoEndAnimNotificationParam&) { return 0; } // vtable+0xd8
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10002e00
|
// FUNCTION: LEGO1 0x10002e00
|
||||||
virtual MxLong HandleNotification19(MxType19NotificationParam&) { return 0; } // vtable+0xdc
|
virtual MxLong HandlePathStruct(LegoPathStructEvent&) { return 0; } // vtable+0xdc
|
||||||
|
|
||||||
virtual void Enter(); // vtable+0xe0
|
virtual void Enter(); // vtable+0xe0
|
||||||
virtual void Exit(); // vtable+0xe4
|
virtual void Exit(); // vtable+0xe4
|
||||||
|
|
|
@ -52,7 +52,7 @@ class JetskiRace : public LegoRace {
|
||||||
void ReadyWorld() override; // vtable+0x50
|
void ReadyWorld() override; // vtable+0x50
|
||||||
MxBool Escape() override; // vtable+0x64
|
MxBool Escape() override; // vtable+0x64
|
||||||
MxLong HandleClick(LegoEventNotificationParam&) override; // vtable+0x6c
|
MxLong HandleClick(LegoEventNotificationParam&) override; // vtable+0x6c
|
||||||
MxLong HandleType19Notification(MxType19NotificationParam&) override; // vtable+0x70
|
MxLong HandlePathStruct(LegoPathStructEvent&) override; // vtable+0x70
|
||||||
MxLong HandleEndAction(MxEndActionNotificationParam&) override; // vtable+0x74
|
MxLong HandleEndAction(MxEndActionNotificationParam&) override; // vtable+0x74
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,38 @@
|
||||||
|
|
||||||
#include "decomp.h"
|
#include "decomp.h"
|
||||||
#include "mxatom.h"
|
#include "mxatom.h"
|
||||||
|
#include "mxnotificationparam.h"
|
||||||
#include "mxtypes.h"
|
#include "mxtypes.h"
|
||||||
|
|
||||||
class LegoPathActor;
|
class LegoPathActor;
|
||||||
class LegoWorld;
|
class LegoWorld;
|
||||||
|
|
||||||
|
// VTABLE: LEGO1 0x100d6230
|
||||||
|
// SIZE 0x10
|
||||||
|
class LegoPathStructEvent : public MxNotificationParam {
|
||||||
|
public:
|
||||||
|
LegoPathStructEvent(NotificationId p_type, MxCore* p_sender, MxU8 p_trigger, MxS16 p_data) : MxNotificationParam()
|
||||||
|
{
|
||||||
|
m_type = p_type;
|
||||||
|
m_sender = p_sender;
|
||||||
|
m_data = p_data;
|
||||||
|
m_trigger = p_trigger;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x1001bac0
|
||||||
|
MxNotificationParam* Clone() const override
|
||||||
|
{
|
||||||
|
return new LegoPathStructEvent(m_type, m_sender, m_trigger, m_data);
|
||||||
|
} // vtable+0x04
|
||||||
|
|
||||||
|
inline MxU8 GetTrigger() { return m_trigger; }
|
||||||
|
inline MxS16 GetData() { return m_data; }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
MxS16 m_data; // 0x0c
|
||||||
|
MxU8 m_trigger; // 0x0e
|
||||||
|
};
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d7d9c
|
// VTABLE: LEGO1 0x100d7d9c
|
||||||
// SIZE 0x0c
|
// SIZE 0x0c
|
||||||
struct LegoPathStructBase {
|
struct LegoPathStructBase {
|
||||||
|
@ -71,6 +98,12 @@ class LegoPathStruct : public LegoPathStructBase {
|
||||||
MxAtomId m_atomId; // 0x10
|
MxAtomId m_atomId; // 0x10
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// SYNTHETIC: LEGO1 0x1001bb80
|
||||||
|
// LegoPathStructEvent::`scalar deleting destructor'
|
||||||
|
|
||||||
|
// SYNTHETIC: LEGO1 0x1001bbf0
|
||||||
|
// LegoPathStructEvent::~LegoPathStructEvent
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x10047440
|
// SYNTHETIC: LEGO1 0x10047440
|
||||||
// LegoPathStructBase::`scalar deleting destructor'
|
// LegoPathStructBase::`scalar deleting destructor'
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ class LegoEventNotificationParam;
|
||||||
class LegoPathActor;
|
class LegoPathActor;
|
||||||
class MxEndActionNotificationParam;
|
class MxEndActionNotificationParam;
|
||||||
class MxNotificationParam;
|
class MxNotificationParam;
|
||||||
class MxType19NotificationParam;
|
class LegoPathStructEvent;
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d5e30
|
// VTABLE: LEGO1 0x100d5e30
|
||||||
// SIZE 0x2c
|
// SIZE 0x2c
|
||||||
|
@ -23,12 +23,12 @@ class RaceState : public LegoState {
|
||||||
struct Entry {
|
struct Entry {
|
||||||
public:
|
public:
|
||||||
inline MxS16 GetUnknown0x02() { return m_unk0x02; }
|
inline MxS16 GetUnknown0x02() { return m_unk0x02; }
|
||||||
inline MxU16 GetScore() { return m_score; }
|
inline MxS16 GetHighScore() { return m_score; }
|
||||||
|
|
||||||
// TODO: Possibly private
|
// TODO: Possibly private
|
||||||
MxU8 m_id; // 0x00
|
MxU8 m_id; // 0x00
|
||||||
MxS16 m_unk0x02; // 0x02
|
MxS16 m_unk0x02; // 0x02
|
||||||
MxU16 m_score; // 0x04
|
MxS16 m_score; // 0x04
|
||||||
};
|
};
|
||||||
|
|
||||||
RaceState();
|
RaceState();
|
||||||
|
@ -101,7 +101,7 @@ class LegoRace : public LegoWorld {
|
||||||
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 HandlePathStruct(LegoPathStructEvent&); // vtable+0x70
|
||||||
virtual MxLong HandleEndAction(MxEndActionNotificationParam&); // vtable+0x74
|
virtual MxLong HandleEndAction(MxEndActionNotificationParam&); // vtable+0x74
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1000dab0
|
// FUNCTION: LEGO1 0x1000dab0
|
||||||
|
|
|
@ -9,6 +9,13 @@
|
||||||
// SIZE 0x08
|
// SIZE 0x08
|
||||||
class LegoState : public MxCore {
|
class LegoState : public MxCore {
|
||||||
public:
|
public:
|
||||||
|
enum ScoreColor {
|
||||||
|
e_grey = 0,
|
||||||
|
e_yellow,
|
||||||
|
e_blue,
|
||||||
|
e_red
|
||||||
|
};
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10005f40
|
// FUNCTION: LEGO1 0x10005f40
|
||||||
~LegoState() override {}
|
~LegoState() override {}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ class Motocycle : public IslePathActor {
|
||||||
void VTable0x70(float p_float) override; // vtable+0x70
|
void VTable0x70(float p_float) override; // vtable+0x70
|
||||||
MxLong HandleClick() override; // vtable+0xcc
|
MxLong HandleClick() override; // vtable+0xcc
|
||||||
MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
|
MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
|
||||||
MxLong HandleNotification19(MxType19NotificationParam&) override; // vtable+0xdc
|
MxLong HandlePathStruct(LegoPathStructEvent&) override; // vtable+0xdc
|
||||||
void Exit() override; // vtable+0xe4
|
void Exit() override; // vtable+0xe4
|
||||||
|
|
||||||
void FUN_10035e10();
|
void FUN_10035e10();
|
||||||
|
|
|
@ -18,7 +18,7 @@ class PizzaMissionState : public LegoState {
|
||||||
undefined2 m_unk0x00; // 0x00
|
undefined2 m_unk0x00; // 0x00
|
||||||
MxU8 m_id; // 0x02
|
MxU8 m_id; // 0x02
|
||||||
undefined m_unk0x03[0x15]; // 0x03
|
undefined m_unk0x03[0x15]; // 0x03
|
||||||
MxU16 m_score; // 0x18
|
MxS16 m_score; // 0x18
|
||||||
undefined m_unk0x18[6]; // 0x1a
|
undefined m_unk0x18[6]; // 0x1a
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ class PizzaMissionState : public LegoState {
|
||||||
|
|
||||||
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
|
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
|
||||||
|
|
||||||
inline MxU16 GetScore(MxU8 p_id) { return GetState(p_id)->m_score; }
|
inline MxS16 GetHighScore(MxU8 p_id) { return GetState(p_id)->m_score; }
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x10039350
|
// SYNTHETIC: LEGO1 0x10039350
|
||||||
// PizzaMissionState::`scalar deleting destructor'
|
// PizzaMissionState::`scalar deleting destructor'
|
||||||
|
|
|
@ -26,7 +26,7 @@ class TowTrackMissionState : public LegoState {
|
||||||
|
|
||||||
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
|
MxResult Serialize(LegoFile* p_legoFile) override; // vtable+0x1c
|
||||||
|
|
||||||
inline MxU16 GetScore(MxU8 p_id)
|
inline MxS16 GetHighScore(MxU8 p_id)
|
||||||
{
|
{
|
||||||
switch (p_id) {
|
switch (p_id) {
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -50,16 +50,16 @@ class TowTrackMissionState : public LegoState {
|
||||||
undefined4 m_unk0x08; // 0x08
|
undefined4 m_unk0x08; // 0x08
|
||||||
undefined4 m_unk0x0c; // 0x0c
|
undefined4 m_unk0x0c; // 0x0c
|
||||||
MxU8 m_unk0x10; // 0x10
|
MxU8 m_unk0x10; // 0x10
|
||||||
MxU16 m_unk0x12; // 0x12
|
MxS16 m_unk0x12; // 0x12
|
||||||
MxU16 m_unk0x14; // 0x14
|
MxS16 m_unk0x14; // 0x14
|
||||||
MxU16 m_unk0x16; // 0x16
|
MxS16 m_unk0x16; // 0x16
|
||||||
MxU16 m_unk0x18; // 0x18
|
MxS16 m_unk0x18; // 0x18
|
||||||
MxU16 m_unk0x1a; // 0x1a
|
MxS16 m_unk0x1a; // 0x1a
|
||||||
MxU16 m_score1; // 0x1c
|
MxS16 m_score1; // 0x1c
|
||||||
MxU16 m_score2; // 0x1e
|
MxS16 m_score2; // 0x1e
|
||||||
MxU16 m_score3; // 0x20
|
MxS16 m_score3; // 0x20
|
||||||
MxU16 m_score4; // 0x22
|
MxS16 m_score4; // 0x22
|
||||||
MxU16 m_score5; // 0x24
|
MxS16 m_score5; // 0x24
|
||||||
};
|
};
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d7ee0
|
// VTABLE: LEGO1 0x100d7ee0
|
||||||
|
@ -88,7 +88,7 @@ class TowTrack : public IslePathActor {
|
||||||
MxLong HandleClick() override; // vtable+0xcc
|
MxLong HandleClick() override; // vtable+0xcc
|
||||||
MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
|
MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4
|
||||||
MxLong HandleEndAnim(LegoEndAnimNotificationParam& p_param) override; // vtable+0xd8
|
MxLong HandleEndAnim(LegoEndAnimNotificationParam& p_param) override; // vtable+0xd8
|
||||||
MxLong HandleNotification19(MxType19NotificationParam& p_param) override; // vtable+0xdc
|
MxLong HandlePathStruct(LegoPathStructEvent& p_param) override; // vtable+0xdc
|
||||||
void Exit() override; // vtable+0xe4
|
void Exit() override; // vtable+0xe4
|
||||||
|
|
||||||
void CreateState();
|
void CreateState();
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include "legocontrolmanager.h"
|
#include "legocontrolmanager.h"
|
||||||
#include "legogamestate.h"
|
#include "legogamestate.h"
|
||||||
#include "legonavcontroller.h"
|
#include "legonavcontroller.h"
|
||||||
|
#include "legopathstruct.h"
|
||||||
#include "legoutils.h"
|
#include "legoutils.h"
|
||||||
#include "legovariables.h"
|
#include "legovariables.h"
|
||||||
#include "legoworld.h"
|
#include "legoworld.h"
|
||||||
|
@ -31,7 +32,7 @@ Ambulance::Ambulance()
|
||||||
m_maxLinearVel = 40.0;
|
m_maxLinearVel = 40.0;
|
||||||
m_state = NULL;
|
m_state = NULL;
|
||||||
m_unk0x168 = 0;
|
m_unk0x168 = 0;
|
||||||
m_unk0x16a = -1;
|
m_actorId = -1;
|
||||||
m_unk0x16c = 0;
|
m_unk0x16c = 0;
|
||||||
m_unk0x16e = 0;
|
m_unk0x16e = 0;
|
||||||
m_unk0x170 = 0;
|
m_unk0x170 = 0;
|
||||||
|
@ -126,7 +127,7 @@ MxLong Ambulance::Notify(MxParam& p_param)
|
||||||
{
|
{
|
||||||
MxLong result = 0;
|
MxLong result = 0;
|
||||||
|
|
||||||
switch (((MxNotificationParam&) p_param).GetType()) {
|
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||||
case c_notificationType0:
|
case c_notificationType0:
|
||||||
result = HandleNotification0();
|
result = HandleNotification0();
|
||||||
break;
|
break;
|
||||||
|
@ -142,8 +143,8 @@ MxLong Ambulance::Notify(MxParam& p_param)
|
||||||
case c_notificationControl:
|
case c_notificationControl:
|
||||||
result = HandleControl((LegoControlManagerEvent&) p_param);
|
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||||
break;
|
break;
|
||||||
case c_notificationType19:
|
case c_notificationPathStruct:
|
||||||
result = HandleNotification19((MxType19NotificationParam&) p_param);
|
result = HandlePathStruct((LegoPathStructEvent&) p_param);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,10 +260,103 @@ MxLong Ambulance::HandleButtonDown(LegoControlManagerEvent& p_param)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10036860
|
// FUNCTION: LEGO1 0x10036860
|
||||||
MxLong Ambulance::HandleNotification19(MxType19NotificationParam& p_param)
|
// FUNCTION: BETA10 0x100231bf
|
||||||
|
MxLong Ambulance::HandlePathStruct(LegoPathStructEvent& p_param)
|
||||||
{
|
{
|
||||||
// TODO
|
// 0x168 corresponds to the path at the gas station
|
||||||
|
if (p_param.GetData() == 0x168) {
|
||||||
|
m_fuel = 1.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (p_param.GetTrigger() == LegoPathStruct::c_camAnim && p_param.GetData() == 0x0b) {
|
||||||
|
if (m_unk0x16e != 0) {
|
||||||
|
if (m_unk0x16c != 0) {
|
||||||
|
m_state->m_unk0x08 = 2;
|
||||||
|
|
||||||
|
if (m_lastAction != IsleScript::c_noneIsle) {
|
||||||
|
InvokeAction(Extra::e_stop, *g_isleScript, m_lastAction, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
FUN_10036ec0();
|
||||||
|
MxLong time = Timer()->GetTime() - m_state->m_unk0x0c;
|
||||||
|
|
||||||
|
if (time < 300000) {
|
||||||
|
m_state->UpdateScore(LegoState::e_red, m_actorId);
|
||||||
|
PlayFinalAnimation(IsleScript::c_hho142cl_RunAnim);
|
||||||
|
}
|
||||||
|
else if (time < 400000) {
|
||||||
|
m_state->UpdateScore(LegoState::e_blue, m_actorId);
|
||||||
|
PlayFinalAnimation(IsleScript::c_hho143cl_RunAnim);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_state->UpdateScore(LegoState::e_yellow, m_actorId);
|
||||||
|
PlayFinalAnimation(IsleScript::c_hho144cl_RunAnim);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_unk0x16e != 0) {
|
||||||
|
if (m_lastAction != IsleScript::c_noneIsle) {
|
||||||
|
InvokeAction(Extra::e_stop, *g_isleScript, m_lastAction, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
PlayAction(IsleScript::c_Avo915In_PlayWav);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_unk0x16c != 0) {
|
||||||
|
if (m_lastAction != IsleScript::c_noneIsle) {
|
||||||
|
InvokeAction(Extra::e_stop, *g_isleScript, m_lastAction, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
PlayAction(IsleScript::c_Avo915In_PlayWav);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (p_param.GetTrigger() == LegoPathStruct::c_s && p_param.GetData() == 0x131 && m_unk0x16e == 0) {
|
||||||
|
m_unk0x16e = 1;
|
||||||
|
m_unk0x170 = 1;
|
||||||
|
|
||||||
|
if (m_lastAction != IsleScript::c_noneIsle) {
|
||||||
|
InvokeAction(Extra::e_stop, *g_isleScript, m_lastAction, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
FUN_10036ec0();
|
||||||
|
|
||||||
|
if (m_actorId < LegoActor::c_pepper || m_actorId > LegoActor::c_laura) {
|
||||||
|
m_actorId = LegoActor::c_laura;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (m_actorId) {
|
||||||
|
case c_pepper:
|
||||||
|
PlayAnimation(IsleScript::c_hpz049bd_RunAnim);
|
||||||
|
break;
|
||||||
|
case c_mama:
|
||||||
|
PlayAnimation(IsleScript::c_hpz047pe_RunAnim);
|
||||||
|
break;
|
||||||
|
case c_papa:
|
||||||
|
PlayAnimation(IsleScript::c_hpz050bd_RunAnim);
|
||||||
|
break;
|
||||||
|
case c_nick:
|
||||||
|
case c_laura:
|
||||||
|
PlayAnimation(IsleScript::c_hpz048pe_RunAnim);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (p_param.GetTrigger() == LegoPathStruct::c_camAnim && (p_param.GetData() == 0x22 || p_param.GetData() == 0x23 || p_param.GetData() == 0x24) && m_unk0x16c == 0) {
|
||||||
|
m_unk0x16c = 1;
|
||||||
|
m_unk0x170 = 1;
|
||||||
|
|
||||||
|
if (m_lastAction != IsleScript::c_noneIsle) {
|
||||||
|
InvokeAction(Extra::e_stop, *g_isleScript, m_lastAction, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
FUN_10036ec0();
|
||||||
|
PlayAnimation(IsleScript::c_hps116bd_RunAnim);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -287,7 +381,7 @@ MxLong Ambulance::HandleClick()
|
||||||
}
|
}
|
||||||
|
|
||||||
m_time = Timer()->GetTime();
|
m_time = Timer()->GetTime();
|
||||||
m_unk0x16a = UserActor()->GetActorId();
|
m_actorId = UserActor()->GetActorId();
|
||||||
|
|
||||||
Enter();
|
Enter();
|
||||||
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_AmbulanceDashboard, NULL);
|
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_AmbulanceDashboard, NULL);
|
||||||
|
@ -318,6 +412,12 @@ void Ambulance::Exit()
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x10036ec0
|
||||||
|
void Ambulance::FUN_10036ec0()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10036f90
|
// STUB: LEGO1 0x10036f90
|
||||||
MxLong Ambulance::HandleControl(LegoControlManagerEvent& p_param)
|
MxLong Ambulance::HandleControl(LegoControlManagerEvent& p_param)
|
||||||
{
|
{
|
||||||
|
@ -447,6 +547,14 @@ void Ambulance::PlayAnimation(IsleScript::Script p_objectId)
|
||||||
m_lastAnimation = p_objectId;
|
m_lastAnimation = p_objectId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x10037310
|
||||||
|
// FUNCTION: BETA10 0x10024440
|
||||||
|
void Ambulance::PlayFinalAnimation(IsleScript::Script p_objectId)
|
||||||
|
{
|
||||||
|
AnimationManager()->FUN_10060dc0(p_objectId, NULL, TRUE, TRUE, NULL, FALSE, FALSE, TRUE, TRUE);
|
||||||
|
m_lastAnimation = p_objectId;
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10037340
|
// FUNCTION: LEGO1 0x10037340
|
||||||
void Ambulance::StopAction(IsleScript::Script p_objectId)
|
void Ambulance::StopAction(IsleScript::Script p_objectId)
|
||||||
{
|
{
|
||||||
|
@ -469,18 +577,18 @@ void Ambulance::PlayAction(IsleScript::Script p_objectId)
|
||||||
// FUNCTION: LEGO1 0x100373a0
|
// FUNCTION: LEGO1 0x100373a0
|
||||||
AmbulanceMissionState::AmbulanceMissionState()
|
AmbulanceMissionState::AmbulanceMissionState()
|
||||||
{
|
{
|
||||||
m_unk0x10 = 0;
|
|
||||||
m_unk0x12 = 0;
|
|
||||||
m_unk0x14 = 0;
|
|
||||||
m_unk0x08 = 0;
|
m_unk0x08 = 0;
|
||||||
m_unk0x16 = 0;
|
|
||||||
m_unk0x0c = 0;
|
m_unk0x0c = 0;
|
||||||
m_unk0x18 = 0;
|
m_peScore = 0;
|
||||||
m_score1 = 0;
|
m_maScore = 0;
|
||||||
m_score2 = 0;
|
m_paScore = 0;
|
||||||
m_score3 = 0;
|
m_niScore = 0;
|
||||||
m_score4 = 0;
|
m_laScore = 0;
|
||||||
m_score5 = 0;
|
m_peHighScore = 0;
|
||||||
|
m_maHighScore = 0;
|
||||||
|
m_paHighScore = 0;
|
||||||
|
m_niHighScore = 0;
|
||||||
|
m_laHighScore = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10037440
|
// STUB: LEGO1 0x10037440
|
||||||
|
|
|
@ -21,7 +21,7 @@ BuildingEntity::~BuildingEntity()
|
||||||
// FUNCTION: LEGO1 0x100150a0
|
// FUNCTION: LEGO1 0x100150a0
|
||||||
MxLong BuildingEntity::Notify(MxParam& p_param)
|
MxLong BuildingEntity::Notify(MxParam& p_param)
|
||||||
{
|
{
|
||||||
if (((MxNotificationParam&) p_param).GetType() == c_notificationClick) {
|
if (((MxNotificationParam&) p_param).GetNotification() == c_notificationClick) {
|
||||||
return HandleClick((LegoEventNotificationParam&) p_param);
|
return HandleClick((LegoEventNotificationParam&) p_param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ MxLong DuneBuggy::HandleControl(LegoControlManagerEvent& p_param)
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10068270
|
// STUB: LEGO1 0x10068270
|
||||||
MxLong DuneBuggy::HandleNotification19(MxType19NotificationParam& p_param)
|
MxLong DuneBuggy::HandlePathStruct(LegoPathStructEvent& p_param)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -48,7 +48,7 @@ MxLong IsleActor::Notify(MxParam& p_param)
|
||||||
case c_notificationEndAnim:
|
case c_notificationEndAnim:
|
||||||
result = VTable0x70();
|
result = VTable0x70();
|
||||||
break;
|
break;
|
||||||
case c_notificationType19:
|
case c_notificationPathStruct:
|
||||||
result = VTable0x80(p_param);
|
result = VTable0x80(p_param);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,27 +48,27 @@ void IslePathActor::Destroy(MxBool p_fromDestructor)
|
||||||
// FUNCTION: LEGO1 0x1001a2c0
|
// FUNCTION: LEGO1 0x1001a2c0
|
||||||
MxLong IslePathActor::Notify(MxParam& p_param)
|
MxLong IslePathActor::Notify(MxParam& p_param)
|
||||||
{
|
{
|
||||||
MxLong ret = 0;
|
MxLong result = 0;
|
||||||
|
|
||||||
switch (((MxNotificationParam&) p_param).GetType()) {
|
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||||
case c_notificationType0:
|
case c_notificationType0:
|
||||||
ret = HandleNotification0();
|
result = HandleNotification0();
|
||||||
break;
|
break;
|
||||||
case c_notificationClick:
|
case c_notificationClick:
|
||||||
ret = HandleClick();
|
result = HandleClick();
|
||||||
break;
|
break;
|
||||||
case c_notificationControl:
|
case c_notificationControl:
|
||||||
ret = HandleControl((LegoControlManagerEvent&) p_param);
|
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||||
break;
|
break;
|
||||||
case c_notificationEndAnim:
|
case c_notificationEndAnim:
|
||||||
ret = HandleEndAnim((LegoEndAnimNotificationParam&) p_param);
|
result = HandleEndAnim((LegoEndAnimNotificationParam&) p_param);
|
||||||
break;
|
break;
|
||||||
case c_notificationType19:
|
case c_notificationPathStruct:
|
||||||
ret = HandleNotification19((MxType19NotificationParam&) p_param);
|
result = HandlePathStruct((LegoPathStructEvent&) p_param);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1001a350
|
// FUNCTION: LEGO1 0x1001a350
|
||||||
|
|
|
@ -32,7 +32,7 @@ JukeBoxEntity::~JukeBoxEntity()
|
||||||
// FUNCTION: LEGO1 0x10085e40
|
// FUNCTION: LEGO1 0x10085e40
|
||||||
MxLong JukeBoxEntity::Notify(MxParam& p_param)
|
MxLong JukeBoxEntity::Notify(MxParam& p_param)
|
||||||
{
|
{
|
||||||
if (((MxNotificationParam&) p_param).GetType() == c_notificationClick) {
|
if (((MxNotificationParam&) p_param).GetNotification() == c_notificationClick) {
|
||||||
if (!FUN_1003ef60()) {
|
if (!FUN_1003ef60()) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ MxLong Motocycle::HandleControl(LegoControlManagerEvent& p_param)
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10035df0
|
// STUB: LEGO1 0x10035df0
|
||||||
MxLong Motocycle::HandleNotification19(MxType19NotificationParam& p_param)
|
MxLong Motocycle::HandlePathStruct(LegoPathStructEvent& p_param)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -86,7 +86,7 @@ MxLong Radio::Notify(MxParam& p_param)
|
||||||
MxLong result = 0;
|
MxLong result = 0;
|
||||||
|
|
||||||
if (m_unk0x0c) {
|
if (m_unk0x0c) {
|
||||||
switch (((MxNotificationParam&) p_param).GetType()) {
|
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||||
case c_notificationEndAction:
|
case c_notificationEndAction:
|
||||||
result = HandleEndAction((MxEndActionNotificationParam&) p_param);
|
result = HandleEndAction((MxEndActionNotificationParam&) p_param);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -89,7 +89,7 @@ MxLong TowTrack::HandleEndAnim(LegoEndAnimNotificationParam& p_param)
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1004d330
|
// STUB: LEGO1 0x1004d330
|
||||||
MxLong TowTrack::HandleNotification19(MxType19NotificationParam& p_param)
|
MxLong TowTrack::HandlePathStruct(LegoPathStructEvent& p_param)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -1366,11 +1366,11 @@ LegoTranInfo* LegoAnimationManager::GetTranInfo(MxU32 p_index)
|
||||||
MxLong LegoAnimationManager::Notify(MxParam& p_param)
|
MxLong LegoAnimationManager::Notify(MxParam& p_param)
|
||||||
{
|
{
|
||||||
if (((MxNotificationParam&) p_param).GetSender() == this) {
|
if (((MxNotificationParam&) p_param).GetSender() == this) {
|
||||||
if (((MxNotificationParam&) p_param).GetType() == c_notificationEndAnim) {
|
if (((MxNotificationParam&) p_param).GetNotification() == c_notificationEndAnim) {
|
||||||
FUN_100605e0(m_unk0x18, TRUE, NULL, TRUE, NULL, FALSE, TRUE, TRUE, TRUE);
|
FUN_100605e0(m_unk0x18, TRUE, NULL, TRUE, NULL, FALSE, TRUE, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (((MxNotificationParam&) p_param).GetType() == c_notificationEndAnim && m_tranInfoList != NULL) {
|
else if (((MxNotificationParam&) p_param).GetNotification() == c_notificationEndAnim && m_tranInfoList != NULL) {
|
||||||
LegoTranInfoListCursor cursor(m_tranInfoList);
|
LegoTranInfoListCursor cursor(m_tranInfoList);
|
||||||
LegoTranInfo* tranInfo;
|
LegoTranInfo* tranInfo;
|
||||||
|
|
||||||
|
|
|
@ -216,7 +216,7 @@ MxLong LegoAnimMMPresenter::Notify(MxParam& p_param)
|
||||||
{
|
{
|
||||||
AUTOLOCK(m_criticalSection);
|
AUTOLOCK(m_criticalSection);
|
||||||
|
|
||||||
if (((MxNotificationParam&) p_param).GetType() == c_notificationEndAction &&
|
if (((MxNotificationParam&) p_param).GetNotification() == c_notificationEndAction &&
|
||||||
((MxNotificationParam&) p_param).GetSender() == m_presenter) {
|
((MxNotificationParam&) p_param).GetSender() == m_presenter) {
|
||||||
m_presenter = NULL;
|
m_presenter = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include "legoinputmanager.h"
|
#include "legoinputmanager.h"
|
||||||
#include "legomain.h"
|
#include "legomain.h"
|
||||||
#include "legonamedtexture.h"
|
#include "legonamedtexture.h"
|
||||||
|
#include "legopathstruct.h"
|
||||||
#include "legosoundmanager.h"
|
#include "legosoundmanager.h"
|
||||||
#include "legovideomanager.h"
|
#include "legovideomanager.h"
|
||||||
#include "legoworld.h"
|
#include "legoworld.h"
|
||||||
|
@ -20,7 +21,6 @@
|
||||||
#include "mxmisc.h"
|
#include "mxmisc.h"
|
||||||
#include "mxnotificationmanager.h"
|
#include "mxnotificationmanager.h"
|
||||||
#include "mxstreamer.h"
|
#include "mxstreamer.h"
|
||||||
#include "mxtype19notificationparam.h"
|
|
||||||
#include "mxtypes.h"
|
#include "mxtypes.h"
|
||||||
#include "mxutilities.h"
|
#include "mxutilities.h"
|
||||||
#include "mxvariabletable.h"
|
#include "mxvariabletable.h"
|
||||||
|
@ -367,7 +367,7 @@ void PlayCamAnim(LegoPathActor* p_actor, MxBool p_unused, MxU32 p_location, MxBo
|
||||||
MxLong result = 0;
|
MxLong result = 0;
|
||||||
|
|
||||||
if (world != NULL) {
|
if (world != NULL) {
|
||||||
MxType19NotificationParam param(c_notificationType19, p_actor, 0x43, p_location);
|
LegoPathStructEvent param(c_notificationPathStruct, p_actor, LegoPathStruct::c_camAnim, p_location);
|
||||||
result = world->Notify(param);
|
result = world->Notify(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -178,13 +178,13 @@ MxBool MxControlPresenter::FUN_10044270(MxS32 p_x, MxS32 p_y, MxVideoPresenter*
|
||||||
MxBool MxControlPresenter::FUN_10044480(LegoControlManagerEvent* p_event, MxPresenter* p_presenter)
|
MxBool MxControlPresenter::FUN_10044480(LegoControlManagerEvent* p_event, MxPresenter* p_presenter)
|
||||||
{
|
{
|
||||||
if (IsEnabled()) {
|
if (IsEnabled()) {
|
||||||
switch (p_event->GetType()) {
|
switch (p_event->GetNotification()) {
|
||||||
case c_notificationButtonUp:
|
case c_notificationButtonUp:
|
||||||
if (m_unk0x4c == 0 || m_unk0x4c == 2 || m_unk0x4c == 3) {
|
if (m_unk0x4c == 0 || m_unk0x4c == 2 || m_unk0x4c == 3) {
|
||||||
p_event->SetClickedObjectId(m_action->GetObjectId());
|
p_event->SetClickedObjectId(m_action->GetObjectId());
|
||||||
p_event->SetClickedAtom(m_action->GetAtomId().GetInternal());
|
p_event->SetClickedAtom(m_action->GetAtomId().GetInternal());
|
||||||
VTable0x6c(0);
|
VTable0x6c(0);
|
||||||
p_event->SetType(c_notificationControl);
|
p_event->SetNotification(c_notificationControl);
|
||||||
p_event->SetUnknown0x28(m_unk0x4e);
|
p_event->SetUnknown0x28(m_unk0x4e);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -194,7 +194,7 @@ MxBool MxControlPresenter::FUN_10044480(LegoControlManagerEvent* p_event, MxPres
|
||||||
p_event->SetClickedObjectId(m_action->GetObjectId());
|
p_event->SetClickedObjectId(m_action->GetObjectId());
|
||||||
p_event->SetClickedAtom(m_action->GetAtomId().GetInternal());
|
p_event->SetClickedAtom(m_action->GetAtomId().GetInternal());
|
||||||
VTable0x6c(m_unk0x56);
|
VTable0x6c(m_unk0x56);
|
||||||
p_event->SetType(c_notificationControl);
|
p_event->SetNotification(c_notificationControl);
|
||||||
p_event->SetUnknown0x28(m_unk0x4e);
|
p_event->SetUnknown0x28(m_unk0x4e);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,15 +58,16 @@ MxBool LegoControlManager::FUN_10029210(LegoEventNotificationParam& p_param, MxP
|
||||||
if (m_presenterList != NULL && m_presenterList->GetCount() != 0) {
|
if (m_presenterList != NULL && m_presenterList->GetCount() != 0) {
|
||||||
m_unk0x14 = p_presenter;
|
m_unk0x14 = p_presenter;
|
||||||
|
|
||||||
if (p_param.GetType() == c_notificationButtonUp || p_param.GetType() == c_notificationButtonDown) {
|
if (p_param.GetNotification() == c_notificationButtonUp ||
|
||||||
m_event.SetType(p_param.GetType());
|
p_param.GetNotification() == c_notificationButtonDown) {
|
||||||
|
m_event.SetNotification(p_param.GetNotification());
|
||||||
m_event.SetSender(p_param.GetSender());
|
m_event.SetSender(p_param.GetSender());
|
||||||
m_event.SetModifier(p_param.GetModifier());
|
m_event.SetModifier(p_param.GetModifier());
|
||||||
m_event.SetX(p_param.GetX());
|
m_event.SetX(p_param.GetX());
|
||||||
m_event.SetY(p_param.GetY());
|
m_event.SetY(p_param.GetY());
|
||||||
m_event.SetKey(p_param.GetKey());
|
m_event.SetKey(p_param.GetKey());
|
||||||
|
|
||||||
if (p_param.GetType() == c_notificationButtonUp) {
|
if (p_param.GetNotification() == c_notificationButtonUp) {
|
||||||
if (m_unk0x10 == TRUE) {
|
if (m_unk0x10 == TRUE) {
|
||||||
m_unk0x10 = FALSE;
|
m_unk0x10 = FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -82,7 +83,7 @@ MxBool LegoControlManager::FUN_10029210(LegoEventNotificationParam& p_param, MxP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (p_param.GetType() == c_notificationButtonDown) {
|
else if (p_param.GetNotification() == c_notificationButtonDown) {
|
||||||
if (m_unk0x0c == 1) {
|
if (m_unk0x0c == 1) {
|
||||||
m_unk0x10 = TRUE;
|
m_unk0x10 = TRUE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -163,7 +164,7 @@ MxControlPresenter* LegoControlManager::FUN_100294e0(MxS32 p_x, MxS32 p_y)
|
||||||
MxResult LegoControlManager::Tickle()
|
MxResult LegoControlManager::Tickle()
|
||||||
{
|
{
|
||||||
if (m_unk0x08 == 2 && m_unk0x0c == 1) {
|
if (m_unk0x08 == 2 && m_unk0x0c == 1) {
|
||||||
m_event.SetType(c_notificationButtonUp);
|
m_event.SetNotification(c_notificationButtonUp);
|
||||||
FUN_10029750();
|
FUN_10029750();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ DECOMP_SIZE_ASSERT(Act2PoliceStation, 0x68)
|
||||||
// FUNCTION: LEGO1 0x1004e0e0
|
// FUNCTION: LEGO1 0x1004e0e0
|
||||||
MxLong Act2PoliceStation::Notify(MxParam& p_param)
|
MxLong Act2PoliceStation::Notify(MxParam& p_param)
|
||||||
{
|
{
|
||||||
if (((MxNotificationParam&) p_param).GetType() == c_notificationClick) {
|
if (((MxNotificationParam&) p_param).GetNotification() == c_notificationClick) {
|
||||||
MxNotificationParam param(c_notificationType23, NULL);
|
MxNotificationParam param(c_notificationType23, NULL);
|
||||||
NotificationManager()->Send(CurrentWorld(), param);
|
NotificationManager()->Send(CurrentWorld(), param);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -602,7 +602,7 @@ MxResult LegoNavController::ProcessKeyboardInput()
|
||||||
// STUB: LEGO1 0x10055a60
|
// STUB: LEGO1 0x10055a60
|
||||||
MxLong LegoNavController::Notify(MxParam& p_param)
|
MxLong LegoNavController::Notify(MxParam& p_param)
|
||||||
{
|
{
|
||||||
if (((MxNotificationParam&) p_param).GetType() == c_notificationKeyPress) {
|
if (((MxNotificationParam&) p_param).GetNotification() == c_notificationKeyPress) {
|
||||||
m_unk0x5d = TRUE;
|
m_unk0x5d = TRUE;
|
||||||
|
|
||||||
switch (((LegoEventNotificationParam&) p_param).GetKey()) {
|
switch (((LegoEventNotificationParam&) p_param).GetKey()) {
|
||||||
|
|
|
@ -345,7 +345,7 @@ void LegoInputManager::QueueEvent(NotificationId p_id, MxU8 p_modifier, MxLong p
|
||||||
{
|
{
|
||||||
LegoEventNotificationParam param = LegoEventNotificationParam(p_id, NULL, p_modifier, p_x, p_y, p_key);
|
LegoEventNotificationParam param = LegoEventNotificationParam(p_id, NULL, p_modifier, p_x, p_y, p_key);
|
||||||
|
|
||||||
if (((!m_unk0x88) || ((m_unk0x335 && (param.GetType() == c_notificationButtonDown)))) ||
|
if (((!m_unk0x88) || ((m_unk0x335 && (param.GetNotification() == c_notificationButtonDown)))) ||
|
||||||
((m_unk0x336 && (p_key == VK_SPACE)))) {
|
((m_unk0x336 && (p_key == VK_SPACE)))) {
|
||||||
ProcessOneEvent(param);
|
ProcessOneEvent(param);
|
||||||
}
|
}
|
||||||
|
@ -369,12 +369,12 @@ MxBool LegoInputManager::ProcessOneEvent(LegoEventNotificationParam& p_param)
|
||||||
{
|
{
|
||||||
MxBool processRoi;
|
MxBool processRoi;
|
||||||
|
|
||||||
if (p_param.GetType() == c_notificationKeyPress) {
|
if (p_param.GetNotification() == c_notificationKeyPress) {
|
||||||
if (!Lego()->IsPaused() || p_param.GetKey() == VK_PAUSE) {
|
if (!Lego()->IsPaused() || p_param.GetKey() == VK_PAUSE) {
|
||||||
if (p_param.GetKey() == VK_SHIFT) {
|
if (p_param.GetKey() == VK_SHIFT) {
|
||||||
if (m_unk0x195) {
|
if (m_unk0x195) {
|
||||||
m_unk0x80 = FALSE;
|
m_unk0x80 = FALSE;
|
||||||
p_param.SetType(c_notificationDrag);
|
p_param.SetNotification(c_notificationDrag);
|
||||||
|
|
||||||
if (m_camera) {
|
if (m_camera) {
|
||||||
m_camera->Notify(p_param);
|
m_camera->Notify(p_param);
|
||||||
|
@ -400,7 +400,7 @@ MxBool LegoInputManager::ProcessOneEvent(LegoEventNotificationParam& p_param)
|
||||||
processRoi = TRUE;
|
processRoi = TRUE;
|
||||||
|
|
||||||
if (m_unk0x335 != 0) {
|
if (m_unk0x335 != 0) {
|
||||||
if (p_param.GetType() == c_notificationButtonDown) {
|
if (p_param.GetNotification() == c_notificationButtonDown) {
|
||||||
LegoEventNotificationParam notification(c_notificationKeyPress, NULL, 0, 0, 0, VK_SPACE);
|
LegoEventNotificationParam notification(c_notificationKeyPress, NULL, 0, 0, 0, VK_SPACE);
|
||||||
LegoNotifyListCursor cursor(m_keyboardNotifyList);
|
LegoNotifyListCursor cursor(m_keyboardNotifyList);
|
||||||
MxCore* target;
|
MxCore* target;
|
||||||
|
@ -415,7 +415,7 @@ MxBool LegoInputManager::ProcessOneEvent(LegoEventNotificationParam& p_param)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_unk0x195 && p_param.GetType() == c_notificationButtonDown) {
|
if (m_unk0x195 && p_param.GetNotification() == c_notificationButtonDown) {
|
||||||
m_unk0x195 = 0;
|
m_unk0x195 = 0;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -424,7 +424,7 @@ MxBool LegoInputManager::ProcessOneEvent(LegoEventNotificationParam& p_param)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_param.GetType() == c_notificationButtonDown) {
|
if (p_param.GetNotification() == c_notificationButtonDown) {
|
||||||
MxPresenter* presenter = VideoManager()->GetPresenterAt(p_param.GetX(), p_param.GetY());
|
MxPresenter* presenter = VideoManager()->GetPresenterAt(p_param.GetX(), p_param.GetY());
|
||||||
|
|
||||||
if (presenter) {
|
if (presenter) {
|
||||||
|
@ -444,7 +444,7 @@ MxBool LegoInputManager::ProcessOneEvent(LegoEventNotificationParam& p_param)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (p_param.GetType() == c_notificationButtonUp) {
|
else if (p_param.GetNotification() == c_notificationButtonUp) {
|
||||||
if (g_unk0x100f31b0 != -1 || m_controlManager->GetUnknown0x10() ||
|
if (g_unk0x100f31b0 != -1 || m_controlManager->GetUnknown0x10() ||
|
||||||
m_controlManager->GetUnknown0x0c() == 1) {
|
m_controlManager->GetUnknown0x0c() == 1) {
|
||||||
MxBool result = m_controlManager->FUN_10029210(p_param, NULL);
|
MxBool result = m_controlManager->FUN_10029210(p_param, NULL);
|
||||||
|
@ -457,7 +457,7 @@ MxBool LegoInputManager::ProcessOneEvent(LegoEventNotificationParam& p_param)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FUN_1005cdf0(p_param)) {
|
if (FUN_1005cdf0(p_param)) {
|
||||||
if (processRoi && p_param.GetType() == c_notificationClick) {
|
if (processRoi && p_param.GetNotification() == c_notificationClick) {
|
||||||
LegoROI* roi = PickROI(p_param.GetX(), p_param.GetY());
|
LegoROI* roi = PickROI(p_param.GetX(), p_param.GetY());
|
||||||
p_param.SetROI(roi);
|
p_param.SetROI(roi);
|
||||||
|
|
||||||
|
@ -493,13 +493,13 @@ MxBool LegoInputManager::FUN_1005cdf0(LegoEventNotificationParam& p_param)
|
||||||
StopAutoDragTimer();
|
StopAutoDragTimer();
|
||||||
|
|
||||||
if (m_unk0x80) {
|
if (m_unk0x80) {
|
||||||
p_param.SetType(c_notificationDrag);
|
p_param.SetNotification(c_notificationDrag);
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
}
|
}
|
||||||
else if (m_unk0x81) {
|
else if (m_unk0x81) {
|
||||||
p_param.SetX(m_x);
|
p_param.SetX(m_x);
|
||||||
p_param.SetY(m_y);
|
p_param.SetY(m_y);
|
||||||
p_param.SetType(c_notificationClick);
|
p_param.SetNotification(c_notificationClick);
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -531,14 +531,14 @@ MxBool LegoInputManager::FUN_1005cdf0(LegoEventNotificationParam& p_param)
|
||||||
if (m_unk0x195 || (diffX * diffX) + (diffY * diffY) > m_unk0x74) {
|
if (m_unk0x195 || (diffX * diffX) + (diffY * diffY) > m_unk0x74) {
|
||||||
StopAutoDragTimer();
|
StopAutoDragTimer();
|
||||||
m_unk0x80 = TRUE;
|
m_unk0x80 = TRUE;
|
||||||
p_param.SetType(c_notificationDragEnd);
|
p_param.SetNotification(c_notificationDragEnd);
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
p_param.SetX(m_x);
|
p_param.SetX(m_x);
|
||||||
p_param.SetY(m_y);
|
p_param.SetY(m_y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
p_param.SetType(c_notificationDragStart);
|
p_param.SetNotification(c_notificationDragStart);
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -552,7 +552,7 @@ MxBool LegoInputManager::FUN_1005cdf0(LegoEventNotificationParam& p_param)
|
||||||
p_param.SetX(m_x);
|
p_param.SetX(m_x);
|
||||||
p_param.SetY(m_y);
|
p_param.SetY(m_y);
|
||||||
p_param.SetModifier(LegoEventNotificationParam::c_lButtonState);
|
p_param.SetModifier(LegoEventNotificationParam::c_lButtonState);
|
||||||
p_param.SetType(c_notificationDragEnd);
|
p_param.SetNotification(c_notificationDragEnd);
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -564,7 +564,7 @@ MxLong LegoOmni::Notify(MxParam& p_param)
|
||||||
{
|
{
|
||||||
MxBool isCD = FALSE;
|
MxBool isCD = FALSE;
|
||||||
|
|
||||||
if (((MxNotificationParam&) p_param).GetType() == c_notificationEndAction &&
|
if (((MxNotificationParam&) p_param).GetNotification() == c_notificationEndAction &&
|
||||||
((MxActionNotificationParam&) p_param).GetAction()->GetAtomId() == *g_nocdSourceName) {
|
((MxActionNotificationParam&) p_param).GetAction()->GetAtomId() == *g_nocdSourceName) {
|
||||||
isCD = TRUE;
|
isCD = TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#include "mxbackgroundaudiomanager.h"
|
#include "mxbackgroundaudiomanager.h"
|
||||||
#include "mxmisc.h"
|
#include "mxmisc.h"
|
||||||
#include "mxnotificationmanager.h"
|
#include "mxnotificationmanager.h"
|
||||||
#include "mxtype19notificationparam.h"
|
|
||||||
#include "scripts.h"
|
#include "scripts.h"
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(LegoPathStructBase, 0x0c)
|
DECOMP_SIZE_ASSERT(LegoPathStructBase, 0x0c)
|
||||||
|
@ -52,7 +51,7 @@ MxBool LegoPathStruct::HandleTrigger(LegoPathActor* p_actor, MxBool p_direction,
|
||||||
case c_d: {
|
case c_d: {
|
||||||
p_actor->VTable0x58(p_data);
|
p_actor->VTable0x58(p_data);
|
||||||
|
|
||||||
MxType19NotificationParam param(c_notificationType19, p_actor, m_name[2], p_data);
|
LegoPathStructEvent param(c_notificationPathStruct, p_actor, m_name[2], p_data);
|
||||||
p_actor->Notify(param);
|
p_actor->Notify(param);
|
||||||
|
|
||||||
LegoWorld* world = CurrentWorld();
|
LegoWorld* world = CurrentWorld();
|
||||||
|
@ -68,7 +67,6 @@ MxBool LegoPathStruct::HandleTrigger(LegoPathActor* p_actor, MxBool p_direction,
|
||||||
break;
|
break;
|
||||||
case c_h: {
|
case c_h: {
|
||||||
LegoHideAnimPresenter* presenter = m_world->GetHideAnimPresenter();
|
LegoHideAnimPresenter* presenter = m_world->GetHideAnimPresenter();
|
||||||
|
|
||||||
if (presenter != NULL) {
|
if (presenter != NULL) {
|
||||||
presenter->FUN_1006db40(p_data * 100);
|
presenter->FUN_1006db40(p_data * 100);
|
||||||
}
|
}
|
||||||
|
@ -82,7 +80,7 @@ MxBool LegoPathStruct::HandleTrigger(LegoPathActor* p_actor, MxBool p_direction,
|
||||||
case c_s: {
|
case c_s: {
|
||||||
LegoWorld* world = CurrentWorld();
|
LegoWorld* world = CurrentWorld();
|
||||||
if (world != NULL) {
|
if (world != NULL) {
|
||||||
MxType19NotificationParam param(c_notificationType19, p_actor, m_name[2], p_data);
|
LegoPathStructEvent param(c_notificationPathStruct, p_actor, m_name[2], p_data);
|
||||||
|
|
||||||
if (world->Notify(param) != 0) {
|
if (world->Notify(param) != 0) {
|
||||||
break;
|
break;
|
||||||
|
@ -95,7 +93,7 @@ MxBool LegoPathStruct::HandleTrigger(LegoPathActor* p_actor, MxBool p_direction,
|
||||||
case c_w: {
|
case c_w: {
|
||||||
LegoWorld* world = CurrentWorld();
|
LegoWorld* world = CurrentWorld();
|
||||||
if (world != NULL) {
|
if (world != NULL) {
|
||||||
MxType19NotificationParam param(c_notificationType19, p_actor, m_name[2], p_data);
|
LegoPathStructEvent param(c_notificationPathStruct, p_actor, m_name[2], p_data);
|
||||||
NotificationManager()->Send(world, param);
|
NotificationManager()->Send(world, param);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -32,7 +32,7 @@ MxLong CarRace::HandleEndAction(MxEndActionNotificationParam&)
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100170e0
|
// STUB: LEGO1 0x100170e0
|
||||||
MxLong CarRace::HandleType19Notification(MxType19NotificationParam&)
|
MxLong CarRace::HandlePathStruct(LegoPathStructEvent&)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -26,7 +26,7 @@ MxLong JetskiRace::HandleClick(LegoEventNotificationParam&)
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100166a0
|
// STUB: LEGO1 0x100166a0
|
||||||
MxLong JetskiRace::HandleType19Notification(MxType19NotificationParam&)
|
MxLong JetskiRace::HandlePathStruct(LegoPathStructEvent&)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ LegoRace::LegoRace()
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10015b70
|
// FUNCTION: LEGO1 0x10015b70
|
||||||
MxLong LegoRace::HandleType19Notification(MxType19NotificationParam&)
|
MxLong LegoRace::HandlePathStruct(LegoPathStructEvent&)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -101,8 +101,8 @@ MxLong LegoRace::Notify(MxParam& p_param)
|
||||||
case c_notificationClick:
|
case c_notificationClick:
|
||||||
result = HandleClick((LegoEventNotificationParam&) p_param);
|
result = HandleClick((LegoEventNotificationParam&) p_param);
|
||||||
break;
|
break;
|
||||||
case c_notificationType19:
|
case c_notificationPathStruct:
|
||||||
result = HandleType19Notification((MxType19NotificationParam&) p_param);
|
result = HandlePathStruct((LegoPathStructEvent&) p_param);
|
||||||
break;
|
break;
|
||||||
case c_notificationTransitioned:
|
case c_notificationTransitioned:
|
||||||
GameState()->SwitchArea(m_destLocation);
|
GameState()->SwitchArea(m_destLocation);
|
||||||
|
|
|
@ -58,7 +58,7 @@ MxLong ElevatorBottom::Notify(MxParam& p_param)
|
||||||
LegoWorld::Notify(p_param);
|
LegoWorld::Notify(p_param);
|
||||||
|
|
||||||
if (m_worldStarted) {
|
if (m_worldStarted) {
|
||||||
switch (((MxNotificationParam&) p_param).GetType()) {
|
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||||
case c_notificationControl:
|
case c_notificationControl:
|
||||||
ret = HandleControl((LegoControlManagerEvent&) p_param);
|
ret = HandleControl((LegoControlManagerEvent&) p_param);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -61,7 +61,7 @@ MxLong InfocenterDoor::Notify(MxParam& p_param)
|
||||||
LegoWorld::Notify(p_param);
|
LegoWorld::Notify(p_param);
|
||||||
|
|
||||||
if (m_worldStarted) {
|
if (m_worldStarted) {
|
||||||
switch (((MxNotificationParam&) p_param).GetType()) {
|
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||||
case c_notificationEndAction:
|
case c_notificationEndAction:
|
||||||
if (((MxEndActionNotificationParam&) p_param).GetAction()->GetAtomId() == m_atom) {
|
if (((MxEndActionNotificationParam&) p_param).GetAction()->GetAtomId() == m_atom) {
|
||||||
BackgroundAudioManager()->RaiseVolume();
|
BackgroundAudioManager()->RaiseVolume();
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include "legoinputmanager.h"
|
#include "legoinputmanager.h"
|
||||||
#include "legomain.h"
|
#include "legomain.h"
|
||||||
#include "legonamedtexture.h"
|
#include "legonamedtexture.h"
|
||||||
|
#include "legopathstruct.h"
|
||||||
#include "legoutils.h"
|
#include "legoutils.h"
|
||||||
#include "legovariables.h"
|
#include "legovariables.h"
|
||||||
#include "legovideomanager.h"
|
#include "legovideomanager.h"
|
||||||
|
@ -29,7 +30,6 @@
|
||||||
#include "mxnotificationmanager.h"
|
#include "mxnotificationmanager.h"
|
||||||
#include "mxstillpresenter.h"
|
#include "mxstillpresenter.h"
|
||||||
#include "mxtransitionmanager.h"
|
#include "mxtransitionmanager.h"
|
||||||
#include "mxtype19notificationparam.h"
|
|
||||||
#include "mxvariabletable.h"
|
#include "mxvariabletable.h"
|
||||||
#include "pizza.h"
|
#include "pizza.h"
|
||||||
#include "pizzeria.h"
|
#include "pizzeria.h"
|
||||||
|
@ -167,8 +167,8 @@ MxLong Isle::Notify(MxParam& p_param)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case c_notificationType19:
|
case c_notificationPathStruct:
|
||||||
result = HandleType19Notification((MxType19NotificationParam&) p_param);
|
result = HandlePathStruct((LegoPathStructEvent&) p_param);
|
||||||
break;
|
break;
|
||||||
case c_notificationType20:
|
case c_notificationType20:
|
||||||
Enable(TRUE);
|
Enable(TRUE);
|
||||||
|
@ -469,7 +469,7 @@ void Isle::UpdateGlobe()
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100315f0
|
// FUNCTION: LEGO1 0x100315f0
|
||||||
MxLong Isle::HandleType19Notification(MxType19NotificationParam& p_param)
|
MxLong Isle::HandlePathStruct(LegoPathStructEvent& p_param)
|
||||||
{
|
{
|
||||||
MxLong result = 0;
|
MxLong result = 0;
|
||||||
|
|
||||||
|
@ -495,7 +495,8 @@ MxLong Isle::HandleType19Notification(MxType19NotificationParam& p_param)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result == 0) {
|
if (result == 0) {
|
||||||
switch (p_param.GetUnknown0x0c()) {
|
// These values correspond to certain paths on the island
|
||||||
|
switch (p_param.GetData()) {
|
||||||
case 0x12c:
|
case 0x12c:
|
||||||
AnimationManager()->FUN_10064670(NULL);
|
AnimationManager()->FUN_10064670(NULL);
|
||||||
result = 1;
|
result = 1;
|
||||||
|
|
|
@ -103,7 +103,7 @@ MxLong RegistrationBook::Notify(MxParam& p_param)
|
||||||
LegoWorld::Notify(p_param);
|
LegoWorld::Notify(p_param);
|
||||||
|
|
||||||
if (m_worldStarted) {
|
if (m_worldStarted) {
|
||||||
switch (((MxNotificationParam&) p_param).GetType()) {
|
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||||
case c_notificationEndAction:
|
case c_notificationEndAction:
|
||||||
result = HandleEndAction((MxEndActionNotificationParam&) p_param);
|
result = HandleEndAction((MxEndActionNotificationParam&) p_param);
|
||||||
break;
|
break;
|
||||||
|
@ -117,7 +117,7 @@ MxLong RegistrationBook::Notify(MxParam& p_param)
|
||||||
case c_notificationControl:
|
case c_notificationControl:
|
||||||
result = HandleControl((LegoControlManagerEvent&) p_param);
|
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||||
break;
|
break;
|
||||||
case c_notificationType19:
|
case c_notificationPathStruct:
|
||||||
result = HandleNotification19(p_param);
|
result = HandleNotification19(p_param);
|
||||||
break;
|
break;
|
||||||
case c_notificationTransitioned:
|
case c_notificationTransitioned:
|
||||||
|
|
|
@ -266,21 +266,21 @@ void Score::Paint()
|
||||||
m_surface = (MxU8*) desc.lpSurface;
|
m_surface = (MxU8*) desc.lpSurface;
|
||||||
|
|
||||||
for (MxU8 actor = 1; actor <= 5; actor++) {
|
for (MxU8 actor = 1; actor <= 5; actor++) {
|
||||||
MxU16 score;
|
MxS16 score;
|
||||||
|
|
||||||
score = carRaceState ? carRaceState->GetState(actor)->GetScore() : 0;
|
score = carRaceState ? carRaceState->GetState(actor)->GetHighScore() : 0;
|
||||||
FillArea(0, actor - 1, score);
|
FillArea(0, actor - 1, score);
|
||||||
|
|
||||||
score = jetskiRaceState ? jetskiRaceState->GetState(actor)->GetScore() : 0;
|
score = jetskiRaceState ? jetskiRaceState->GetState(actor)->GetHighScore() : 0;
|
||||||
FillArea(1, actor - 1, score);
|
FillArea(1, actor - 1, score);
|
||||||
|
|
||||||
score = pizzaMissionState ? pizzaMissionState->GetScore(actor) : 0;
|
score = pizzaMissionState ? pizzaMissionState->GetHighScore(actor) : 0;
|
||||||
FillArea(2, actor - 1, score);
|
FillArea(2, actor - 1, score);
|
||||||
|
|
||||||
score = towTrackMissionState ? towTrackMissionState->GetScore(actor) : 0;
|
score = towTrackMissionState ? towTrackMissionState->GetHighScore(actor) : 0;
|
||||||
FillArea(3, actor - 1, score);
|
FillArea(3, actor - 1, score);
|
||||||
|
|
||||||
score = ambulanceMissionState ? ambulanceMissionState->GetScore(actor) : 0;
|
score = ambulanceMissionState ? ambulanceMissionState->GetHighScore(actor) : 0;
|
||||||
FillArea(4, actor - 1, score);
|
FillArea(4, actor - 1, score);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -299,14 +299,14 @@ void Score::FillArea(MxU32 i_activity, MxU32 i_actor, MxS16 score)
|
||||||
MxS32 local14[] = {0x2a, 0x27, 0x29, 0x29, 0x2a};
|
MxS32 local14[] = {0x2a, 0x27, 0x29, 0x29, 0x2a};
|
||||||
MxS32 local50[] = {0x2f, 0x56, 0x81, 0xaa, 0xd4};
|
MxS32 local50[] = {0x2f, 0x56, 0x81, 0xaa, 0xd4};
|
||||||
MxS32 local28[] = {0x25, 0x29, 0x27, 0x28, 0x28};
|
MxS32 local28[] = {0x25, 0x29, 0x27, 0x28, 0x28};
|
||||||
MxS32 local60[] = {0x11, 0x0f, 0x08, 0x05};
|
MxS32 colors[] = {0x11, 0x0f, 0x08, 0x05};
|
||||||
|
|
||||||
MxU8* ptr = m_surface + local3c[i_actor] + local50[i_activity];
|
MxU8* ptr = m_surface + local3c[i_actor] + local50[i_activity];
|
||||||
MxS32 val = local60[score];
|
MxS32 color = colors[score];
|
||||||
MxS32 size = local28[i_activity];
|
MxS32 size = local28[i_activity];
|
||||||
|
|
||||||
for (MxS32 i = 0; i < local14[i_actor]; i++) {
|
for (MxS32 i = 0; i < local14[i_actor]; i++) {
|
||||||
memset(ptr, val, size);
|
memset(ptr, color, size);
|
||||||
ptr += 0x100;
|
ptr += 0x100;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ enum NotificationId {
|
||||||
c_notificationTimer = 15, // 100d6aa0
|
c_notificationTimer = 15, // 100d6aa0
|
||||||
c_notificationControl = 17,
|
c_notificationControl = 17,
|
||||||
c_notificationEndAnim = 18, // 100d7e80
|
c_notificationEndAnim = 18, // 100d7e80
|
||||||
c_notificationType19 = 19, // 100d6230
|
c_notificationPathStruct = 19, // 100d6230
|
||||||
c_notificationType20 = 20,
|
c_notificationType20 = 20,
|
||||||
c_notificationNewPresenter = 21,
|
c_notificationNewPresenter = 21,
|
||||||
c_notificationType22 = 22,
|
c_notificationType22 = 22,
|
||||||
|
@ -48,9 +48,8 @@ class MxNotificationParam : public MxParam {
|
||||||
|
|
||||||
inline NotificationId GetNotification() const { return m_type; }
|
inline NotificationId GetNotification() const { return m_type; }
|
||||||
inline MxCore* GetSender() const { return m_sender; }
|
inline MxCore* GetSender() const { return m_sender; }
|
||||||
inline NotificationId GetType() const { return m_type; }
|
|
||||||
|
|
||||||
inline void SetType(NotificationId p_type) { m_type = p_type; }
|
inline void SetNotification(NotificationId p_type) { m_type = p_type; }
|
||||||
inline void SetSender(MxCore* p_sender) { m_sender = p_sender; }
|
inline void SetSender(MxCore* p_sender) { m_sender = p_sender; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
#ifndef MXTYPE19NOTIFICATIONPARAM_H
|
|
||||||
#define MXTYPE19NOTIFICATIONPARAM_H
|
|
||||||
|
|
||||||
#include "decomp.h"
|
|
||||||
#include "mxnotificationparam.h"
|
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d6230
|
|
||||||
// SIZE 0x10
|
|
||||||
class MxType19NotificationParam : public MxNotificationParam {
|
|
||||||
public:
|
|
||||||
MxType19NotificationParam(NotificationId p_type, MxCore* p_sender, MxU8 p_unk0x0e, MxS16 p_unk0x0c)
|
|
||||||
: MxNotificationParam()
|
|
||||||
{
|
|
||||||
m_type = p_type;
|
|
||||||
m_sender = p_sender;
|
|
||||||
m_unk0x0c = p_unk0x0c;
|
|
||||||
m_unk0x0e = p_unk0x0e;
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1001bac0
|
|
||||||
MxNotificationParam* Clone() const override
|
|
||||||
{
|
|
||||||
return new MxType19NotificationParam(m_type, m_sender, m_unk0x0e, m_unk0x0c);
|
|
||||||
} // vtable+0x04
|
|
||||||
|
|
||||||
inline MxS16 GetUnknown0x0c() { return m_unk0x0c; }
|
|
||||||
|
|
||||||
protected:
|
|
||||||
MxS16 m_unk0x0c; // 0x0c
|
|
||||||
MxU8 m_unk0x0e; // 0x0e
|
|
||||||
};
|
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x1001bb80
|
|
||||||
// MxType19NotificationParam::`scalar deleting destructor'
|
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x1001bbf0
|
|
||||||
// MxType19NotificationParam::~MxType19NotificationParam
|
|
||||||
|
|
||||||
#endif // MXTYPE19NOTIFICATIONPARAM_H
|
|
Loading…
Reference in a new issue