Isle
Loading...
Searching...
No Matches
ambulance.h
Go to the documentation of this file.
1#ifndef AMBULANCE_H
2#define AMBULANCE_H
3
4#include "islepathactor.h"
5#include "legostate.h"
6
8
13public:
16
21 MxResult Serialize(LegoStorage* p_storage) override; // vtable+0x1c [AI]
22
26 const char* ClassName() const override; // vtable+0x0c [AI]
27
31 MxBool IsA(const char* p_name) const override; // vtable+0x10 [AI]
32
36 MxS16 GetHighScore(MxU8 p_actorId); // [AI]
37
41 void UpdateScore(ScoreColor p_score, MxS16 p_actorId); // [AI]
42
44 undefined4 m_unk0x08; // 0x08 [AI]
46 MxLong m_startTime; // 0x0c [AI]
47
49 MxS16 m_peScore; // 0x10 [AI]
51 MxS16 m_maScore; // 0x12 [AI]
53 MxS16 m_paScore; // 0x14 [AI]
55 MxS16 m_niScore; // 0x16 [AI]
57 MxS16 m_laScore; // 0x18 [AI]
58
60 MxS16 m_peHighScore; // 0x1a [AI]
62 MxS16 m_maHighScore; // 0x1c [AI]
64 MxS16 m_paHighScore; // 0x1e [AI]
66 MxS16 m_niHighScore; // 0x20 [AI]
68 MxS16 m_laHighScore; // 0x22 [AI]
69};
70
71
75class Ambulance : public IslePathActor {
76public:
78 Ambulance();
80 ~Ambulance() override;
81
85 MxLong Notify(MxParam& p_param) override; // vtable+0x04 [AI]
86
89 MxResult Tickle() override; // vtable+0x08 [AI]
90
93 void Destroy(MxBool p_fromDestructor) override {} // vtable+0x1c [AI]
94
96 const char* ClassName() const override; // vtable+0x0c [AI]
97
101 MxBool IsA(const char* p_name) const override; // vtable+0x10 [AI]
102
105 MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 [AI]
106
109 void Animate(float p_time) override; // vtable+0x70 [AI]
110
113 MxLong HandleClick() override; // vtable+0xcc [AI]
114
118 MxLong HandleControl(LegoControlManagerNotificationParam& p_param) override; // vtable+0xd4 [AI]
119
123 MxLong HandlePathStruct(LegoPathStructNotificationParam& p_param) override; // vtable+0xdc [AI]
124
126 void Exit() override; // vtable+0xe4 [AI]
127
131 virtual MxLong HandleButtonDown(LegoControlManagerNotificationParam& p_param); // vtable+0xf0 [AI]
132
136 virtual MxLong HandleEndAction(MxEndActionNotificationParam& p_param); // vtable+0xf4 [AI]
137
139 void CreateState(); // [AI]
140
142 void FUN_10036e60(); // [AI]
143
145 void ActivateSceneActions(); // [AI]
146
148 void StopActions(); // [AI]
149
151 void FUN_10037250(); // [AI]
152
153private:
156 void PlayAnimation(IsleScript::Script p_objectId); // [AI]
157
160 void PlayFinalAnimation(IsleScript::Script p_objectId); // [AI]
161
164 void StopAction(IsleScript::Script p_objectId); // [AI]
165
168 void PlayAction(IsleScript::Script p_objectId); // [AI]
169
171 void Leave(); // [AI]
172
174 undefined m_unk0x160[4]; // 0x160 [AI]
176 AmbulanceMissionState* m_state; // 0x164 [AI]
178 MxS16 m_unk0x168; // 0x168 [AI]
180 MxS16 m_actorId; // 0x16a [AI]
182 MxS16 m_unk0x16c; // 0x16c [AI]
184 MxS16 m_unk0x16e; // 0x16e [AI]
186 MxS16 m_unk0x170; // 0x170 [AI]
188 MxS16 m_unk0x172; // 0x172 [AI]
190 IsleScript::Script m_lastAction; // 0x174 [AI]
192 IsleScript::Script m_lastAnimation; // 0x178 [AI]
194 MxFloat m_fuel; // 0x17c [AI]
196 MxFloat m_time; // 0x180 [AI]
197};
198
199#endif // AMBULANCE_H
Holds state and scoring information for the Ambulance mission.
Definition: ambulance.h:12
MxResult Serialize(LegoStorage *p_storage) override
[AI] Serializes (loads or saves) the mission state information for the Ambulance mission.
MxBool IsA(const char *p_name) const override
[AI] Runtime type check for class identity or inheritance.
void UpdateScore(ScoreColor p_score, MxS16 p_actorId)
[AI] Updates the current and high score for a specific actor, if the new score is higher.
MxS16 m_peScore
[AI] Last achieved mission score for Pepper. [AI]
Definition: ambulance.h:49
MxLong m_startTime
[AI] Mission timer: records when the mission started (in milliseconds?). [AI]
Definition: ambulance.h:46
MxS16 m_laScore
[AI] Last achieved mission score for Laura. [AI]
Definition: ambulance.h:57
MxS16 GetHighScore(MxU8 p_actorId)
[AI] Retrieves the highest score achieved by a specified actor.
MxS16 m_niHighScore
[AI] Highest ever mission score for Nick. [AI]
Definition: ambulance.h:66
MxS16 m_paHighScore
[AI] Highest ever mission score for Papa. [AI]
Definition: ambulance.h:64
const char * ClassName() const override
[AI] Returns the class name string.
MxS16 m_laHighScore
[AI] Highest ever mission score for Laura. [AI]
Definition: ambulance.h:68
MxS16 m_maScore
[AI] Last achieved mission score for Mama. [AI]
Definition: ambulance.h:51
MxS16 m_paScore
[AI] Last achieved mission score for Papa. [AI]
Definition: ambulance.h:53
MxS16 m_maHighScore
[AI] Highest ever mission score for Mama. [AI]
Definition: ambulance.h:62
AmbulanceMissionState()
[AI] Default constructor; initializes all scores, high scores, time and internal state to zero....
Definition: ambulance.cpp:627
MxS16 m_niScore
[AI] Last achieved mission score for Nick. [AI]
Definition: ambulance.h:55
undefined4 m_unk0x08
[AI] Flag/state variable—purpose unclear, likely denotes mission sub-state or phase....
Definition: ambulance.h:44
MxS16 m_peHighScore
[AI] Highest ever mission score for Pepper. [AI]
Definition: ambulance.h:60
Main game logic and control entity for the Ambulance gameplay activity.
Definition: ambulance.h:75
MxBool IsA(const char *p_name) const override
[AI] Checks whether this object is of type "Ambulance" or inherits from a type with the given name.
virtual MxLong HandleButtonDown(LegoControlManagerNotificationParam &p_param)
[AI] Handles button down events in the mission interface (e.g., gate click).
Definition: ambulance.cpp:242
const char * ClassName() const override
[AI] Returns the class name "Ambulance" for RTTI. [AI]
virtual MxLong HandleEndAction(MxEndActionNotificationParam &p_param)
[AI] Handles end action notifications (e.g., animation completion), progresses mission or triggers fe...
Definition: ambulance.cpp:156
MxLong Notify(MxParam &p_param) override
[AI] Handles notifications from the system (events, actions, button presses, etc.).
Definition: ambulance.cpp:125
void CreateState()
[AI] Ensures AmbulanceMissionState is present in the game state manager; creates if missing....
Definition: ambulance.cpp:111
void FUN_10037250()
[AI] Resets game- and mission-related state after the mission; restores music, resets state objects,...
Definition: ambulance.cpp:574
MxLong HandleClick() override
[AI] Handles a "click" on this Ambulance actor (starts mission, triggers transitions,...
Definition: ambulance.cpp:365
Ambulance()
[AI] Creates and initializes the ambulance actor; sets default velocities and initial mission state....
Definition: ambulance.cpp:34
void ActivateSceneActions()
[AI] Handles the enabling of in-game ambient/scene actions when player enters the hospital scene....
Definition: ambulance.cpp:466
void FUN_10036e60()
[AI] Marks mission as failed/successful, triggers cutscene/animation for mission outcome....
Definition: ambulance.cpp:401
~Ambulance() override
[AI] Destructor—unregisters the Ambulance from control and tickle managers and performs cleanup....
Definition: ambulance.cpp:51
void Animate(float p_time) override
[AI] Per-frame update for position, fuel, and any animation logic.
Definition: ambulance.cpp:85
MxResult Create(MxDSAction &p_dsAction) override
[AI] Creates this Ambulance object based on the provided DS action (from scripts/etc).
Definition: ambulance.cpp:59
void Exit() override
[AI] Exits the mission; triggers cleanup, world removal, and area/state updates. [AI]
Definition: ambulance.cpp:410
MxResult Tickle() override
[AI] Called on each game "tick" to update state, handle random sounds, etc.
Definition: ambulance.cpp:514
void Destroy(MxBool p_fromDestructor) override
[AI] Does nothing for Ambulance; stub for virtual destroy.
Definition: ambulance.h:93
MxLong HandleControl(LegoControlManagerNotificationParam &p_param) override
[AI] Responds to control (UI/keyboard/joystick) input events.
Definition: ambulance.cpp:436
MxLong HandlePathStruct(LegoPathStructNotificationParam &p_param) override
[AI] Handles notifications related to path structure triggers such as mission segments or locations.
Definition: ambulance.cpp:265
void StopActions()
[AI] Stops currently running scripted actions/animations associated with the Ambulance mission....
Definition: ambulance.cpp:568
Derived path actor type for handling player transitions and activities on LEGO Island.
Definition: islepathactor.h:23
[AI] Notification parameter for the LegoControlManager, used to propagate information about control e...
[AI] Specialized notification parameter used for path structure related events in LEGO Island.
[AI] Base class for game state blocks which encapsulate serializable and/or resettable aspects of the...
Definition: legostate.h:17
ScoreColor
[AI] Score coloring values for in-game display feedback or logic.
Definition: legostate.h:22
Abstract base class providing an interface for file-like storage with binary and text read/write oper...
Definition: legostorage.h:16
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
Definition: mxdsaction.h:17
[AI] Notification parameter marking the end of an action, specialization of MxActionNotificationParam...
[AI] MxParam serves as a polymorphic base class for parameter passing in event and notification syste...
Definition: mxparam.h:7
unsigned int undefined4
Definition: decomp.h:28
unsigned char undefined
Definition: decomp.h:26
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
MxLong MxResult
[AI]
Definition: mxtypes.h:106
int MxLong
[AI]
Definition: mxtypes.h:83
signed short MxS16
[AI]
Definition: mxtypes.h:26
float MxFloat
[AI]
Definition: mxtypes.h:68
unsigned char MxU8
[AI]
Definition: mxtypes.h:8