Isle
Loading...
Searching...
No Matches
hospital.h
Go to the documentation of this file.
1#ifndef HOSPITAL_H
2#define HOSPITAL_H
3
4#include "actionsfwd.h"
5#include "decomp.h"
6#include "legogamestate.h"
7#include "legostate.h"
8#include "legoworld.h"
9
13
14// VTABLE: LEGO1 0x100d97a0
15// VTABLE: BETA10 0x101b9ad8
16// SIZE 0x18
21class HospitalState : public LegoState {
22public:
27
31 ~HospitalState() override {}
32
37 const char* ClassName() const override // vtable+0x0c
38 {
39 // STRING: LEGO1 0x100f0480
40 return "HospitalState";
41 }
42
48 MxBool IsA(const char* p_name) const override // vtable+0x10
49 {
50 return !strcmp(p_name, HospitalState::ClassName()) || LegoState::IsA(p_name);
51 }
52
58 MxResult Serialize(LegoStorage* p_storage) override; // vtable+0x1c
59
60 // SYNTHETIC: LEGO1 0x100764c0
61 // HospitalState::`scalar deleting destructor'
62
63 // TODO: Most likely getters/setters are not used according to BETA.
64
70
76
81
86
91
96
101};
102
103
104// VTABLE: LEGO1 0x100d9730
105// VTABLE: BETA10 0x101b9a60
106// SIZE 0x12c
111class Hospital : public LegoWorld {
112public:
116 Hospital();
117
121 ~Hospital() override; // vtable+0x00
122
128 MxLong Notify(MxParam& p_param) override; // vtable+0x04
129
134 MxResult Tickle() override; // vtable+0x08
135
140 MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
141
146 const char* ClassName() const override // vtable+0x0c
147 {
148 // STRING: LEGO1 0x100f0490
149 return "Hospital";
150 }
151
157 MxBool IsA(const char* p_name) const override // vtable+0x10
158 {
159 return !strcmp(p_name, Hospital::ClassName()) || LegoWorld::IsA(p_name);
160 }
161
167 MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
168
173 void ReadyWorld() override; // vtable+0x50
174
180 MxBool Escape() override; // vtable+0x64
181
186 void Enable(MxBool p_enable) override; // vtable+0x68
187
192 inline void PlayAction(MxU32 p_objectId);
193
194 // SYNTHETIC: LEGO1 0x100747d0
195 // Hospital::`scalar deleting destructor'
196
197private:
203 MxLong HandleKeyPress(MxS8 p_key);
204
210 MxLong HandleEndAction(MxEndActionNotificationParam& p_param);
211
217 MxLong HandleButtonDown(LegoControlManagerNotificationParam& p_param);
218
224 MxBool HandleControl(LegoControlManagerNotificationParam& p_param);
225
229 MxS16 m_currentActorId; // 0xf8
230
234 LegoGameState::Area m_destLocation; // 0xfc
235
239 undefined2 m_unk0x100; // 0x100
240
244 HospitalState* m_hospitalState; // 0x104
245
249 undefined2 m_unk0x108; // 0x108
250
254 HospitalScript::Script m_currentAction; // 0x10c
255
259 MxStillPresenter* m_copLedBitmap; // 0x110
260
264 MxStillPresenter* m_pizzaLedBitmap; // 0x114
265
269 undefined m_unk0x118; // 0x118
270
274 MxLong m_copLedAnimTimer; // 0x11c
275
279 MxLong m_pizzaLedAnimTimer; // 0x120
280
284 MxLong m_time; // 0x124
285
289 undefined m_unk0x128; // 0x128
290};
291
292#endif // HOSPITAL_H
[AI] State-holding class for the hospital area; persists area-specific progress and variables between...
Definition: hospital.h:21
~HospitalState() override
[AI] Default virtual destructor.
Definition: hospital.h:31
MxS16 m_unk0x0c
[AI] General area progress/counter for current actor (mirrors one of the counters below depending on ...
Definition: hospital.h:75
MxS16 m_unk0x16
[AI] Progress counter for LAURA character's hospital actions or visit.
Definition: hospital.h:100
MxS16 m_unk0x12
[AI] Progress counter for PAPA character's hospital actions or visit.
Definition: hospital.h:90
MxS16 m_unk0x14
[AI] Progress counter for NICK character's hospital actions or visit.
Definition: hospital.h:95
MxS16 m_unk0x0e
[AI] Progress counter for PEPPER character's hospital actions or visit.
Definition: hospital.h:80
MxResult Serialize(LegoStorage *p_storage) override
[AI] (De)serializes this state to or from the provided LegoStorage handler.
Definition: hospital.cpp:687
const char * ClassName() const override
[AI] Retrieves the class name string for run-time type identification.
Definition: hospital.h:37
undefined4 m_unk0x08
[AI] State machine/counter variable determining narrative step or branch.
Definition: hospital.h:69
HospitalState()
[AI] Constructs a new HospitalState object and initializes all progression counters to zero.
Definition: hospital.cpp:675
MxBool IsA(const char *p_name) const override
[AI] Checks if the object matches the class name or any parent type.
Definition: hospital.h:48
MxS16 m_unk0x10
[AI] Progress counter for MAMA character's hospital actions or visit.
Definition: hospital.h:85
[AI] Implements the main 3D area and logic flow for the Hospital location/scene in LEGO Island.
Definition: hospital.h:111
Hospital()
[AI] Constructs a Hospital world, zeroes state, registers for notifications.
Definition: hospital.cpp:36
MxResult Create(MxDSAction &p_dsAction) override
[AI] Loads/sets up this world using the provided data-driven action.
Definition: hospital.cpp:71
MxLong Notify(MxParam &p_param) override
[AI] Receives notifications (such as keypresses, control input, and completion of scripted actions) a...
Definition: hospital.cpp:104
MxResult Tickle() override
[AI] Advances the hospital's world logic per tick; animates cop/pizza LED icons, handles script step ...
Definition: hospital.cpp:633
MxBool Escape() override
[AI] Cleans up objects and switches the main menu or outside area, if requested; used for ESC or Info...
Definition: hospital.cpp:664
void Enable(MxBool p_enable) override
[AI] Enables or disables the hospital world; hooks/unhooks input, marks world active state.
Definition: hospital.cpp:607
MxBool IsA(const char *p_name) const override
[AI] Checks if the object matches the class name or any parent type.
Definition: hospital.h:157
const char * ClassName() const override
[AI] Returns the class name for run-time type identification.
Definition: hospital.h:146
MxBool VTable0x5c() override
[AI] Indicates this world supports a custom feature flag for internal purposes; always TRUE.
Definition: hospital.h:140
void PlayAction(MxU32 p_objectId)
[AI] Triggers a new MxDSAction for the specified script object (e.g.
Definition: hospital.cpp:622
~Hospital() override
[AI] Tears down Hospital world handlers, unregisters from input/notification/tickle systems and reset...
Definition: hospital.cpp:54
void ReadyWorld() override
[AI] Initializes the hospital gameplay; loads area animations, resets scores/progress for the current...
Definition: hospital.cpp:136
[AI] Notification parameter for the LegoControlManager, used to propagate information about control e...
Area
Enumeration of all major in-game locations ("areas") for area/scene management and serialization.
Definition: legogamestate.h:92
[AI] Base class for game state blocks which encapsulate serializable and/or resettable aspects of the...
Definition: legostate.h:17
MxBool IsA(const char *p_name) const override
[AI] Tests if this object is of a given class name, directly or through inheritance.
Definition: legostate.h:169
Abstract base class providing an interface for file-like storage with binary and text read/write oper...
Definition: legostorage.h:16
Represents the active 3D world, holding all entity, animation, sound, path, and ROI objects.
Definition: legoworld.h:49
MxBool IsA(const char *p_name) const override
Runtime type checking; checks class hierarchy.
Definition: legoworld.h:153
[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
[AI] Presenter for single still image/bitmap media sources in the game.
#define override
Definition: compat.h:21
#define TRUE
Definition: d3drmdef.h:28
unsigned short undefined2
Definition: decomp.h:27
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
unsigned int MxU32
[AI]
Definition: mxtypes.h:32
signed char MxS8
[AI]
Definition: mxtypes.h:14