38#define Helicopter_Actor CopterScript::c_Helicopter_Actor
39#define DuneBugy_Actor DunecarScript::c_DuneBugy_Actor
40#define Jetski_Actor JetskiScript::c_Jetski_Actor
41#define RaceCar_Actor RacecarScript::c_RaceCar_Actor
83MxFloat LegoCarBuild::g_unk0x100d65a4 = -0.1f;
86MxFloat LegoCarBuild::g_rotationAngleStepYAxis = 0.07;
89MxS16 LegoCarBuild::g_unk0x100f11cc = -1;
100 m_ColorBook_Bitmap =
NULL;
107 m_Shelf_Sound =
NULL;
108 m_PlaceBrick_Sound =
NULL;
109 m_GetBrick_Sound =
NULL;
110 m_Paint_Sound =
NULL;
111 m_Decal_Sound =
NULL;
112 m_Decal_Bitmap =
NULL;
114 m_Decals_Ctl1 =
NULL;
115 m_Decals_Ctl2 =
NULL;
116 m_Decals_Ctl3 =
NULL;
117 m_Decals_Ctl4 =
NULL;
118 m_Decals_Ctl5 =
NULL;
119 m_Decals_Ctl6 =
NULL;
120 m_Decals_Ctl7 =
NULL;
173 const char* buildStateClassName =
NULL;
176 buildStateClassName =
"LegoCopterBuildState";
181 buildStateClassName =
"LegoDuneCarBuildState";
186 buildStateClassName =
"LegoJetskiBuildState";
191 buildStateClassName =
"LegoRaceCarBuildState";
204 m_buildState = buildState;
245 assert(m_ColorBook_Bitmap);
247 assert(m_Yellow_Ctl);
259 assert(m_Shelf_Sound);
261 assert(m_PlaceBrick_Sound);
263 assert(m_GetBrick_Sound);
265 assert(m_Paint_Sound);
271 assert(m_Decal_Bitmap);
272 if (m_Decal_Bitmap) {
274 assert(m_Decals_Ctl3);
276 assert(m_Decals_Ctl4);
278 assert(m_Decals_Ctl5);
280 assert(m_Decals_Ctl6);
282 assert(m_Decals_Ctl7);
320 m_unk0x178 = m_unk0x1c0;
334 worldPos[0] = m_unk0x2a4[0];
335 worldPos[1] = m_unk0x2a4[1];
336 worldPos[2] = m_unk0x2a4[2];
340 m_unk0x290[0] = screenPos[0] / screenPos[3];
341 m_unk0x290[1] = screenPos[1] / screenPos[3];
343 worldPos[0] = m_unk0x2bc[0];
344 worldPos[1] = m_unk0x2bc[1];
345 worldPos[2] = m_unk0x2bc[2];
349 m_unk0x298[0] = screenPos[0] / screenPos[3];
350 m_unk0x298[1] = screenPos[1] / screenPos[3];
366 p_x += (m_unk0x290[0] - m_unk0x250[0]);
367 p_y += (m_unk0x290[1] - m_unk0x250[1]);
385 if (p_y < m_unk0x290[1]) {
388 else if (p_y > m_unk0x298[1]) {
391 else if (p_y >= m_unk0x290[1]) {
397 local20[0] = p_x - m_unk0x290[0];
398 local20[1] = p_y - m_unk0x290[1];
404 local78[3][0] = m_unk0x178[3][0] + local18[0];
405 local78[3][1] = m_unk0x178[3][1] + local18[1];
406 local78[3][2] = m_unk0x178[3][2] + local18[2];
424 fVar1 = (m_unk0x2a4[2] - local20[2]) / local14[2];
425 p_param2[0] = (fVar1 * local14[0] + local20[0]) - m_unk0x2a4[0];
426 p_param2[1] = (fVar1 * local14[1] + local20[1]) - m_unk0x2a4[1];
440 p_param2[2] = m_unk0x2a4[2] +
441 (m_unk0x2bc[2] - m_unk0x2a4[2]) * ((p_param1[1] - m_unk0x290[1]) / (m_unk0x298[1] - m_unk0x290[1]));
442 fVar1 = (p_param2[2] - localc[2]) / local18[2];
443 p_param2[0] = fVar1 * local18[0] - m_unk0x2a4[0] + localc[0];
444 p_param2[1] = fVar1 * local18[1] - m_unk0x2a4[1] + localc[1];
445 p_param2[2] = p_param2[2] - m_unk0x2a4[2];
456 MxFloat fVar1 = (m_unk0x2bc[1] - localc[1]) / local18[1];
457 p_param2[0] = fVar1 * local18[0] - m_unk0x2a4[0] + localc[0];
458 p_param2[1] = m_unk0x2bc[1] - m_unk0x2a4[1];
459 p_param2[2] = fVar1 * local18[2] - m_unk0x2a4[2] + localc[2];
466 if (p_param1[1] == 0.0f) {
469 p_param4[0] = ((p_param3 - p_param2[1]) / p_param1[1]) * p_param1[0] + p_param2[0];
470 p_param4[1] = p_param3;
505 if (m_numAnimsRun > 0) {
522#define LEGOCARBUILD_TICKLE_CASE(subtract, start, end, str) \
523 if (start < dTime && dTime < end) { \
524 FUN_10025db0(str, dTime - subtract); \
538 if (m_unk0xfc == 1) {
549 if (m_unk0x100 == 5 && m_unk0x110) {
550 RotateY(m_unk0x110, g_unk0x100d65a4);
554 DWORD time = timeGetTime();
555 DWORD dTime = (time - m_unk0x10c) / 100;
558 switch (m_unk0x10a) {
581 switch (m_unk0x10a) {
604 switch (m_unk0x10a) {
621 switch (m_unk0x10a) {
677 if (++m_unk0x109 > 2) {
684 assert(m_buildState);
715 if (m_numAnimsRun > 0) {
737 if (m_numAnimsRun > 0) {
752 m_presentersEnabled =
FALSE;
829 if (m_unk0x110 != roi) {
846 if (m_unk0x100 != 5) {
847 m_unk0x250[0] += m_unk0x290[0] - m_unk0x298[0];
848 m_unk0x250[1] += m_unk0x290[1] - m_unk0x298[1];
851 if (m_unk0x100 == 0) {
861 switch (m_unk0x100) {
883 switch (m_unk0x100) {
932 switch (m_unk0x100) {
952 assert(m_buildState);
962 if (m_numAnimsRun > 0) {
976 if (m_numAnimsRun > 0) {
1050 assert(m_buildState);
1068 if (
GameState()->GetCurrentAct() == 0) {
1073 assert(m_buildState);
1151 assert(m_buildState);
1157 if (entity && entity->
GetROI()) {
1215 MxU32 jukeboxScript;
1286 m_presentersEnabled = p_enabled;
1287 m_ColorBook_Bitmap->
Enable(p_enabled);
1288 m_Yellow_Ctl->
Enable(p_enabled);
1289 m_Red_Ctl->
Enable(p_enabled);
1290 m_Blue_Ctl->
Enable(p_enabled);
1291 m_Green_Ctl->
Enable(p_enabled);
1292 m_Gray_Ctl->
Enable(p_enabled);
1293 m_Black_Ctl->
Enable(p_enabled);
1313 if (strnicmp(m_unk0x110->
GetName(),
"JSFRNT", strlen(
"JSFRNT")) == 0) {
1314 m_Decal_Bitmap->
Enable(p_enabled);
1315 m_Decals_Ctl->
Enable(p_enabled);
1316 m_Decals_Ctl1->
Enable(p_enabled);
1317 m_Decals_Ctl2->
Enable(p_enabled);
1318 m_Decals_Ctl3->
Enable(p_enabled);
1320 else if (strnicmp(m_unk0x110->
GetName(),
"JSWNSH", strlen(
"JSWNSH")) == 0) {
1321 m_Decal_Bitmap->
Enable(p_enabled);
1322 m_Decals_Ctl4->
Enable(p_enabled);
1323 m_Decals_Ctl5->
Enable(p_enabled);
1324 m_Decals_Ctl6->
Enable(p_enabled);
1325 m_Decals_Ctl7->
Enable(p_enabled);
1327 else if (strnicmp(m_unk0x110->
GetName(),
"RCBACK", strlen(
"RCBACK")) == 0) {
1328 m_Decals_Ctl1->
Enable(p_enabled);
1330 else if (strnicmp(m_unk0x110->
GetName(),
"RCTAIL", strlen(
"RCTAIL")) == 0) {
1331 m_Decals_Ctl2->
Enable(p_enabled);
1333 else if (m_Decals_Ctl1 && strnicmp(m_unk0x110->
GetName(),
"chljety", strlen(
"chljety")) == 0) {
1334 m_Decals_Ctl1->
Enable(p_enabled);
1336 else if (m_Decals_Ctl2 && strnicmp(m_unk0x110->
GetName(),
"chrjety", strlen(
"chrjety")) == 0) {
1337 m_Decals_Ctl2->
Enable(p_enabled);
1339 else if (m_Decals_Ctl) {
1340 m_Decals_Ctl->
Enable(p_enabled);
1357 color =
"lego yellow";
1363 color =
"lego blue";
1366 color =
"lego green";
1369 color =
"lego white";
1372 color =
"lego black";
1381 sprintf(buffer,
"c_%s", m_unk0x110->
GetName());
1390 m_unk0x1c0 = m_unk0x12c;
1392 Vector3 lastColumnOfUnk0x1c0(m_unk0x1c0[3]);
1400 *unk0x178 = m_unk0x12c;
1406 m_unk0x2bc = m_unk0x2a4;
1408 m_unk0x208 = m_unk0x12c;
1409 m_unk0x2a4[0] += m_unk0x1c0[3][0] - m_unk0x208[3][0];
1410 m_unk0x2a4[1] += m_unk0x1c0[3][1] - m_unk0x208[3][1];
1411 m_unk0x2a4[2] += m_unk0x1c0[3][2] - m_unk0x208[3][2];
1414 *unk0x178 = m_unk0x1c0;
1431 m_unk0x2a4[2] += (m_unk0x1c0[3][2] - m_unk0x12c[3][2]);
1432 m_unk0x178[3][2] = m_unk0x1c0[3][2];
1455inline MxU32 LegoCarBuild::Beta0x10070520()
1472inline void LegoCarBuild::StopActionIn0x344()
1500 switch (rand() % 3) {
1503 StopActionIn0x344();
1510 StopActionIn0x344();
1517 StopActionIn0x344();
1525 FUN_10025d10(g_unk0x100d65b0[Beta0x10070520()].m_unk0x04);
1528 FUN_10025d10(g_unk0x100d65b0[Beta0x10070520()].m_unk0x08);
1531 m_unk0x10a = g_unk0x100d65b0[Beta0x10070520()].
m_unk0x18;
1533 StopActionIn0x344();
1552 m_unk0x10a = g_unk0x100d65b0[Beta0x10070520()].
m_unk0x00;
1556 m_unk0x10a = g_unk0x100d65b0[Beta0x10070520()].
m_unk0x0c;
1565 m_unk0x10a = g_unk0x100d65b0[Beta0x10070520()].
m_unk0x10;
1574 FUN_10025d10(g_unk0x100d65b0[Beta0x10070520()].m_unk0x14);
1577 FUN_10025d10(g_unk0x100d65b0[Beta0x10070520()].m_unk0x04);
1580 FUN_10025d10(g_unk0x100d65b0[Beta0x10070520()].m_unk0x08);
1583 m_unk0x10a = g_unk0x100d65b0[Beta0x10070520()].
m_unk0x18;
1591 assert(m_numAnimsRun >= 0);
1598 if (m_unk0x10a != 0) {
1599 m_unk0x10c = timeGetTime();
1615 m_unk0x344 = p_param;
1642 MxS16 sVar3 = 1 - ((p_param2 / 5) & 1);
1644 if (m_Yellow_Ctl == m_unk0x33c) {
1645 if (sVar3 != g_unk0x100f11cc) {
1647 g_unk0x100f11cc = sVar3;
1655 g_unk0x100f11cc = -1;
1664 if (m_unk0x33c && m_Yellow_Ctl != m_unk0x33c) {
[AI] Holds state and transient gameplay data for the first act on Lego Island.
DuneBuggy * m_dunebuggy
[AI] Serializable pointer to current dune buggy object (NULL when not held in state)....
Helicopter * m_helicopter
[AI] Serializable pointer to current helicopter object (NULL when not held in state)....
RaceCar * m_racecar
[AI] Serializable pointer to current racecar object (NULL when not held in state)....
LegoNamedPlane m_helicopterPlane
[AI] Serialized/deserialized world placement state for helicopter.
LegoNamedPlane m_jetskiPlane
[AI] Placement state for jetski in world (serializable). [AI]
LegoNamedPlane m_dunebuggyPlane
[AI] Placement state for dune buggy in world (serializable). [AI]
LegoNamedPlane m_racecarPlane
[AI] Placement state for racecar in world (serializable). [AI]
Jetski * m_jetski
[AI] Serializable pointer to current jetski object (NULL when not held in state). [AI]
[AI] Represents the player-controllable dune buggy vehicle in LEGO Island, inheriting movement and in...
[AI] Represents the flyable helicopter vehicle/path actor in the game, handling all in-game behaviors...
[AI] Represents the jetski vehicle placed in the 3D world of LEGO Island.
void SetUnknown0xbc(undefined2 p_unk0xbc)
[AI] Sets the internal unknown word at offset 0xbc.
Matrix4 & GetUnknown0xe0()
[AI] Provides access to the internal Matrix4 representing current animation state,...
void PutFrame() override
[AI] Called once per displayed animation frame.
const LegoChar * GetWiredNameOfLastPlacedPart()
[AI] Returns the wired part name for the last placed part.
void SetPartObjectIdByName(const LegoChar *p_name, MxS16 p_objectId)
[AI] Sets the object id for the given part name in the assembly state.
void FUN_10079790(const LegoChar *p_name)
[AI] Advances current placed part, handles swaps, and updates morph/visibility.
MxBool PartIsPlaced(const LegoChar *p_name)
[AI] Returns whether a part (by name) has already been placed in the sequence.
MxBool StringEndsOnY(const LegoChar *p_string)
[AI] Checks if the supplied string ends with "Y" or "y" in the second-to-last character.
void RotateAroundYAxis(MxFloat p_angle)
[AI] Rotates the assembly platform (root part) around the Y axis by the given angle (quaternion math)...
MxBool StringDoesNotEndOnZero(const LegoChar *p_string)
[AI] Checks if string does not end on the character '0'.
MxBool FUN_10079c30(const LegoChar *p_name)
[AI] Returns true if the part with the given name is not yet placed, but is the current to-be-placed ...
MxBool AllPartsPlaced()
[AI] Returns TRUE if all parts have been placed (i.e., assembly is complete).
const LegoChar * GetWiredNameByPartName(const LegoChar *p_name)
[AI] Retrieves the wireframe/scene-graph name associated with the player-facing part name.
const BoundingSphere & FUN_10079e20()
[AI] Returns the world bounding sphere of the next part to be placed.
MxBool StringEndsOnYOrN(const LegoChar *p_string)
[AI] Returns TRUE if the given part's name ends with 'Y', 'y', 'N', or 'n' as the second-to-last char...
[AI] World implementation for the LEGO vehicle builder (Racecar, Copter, Dune Car,...
MxS16 GetPlacedPartCount()
[AI] Gets number of parts currently placed in build progress.
void FUN_10022f00()
[AI] Internal: handles transition when moving a placed part, possibly triggering state change.
MxResult Create(MxDSAction &p_dsAction) override
[AI] Creates world from script action; initializes build and assigns state according to area/car type...
MxS32 FUN_10025d70()
[AI] Gets next animation/cutscene ID depending on current build stage value.
void FUN_100243a0()
[AI] Handles the transition to the next act/location when building is complete.
LegoCarBuild()
[AI] Constructs a new LegoCarBuild world and initializes all references/UI.
MxResult Tickle() override
[AI] Tickle function (called every frame/tick); processes build logic and part animation.
void FUN_10024f30()
[AI] Internal: Logic for the shelf-up UI animation/response.
virtual void VTable0x7c(MxFloat p_param1[2], MxFloat p_param2[3])
[AI] Adjusts transformation for part manipulation above the "default" reference.
virtual void VTable0x70()
[AI] Computes screen-projected coordinates for picking/placing parts and updates internal pixel locat...
void FUN_10025350(MxS32 p_objectId)
[AI] Handles color/decal actions by object ID, mapping click to appropriate color or updating variabl...
void FUN_10025720(undefined4 p_param1)
[AI] Initiates the next world/cutscene/animation step, based on internal build progress and car ID.
void ReadyWorld() override
[AI] Prepares UI and scripting when world is ready.
undefined4 FUN_100244e0(MxLong p_x, MxLong p_y)
[AI] Handles mouse click/button down notifications to pick parts or trigger color/decal tools.
MxLong Notify(MxParam &p_param) override
[AI] Handles notifications (input, state, animation, world events) for the build world.
undefined4 FUN_10024c20(LegoEventNotificationParam *p_param)
[AI] Handles the core event when the build is completed and creation should be finalized.
MxBool Escape() override
[AI] Escapes from the build UI (initiates transition to outside world/menu).
void FUN_10024f50()
[AI] Internal: Handles part rotation/y-axis interaction.
virtual void VTable0x78(MxFloat p_param1[2], MxFloat p_param2[3])
[AI] Adjusts transformation for part manipulation when within the vertical bounds of the reference po...
virtual void VTable0x6c()
[AI] Internal logic, used during part drag/drop and animation (possibly for placing or updating a par...
virtual void VTable0x74(MxFloat p_param1[2], MxFloat p_param2[3])
[AI] Adjusts transformation for part manipulation based on mouse/drag locations below the "default" p...
void FUN_10022f30()
[AI] Internal: logic for finalizing or dropping a part at build location, updates sound and UI.
undefined4 FUN_10024250(LegoEventNotificationParam *p_param)
[AI] Handles keyboard event notifications, most notably the Space key for canceling animations or sou...
undefined4 FUN_10024890(MxParam *p_param)
[AI] Handles UI input/control presenter notifications.
void SetPlacedPartCount(MxU8 p_placedPartCount)
[AI] Sets the number of placed parts in the build state.
void InitPresenters()
[AI] Finds and initializes all presenters (UI and sound) used in the car build area.
void FUN_10025e40()
[AI] Re-applies enabled/disabled flags on presenters, resetting the last-toggled presenter if needed.
virtual void VTable0x80(MxFloat p_param1[2], MxFloat p_param2[2], MxFloat p_param3, MxFloat p_param4[2])
[AI] Used for conversions between projected and real pixel/world space.
@ c_unknownminusone
[AI] Default/uninitialized
@ c_unknown8
[AI] Internal marker
void FUN_100250e0(MxBool p_param)
[AI] Enables/Disables only the presenter set related to current part, using name pattern.
~LegoCarBuild() override
[AI] Cleans up presenters, unregisters input/notification handlers, and resets world build state.
void FUN_100236d0()
[AI] Internal: launches the finalization of all parts if build is completed; triggers further game pr...
undefined4 FUN_100246e0(MxLong p_x, MxLong p_y)
[AI] Handles mouse button up events; initiates part-finalization or validated placement.
void FUN_10025450()
[AI] Updates part transformation matrices and records old/new world/projected positions for drag/drop...
void FUN_10024f70(MxBool p_enabled)
[AI] Enables/Disables color/decal presenters depending on selected part and part name.
void TogglePresentersEnabled()
[AI] Toggles enabled/disabled state for all main presenters (color/decal tools).
MxS32 FUN_10025ee0(undefined4 p_param1)
[AI] Gets the appropriate jukebox/music action ID for the current car type, used when leaving the bui...
void Enable(MxBool p_enable) override
[AI] Enables or disables the world, handling both visual and audio states and input registration.
undefined4 FUN_10024480(MxActionNotificationParam *p_param)
[AI] Handles animation end notification action (e.g., volume restoration, state reset,...
void FUN_10025db0(const char *p_param1, undefined4 p_param2)
[AI] Controls global UI presentations actions (such as blinking or activation), based on progress in ...
MxS32 FUN_10024850(MxLong p_x, MxLong p_y)
[AI] Handles mouse move notifications for drag-to-place part.
void FUN_10025d10(MxS32 p_param)
[AI] Starts/stops an animation action for the specified parameter (e.g., cutscene transition,...
void FUN_10023130(MxLong p_x, MxLong p_y)
[AI] Internal: handles interaction when dragging part along projected axis.
void FUN_10024ef0()
[AI] Starts the cutscene or music intro for the build with necessary state adjustment.
void SetPresentersEnabled(MxBool p_enabled)
[AI] Controls common set of UI presenters' enabled state at once.
[AI] Notification parameter for the LegoControlManager, used to propagate information about control e...
MxS32 m_clickedObjectId
[AI] Object ID of the clicked control/presenter (or -1 if not set). [AI]
MxS16 m_unk0x28
[AI] Undetermined; settable via SetUnknown0x28. [AI]
void Register(MxCore *p_listener)
[AI] Adds a listener to be notified of control events.
void Unregister(MxCore *p_listener)
[AI] Removes a listener so it no longer receives control events.
[AI] Represents an entity that can be placed and managed in the LEGO Island world.
LegoROI * GetROI()
[AI] Gets the ROI (Realtime Object Instance) associated with this entity. [AI]
Notification parameter class for LEGO event notifications such as mouse events and modifier keys.
MxU8 GetKey() const
Returns the keycode for this event, or 0 if not used.
Comprehensive persistent game state manager: handles save/load, player selection, area switching,...
void SwitchArea(Area p_area)
Switches the whole game state into a new area/world; manages transitions/scene loads.
Area m_currentArea
Area/world the player is presently in. [AI].
LegoState * CreateState(const char *p_stateName)
Creates an instance of given state, registers it, and returns pointer.
@ e_act2
Act 2: main story segment two. [AI].
void StopArea(Area p_area)
Calls cleanup logic for the specified area (removes actors, VMs, closes handles, etc....
LegoState * GetState(const char *p_stateName)
Find an existing state (LegoState-derived) object by its registered script/class name.
@ e_infomain
Information Center, main screen. [AI].
@ e_previousArea
Alias: go to previous area. [AI].
@ e_dunecarbuild
Vehicle construction: dune buggy. [AI].
@ e_racecarbuild
Vehicle construction: racecar. [AI].
@ e_act3script
Act 3 world/script main. [AI].
@ e_garadoor
Garage door or doorway. [AI].
@ e_copterbuild
Vehicle construction: helicopter. [AI].
@ e_polidoor
Police Station door. [AI].
@ e_undefined
Undefined or unset area. [AI].
@ e_jetskibuild
Vehicle construction: jetski. [AI].
@ c_clearScreen
[AI] When set, clears the display surface. [AI]
@ c_disable3d
[AI] When set, disables 3D rendering. [AI]
@ c_disableInput
[AI] When set, disables input processing. [AI]
[AI] Represents a Real-time Object Instance enriched with LEGO-specific functionality.
LegoResult FUN_100a93b0(const LegoChar *p_name)
[AI] Like SetLodColor, but uses a different implementation or legacy style.
LegoROI * FindChildROI(const LegoChar *p_name, LegoROI *p_roi)
[AI] Recursively searches for a child ROI by name, starting at the given ROI.
const LegoChar * GetName() const
[AI] Gets this ROI's name.
virtual MxResult Serialize(LegoStorage *p_storage)
[AI] Serialize state to a storage (for save/load).
Abstract base class providing an interface for file-like storage with binary and text read/write oper...
LegoStorage * WriteU8(LegoU8 p_data)
Writes an 8-bit unsigned value to storage.
LegoStorage * ReadU8(LegoU8 &p_data)
Reads an 8-bit unsigned value from storage.
virtual LegoBool IsReadMode()
Returns TRUE if object was opened in read mode.
[AI] Represents the persistent state of the LEGO vehicle build world, tracking animation and part pla...
MxBool m_unk0x4d
[AI] Persists transition or completion flag across world reloads.
AnimationState m_animationState
[AI] Current animation state within the build area.
@ e_exiting
[AI] Build area is in the process of ending/exiting.
@ e_entering
[AI] Transition/Entering the build area.
@ e_unknown4
[AI] Indicates transition to exit (possibly ready for world exit or next act).
@ e_cutscene
[AI] Indicates that the build is in a cutscene (camera or instructions animation).
@ e_unknown0
[AI] Default/uninitialized state. Meaning unclear.
@ e_unknown2
[AI] Likely a 'ready' or transitional state before a cutscene.
MxResult Serialize(LegoStorage *p_storage) override
[AI] Serialize or deserialize the build state to/from a storage object for save/load.
MxBool m_unk0x4e
[AI] Unknown. Flag—purpose unclear.
MxString m_className
[AI] Class name string ("LegoRaceCarBuildState", etc), used for identifying the build state type.
MxU8 m_placedPartCount
[AI] Number of parts (bricks) placed during the build.
LegoVehicleBuildState(const char *p_classType)
[AI] Constructs a LegoVehicleBuildState with a specified class type string, which identifies the buil...
MxU8 m_unk0x4c
[AI] Number of completed actions or animation steps, incremented through build progress.
Represents the active 3D world, holding all entity, animation, sound, path, and ROI objects.
virtual void Enable(MxBool p_enable)
Enables or disables (pauses) the world and its main components.
MxResult Tickle() override
Main world tick/update, especially manages startup countdown.
MxBool m_worldStarted
Indicates if the world has successfully started and is considered active.
MxCore * Find(const char *p_class, const char *p_name)
Finds an object of a given class and name in the world.
MxLong Notify(MxParam &p_param) override
Notification callback responding to registered events such as EndAction and NewPresenter.
MxResult Create(MxDSAction &p_dsAction) override
Initializes the world using an action, creating entity and sound lists, and camera controller.
[AI] Notification parameter class that contains information about an MxDSAction, used for inter-objec...
MxDSAction * GetAction()
[AI] Direct access to the underlying action.
void Init()
[AI] Reinitializes manager's active presenter and tickle state; typically called at the start of a sc...
undefined4 FUN_1007f610(MxPresenter *p_unk0x138, MxS32 p_speed, MxPresenter::TickleState p_tickleState)
[AI] Helper for queued volume changing: Sets up a coming presenter/action for activation with given s...
void RaiseVolume()
[AI] Requests that the background music volume is raised (decrements suppression counter); triggers f...
void LowerVolume()
[AI] Requests a reduction in current background music volume, queuing for fade out (increments suppre...
void Stop()
[AI] Immediately stops all background music, clears all actions and presenters, and resets tickle sta...
[AI] Presenter for UI controls, supporting toggles, grids, and "map" style controls with multiple int...
void Enable(MxBool p_enable) override
[AI] Enables or disables the control; delegates enable to correct sub-presenter based on current stat...
virtual void VTable0x6c(MxS16 p_unk0x4e)
[AI] Selects a state/sub-control by index, or advances the currently selected state if -1 is provided...
MxS16 GetUnknown0x4e()
[AI] Returns the current selected/control state index.
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
MxU32 GetObjectId()
[AI] Returns the object id numeric value.
MxAtomId m_atomId
The AtomId associated with this entity, used for resource and script identification.
[AI] Represents a 4x4 transformation matrix, specialized for the LEGO Island engine and derived from ...
void Unregister(MxCore *p_listener)
[AI] Removes a previously registered listener and flushes any pending notifications for it.
void Register(MxCore *p_listener)
[AI] Registers a listener object to receive notifications.
MxResult Send(MxCore *p_listener, const MxNotificationParam &p_param)
[AI] Queues a notification to be sent to a specific registered listener.
[AI] Parameter object representing a single notification or event, carrying an identifier and sender ...
NotificationId GetNotification() const
[AI] Retrieves the current notification type of this parameter.
[AI] MxParam serves as a polymorphic base class for parameter passing in event and notification syste...
virtual void SetTickleState(TickleState p_tickleState)
[AI] Forces the tickle state, advancing to the requested lifecycle stage.
MxBool IsEnabled()
[AI] Returns whether this presenter is logically enabled (based on the associated action's flags).
@ e_repeating
[AI] Presentation is repeating (e.g., looping media).
@ e_idle
[AI] Not processing an action.
MxDSAction * GetAction() const
[AI] Returns the current action being presented.
MxPresenter * FUN_100aebd0(const MxAtomId &p_atomId, MxU32 p_objectId)
[AI] Finds a presenter matching a specific atom ID and object ID.
[AI] Concrete presenter for sound playback and control within the LEGO Island engine.
[AI] Presenter for single still image/bitmap media sources in the game.
void Enable(MxBool p_enable) override
[AI] Sets the enabled/disabled state of the presenter, updating the video manager's rendering as need...
virtual void UnregisterClient(MxCore *p_client)
[AI] Unregisters (marks for destruction) a previously registered client.
MxResult StartTransition(TransitionType p_animationType, MxS32 p_speed, MxBool p_doCopy, MxBool p_playMusicInAnim)
[AI] Begins a new transition animation of type p_animationType at the specified speed,...
@ e_mosaic
[AI] Complex mosaic block-out effect.
void SetVariable(const char *p_key, const char *p_value)
Sets a variable by key and value, replacing or updating if it exists.
const BoundingSphere & GetWorldBoundingSphere() const override
Returns the object's bounding sphere in world coordinates.
const float * GetWorldPosition() const
Returns a pointer to the world position from the transformation matrix (translation row).
const Matrix4 & GetLocal2World() const
Accessor for the current local-to-world transformation matrix.
void WrappedSetLocalTransform(const Matrix4 &p_transform)
Wraps SetLocalTransform, for possible override or interface uniformity.
OrientableROI * GetParentROI() const
Accessor for the parent ROI in the transformation hierarchy.
[AI] Represents the drivable race car entity in the LEGO Island world.
[AI] 3D vector class, providing vector and cross-product operations in 3D space.
[AI] A four-dimensional vector, supporting operations relevant for matrix and quaternion math (homoge...
typedef DWORD(FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper
#define DECOMP_SIZE_ASSERT(T, S)
#define LEGOCARBUILD_TICKLE_CASE(subtract, start, end, str)
#define NULL
[AI] Null pointer value (C/C++ semantics).
char LegoChar
[AI] Alias for char, for use in character/byte data and string handling.
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.
#define DS_NOT_A_STREAM
[AI] Special stream ID indicating that the current stream is not valid.
void EnableAnimations(MxBool p_enable)
[AI] Enables or disables animation playback globally.
void InvokeAction(Extra::ActionType p_actionId, const MxAtomId &p_pAtom, MxS32 p_streamId, LegoEntity *p_sender)
[AI] Dispatches and triggers a game action on the given script or object.
MxBool TransformWorldToScreen(const MxFloat p_world[3], MxFloat p_screen[4])
[AI] Projects a world-space point into normalized screen coordinates.
LegoROI * PickROI(MxLong p_x, MxLong p_y)
[AI] Picks the ROI (Renderable Object Instance) at screen coordinates.
void FUN_1003eda0()
[AI] Updates sound listener position to follow the view ROI's transform.
void RotateY(LegoROI *p_roi, MxFloat p_angle)
[AI] Rotates the given ROI around the Y axis in world space.
MxBool SpheresIntersect(const BoundingSphere &p_sphere1, const BoundingSphere &p_sphere2)
[AI] Tests if two bounding spheres in the 3D world intersect.
MxAtomId * g_isleScript
[AI] Node used in hierarchical scene graphs and animation trees. [AI]
MxBool FUN_1003ded0(MxFloat p_param1[2], MxFloat p_param2[3], MxFloat p_param3[3])
[AI] Calculates a ray starting at a screen location and outputs its world origin and direction.
LegoGameState * GameState()
[AI] Accessor for the game's central game state controller. [AI]
void DeleteObjects(MxAtomId *p_id, MxS32 p_first, MxS32 p_last)
[AI] Batch deletes objects, given by atom id, and within the entity id range [p_first,...
LegoSoundManager * SoundManager()
[AI] Accessor for the game's LegoSoundManager subsystem from the global LegoOmni instance....
MxTransitionManager * TransitionManager()
[AI] Accessor for the MxTransitionManager, handling level transitions, fades, and world changes....
MxBackgroundAudioManager * BackgroundAudioManager()
[AI] Accessor for the background audio manager. Used for background music and ambient sounds....
LegoWorld * FindWorld(const MxAtomId &p_atom, MxS32 p_entityid)
[AI] Searches for or retrieves a LegoWorld instance based on an atom id and entity id.
LegoControlManager * ControlManager()
[AI] Accessor for the control manager through the input manager; manages higher-level user/game contr...
void FUN_10015820(MxBool p_disable, MxU16 p_flags)
[AI] Utility for enabling or disabling functionality in LegoOmni based on certain flags.
void SetIsWorldActive(MxBool p_isWorldActive)
[AI] Toggles whether the world should be considered active (enables/disables camera/user control etc)...
LegoInputManager * InputManager()
[AI] Accessor for the input manager, which handles keyboard, mouse, and controller input....
MxVariableTable * VariableTable()
[AI] Returns the variable table used for script variables and global key/value state.
MxNotificationManager * NotificationManager()
[AI] Returns the notification manager for system-wide state/update notifications.
MxTickleManager * TickleManager()
[AI] Provides access to the global tickle manager.
@ c_notificationControl
[AI] UI control event [AI]
@ c_notificationButtonUp
[AI] Mouse/gamepad button release [AI]
@ c_notificationButtonDown
[AI] Mouse/gamepad button press [AI]
@ c_notificationEndAnim
[AI] End of an animation [AI]
@ c_notificationMouseMove
[AI] Mouse movement event [AI]
@ c_notificationKeyPress
[AI] Keyboard key press detected [AI]
@ c_notificationTransitioned
[AI] Object has transitioned states or locations [AI]
@ c_notificationType0
[AI] Undefined/Generic notification type [AI]
@ c_notificationEndAction
[AI] Indicates the end of an action [AI]
@ c_ips001d2_RunAnim
[AI] Trigger/action for running the full ips001d2 animation.
@ c_ips005d2_RunAnim
[AI] Trigger/action for running the full ips005d2 animation.
@ c_ipsxx1d2_RunAnim
[AI] Trigger/action for running the full ipsxx1d2 animation.
@ c_Exit_Ctl
[AI] "Exit" button or UI control handler.
@ c_ips003d2_RunAnim
[AI] Trigger/action for running the full ips003d2 animation.
@ c_ShelfUp_Ctl
[AI] "Shelf up" UI control, possibly for toggling/animating a shelf.
@ c_slp01xd2_RunAnim
[AI] Trigger/action for running the full slp01xd2 animation.
@ c_Info_Ctl
[AI] "Info" button or UI control handler for the copter UI.
@ c_ips004d2_RunAnim
[AI] Trigger/action for running the full ips004d2 animation.
@ c_Platform_Ctl
[AI] "Platform" control - possibly for animation/location logic.
@ c_ips002d2_RunAnim
[AI] Trigger/action for running the full ips002d2 animation.
@ c_ips006d2_RunAnim
[AI] Trigger/action for running the full ips006d2 animation.
@ c_igs002d3_RunAnim
[AI] Run animation for 002d3 sequence.
@ c_igs004d3_RunAnim
[AI] Run animation for 004d3 sequence.
@ c_igs005d3_RunAnim
[AI] Run animation for 005d3 sequence.
@ c_igs001d3_RunAnim
[AI] Run animation for 001d3 sequence.
@ c_igs003d3_RunAnim
[AI] Run animation for 003d3 sequence.
@ c_igsxx1d3_RunAnim
[AI] Run animation for xx1d3 sequence.
@ c_ijs007d4_RunAnim
[AI] Run animation for jetski type 7. [AI]
@ c_ijs003d4_RunAnim
[AI] Run animation for jetski type 3. [AI]
@ c_ijs006d4_RunAnim
[AI] Run animation for jetski type 6. [AI]
@ c_ijs001d4_RunAnim
[AI] Run animation for jetski type 1. [AI]
@ c_ijs005d4_RunAnim
[AI] Run animation for jetski type 5. [AI]
@ c_ijsxx2d4_RunAnim
[AI] Run animation for jetski type X. [AI]
@ c_ijs004d4_RunAnim
[AI] Run animation for jetski type 4. [AI]
@ c_HelicopterBuild_Music
[AI] Music used for the helicopter build event.
@ c_JetskiBuild_Music
[AI] Music for the Jetski build event.
@ c_DuneCarBuild_Music
[AI] Music used for the Dune Car build.
@ c_RaceCarBuild_Music
[AI] Music for the Race Car build.
[AI] Contains global script AtomId pointers and utility functions for managing script AtomIds in LEGO...
MxAtomId * g_jukeboxScript
[AI] Script AtomId for the Jukebox entity/event script.
MxAtomId * g_racecarScript
[AI] Script AtomId for the build/race car SI file.
MxAtomId * g_copterScript
[AI] Script AtomId for the helicopter ("copter") build or activity.
MxAtomId * g_jetskiScript
[AI] Script AtomId for the jet ski-related script.
MxAtomId * g_dunecarScript
[AI] Script AtomId for the dune car building or mission script.
undefined4 m_unk0x18
[AI] Script/action ID for animation 6.
undefined4 m_unk0x10
[AI] Script/action ID for animation 4.
undefined4 m_unk0x00
[AI] Script/action ID for animation 0.
undefined4 m_unk0x0c
[AI] Script/action ID for animation 3.
void Reset()
[AI] Reset the plane to "not present" by clearing its name.