Isle
Loading...
Searching...
No Matches
police.h
Go to the documentation of this file.
1#ifndef POLICE_H
2#define POLICE_H
3
4#include "decomp.h"
5#include "legogamestate.h"
6#include "legostate.h"
7#include "legoworld.h"
8#include "radio.h"
9
12class MxDSAction;
13
19class PoliceState : public LegoState {
20public:
23
25 ~PoliceState() override {}
26
29 const char* ClassName() const override // vtable+0x0c
30 {
31 return "PoliceState";
32 }
33
37 MxBool IsA(const char* p_name) const override // vtable+0x10
38 {
39 return !strcmp(p_name, PoliceState::ClassName()) || LegoState::IsA(p_name);
40 }
41
45 MxResult Serialize(LegoStorage* p_storage) override; // vtable+0x1c
46
50
53 void SetUnknown0x0c(undefined4 p_unk0x0c) { m_unk0x0c = p_unk0x0c; }
54
57 void FUN_1005ea40();
58
61
65};
66
71class Police : public LegoWorld {
72public:
74 Police();
75
77 ~Police() override; // vtable+0x00
78
82 MxLong Notify(MxParam& p_param) override; // vtable+0x04
83
86 MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
87
89 const char* ClassName() const override // vtable+0x0c
90 {
91 return "Police";
92 }
93
97 MxBool IsA(const char* p_name) const override // vtable+0x10
98 {
99 return !strcmp(p_name, Police::ClassName()) || LegoWorld::IsA(p_name);
100 }
101
105 MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
106
108 void ReadyWorld() override; // vtable+0x50
109
112 MxBool Escape() override; // vtable+0x64
113
116 void Enable(MxBool p_enable) override; // vtable+0x68
117
118private:
123 MxLong HandleControl(LegoControlManagerNotificationParam& p_param);
124
128 MxLong HandleEndAction(MxEndActionNotificationParam& p_param);
129
134 MxLong HandleKeyPress(LegoEventNotificationParam& p_param);
135
137 Radio m_radio; // 0xf8
138
140 PoliceState* m_policeState; // 0x108
141
143 LegoGameState::Area m_destLocation; // 0x10c
144};
145
146#endif // POLICE_H
[AI] Notification parameter for the LegoControlManager, used to propagate information about control e...
Notification parameter class for LEGO event notifications such as mouse events and modifier keys.
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] Represents the state information specific to the Police area of the game.
Definition: police.h:19
void SetUnknown0x0c(undefined4 p_unk0x0c)
[AI] Set the value of the internal state variable at offset 0x0c.
Definition: police.h:53
void FUN_1005ea40()
[AI] Trigger the "donut" animation event.
Definition: police.cpp:221
PoliceState()
[AI] Constructs a new PoliceState. Initializes script and internal state. [AI]
Definition: police.cpp:198
MxResult Serialize(LegoStorage *p_storage) override
[AI] Serialize the PoliceState to or from the provided storage.
Definition: police.cpp:206
undefined4 GetUnknown0x0c()
[AI] Returns the value of the internal state variable at offset 0x0c.
Definition: police.h:49
const char * ClassName() const override
[AI] Returns the class name for this type; used for RTTI and IsA checks.
Definition: police.h:29
PoliceScript::Script m_policeScript
[AI] The currently active animation/script for the Police state (e.g. which minifig or animation runs...
Definition: police.h:60
MxBool IsA(const char *p_name) const override
[AI] Checks whether the given type name matches this class or any ancestor.
Definition: police.h:37
undefined4 m_unk0x0c
[AI] Internal flag to indicate whether the donut animation has started (1), finished (0),...
Definition: police.h:64
~PoliceState() override
[AI] Default destructor. [AI]
Definition: police.h:25
[AI] Main world object for the Police Station area in LEGO Island.
Definition: police.h:71
void Enable(MxBool p_enable) override
[AI] Enables or disables the Police world for input and activity.
Definition: police.cpp:174
MxBool VTable0x5c() override
[AI] Returns TRUE for this virtual slot (area loading indication or presence check).
Definition: police.h:86
~Police() override
[AI] Destructor: deregisters world from managers and clears input/world pointers. [AI]
Definition: police.cpp:30
MxBool Escape() override
[AI] Handles user request to exit the Police area (e.g., Escape key).
Definition: police.cpp:190
MxResult Create(MxDSAction &p_dsAction) override
[AI] Handles world creation, input setup, and PoliceState initialization.
Definition: police.cpp:42
MxLong Notify(MxParam &p_param) override
[AI] Handle incoming notifications (key presses, controls, end actions, transitions).
Definition: police.cpp:67
void ReadyWorld() override
[AI] Prepares the Police world for activation, setting music and disabling user input/3d as needed....
Definition: police.cpp:94
const char * ClassName() const override
[AI] Returns the class name for this type ("Police")—used for IsA and RTTI. [AI]
Definition: police.h:89
MxBool IsA(const char *p_name) const override
[AI] Checks if this object matches the given class name, including ancestors (LegoWorld).
Definition: police.h:97
Police()
[AI] Constructs the Police world, setting up default state and registering for notifications....
Definition: police.cpp:22
[AI] High-level manager for the in-game radio, handling notifications, playing/stopping,...
Definition: radio.h:77
#define override
Definition: compat.h:21
#define TRUE
Definition: d3drmdef.h:28
unsigned int undefined4
Definition: decomp.h:28
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
MxLong MxResult
[AI]
Definition: mxtypes.h:106
int MxLong
[AI]
Definition: mxtypes.h:83