Isle
Loading...
Searching...
No Matches
LegoCarBuild Class Reference

[AI] World implementation for the LEGO vehicle builder (Racecar, Copter, Dune Car, Jetski), handling UI, input, 3D vehicle assembly, part placement, and all vehicle-specific interactions. More...

#include <legocarbuild.h>

Inheritance diagram for LegoCarBuild:
Collaboration diagram for LegoCarBuild:

Classes

struct  LookupTableActions
 [AI] Lookup table for animation/action IDs for vehicle types. More...
 

Public Types

enum  Unknown0xf8 { c_unknownminusone = -1 , c_unknown8 = 8 }
 [AI] Special constants for internal state tracking of the build world. More...
 
- Public Types inherited from LegoWorld
enum  StartupTicks {
  e_start = 0 , e_one , e_two , e_three ,
  e_four
}
 Ticks for world startup sequencing. More...
 
- Public Types inherited from LegoEntity
enum  Type {
  e_actor = 0 , e_unk1 , e_plant , e_building ,
  e_autoROI
}
 [AI] Types of LegoEntity (Actor, Plant, Building, Auto ROI, etc.) [AI] More...
 
enum  { c_bit1 = 0x01 , c_managerOwned = 0x02 }
 [AI] Bit flag constants for entity state management [AI] More...
 
enum  { c_altBit1 = 0x01 }
 [AI] Secondary bit flag constants [AI] More...
 

Public Member Functions

 LegoCarBuild ()
 [AI] Constructs a new LegoCarBuild world and initializes all references/UI. More...
 
 ~LegoCarBuild () override
 [AI] Cleans up presenters, unregisters input/notification handlers, and resets world build state. More...
 
MxBool VTable0x5c () override
 [AI] Always returns TRUE; signals that this world can be entered. More...
 
const char * ClassName () const override
 [AI] Returns the type string for this object. More...
 
MxLong Notify (MxParam &p_param) override
 [AI] Handles notifications (input, state, animation, world events) for the build world. More...
 
MxResult Tickle () override
 [AI] Tickle function (called every frame/tick); processes build logic and part animation. More...
 
MxBool IsA (const char *p_name) const override
 [AI] Checks run-time type compatibility. More...
 
MxResult Create (MxDSAction &p_dsAction) override
 [AI] Creates world from script action; initializes build and assigns state according to area/car type. More...
 
void ReadyWorld () override
 [AI] Prepares UI and scripting when world is ready. More...
 
MxBool Escape () override
 [AI] Escapes from the build UI (initiates transition to outside world/menu). More...
 
void Enable (MxBool p_enable) override
 [AI] Enables or disables the world, handling both visual and audio states and input registration. More...
 
virtual void VTable0x6c ()
 [AI] Internal logic, used during part drag/drop and animation (possibly for placing or updating a part coordinate). More...
 
virtual void VTable0x70 ()
 [AI] Computes screen-projected coordinates for picking/placing parts and updates internal pixel locations. More...
 
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" part reference. More...
 
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 points. More...
 
virtual void VTable0x7c (MxFloat p_param1[2], MxFloat p_param2[3])
 [AI] Adjusts transformation for part manipulation above the "default" reference. More...
 
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. More...
 
MxS16 GetPlacedPartCount ()
 [AI] Gets number of parts currently placed in build progress. More...
 
void SetPlacedPartCount (MxU8 p_placedPartCount)
 [AI] Sets the number of placed parts in the build state. More...
 
void InitPresenters ()
 [AI] Finds and initializes all presenters (UI and sound) used in the car build area. More...
 
void FUN_10022f00 ()
 [AI] Internal: handles transition when moving a placed part, possibly triggering state change. More...
 
void FUN_10022f30 ()
 [AI] Internal: logic for finalizing or dropping a part at build location, updates sound and UI. More...
 
void FUN_10023130 (MxLong p_x, MxLong p_y)
 [AI] Internal: handles interaction when dragging part along projected axis. More...
 
void FUN_100236d0 ()
 [AI] Internal: launches the finalization of all parts if build is completed; triggers further game progression or cutscene. More...
 
undefined4 FUN_10024250 (LegoEventNotificationParam *p_param)
 [AI] Handles keyboard event notifications, most notably the Space key for canceling animations or sounds. More...
 
void FUN_100243a0 ()
 [AI] Handles the transition to the next act/location when building is complete. More...
 
undefined4 FUN_10024480 (MxActionNotificationParam *p_param)
 [AI] Handles animation end notification action (e.g., volume restoration, state reset, triggers exit logic). More...
 
undefined4 FUN_100244e0 (MxLong p_x, MxLong p_y)
 [AI] Handles mouse click/button down notifications to pick parts or trigger color/decal tools. More...
 
undefined4 FUN_100246e0 (MxLong p_x, MxLong p_y)
 [AI] Handles mouse button up events; initiates part-finalization or validated placement. More...
 
MxS32 FUN_10024850 (MxLong p_x, MxLong p_y)
 [AI] Handles mouse move notifications for drag-to-place part. More...
 
undefined4 FUN_10024890 (MxParam *p_param)
 [AI] Handles UI input/control presenter notifications. More...
 
undefined4 FUN_10024c20 (LegoEventNotificationParam *p_param)
 [AI] Handles the core event when the build is completed and creation should be finalized. More...
 
void FUN_10024ef0 ()
 [AI] Starts the cutscene or music intro for the build with necessary state adjustment. More...
 
void FUN_10024f30 ()
 [AI] Internal: Logic for the shelf-up UI animation/response. More...
 
void FUN_10024f50 ()
 [AI] Internal: Handles part rotation/y-axis interaction. More...
 
void FUN_10024f70 (MxBool p_enabled)
 [AI] Enables/Disables color/decal presenters depending on selected part and part name. More...
 
void SetPresentersEnabled (MxBool p_enabled)
 [AI] Controls common set of UI presenters' enabled state at once. More...
 
void TogglePresentersEnabled ()
 [AI] Toggles enabled/disabled state for all main presenters (color/decal tools). More...
 
void FUN_100250e0 (MxBool p_param)
 [AI] Enables/Disables only the presenter set related to current part, using name pattern. More...
 
void FUN_10025350 (MxS32 p_objectId)
 [AI] Handles color/decal actions by object ID, mapping click to appropriate color or updating variables. More...
 
void FUN_10025450 ()
 [AI] Updates part transformation matrices and records old/new world/projected positions for drag/drop and manip. More...
 
void FUN_10025720 (undefined4 p_param1)
 [AI] Initiates the next world/cutscene/animation step, based on internal build progress and car ID. More...
 
void FUN_10025d10 (MxS32 p_param)
 [AI] Starts/stops an animation action for the specified parameter (e.g., cutscene transition, per-action). More...
 
MxS32 FUN_10025d70 ()
 [AI] Gets next animation/cutscene ID depending on current build stage value. More...
 
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 animation. More...
 
void FUN_10025e40 ()
 [AI] Re-applies enabled/disabled flags on presenters, resetting the last-toggled presenter if needed. More...
 
MxS32 FUN_10025ee0 (undefined4 p_param1)
 [AI] Gets the appropriate jukebox/music action ID for the current car type, used when leaving the build. More...
 
void SetUnknown0x258 (LegoCarBuildAnimPresenter *p_unk0x258)
 [AI] Directly sets the animation presenter for this build world. More...
 
- Public Member Functions inherited from LegoWorld
 LegoWorld ()
 Constructs a LegoWorld, initializing lists and notifying the notification manager. More...
 
 ~LegoWorld () override
 Cleans up the world, destroying all held entities, presenters, and controllers. More...
 
MxLong Notify (MxParam &p_param) override
 Notification callback responding to registered events such as EndAction and NewPresenter. More...
 
MxResult Tickle () override
 Main world tick/update, especially manages startup countdown. More...
 
MxResult Create (MxDSAction &p_dsAction) override
 Initializes the world using an action, creating entity and sound lists, and camera controller. More...
 
void Destroy (MxBool p_fromDestructor) override
 Destroys the world and its contents, optionally called from the destructor. More...
 
virtual void ReadyWorld ()
 Called when the world is ready to be used—typically for custom scene setup after startup. More...
 
virtual LegoCameraControllerVTable0x54 ()
 Initializes and returns the camera controller for the world; may create it on-demand. More...
 
virtual void Add (MxCore *p_object)
 Adds an object (entity, presenter, ROI, etc.) to the appropriate world-managed list or set. More...
 
virtual MxBool VTable0x5c ()
 Potential "escape" action for world; returns FALSE by default, may be overridden in child worlds. More...
 
virtual void VTable0x60 ()
 Placeholder/extensible virtual—default does nothing. More...
 
virtual MxBool Escape ()
 Handles user-initiated "escape" or exit action. More...
 
virtual void Enable (MxBool p_enable)
 Enables or disables (pauses) the world and its main components. More...
 
const char * ClassName () const override
 Returns the class name for runtime type information and debugging. More...
 
MxBool IsA (const char *p_name) const override
 Runtime type checking; checks class hierarchy. More...
 
MxBool PresentersPending ()
 Checks if there are any presenters pending to fully enter their tickle (animation) state. More...
 
void Remove (MxCore *p_object)
 Removes an object from all relevant world-managed lists or sets, and also detaches if needed. More...
 
MxResult PlaceActor (LegoPathActor *p_actor, const char *p_name, MxS32 p_src, float p_srcScale, MxS32 p_dest, float p_destScale)
 Places an actor along a path, from source to destination, using named references and scaling. More...
 
MxResult PlaceActor (LegoPathActor *p_actor)
 Places an actor using only its reference, using controller logic. More...
 
MxResult PlaceActor (LegoPathActor *p_actor, LegoAnimPresenter *p_presenter, Vector3 &p_position, Vector3 &p_direction)
 Places an actor using detailed presenter, position and direction. More...
 
void RemoveActor (LegoPathActor *p_actor)
 Removes an actor from all known path controllers. More...
 
MxBool ActorExists (LegoPathActor *p_actor)
 Determines if an actor already exists in any controller in this world. More...
 
void FUN_1001fda0 (LegoAnimPresenter *p_presenter)
 Forwards a presenter to all path controllers to perform a custom action (possibly hide, etc.). More...
 
void FUN_1001fe90 (LegoAnimPresenter *p_presenter)
 Forwards a presenter to all path controllers for another custom or state change action. More...
 
LegoPathBoundaryFindPathBoundary (const char *p_name)
 Finds a path boundary in all path controllers by name. More...
 
void AddPath (LegoPathController *p_controller)
 Adds a path controller to the world and calls its initialization with this. More...
 
MxResult GetCurrPathInfo (LegoPathBoundary **p_boundaries, MxS32 &p_numL)
 Gets information about the currently active path and boundaries. More...
 
MxCoreFind (const char *p_class, const char *p_name)
 Finds an object of a given class and name in the world. More...
 
MxCoreFind (const MxAtomId &p_atom, MxS32 p_entityId)
 Finds an object in the world by its atom id and entity id. More...
 
LegoCameraControllerGetCameraController ()
 Returns the current camera controller for the world. More...
 
LegoEntityListGetEntityList ()
 Returns the current list of entities. More...
 
LegoOmni::World GetWorldId ()
 Gets the world id associated with this world. More...
 
MxBool GetUnknown0xd0Empty ()
 Checks if the 'set0xd0' set is empty. More...
 
list< LegoROI * > & GetROIList ()
 Gets the list of all ROIs (Real-time Object Instances) in the world. More...
 
LegoHideAnimPresenterGetHideAnimPresenter ()
 Gets the animation presenter responsible for hide animations in this world. More...
 
void SetWorldId (LegoOmni::World p_worldId)
 Sets the world id for this world instance. More...
 
- Public Member Functions inherited from LegoEntity
 LegoEntity ()
 [AI] Default constructor. Initializes the LegoEntity with default values. [AI] More...
 
 ~LegoEntity () override
 [AI] Destructor. Cleans up resources and ensures ROI and script state are released. [AI] More...
 
MxLong Notify (MxParam &p_param) override
 [AI] Handles event notification for the entity, most notably user clicks, using polymorphic dispatch. More...
 
const char * ClassName () const override
 [AI] Returns the class name string. Used in entity runtime type identification. [AI] More...
 
MxBool IsA (const char *p_name) const override
 [AI] Polymorphic type check for this entity given a string. More...
 
virtual MxResult Create (MxDSAction &p_dsAction)
 [AI] Initializes the entity from a DSAction object, typically from a script or file load. More...
 
virtual void Destroy (MxBool p_fromDestructor)
 [AI] Cleans up the entity, detaching ROI and releasing references. More...
 
virtual void ParseAction (char *p_extra)
 [AI] Parses an action description string (usually from script "extra" data) and sets up this entity's action state. More...
 
virtual void SetROI (LegoROI *p_roi, MxBool p_bool1, MxBool p_bool2)
 [AI] Assigns a 3D ROI (3D object instance) to this entity, controlling how it appears/acts in the world. More...
 
virtual void SetWorldTransform (const Vector3 &p_location, const Vector3 &p_direction, const Vector3 &p_up)
 [AI] Explicitly sets the world transformation (location, direction, up vector) for this entity. More...
 
virtual void ResetWorldTransform (MxBool p_cameraFlag)
 [AI] Resets the transformation for this entity (e.g., used with camera transitions). More...
 
virtual void SetWorldSpeed (MxFloat p_worldSpeed)
 [AI] Sets the current world speed value for this entity (used to control motion/animation rate). More...
 
virtual void ClickSound (MxBool p_und)
 [AI] Plays a click sound, typically in response to user/AI actions, according to entity type. More...
 
virtual void ClickAnimation ()
 [AI] Plays a context-sensitive click animation, driven by current entity type and state. [AI] More...
 
virtual void SwitchVariant ()
 [AI] Switches variants for this entity (e.g., different animation, mesh, or texture variant), based on type. [AI] More...
 
virtual void SwitchSound ()
 [AI] Triggers a context-dependent audio/sound variant switch for this entity. [AI] More...
 
virtual void SwitchMove ()
 [AI] Switches movement/animation variant for this entity, if applicable (e.g., walking/running state). [AI] More...
 
virtual void SwitchColor (LegoROI *p_roi)
 [AI] Switches the color or texture variant for this entity (or target ROI). More...
 
virtual void SwitchMood ()
 [AI] Triggers a mood/state switch for this entity (if supported), often for characters. [AI] More...
 
void FUN_10010c30 ()
 [AI] Updates the camera transformation when this entity is the camera target. Used after movement or position updates. [AI] More...
 
void SetType (MxU8 p_type)
 [AI] Sets the entity's type (actor/plant/building/etc.) [AI] More...
 
void SetLocation (const Vector3 &p_location, const Vector3 &p_direction, const Vector3 &p_up, MxBool p_und)
 [AI] Sets the world-space location, direction, and up, applying normalization and transformation. More...
 
Mx3DPointFloat GetWorldDirection ()
 [AI] Gets the normalized world-space direction vector, optionally updating from ROI. [AI] More...
 
Mx3DPointFloat GetWorldUp ()
 [AI] Gets the normalized world-space up vector, optionally updating from ROI. [AI] More...
 
Mx3DPointFloat GetWorldPosition ()
 [AI] Gets the world-space position vector, optionally updating from ROI. [AI] More...
 
MxBool GetUnknown0x10IsSet (MxU8 p_flag)
 [AI] Checks if a bit flag in m_unk0x10 is set (purpose: state/animation suppression lock). More...
 
MxBool GetFlagsIsSet (MxU8 p_flag)
 [AI] Checks if a flag is set in the primary flags byte (m_flags). More...
 
MxU8 GetFlags ()
 [AI] Returns the value of the flag byte. [AI] More...
 
MxFloat GetWorldSpeed ()
 [AI] Gets the entity's current world speed state. [AI] More...
 
LegoROIGetROI ()
 [AI] Gets the ROI (Realtime Object Instance) associated with this entity. [AI] More...
 
MxU8 GetType ()
 [AI] Gets the type of this entity (one of the enum Type values). [AI] More...
 
MxBool GetCameraFlag ()
 [AI] Returns whether this entity is flagged as camera (affects world/camera synchronization). [AI] More...
 
void SetFlags (MxU8 p_flags)
 [AI] Sets all entity flags at once (replaces previous). More...
 
void SetFlag (MxU8 p_flag)
 [AI] Sets the given flag in the flags byte. More...
 
void ClearFlag (MxU8 p_flag)
 [AI] Clears the given flag in the flags byte. More...
 
void SetUnknown0x10Flag (MxU8 p_flag)
 [AI] Sets the given bit in the unknown (usually internal action suppression) flag byte. More...
 
void ClearUnknown0x10Flag (MxU8 p_flag)
 [AI] Clears the given bit in the unknown flag byte. More...
 
- Public Member Functions inherited from MxEntity
 MxEntity ()
 Default constructor. More...
 
 ~MxEntity () override
 Virtual destructor for MxEntity. More...
 
const char * ClassName () const override
 Returns the class name for type introspection. More...
 
MxBool IsA (const char *p_name) const override
 Checks if the object is of the given class name or a parent type. More...
 
virtual MxResult Create (MxS32 p_entityId, const MxAtomId &p_atomId)
 Initializes the entity from a given entity ID and AtomId. More...
 
MxResult Create (MxDSAction &p_dsAction)
 Initializes the entity from a MxDSAction object. More...
 
MxS32 GetEntityId ()
 Returns the current entity ID. More...
 
MxAtomIdGetAtomId ()
 Returns a reference to the entity AtomId. More...
 
void SetEntityId (MxS32 p_entityId)
 Sets the entity ID to the given value. More...
 
void SetAtomId (const MxAtomId &p_atomId)
 Sets the AtomId to the given value. More...
 
- Public Member Functions inherited from MxCore
 MxCore ()
 [AI] Constructs a new MxCore object and assigns it a unique id. More...
 
virtual ~MxCore ()
 [AI] Virtual destructor. Required for correct polymorphic cleanup in derived classes. More...
 
virtual MxLong Notify (MxParam &p_param)
 [AI] Virtual callback notification mechanism. More...
 
virtual MxResult Tickle ()
 [AI] Called by tickle managers to allow the object to update itself. More...
 
virtual const char * ClassName () const
 [AI] Returns the runtime class name of this object. More...
 
virtual MxBool IsA (const char *p_name) const
 [AI] Checks whether this object's class type or parents match the given name. More...
 
MxU32 GetId ()
 [AI] Gets the unique (per-process) id assigned to this object instance. More...
 

Additional Inherited Members

- Protected Member Functions inherited from LegoEntity
void Init ()
 [AI] Initializes the entity's members to default/neutral values (utility for constructors and resets). [AI] More...
 
void SetWorld ()
 [AI] Registers/attaches this entity to the current world if not already; called on create or location change. [AI] More...
 
- Protected Attributes inherited from LegoWorld
LegoPathControllerList m_pathControllerList
 List of all path controllers currently managing pathing in this world. More...
 
MxPresenterList m_animPresenters
 List of active animation presenters (anims, hide/show, looping, etc.). More...
 
LegoCameraControllerm_cameraController
 Camera controller for world's main view. More...
 
LegoEntityListm_entityList
 List of all main world entities, such as actors and objects. More...
 
LegoCacheSoundListm_cacheSoundList
 List of cached sounds for faster access during this world's lifetime. More...
 
MxBool m_destroyed
 Indicates if the world has been destroyed or is pending destruction. More...
 
MxCoreSet m_set0xa8
 Set of 'auxiliary' objects, including presenters, that aren't core entity or animation, but still must be managed. More...
 
MxPresenterList m_controlPresenters
 List of control presenters (UI, input, cutscene control, etc.). More...
 
MxCoreSet m_set0xd0
 Set of currently paused/disconnected objects when world is disabled. More...
 
list< LegoROI * > m_roiList
 List of all visible LegoROI objects in the world, used for rendering and selection. More...
 
LegoOmni::World m_worldId
 Currently assigned world id, corresponding to an enum in LegoOmni. More...
 
LegoHideAnimPresenterm_hideAnim
 Animation presenter for ROI hide (vanish, fade, etc.) sequences. More...
 
MxS16 m_startupTicks
 Current world startup tick countdown—controls staged world startup logic. More...
 
MxBool m_worldStarted
 Indicates if the world has successfully started and is considered active. More...
 
undefined m_unk0xf7
 Unknown, probably flags or padding. More...
 
- Protected Attributes inherited from LegoEntity
MxU8 m_unk0x10
 [AI] Unknown state/flag, used mainly to guard against repeated actions or manage animation/sound state. [AI] More...
 
MxU8 m_flags
 [AI] Primary entity flags (bitfield); tracks per-entity management status, internal update locks, etc. [AI] More...
 
Mx3DPointFloat m_worldLocation
 [AI] Entity location in world coordinates. [AI] More...
 
Mx3DPointFloat m_worldDirection
 [AI] Entity direction vector in world space (normalized). [AI] More...
 
Mx3DPointFloat m_worldUp
 [AI] Entity up vector in world space (normalized). [AI] More...
 
MxFloat m_worldSpeed
 [AI] World-relative speed (can affect animation/movement logic). [AI] More...
 
LegoROIm_roi
 [AI] Pointer to this entity's currently assigned ROI (3D instance in the world). [AI] More...
 
MxBool m_cameraFlag
 [AI] Set to TRUE if this entity is currently the camera target. [AI] More...
 
MxU8 m_type
 [AI] The entity type (Type enum value). [AI] More...
 
Extra::ActionType m_actionType
 [AI] Action type, parsed from script/extra string (e.g., openram/run/exit); guides Notify() and click logic. [AI] More...
 
char * m_siFile
 [AI] When parsing ACTION command, this is the SI script/filename to execute (owned, heap-allocated). [AI] More...
 
MxS32 m_targetEntityId
 [AI] When parsing ACTION command, this is the target entity ID for the action (or -1 for none). [AI] More...
 
- Protected Attributes inherited from MxEntity
MxS32 m_entityId
 The unique entity ID, typically used for lookup and reference. More...
 
MxAtomId m_atomId
 The AtomId associated with this entity, used for resource and script identification. More...
 

Detailed Description

[AI] World implementation for the LEGO vehicle builder (Racecar, Copter, Dune Car, Jetski), handling UI, input, 3D vehicle assembly, part placement, and all vehicle-specific interactions.

[AI] Inherits from LegoWorld. Maintains state about currently manipulated vehicle/part, responds to input (mouse/key/click), handles animation state transitions, manages presenters for vehicle builder UI and sound, and synchronizes with game/area state.

Definition at line 97 of file legocarbuild.h.

Member Enumeration Documentation

◆ Unknown0xf8

[AI] Special constants for internal state tracking of the build world.

Enumerator
c_unknownminusone 

[AI] Default/uninitialized

c_unknown8 

[AI] Internal marker

Definition at line 115 of file legocarbuild.h.

Constructor & Destructor Documentation

◆ LegoCarBuild()

LegoCarBuild::LegoCarBuild ( )

[AI] Constructs a new LegoCarBuild world and initializes all references/UI.

Definition at line 93 of file legocarbuild.cpp.

◆ ~LegoCarBuild()

LegoCarBuild::~LegoCarBuild ( )
override

[AI] Cleans up presenters, unregisters input/notification handlers, and resets world build state.

Definition at line 135 of file legocarbuild.cpp.

Member Function Documentation

◆ ClassName()

const char * LegoCarBuild::ClassName ( ) const
overridevirtual

[AI] Returns the type string for this object.

Returns
const char* "LegoCarBuild". [AI]

Reimplemented from MxCore.

◆ Create()

MxResult LegoCarBuild::Create ( MxDSAction p_dsAction)
overridevirtual

[AI] Creates world from script action; initializes build and assigns state according to area/car type.

Parameters
p_dsActionData source action with world creation parameters. [AI]
Returns
MxResult Success (creates world + build state) or failure. [AI]

Reimplemented from LegoEntity.

Definition at line 159 of file legocarbuild.cpp.

◆ Enable()

void LegoCarBuild::Enable ( MxBool  p_enable)
overridevirtual

[AI] Enables or disables the world, handling both visual and audio states and input registration.

Parameters
p_enableIf TRUE, enable inputs and reset world state; otherwise, cleans up resources. [AI]

Reimplemented from LegoWorld.

Definition at line 1438 of file legocarbuild.cpp.

◆ Escape()

MxBool LegoCarBuild::Escape ( )
overridevirtual

[AI] Escapes from the build UI (initiates transition to outside world/menu).

Returns
MxBool TRUE if escape logic ran. [AI]

Reimplemented from LegoWorld.

Definition at line 1670 of file legocarbuild.cpp.

◆ FUN_10022f00()

void LegoCarBuild::FUN_10022f00 ( )

[AI] Internal: handles transition when moving a placed part, possibly triggering state change.

Definition at line 287 of file legocarbuild.cpp.

◆ FUN_10022f30()

void LegoCarBuild::FUN_10022f30 ( )

[AI] Internal: logic for finalizing or dropping a part at build location, updates sound and UI.

Definition at line 298 of file legocarbuild.cpp.

◆ FUN_10023130()

void LegoCarBuild::FUN_10023130 ( MxLong  p_x,
MxLong  p_y 
)

[AI] Internal: handles interaction when dragging part along projected axis.

Parameters
p_xX position in pixels. [AI]
p_yY position in pixels. [AI]

Definition at line 359 of file legocarbuild.cpp.

◆ FUN_100236d0()

void LegoCarBuild::FUN_100236d0 ( )

[AI] Internal: launches the finalization of all parts if build is completed; triggers further game progression or cutscene.

Definition at line 475 of file legocarbuild.cpp.

◆ FUN_10024250()

undefined4 LegoCarBuild::FUN_10024250 ( LegoEventNotificationParam p_param)

[AI] Handles keyboard event notifications, most notably the Space key for canceling animations or sounds.

Parameters
p_paramKeyboard notification parameter. [AI]
Returns
undefined4 Result code. [AI]

Definition at line 734 of file legocarbuild.cpp.

◆ FUN_100243a0()

void LegoCarBuild::FUN_100243a0 ( )

[AI] Handles the transition to the next act/location when building is complete.

Definition at line 766 of file legocarbuild.cpp.

◆ FUN_10024480()

undefined4 LegoCarBuild::FUN_10024480 ( MxActionNotificationParam p_param)

[AI] Handles animation end notification action (e.g., volume restoration, state reset, triggers exit logic).

Parameters
p_paramAction notification parameter. [AI]
Returns
undefined4 Status/result code. [AI]

Definition at line 795 of file legocarbuild.cpp.

◆ FUN_100244e0()

undefined4 LegoCarBuild::FUN_100244e0 ( MxLong  p_x,
MxLong  p_y 
)

[AI] Handles mouse click/button down notifications to pick parts or trigger color/decal tools.

Parameters
p_xX position of click. [AI]
p_yY position of click. [AI]
Returns
undefined4 Status/result code. 1 on part touched, 0 otherwise. [AI]

Definition at line 818 of file legocarbuild.cpp.

◆ FUN_100246e0()

undefined4 LegoCarBuild::FUN_100246e0 ( MxLong  p_x,
MxLong  p_y 
)

[AI] Handles mouse button up events; initiates part-finalization or validated placement.

Parameters
p_xX position of click. [AI]
p_yY position of click. [AI]
Returns
undefined4 Status/result code. 1 if part dropped/finalized, 0 otherwise. [AI]

Definition at line 879 of file legocarbuild.cpp.

◆ FUN_10024850()

MxS32 LegoCarBuild::FUN_10024850 ( MxLong  p_x,
MxLong  p_y 
)

[AI] Handles mouse move notifications for drag-to-place part.

Moves the part.

Parameters
p_xX pixel position. [AI]
p_yY pixel position. [AI]
Returns
MxS32 1 if moved, 0 otherwise. [AI]

Definition at line 928 of file legocarbuild.cpp.

◆ FUN_10024890()

undefined4 LegoCarBuild::FUN_10024890 ( MxParam p_param)

[AI] Handles UI input/control presenter notifications.

Parameters
p_paramControl/action notification parameter. [AI]
Returns
undefined4 Always 1. [AI]

Definition at line 948 of file legocarbuild.cpp.

◆ FUN_10024c20()

undefined4 LegoCarBuild::FUN_10024c20 ( LegoEventNotificationParam p_param)

[AI] Handles the core event when the build is completed and creation should be finalized.

Parameters
p_paramEvent notification parameter. [AI]
Returns
undefined4 Status/result code. [AI]

Definition at line 1148 of file legocarbuild.cpp.

◆ FUN_10024ef0()

void LegoCarBuild::FUN_10024ef0 ( )

[AI] Starts the cutscene or music intro for the build with necessary state adjustment.

Definition at line 1248 of file legocarbuild.cpp.

◆ FUN_10024f30()

void LegoCarBuild::FUN_10024f30 ( )

[AI] Internal: Logic for the shelf-up UI animation/response.

Definition at line 1259 of file legocarbuild.cpp.

◆ FUN_10024f50()

void LegoCarBuild::FUN_10024f50 ( )

[AI] Internal: Handles part rotation/y-axis interaction.

Definition at line 1267 of file legocarbuild.cpp.

◆ FUN_10024f70()

void LegoCarBuild::FUN_10024f70 ( MxBool  p_enabled)

[AI] Enables/Disables color/decal presenters depending on selected part and part name.

Parameters
p_enabledWhether to enable (TRUE) or disable (FALSE) applicable presenters. [AI]

Definition at line 1275 of file legocarbuild.cpp.

◆ FUN_100250e0()

void LegoCarBuild::FUN_100250e0 ( MxBool  p_param)

[AI] Enables/Disables only the presenter set related to current part, using name pattern.

Parameters
p_paramDetermines enable/disable. [AI]

Definition at line 1310 of file legocarbuild.cpp.

◆ FUN_10025350()

void LegoCarBuild::FUN_10025350 ( MxS32  p_objectId)

[AI] Handles color/decal actions by object ID, mapping click to appropriate color or updating variables.

Parameters
p_objectIdIdentifier of the clicked object. [AI]

Definition at line 1347 of file legocarbuild.cpp.

◆ FUN_10025450()

void LegoCarBuild::FUN_10025450 ( )

[AI] Updates part transformation matrices and records old/new world/projected positions for drag/drop and manip.

Definition at line 1387 of file legocarbuild.cpp.

◆ FUN_10025720()

void LegoCarBuild::FUN_10025720 ( undefined4  p_param1)

[AI] Initiates the next world/cutscene/animation step, based on internal build progress and car ID.

Parameters
p_param1Internal state/cutscene ID. [AI]

Definition at line 1486 of file legocarbuild.cpp.

◆ FUN_10025d10()

void LegoCarBuild::FUN_10025d10 ( MxS32  p_param)

[AI] Starts/stops an animation action for the specified parameter (e.g., cutscene transition, per-action).

Parameters
p_paramAnimation/cutscene ID. [AI]

Definition at line 1605 of file legocarbuild.cpp.

◆ FUN_10025d70()

MxS32 LegoCarBuild::FUN_10025d70 ( )

[AI] Gets next animation/cutscene ID depending on current build stage value.

Returns
MxS32 Cutscene/animation ID. [AI]

Definition at line 1622 of file legocarbuild.cpp.

◆ FUN_10025db0()

void LegoCarBuild::FUN_10025db0 ( const char *  p_param1,
undefined4  p_param2 
)

[AI] Controls global UI presentations actions (such as blinking or activation), based on progress in animation.

Parameters
p_param1Presenter name string/ID. [AI]
p_param2Animation progress delta. [AI]

Definition at line 1638 of file legocarbuild.cpp.

◆ FUN_10025e40()

void LegoCarBuild::FUN_10025e40 ( )

[AI] Re-applies enabled/disabled flags on presenters, resetting the last-toggled presenter if needed.

Definition at line 1661 of file legocarbuild.cpp.

◆ FUN_10025ee0()

MxS32 LegoCarBuild::FUN_10025ee0 ( undefined4  p_param1)

[AI] Gets the appropriate jukebox/music action ID for the current car type, used when leaving the build.

Parameters
p_param1CarId/vehicle type. [AI]
Returns
MxS32 Jukebox/music script ID. [AI]

Definition at line 1683 of file legocarbuild.cpp.

◆ GetPlacedPartCount()

MxS16 LegoCarBuild::GetPlacedPartCount ( )

[AI] Gets number of parts currently placed in build progress.

Returns
MxS16 Number of placed parts, or 0 if build state invalid. [AI]

Definition at line 222 of file legocarbuild.cpp.

◆ InitPresenters()

void LegoCarBuild::InitPresenters ( )

[AI] Finds and initializes all presenters (UI and sound) used in the car build area.

Definition at line 242 of file legocarbuild.cpp.

◆ IsA()

MxBool LegoCarBuild::IsA ( const char *  p_name) const
overridevirtual

[AI] Checks run-time type compatibility.

Parameters
p_nameType/class name to check. [AI]
Returns
MxBool TRUE if matches, otherwise calls base class. [AI]

Reimplemented from MxCore.

◆ Notify()

MxLong LegoCarBuild::Notify ( MxParam p_param)
overridevirtual

[AI] Handles notifications (input, state, animation, world events) for the build world.

Parameters
p_paramNotification/event parameter. [AI]
Returns
MxLong Result of notification handling. [AI]

Reimplemented from MxCore.

Definition at line 649 of file legocarbuild.cpp.

◆ ReadyWorld()

void LegoCarBuild::ReadyWorld ( )
overridevirtual

[AI] Prepares UI and scripting when world is ready.

Introspects audio, shows start animation if enabled.

Reimplemented from LegoWorld.

Definition at line 750 of file legocarbuild.cpp.

◆ SetPlacedPartCount()

void LegoCarBuild::SetPlacedPartCount ( MxU8  p_placedPartCount)

[AI] Sets the number of placed parts in the build state.

Parameters
p_placedPartCountNew value. [AI]

Definition at line 233 of file legocarbuild.cpp.

◆ SetPresentersEnabled()

void LegoCarBuild::SetPresentersEnabled ( MxBool  p_enabled)

[AI] Controls common set of UI presenters' enabled state at once.

Parameters
p_enabledWhether to enable or disable them. [AI]

Definition at line 1284 of file legocarbuild.cpp.

◆ SetUnknown0x258()

void LegoCarBuild::SetUnknown0x258 ( LegoCarBuildAnimPresenter p_unk0x258)
inline

[AI] Directly sets the animation presenter for this build world.

Parameters
p_unk0x258Animation presenter for part actions. [AI]

Definition at line 417 of file legocarbuild.h.

◆ Tickle()

MxResult LegoCarBuild::Tickle ( )
overridevirtual

[AI] Tickle function (called every frame/tick); processes build logic and part animation.

Returns
MxResult Success or error code. [AI]

Reimplemented from MxCore.

Definition at line 530 of file legocarbuild.cpp.

◆ TogglePresentersEnabled()

void LegoCarBuild::TogglePresentersEnabled ( )

[AI] Toggles enabled/disabled state for all main presenters (color/decal tools).

Definition at line 1297 of file legocarbuild.cpp.

◆ VTable0x5c()

MxBool LegoCarBuild::VTable0x5c ( )
overridevirtual

[AI] Always returns TRUE; signals that this world can be entered.

Used for world transitions.

Returns
MxBool Always TRUE. [AI]

Reimplemented from LegoWorld.

◆ VTable0x6c()

void LegoCarBuild::VTable0x6c ( )
virtual

[AI] Internal logic, used during part drag/drop and animation (possibly for placing or updating a part coordinate).

Definition at line 318 of file legocarbuild.cpp.

◆ VTable0x70()

void LegoCarBuild::VTable0x70 ( )
virtual

[AI] Computes screen-projected coordinates for picking/placing parts and updates internal pixel locations.

Definition at line 329 of file legocarbuild.cpp.

◆ VTable0x74()

void LegoCarBuild::VTable0x74 ( MxFloat  p_param1[2],
MxFloat  p_param2[3] 
)
virtual

[AI] Adjusts transformation for part manipulation based on mouse/drag locations below the "default" part reference.

Parameters
p_param12D pixel coordinates array. [AI]
p_param23D transform delta to be updated. [AI]

Definition at line 416 of file legocarbuild.cpp.

◆ VTable0x78()

void LegoCarBuild::VTable0x78 ( MxFloat  p_param1[2],
MxFloat  p_param2[3] 
)
virtual

[AI] Adjusts transformation for part manipulation when within the vertical bounds of the reference points.

Parameters
p_param12D pixel coordinates array. [AI]
p_param23D transform delta to be updated. [AI]

Definition at line 432 of file legocarbuild.cpp.

◆ VTable0x7c()

void LegoCarBuild::VTable0x7c ( MxFloat  p_param1[2],
MxFloat  p_param2[3] 
)
virtual

[AI] Adjusts transformation for part manipulation above the "default" reference.

Parameters
p_param12D pixel coordinates array. [AI]
p_param23D transform delta to be updated. [AI]

Definition at line 450 of file legocarbuild.cpp.

◆ VTable0x80()

void LegoCarBuild::VTable0x80 ( MxFloat  p_param1[2],
MxFloat  p_param2[2],
MxFloat  p_param3,
MxFloat  p_param4[2] 
)
virtual

[AI] Used for conversions between projected and real pixel/world space.

Applies linear transformation based on part location.

Parameters
p_param1Source array for calculation. [AI]
p_param2Additional mapping array. [AI]
p_param3Parameter for interpolation or location. [AI]
p_param4Out: Destination array for result. [AI]

Definition at line 464 of file legocarbuild.cpp.


The documentation for this class was generated from the following files: