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

Represents the active 3D world, holding all entity, animation, sound, path, and ROI objects. More...

#include <legoworld.h>

Inheritance diagram for LegoWorld:
Collaboration diagram for LegoWorld:

Public Types

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

 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...
 

Protected Attributes

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...
 

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...
 

Detailed Description

Represents the active 3D world, holding all entity, animation, sound, path, and ROI objects.

[AI]

Derived from LegoEntity, LegoWorld manages the current game world, coordinating path controllers, animations, entity lists, ROIs, and sound cache for a specific "scene". [AI]

It is responsible for adding/removing actors and presenters, handling transitions and events, activating/pausing the world, and managing world startup sequences. [AI]

Definition at line 49 of file legoworld.h.

Member Enumeration Documentation

◆ StartupTicks

Ticks for world startup sequencing.

[AI]

Enumerator
e_start 

Start tick, world is ready to be started. [AI].

e_one 

Countdown tick 1. [AI].

e_two 

Countdown tick 2. [AI].

e_three 

Countdown tick 3. [AI].

e_four 

Countdown tick 4, initial state. [AI].

Definition at line 54 of file legoworld.h.

Constructor & Destructor Documentation

◆ LegoWorld()

LegoWorld::LegoWorld ( )

Constructs a LegoWorld, initializing lists and notifying the notification manager.

[AI]

Definition at line 35 of file legoworld.cpp.

◆ ~LegoWorld()

LegoWorld::~LegoWorld ( )
override

Cleans up the world, destroying all held entities, presenters, and controllers.

[AI]

Definition at line 49 of file legoworld.cpp.

Member Function Documentation

◆ ActorExists()

MxBool LegoWorld::ActorExists ( LegoPathActor p_actor)

Determines if an actor already exists in any controller in this world.

[AI]

Parameters
p_actorThe actor to search for. [AI]
Returns
TRUE if found, FALSE otherwise. [AI]

Definition at line 338 of file legoworld.cpp.

◆ Add()

void LegoWorld::Add ( MxCore p_object)
virtual

Adds an object (entity, presenter, ROI, etc.) to the appropriate world-managed list or set.

[AI]

Parameters
p_objectThe object to add. [AI]

Reimplemented in Isle.

Definition at line 418 of file legoworld.cpp.

◆ AddPath()

void LegoWorld::AddPath ( LegoPathController p_controller)

Adds a path controller to the world and calls its initialization with this.

[AI]

Parameters
p_controllerThe path controller to add. [AI]

Definition at line 377 of file legoworld.cpp.

◆ ClassName()

const char * LegoWorld::ClassName ( ) const
inlineoverridevirtual

Returns the class name for runtime type information and debugging.

[AI]

Returns
The string "LegoWorld". [AI]

Reimplemented from LegoEntity.

Reimplemented in Police, RegistrationBook, and Score.

Definition at line 143 of file legoworld.h.

◆ Create()

MxResult LegoWorld::Create ( MxDSAction p_dsAction)
overridevirtual

Initializes the world using an action, creating entity and sound lists, and camera controller.

[AI]

Parameters
p_dsActionThe action describing world's initialization parameters. [AI]
Returns
SUCCESS on correct initialization, FAILURE otherwise. [AI]

Reimplemented from LegoEntity.

Reimplemented in Police, RegistrationBook, and Score.

Definition at line 58 of file legoworld.cpp.

◆ Destroy()

void LegoWorld::Destroy ( MxBool  p_fromDestructor)
overridevirtual

Destroys the world and its contents, optionally called from the destructor.

[AI]

Parameters
p_fromDestructorIf TRUE, destruction occurs as part of destructor; otherwise, cleans up as needed. [AI]

Reimplemented from LegoEntity.

Definition at line 94 of file legoworld.cpp.

◆ Enable()

void LegoWorld::Enable ( MxBool  p_enable)
virtual

Enables or disables (pauses) the world and its main components.

[AI]

Parameters
p_enableIf TRUE, world is enabled; if FALSE, world is disabled and presenters/controllers are paused. [AI]

Reimplemented in Act3, ElevatorBottom, GasStation, Hospital, Infocenter, InfocenterDoor, Isle, JukeBox, LegoAct2, LegoCarBuild, LegoRace, Police, RegistrationBook, and Score.

Definition at line 684 of file legoworld.cpp.

◆ Escape()

virtual MxBool LegoWorld::Escape ( )
inlinevirtual

Handles user-initiated "escape" or exit action.

Returns FALSE by default. [AI]

Returns
FALSE by default. [AI]

Reimplemented in Act3, CarRace, ElevatorBottom, GasStation, HistoryBook, Hospital, Infocenter, InfocenterDoor, Isle, JetskiRace, JukeBox, LegoAct2, LegoCarBuild, LegoRace, Police, RegistrationBook, and Score.

Definition at line 131 of file legoworld.h.

◆ Find() [1/2]

MxCore * LegoWorld::Find ( const char *  p_class,
const char *  p_name 
)

Finds an object of a given class and name in the world.

[AI]

Parameters
p_classThe class name to search for ("MxEntity", "MxControlPresenter", etc.). [AI]
p_nameThe object name to match. [AI]
Returns
Object pointer if found, otherwise NULL. [AI]

Definition at line 573 of file legoworld.cpp.

◆ Find() [2/2]

MxCore * LegoWorld::Find ( const MxAtomId p_atom,
MxS32  p_entityId 
)

Finds an object in the world by its atom id and entity id.

[AI]

Parameters
p_atomThe atom id to match. [AI]
p_entityIdThe entity id to match. [AI]
Returns
Object pointer if found, otherwise NULL. [AI]

Definition at line 634 of file legoworld.cpp.

◆ FindPathBoundary()

LegoPathBoundary * LegoWorld::FindPathBoundary ( const char *  p_name)

Finds a path boundary in all path controllers by name.

[AI]

Parameters
p_nameThe name of the path boundary to find. [AI]
Returns
The pointer to the found boundary, or NULL. [AI]

Definition at line 385 of file legoworld.cpp.

◆ FUN_1001fda0()

void LegoWorld::FUN_1001fda0 ( LegoAnimPresenter p_presenter)

Forwards a presenter to all path controllers to perform a custom action (possibly hide, etc.).

[AI]

Parameters
p_presenterThe presenter for the custom action. [AI]

Definition at line 354 of file legoworld.cpp.

◆ FUN_1001fe90()

void LegoWorld::FUN_1001fe90 ( LegoAnimPresenter p_presenter)

Forwards a presenter to all path controllers for another custom or state change action.

[AI]

Parameters
p_presenterThe presenter for the custom action. [AI]

Definition at line 366 of file legoworld.cpp.

◆ GetCameraController()

LegoCameraController * LegoWorld::GetCameraController ( )
inline

Returns the current camera controller for the world.

[AI]

Returns
Pointer to the camera controller. [AI]

Definition at line 277 of file legoworld.h.

◆ GetCurrPathInfo()

MxResult LegoWorld::GetCurrPathInfo ( LegoPathBoundary **  p_boundaries,
MxS32 p_numL 
)

Gets information about the currently active path and boundaries.

[AI]

Parameters
p_boundariesArray to hold boundaries (output). [AI]
p_numLNumber of boundaries (output). [AI]
Returns
SUCCESS or FAILURE. [AI]

Definition at line 402 of file legoworld.cpp.

◆ GetEntityList()

LegoEntityList * LegoWorld::GetEntityList ( )
inline

Returns the current list of entities.

[AI]

Returns
Pointer to the entity list. [AI]

Definition at line 283 of file legoworld.h.

◆ GetHideAnimPresenter()

LegoHideAnimPresenter * LegoWorld::GetHideAnimPresenter ( )
inline

Gets the animation presenter responsible for hide animations in this world.

[AI]

Returns
Pointer to the hide animation presenter, or NULL. [AI]

Definition at line 307 of file legoworld.h.

◆ GetROIList()

list< LegoROI * > & LegoWorld::GetROIList ( )
inline

Gets the list of all ROIs (Real-time Object Instances) in the world.

[AI]

Returns
Reference to the ROI list. [AI]

Definition at line 301 of file legoworld.h.

◆ GetUnknown0xd0Empty()

MxBool LegoWorld::GetUnknown0xd0Empty ( )
inline

Checks if the 'set0xd0' set is empty.

[AI]

Returns
TRUE if empty, FALSE otherwise. [AI]

Definition at line 295 of file legoworld.h.

◆ GetWorldId()

LegoOmni::World LegoWorld::GetWorldId ( )
inline

Gets the world id associated with this world.

[AI]

Returns
The world id enum value. [AI]

Definition at line 289 of file legoworld.h.

◆ IsA()

MxBool LegoWorld::IsA ( const char *  p_name) const
inlineoverridevirtual

Runtime type checking; checks class hierarchy.

[AI]

Parameters
p_nameName to check against this or parent classes. [AI]
Returns
TRUE if p_name matches this or any parent class; FALSE otherwise. [AI]

Reimplemented from LegoEntity.

Reimplemented in Police, RegistrationBook, and Score.

Definition at line 153 of file legoworld.h.

◆ Notify()

MxLong LegoWorld::Notify ( MxParam p_param)
overridevirtual

Notification callback responding to registered events such as EndAction and NewPresenter.

[AI]

Parameters
p_paramThe notification parameter, interpreted depending on event. [AI]
Returns
Nonzero if the notification was processed, zero otherwise. [AI]

Reimplemented from LegoEntity.

Reimplemented in Police, RegistrationBook, and Score.

Definition at line 212 of file legoworld.cpp.

◆ PlaceActor() [1/3]

MxResult LegoWorld::PlaceActor ( LegoPathActor p_actor)

Places an actor using only its reference, using controller logic.

[AI]

Parameters
p_actorThe actor to place. [AI]
Returns
SUCCESS on placement, FAILURE otherwise. [AI]

Definition at line 289 of file legoworld.cpp.

◆ PlaceActor() [2/3]

MxResult LegoWorld::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.

[AI]

Parameters
p_actorThe actor to place. [AI]
p_nameName of the path/segment. [AI]
p_srcSource point/index. [AI]
p_srcScaleScaling value at the source. [AI]
p_destDestination point/index. [AI]
p_destScaleScaling value at the destination. [AI]
Returns
SUCCESS on placement, FAILURE otherwise. [AI]

Definition at line 267 of file legoworld.cpp.

◆ PlaceActor() [3/3]

MxResult LegoWorld::PlaceActor ( LegoPathActor p_actor,
LegoAnimPresenter p_presenter,
Vector3 p_position,
Vector3 p_direction 
)

Places an actor using detailed presenter, position and direction.

[AI]

Parameters
p_actorThe actor to place. [AI]
p_presenterPresenter (animation, locomotion, etc.) to associate. [AI]
p_positionTarget position vector. [AI]
p_directionTarget direction vector. [AI]
Returns
SUCCESS on placement, FAILURE otherwise. [AI]

Definition at line 304 of file legoworld.cpp.

◆ PresentersPending()

MxBool LegoWorld::PresentersPending ( )

Checks if there are any presenters pending to fully enter their tickle (animation) state.

[AI]

Returns
TRUE if any presenter is still preparing or starting, FALSE otherwise. [AI]

Definition at line 832 of file legoworld.cpp.

◆ ReadyWorld()

void LegoWorld::ReadyWorld ( )
virtual

Called when the world is ready to be used—typically for custom scene setup after startup.

[AI]

Reimplemented in Act3, CarRace, ElevatorBottom, GasStation, HistoryBook, Hospital, Infocenter, InfocenterDoor, Isle, JetskiRace, JukeBox, LegoAct2, LegoCarBuild, Police, RegistrationBook, and Score.

Definition at line 874 of file legoworld.cpp.

◆ Remove()

void LegoWorld::Remove ( MxCore p_object)

Removes an object from all relevant world-managed lists or sets, and also detaches if needed.

[AI]

Parameters
p_objectThe object to remove. [AI]

Definition at line 508 of file legoworld.cpp.

◆ RemoveActor()

void LegoWorld::RemoveActor ( LegoPathActor p_actor)

Removes an actor from all known path controllers.

[AI]

Parameters
p_actorThe actor to remove. [AI]

Definition at line 325 of file legoworld.cpp.

◆ SetWorldId()

void LegoWorld::SetWorldId ( LegoOmni::World  p_worldId)
inline

Sets the world id for this world instance.

[AI]

Parameters
p_worldIdThe world id to set. [AI]

Definition at line 313 of file legoworld.h.

◆ Tickle()

MxResult LegoWorld::Tickle ( )
overridevirtual

Main world tick/update, especially manages startup countdown.

[AI]

Counts down the world startup ticks, prepares the world for activation and handles initial presenter readiness. [AI]

Returns
TRUE on success. [AI]

Reimplemented from MxCore.

Reimplemented in RegistrationBook.

Definition at line 810 of file legoworld.cpp.

◆ VTable0x54()

LegoCameraController * LegoWorld::VTable0x54 ( )
virtual

Initializes and returns the camera controller for the world; may create it on-demand.

[AI]

Returns
The initialized camera controller, or NULL on failure. [AI]

Definition at line 233 of file legoworld.cpp.

◆ VTable0x5c()

virtual MxBool LegoWorld::VTable0x5c ( )
inlinevirtual

Potential "escape" action for world; returns FALSE by default, may be overridden in child worlds.

[AI]

Returns
FALSE by default. [AI]

Reimplemented in Act3, ElevatorBottom, GasStation, Hospital, Infocenter, InfocenterDoor, Isle, JukeBox, LegoAct2, LegoCarBuild, LegoRace, Police, and Score.

Definition at line 120 of file legoworld.h.

◆ VTable0x60()

virtual void LegoWorld::VTable0x60 ( )
inlinevirtual

Placeholder/extensible virtual—default does nothing.

[AI]

Reimplemented in Act3, Isle, and LegoAct2.

Definition at line 125 of file legoworld.h.

Member Data Documentation

◆ m_animPresenters

MxPresenterList LegoWorld::m_animPresenters
protected

List of active animation presenters (anims, hide/show, looping, etc.).

[AI]

Definition at line 327 of file legoworld.h.

◆ m_cacheSoundList

LegoCacheSoundList* LegoWorld::m_cacheSoundList
protected

List of cached sounds for faster access during this world's lifetime.

[AI]

Definition at line 342 of file legoworld.h.

◆ m_cameraController

LegoCameraController* LegoWorld::m_cameraController
protected

Camera controller for world's main view.

[AI]

Definition at line 332 of file legoworld.h.

◆ m_controlPresenters

MxPresenterList LegoWorld::m_controlPresenters
protected

List of control presenters (UI, input, cutscene control, etc.).

[AI]

Definition at line 357 of file legoworld.h.

◆ m_destroyed

MxBool LegoWorld::m_destroyed
protected

Indicates if the world has been destroyed or is pending destruction.

[AI]

Definition at line 347 of file legoworld.h.

◆ m_entityList

LegoEntityList* LegoWorld::m_entityList
protected

List of all main world entities, such as actors and objects.

[AI]

Definition at line 337 of file legoworld.h.

◆ m_hideAnim

LegoHideAnimPresenter* LegoWorld::m_hideAnim
protected

Animation presenter for ROI hide (vanish, fade, etc.) sequences.

[AI]

Definition at line 378 of file legoworld.h.

◆ m_pathControllerList

LegoPathControllerList LegoWorld::m_pathControllerList
protected

List of all path controllers currently managing pathing in this world.

[AI]

Definition at line 322 of file legoworld.h.

◆ m_roiList

list<LegoROI*> LegoWorld::m_roiList
protected

List of all visible LegoROI objects in the world, used for rendering and selection.

[AI]

Definition at line 368 of file legoworld.h.

◆ m_set0xa8

MxCoreSet LegoWorld::m_set0xa8
protected

Set of 'auxiliary' objects, including presenters, that aren't core entity or animation, but still must be managed.

[AI]

Definition at line 352 of file legoworld.h.

◆ m_set0xd0

MxCoreSet LegoWorld::m_set0xd0
protected

Set of currently paused/disconnected objects when world is disabled.

[AI]

Holds any object that should be re-enabled on world resume, mainly presenters. [AI]

Definition at line 363 of file legoworld.h.

◆ m_startupTicks

MxS16 LegoWorld::m_startupTicks
protected

Current world startup tick countdown—controls staged world startup logic.

[AI]

Definition at line 383 of file legoworld.h.

◆ m_unk0xf7

undefined LegoWorld::m_unk0xf7
protected

Unknown, probably flags or padding.

[AI]

Definition at line 393 of file legoworld.h.

◆ m_worldId

LegoOmni::World LegoWorld::m_worldId
protected

Currently assigned world id, corresponding to an enum in LegoOmni.

[AI]

Definition at line 373 of file legoworld.h.

◆ m_worldStarted

MxBool LegoWorld::m_worldStarted
protected

Indicates if the world has successfully started and is considered active.

[AI]

Definition at line 388 of file legoworld.h.


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