Isle
Loading...
Searching...
No Matches
gasstation.h
Go to the documentation of this file.
1#ifndef GASSTATION_H
2#define GASSTATION_H
3
4#include "decomp.h"
5#include "legogamestate.h"
6#include "legostate.h"
7#include "legoworld.h"
8#include "radio.h"
9
11
15// VTABLE: LEGO1 0x100d46e0
16// VTABLE: BETA10 0x101b9818
17// SIZE 0x24
18class GasStationState : public LegoState {
19public:
22
24 const char* ClassName() const override // vtable+0x0c
25 {
26 // STRING: LEGO1 0x100f0174
27 return "GasStationState";
28 }
29
32 MxBool IsA(const char* p_name) const override // vtable+0x10
33 {
34 return !strcmp(p_name, GasStationState::ClassName()) || LegoState::IsA(p_name);
35 }
36
40 MxResult Serialize(LegoStorage* p_storage) override; // vtable+0x1c
41
42 // SYNTHETIC: LEGO1 0x10006290
43 // GasStationState::`scalar deleting destructor'
44
47 void PlayAction(GarageScript::Script p_objectId);
48
51 void StopAction(GarageScript::Script p_objectId);
52
54 void StopActions();
55
56 // TODO: Most likely getters/setters are not used according to BETA.
57
65};
66
70// VTABLE: LEGO1 0x100d4650
71// VTABLE: BETA10 0x101b97a0
72// SIZE 0x128
73class GasStation : public LegoWorld {
74public:
76 GasStation();
78 ~GasStation() override; // vtable+0x00
79
82 MxLong Notify(MxParam& p_param) override; // vtable+0x04
83
85 MxResult Tickle() override; // vtable+0x08
86
88 MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
89
91 const char* ClassName() const override // vtable+0x0c
92 {
93 // STRING: LEGO1 0x100f0168
94 return "GasStation";
95 }
98 MxBool IsA(const char* p_name) const override // vtable+0x10
99 {
100 return !strcmp(p_name, GasStation::ClassName()) || LegoWorld::IsA(p_name);
101 }
102
105 MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
106
108 void ReadyWorld() override; // vtable+0x50
109
111 MxBool Escape() override; // vtable+0x64
112
115 void Enable(MxBool p_enable) override; // vtable+0x68
116
119 virtual MxLong HandleControl(LegoControlManagerNotificationParam& p_param); // vtable+0x6c
120
121 // SYNTHETIC: LEGO1 0x100048a0
122 // GasStation::`scalar deleting destructor'
123
124private:
127 inline void PlayAction(GarageScript::Script p_objectId);
128
131 inline void StopAction(GarageScript::Script p_objectId);
132
135 MxLong HandleEndAction(MxEndActionNotificationParam& p_param);
136
139 MxLong HandleKeyPress(MxS8 p_key);
140
143 MxLong HandleButtonDown(LegoControlManagerNotificationParam& p_param);
144
145 MxS16 m_currentActorId;
146 undefined2 m_unk0xfa;
147 LegoGameState::Area m_destLocation;
148 GasStationState* m_state;
149 undefined2 m_unk0x104;
150 undefined2 m_unk0x106;
151 MxStillPresenter* m_trackLedBitmap;
152 MxLong m_unk0x10c;
153 MxLong m_trackLedTimer;
154 MxBool m_unk0x114;
155 MxBool m_unk0x115;
156 Radio m_radio;
157};
158
159#endif // GASSTATION_H
Maintains persistent, serializable state information for the gas station/garage area,...
Definition: gasstation.h:18
const char * ClassName() const override
Returns the class name string used for RTTI and IsA queries [AI].
Definition: gasstation.h:24
MxS16 m_nickAction
Current animation/action index for Nick actor [AI].
Definition: gasstation.h:63
GarageScript::Script m_actions[3]
List of up to 3 currently running GarageScript actions [AI].
Definition: gasstation.h:58
MxS16 m_pepperAction
Current animation/action index for Pepper actor (cycles variants) [AI].
Definition: gasstation.h:60
void StopAction(GarageScript::Script p_objectId)
Removes the specified GarageScript action from the active set as no longer running [AI].
Definition: gasstation.cpp:545
undefined4 m_unk0x14
[AI_SUGGESTED_NAME: m_actionState] Tracks the phase in scripted action sequence for state machine con...
Definition: gasstation.h:59
MxBool IsA(const char *p_name) const override
Checks if this object is or inherits from a specified class [AI].
Definition: gasstation.h:32
MxS16 m_papaAction
Current animation/action index for Papa actor [AI].
Definition: gasstation.h:62
MxResult Serialize(LegoStorage *p_storage) override
Serializes/deserializes the gas station state from the given storage [AI].
Definition: gasstation.cpp:511
GasStationState()
[AI] Creates and resets state for gas station, initializing all actor counters and action lists.
Definition: gasstation.cpp:499
void StopActions()
[AI] Stops all running actions tracked in this state and raises background audio volume.
Definition: gasstation.cpp:556
void PlayAction(GarageScript::Script p_objectId)
Records a running GarageScript action as currently active in this state [AI].
Definition: gasstation.cpp:534
MxS16 m_lauraAction
Current animation/action index for Laura actor [AI].
Definition: gasstation.h:64
MxS16 m_mamaAction
Current animation/action index for Mama actor [AI].
Definition: gasstation.h:61
The in-game gas station (garage) area/world logic controller, handling all interactive gameplay,...
Definition: gasstation.h:73
MxLong Notify(MxParam &p_param) override
[AI] Responds to engine/system notifications (actions, keypress, etc).
Definition: gasstation.cpp:99
MxBool IsA(const char *p_name) const override
[AI] IsA-style RTTI: checks if object is of a particular class.
Definition: gasstation.h:98
virtual MxLong HandleControl(LegoControlManagerNotificationParam &p_param)
[AI] Handles direct control manager notifications (UI interaction, navigation, etc).
Definition: gasstation.cpp:388
const char * ClassName() const override
[AI] Returns class name for RTTI/IsA queries.
Definition: gasstation.h:91
MxBool Escape() override
[AI] Cleans up and transitions out of the gas station on user escape [AI].
Definition: gasstation.cpp:488
MxResult Create(MxDSAction &p_dsAction) override
[AI] Creates and activates the gas station world, setting up input/control managers and persistent st...
Definition: gasstation.cpp:67
~GasStation() override
[AI] Destroys gas station logic and unregisters this world from input, control and tick managers,...
Definition: gasstation.cpp:52
GasStation()
[AI] Constructs and initializes the gas station world logic.
Definition: gasstation.cpp:35
MxBool VTable0x5c() override
[AI] Returns TRUE; identifies this world as a "special" interactable world.
Definition: gasstation.h:88
void ReadyWorld() override
[AI] Initializes world assets, actors, and interactive scripts according to saved state/current actor...
Definition: gasstation.cpp:131
void Enable(MxBool p_enable) override
[AI] Enables or disables this world (switches input/camera registration, etc) [AI].
Definition: gasstation.cpp:430
MxResult Tickle() override
[AI] Called every frame to update the garage world state for timers and LED animation.
Definition: gasstation.cpp:447
[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.
[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 short undefined2
Definition: decomp.h:27
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
signed short MxS16
[AI]
Definition: mxtypes.h:26
signed char MxS8
[AI]
Definition: mxtypes.h:14