Isle
Loading...
Searching...
No Matches
legoact2.h
Go to the documentation of this file.
1#ifndef LEGOACT2_H
2#define LEGOACT2_H
3
4#include "act2brick.h"
5#include "legogamestate.h"
6#include "legostate.h"
7#include "legoworld.h"
8
9class Act2Actor;
12
13// VTABLE: LEGO1 0x100d4a70
14// VTABLE: BETA10 0x101ba910
15// SIZE 0x10
25class LegoAct2State : public LegoState {
26public:
31 {
32 m_unk0x08 = 0;
34 }
35
39 ~LegoAct2State() override {}
40
44 MxBool IsSerializable() override { return FALSE; } // vtable+0x14
45
49 const char* ClassName() const override // vtable+0x0c
50 {
51 // STRING: LEGO1 0x100f0428
52 return "LegoAct2State";
53 }
54
60 MxBool IsA(const char* p_name) const override // vtable+0x10
61 {
62 return !strcmp(p_name, LegoAct2State::ClassName()) || LegoState::IsA(p_name);
63 }
64
65 // SYNTHETIC: LEGO1 0x1000e040
66 // LegoAct2State::`scalar deleting destructor'
67
72 void SetUnknown0x08(undefined4 p_unk0x08) { m_unk0x08 = p_unk0x08; }
73
79
80 // TODO: Most likely getters/setters are not used according to BETA. (?)
81
84};
85
86// VTABLE: LEGO1 0x100d82e0
87// VTABLE: BETA10 0x101ba898
88// SIZE 0x1154
98class LegoAct2 : public LegoWorld {
99public:
103 LegoAct2();
104
108 ~LegoAct2() override;
109
115 MxLong Notify(MxParam& p_param) override;
116
122 MxResult Tickle() override;
123
129 MxResult Create(MxDSAction& p_dsAction) override;
130
135 void ReadyWorld() override;
136
140 MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
141
145 void VTable0x60() override;
146
151 MxBool Escape() override;
152
158 void Enable(MxBool p_enable) override;
159
164 void SetUnknown0x1138(Act2Actor* p_unk0x1138) { m_unk0x1138 = p_unk0x1138; }
165
170 void SetDestLocation(LegoGameState::Area p_destLocation) { m_destLocation = p_destLocation; }
171
177
182 void FUN_100517b0();
183
189
201 Act2mainScript::Script p_objectId,
202 MxBool p_param2,
203 MxBool p_param3,
204 Mx3DPointFloat* p_location,
205 Mx3DPointFloat* p_direction,
206 Mx3DPointFloat* p_param6
207 );
208
209 // SYNTHETIC: LEGO1 0x1004fe20
210 // LegoAct2::`scalar deleting destructor'
211
212private:
219 MxLong HandleEndAction(MxEndActionNotificationParam& p_param);
220
226 MxLong HandleTransitionEnd();
227
234 MxLong HandlePathStruct(LegoPathStructNotificationParam& p_param);
235
240 void PlayMusic(JukeboxScript::Script p_objectId);
241
245 void FUN_10051900();
246
251 void FUN_10051960();
252
256 void InitBricks();
257
261 void UninitBricks();
262
267 void SpawnBricks();
268
274 void FUN_10051fa0(MxS32 p_param1);
275
281 void FUN_100521f0(MxS32 p_param1);
282
287 MxResult FUN_10052800();
288
289 Act2Brick m_bricks[10];
290 MxU8 m_nextBrick;
291 undefined m_unk0x10c1;
292 MxBool m_ready;
293 undefined4 m_unk0x10c4;
294 JukeboxScript::Script m_music;
295 LegoAct2State* m_gameState;
296 MxS32 m_unk0x10d0;
297 const char* m_siFile;
298 LegoROI* m_pepper;
299 MxMatrix m_unk0x10dc;
300 LegoPathBoundary* m_unk0x1124;
301 LegoROI* m_ambulance;
302 undefined4 m_unk0x112c;
303 undefined4 m_unk0x1130;
304 undefined4 m_unk0x1134;
305 Act2Actor* m_unk0x1138;
306 undefined m_unk0x113c;
307 Act2mainScript::Script m_unk0x1140;
308 Act2mainScript::Script m_unk0x1144;
309 undefined4 m_unk0x1148;
310 undefined m_firstBrick;
311 undefined m_secondBrick;
312 undefined m_thirdBrick;
313 undefined m_fourthBrick;
314 LegoGameState::Area m_destLocation;
315};
316
317#endif // LEGOACT2_H
[AI] Act2 mission-specific actor class, with custom state and animation handling for Act 2 of the sto...
Definition: act2actor.h:17
[AI] Represents a special 'brick' object in the LEGO Island "Act 2" sequence, derived from LegoPathAc...
Definition: act2brick.h:12
Represents the state object for Act 2 of the game.
Definition: legoact2.h:25
undefined4 GetUnknown0x08()
Gets the value of the unknown member variable.
Definition: legoact2.h:78
~LegoAct2State() override
Destructor.
Definition: legoact2.h:39
undefined4 m_unk0x08
[AI] Unknown state variable. Purpose unclear. [AI]
Definition: legoact2.h:82
MxBool m_enabled
[AI] TRUE if this state is currently enabled/active. [AI]
Definition: legoact2.h:83
MxBool IsA(const char *p_name) const override
Type check against class name or parent class.
Definition: legoact2.h:60
LegoAct2State()
Constructor, initializes state members.
Definition: legoact2.h:30
MxBool IsSerializable() override
Always returns FALSE, as this state is not serializable.
Definition: legoact2.h:44
void SetUnknown0x08(undefined4 p_unk0x08)
Sets the unknown value (purpose unclear).
Definition: legoact2.h:72
const char * ClassName() const override
Returns the class name of this state ("LegoAct2State").
Definition: legoact2.h:49
Implements the world and game logic for Act 2.
Definition: legoact2.h:98
MxLong Notify(MxParam &p_param) override
Handles incoming notifications dispatched by the notification system.
Definition: legoact2.cpp:268
void SetUnknown0x1138(Act2Actor *p_unk0x1138)
Sets the Act2Actor instance (main NPC or controller) used within Act2 logic.
Definition: legoact2.h:164
MxBool Escape() override
Handles the Escape (quit/abort) action, stops audio/cutscene/cleans up state.
Definition: legoact2.cpp:753
MxResult Create(MxDSAction &p_dsAction) override
Creates and initializes this world object using a DSAction.
Definition: legoact2.cpp:114
void FUN_100517b0()
Spawns the next brick and triggers sound/whistle for the new brick.
Definition: legoact2.cpp:682
void SetDestLocation(LegoGameState::Area p_destLocation)
Sets the destination location for area transition upon completion.
Definition: legoact2.h:170
~LegoAct2() override
Destructor.
Definition: legoact2.cpp:97
LegoAct2()
Constructor, initializes all members and registers to the notification manager.
Definition: legoact2.cpp:75
MxBool VTable0x5c() override
Always returns TRUE: internal state-check used by engine.
Definition: legoact2.h:140
MxResult FUN_10052560(Act2mainScript::Script p_objectId, MxBool p_param2, MxBool p_param3, Mx3DPointFloat *p_location, Mx3DPointFloat *p_direction, Mx3DPointFloat *p_param6)
Plays an animation (or cutscene) at optional location/direction in world space.
Definition: legoact2.cpp:1091
MxResult BadEnding()
Handles the "bad ending" sequence for Act 2.
Definition: legoact2.cpp:927
MxResult Tickle() override
Main update tick for Act 2.
Definition: legoact2.cpp:160
void Enable(MxBool p_enable) override
Enables or disables the Act 2 world and logic.
Definition: legoact2.cpp:523
MxResult FUN_100516b0()
Spawns the next collectible brick at its position and plays associated animation if possible.
Definition: legoact2.cpp:658
void VTable0x60() override
Unused; placeholder for possible extension.
Definition: legoact2.cpp:747
void ReadyWorld() override
Prepares the world for player interaction, resumes animation, registers tickle, etc.
Definition: legoact2.cpp:477
Area
Enumeration of all major in-game locations ("areas") for area/scene management and serialization.
Definition: legogamestate.h:92
[AI] Represents a path segment or boundary in the navigation network for actors (vehicles,...
[AI] Specialized notification parameter used for path structure related events in LEGO Island.
[AI] Represents a Real-time Object Instance enriched with LEGO-specific functionality.
Definition: legoroi.h:43
[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
Represents the active 3D world, holding all entity, animation, sound, path, and ROI objects.
Definition: legoworld.h:49
[AI] Represents a 3D point with floating-point precision, inheriting from Vector3.
Definition: mxgeometry3d.h:14
[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] Represents a 4x4 transformation matrix, specialized for the LEGO Island engine and derived from ...
Definition: mxmatrix.h:16
[AI] MxParam serves as a polymorphic base class for parameter passing in event and notification syste...
Definition: mxparam.h:7
#define override
Definition: compat.h:21
#define TRUE
Definition: d3drmdef.h:28
#define FALSE
Definition: d3drmdef.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
unsigned char MxU8
[AI]
Definition: mxtypes.h:8
signed int MxS32
[AI]
Definition: mxtypes.h:38
Script
[AI] Identifiers for scripts, actions, entities, and resources for Act2Main.