[AI] Represents an entity that can be placed and managed in the LEGO Island world.
MxBool GetUnknown0x10IsSet(MxU8 p_flag)
[AI] Checks if a bit flag in m_unk0x10 is set (purpose: state/animation suppression lock).
~LegoEntity() override
[AI] Destructor. Cleans up resources and ensures ROI and script state are released....
void Init()
[AI] Initializes the entity's members to default/neutral values (utility for constructors and resets)...
void SetFlag(MxU8 p_flag)
[AI] Sets the given flag in the flags byte.
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 wor...
void ClearUnknown0x10Flag(MxU8 p_flag)
[AI] Clears the given bit in the unknown flag byte.
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.
virtual void SwitchSound()
[AI] Triggers a context-dependent audio/sound variant switch for this entity. [AI]
Mx3DPointFloat GetWorldDirection()
[AI] Gets the normalized world-space direction vector, optionally updating from ROI....
virtual void SetWorldSpeed(MxFloat p_worldSpeed)
[AI] Sets the current world speed value for this entity (used to control motion/animation rate).
virtual void ClickSound(MxBool p_und)
[AI] Plays a click sound, typically in response to user/AI actions, according to entity type.
LegoROI * GetROI()
[AI] Gets the ROI (Realtime Object Instance) associated with this entity. [AI]
virtual void Destroy(MxBool p_fromDestructor)
[AI] Cleans up the entity, detaching ROI and releasing references.
MxS32 m_targetEntityId
[AI] When parsing ACTION command, this is the target entity ID for the action (or -1 for none)....
MxBool GetFlagsIsSet(MxU8 p_flag)
[AI] Checks if a flag is set in the primary flags byte (m_flags).
virtual void SwitchColor(LegoROI *p_roi)
[AI] Switches the color or texture variant for this entity (or target ROI).
MxU8 m_type
[AI] The entity type (Type enum value). [AI]
const char * ClassName() const override
[AI] Returns the class name string. Used in entity runtime type identification. [AI]
void SetUnknown0x10Flag(MxU8 p_flag)
[AI] Sets the given bit in the unknown (usually internal action suppression) flag byte.
Mx3DPointFloat m_worldDirection
[AI] Entity direction vector in world space (normalized). [AI]
void FUN_10010c30()
[AI] Updates the camera transformation when this entity is the camera target. Used after movement or ...
MxBool m_cameraFlag
[AI] Set to TRUE if this entity is currently the camera target. [AI]
char * m_siFile
[AI] When parsing ACTION command, this is the SI script/filename to execute (owned,...
MxU8 GetType()
[AI] Gets the type of this entity (one of the enum Type values). [AI]
Mx3DPointFloat m_worldLocation
[AI] Entity location in world coordinates. [AI]
MxU8 GetFlags()
[AI] Returns the value of the flag byte. [AI]
virtual MxResult Create(MxDSAction &p_dsAction)
[AI] Initializes the entity from a DSAction object, typically from a script or file load.
MxFloat m_worldSpeed
[AI] World-relative speed (can affect animation/movement logic). [AI]
void ClearFlag(MxU8 p_flag)
[AI] Clears the given flag in the flags byte.
MxLong Notify(MxParam &p_param) override
[AI] Handles event notification for the entity, most notably user clicks, using polymorphic dispatch.
MxFloat GetWorldSpeed()
[AI] Gets the entity's current world speed state. [AI]
virtual void ResetWorldTransform(MxBool p_cameraFlag)
[AI] Resets the transformation for this entity (e.g., used with camera transitions).
Mx3DPointFloat m_worldUp
[AI] Entity up vector in world space (normalized). [AI]
virtual void SwitchMove()
[AI] Switches movement/animation variant for this entity, if applicable (e.g., walking/running state)...
Extra::ActionType m_actionType
[AI] Action type, parsed from script/extra string (e.g., openram/run/exit); guides Notify() and click...
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.
LegoEntity()
[AI] Default constructor. Initializes the LegoEntity with default values. [AI]
LegoROI * m_roi
[AI] Pointer to this entity's currently assigned ROI (3D instance in the world). [AI]
MxU8 m_flags
[AI] Primary entity flags (bitfield); tracks per-entity management status, internal update locks,...
virtual void SwitchMood()
[AI] Triggers a mood/state switch for this entity (if supported), often for characters....
void SetType(MxU8 p_type)
[AI] Sets the entity's type (actor/plant/building/etc.) [AI]
Mx3DPointFloat GetWorldUp()
[AI] Gets the normalized world-space up vector, optionally updating from ROI. [AI]
virtual void SwitchVariant()
[AI] Switches variants for this entity (e.g., different animation, mesh, or texture variant),...
void SetFlags(MxU8 p_flags)
[AI] Sets all entity flags at once (replaces previous).
virtual void ParseAction(char *p_extra)
[AI] Parses an action description string (usually from script "extra" data) and sets up this entity's...
Type
[AI] Types of LegoEntity (Actor, Plant, Building, Auto ROI, etc.) [AI]
@ e_plant
[AI] Plant objects in the game (e.g., trees or bushes) [AI]
@ e_unk1
[AI_SUGGESTED_NAME: e_unknown1] Reserved or unused, purpose unclear [AI]
@ e_autoROI
[AI] Catchall for ROI-adapted/unknown entities [AI]
@ e_building
[AI] Building entities, usually interactable or decorations [AI]
@ e_actor
[AI] Standard character entity controlled by scripts or user [AI]
@ c_altBit1
[AI] Used to prevent repeat sound/animation actions while one is in progress [AI]
void SetWorld()
[AI] Registers/attaches this entity to the current world if not already; called on create or location...
MxBool IsA(const char *p_name) const override
[AI] Polymorphic type check for this entity given a string.
@ c_managerOwned
[AI] Indicates this entity is managed/owned by an entity manager [AI]
@ c_bit1
[AI] Used internally for ROI/entity ownership tracking [AI]
virtual void ClickAnimation()
[AI] Plays a context-sensitive click animation, driven by current entity type and state....
MxBool GetCameraFlag()
[AI] Returns whether this entity is flagged as camera (affects world/camera synchronization)....
MxU8 m_unk0x10
[AI] Unknown state/flag, used mainly to guard against repeated actions or manage animation/sound stat...
Mx3DPointFloat GetWorldPosition()
[AI] Gets the world-space position vector, optionally updating from ROI. [AI]
[AI] Represents a Real-time Object Instance enriched with LEGO-specific functionality.
[AI] Represents a 3D point with floating-point precision, inheriting from Vector3.
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
MxEntity is a base class for game entities which are uniquely identified by an integer ID and an Atom...
MxBool IsA(const char *p_name) const override
Checks if the object is of the given class name or a parent type.
[AI] MxParam serves as a polymorphic base class for parameter passing in event and notification syste...
[AI] 3D vector class, providing vector and cross-product operations in 3D space.