24 {
"xchbase1",
"xchblad1",
"xchseat1",
"xchtail1",
"xhback1",
"xhljet1",
"xhmidl1",
"xhmotr1",
"xhsidl1",
"xhsidr1"};
27MxLong Act2Brick::g_lastHitActorTime = 0;
33 m_whistleSound =
NULL;
52 sprintf(name,
"chbrick%d", p_index);
98 m_unk0x17c = p_param2[3];
99 m_unk0x168 = p_param2[3];
100 m_unk0x168 -= p_param1[3];
120 MxLong diff = time - g_lastHitActorTime;
126 g_lastHitActorTime = time;
141 if (m_unk0x190 >= 8) {
142 local2world.
SetTranslation(m_unk0x17c[0], m_unk0x17c[1], m_unk0x17c[2]);
147 VPV3(local2world[3], local2world[3], m_unk0x168);
164 if (m_whistleSound !=
NULL) {
181 if (m_whistleSound ==
NULL) {
190 if (m_whistleSound !=
NULL) {
192 m_whistleSound =
NULL;
199 if (m_whistleSound !=
NULL) {
[AI] Represents a special 'brick' object in the LEGO Island "Act 2" sequence, derived from LegoPathAc...
MxResult Create(MxS32 p_index)
[AI] Instantiates and initializes the brick actor in the world with a specified index/type,...
~Act2Brick() override
[AI] Destructor. Unregisters from the tickle manager and clears up resources.
MxResult HitActor(LegoPathActor *p_actor, MxBool) override
[AI] Called when another actor (typically Pepper) intersects or "hits" this brick.
void FUN_1007a670(MxMatrix &p_param1, MxMatrix &p_param2, LegoPathBoundary *p_boundary)
[AI] Starts the brick motion and animation parameters, registers the object for tickling and places t...
MxResult Tickle() override
[AI] Called periodically when registered with the TickleManager to animate the movement and state cha...
void PlayWhistleSound()
[AI] Begins playback of the looping whistle sound associated with this brick, if not already playing.
void StopWhistleSound()
[AI] Stops the playback of the whistle sound if it is currently playing.
void Mute(MxBool p_muted)
[AI] Mutes or unmutes the whistle sound according to the argument given.
void Remove()
[AI] Removes this brick from the world, releases associated resources, and notifies the character man...
Act2Brick()
[AI] Constructs an Act2Brick. Initializes internal state, including whistle sound and tracking state ...
MxLong Notify(MxParam &p_param) override
[AI] Handles notifications.
[AI] Represents a bounding sphere in 3D space with center and radius.
const float & Radius() const
[AI] Const accessor for the sphere radius.
const Vector3 & Center() const
[AI] Const accessor for the center of the sphere.
LegoCacheSound * Play(const char *p_key, const char *p_name, MxBool p_looping)
[AI] Plays a sound identified by key, with the given playback name and looping flag.
void Stop(LegoCacheSound *&p_sound)
[AI] Stops playback of the specified sound object.
void MuteSilence(MxBool p_muted)
Mutes/unmutes by scaling volume to minimum (muted) or restoring original volume.
LegoROI * CreateAutoROI(const char *p_name, const char *p_lodName, MxBool p_createEntity)
[AI] Creates an "auto" ROI object with the given name, LOD name, and optional entity creation.
void ReleaseActor(const char *p_name)
[AI] Releases a character/ROI by name, decrementing its reference count and deleting if zero.
LegoROI * GetROI()
[AI] Gets the ROI (Realtime Object Instance) associated with this entity. [AI]
LegoROI * m_roi
[AI] Pointer to this entity's currently assigned ROI (3D instance in the world). [AI]
[AI] An actor that moves along a predefined path, supporting boundary transitions,...
@ c_disabled
[AI] Marks as disabled or inactive for path follow logic. [AI]
void SetActorState(MxU32 p_actorState)
[AI] Sets the navigation/path state of the actor.
[AI] Represents a path segment or boundary in the navigation network for actors (vehicles,...
MxResult AddActor(LegoPathActor *p_actor)
[AI] Adds the given actor to this path boundary and sets its boundary pointer.
void SetBoundingSphere(const BoundingSphere &p_sphere)
[AI] Sets the local and world bounding spheres.
void SetEntity(LegoEntity *p_entity)
[AI] Associates a LegoEntity with this ROI (typically called by parent entity/logic).
const LegoChar * GetName() const
[AI] Gets this ROI's name.
BoundingSphere & GetBoundingSphere()
[AI] Accesses the local bounding sphere object.
LegoCacheSoundManager * GetCacheSoundManager()
[AI] Returns the cache sound manager used to cache and reuse sound effects.
void Remove(MxCore *p_object)
Removes an object from all relevant world-managed lists or sets, and also detaches if needed.
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.
virtual void Add(MxCore *p_object)
Adds an object (entity, presenter, ROI, etc.) to the appropriate world-managed list or set.
virtual void SetTranslation(const float &p_x, const float &p_y, const float &p_z)
Overwrites the translation part of the matrix (last column).
[AI] Represents a 4x4 transformation matrix, specialized for the LEGO Island engine and derived from ...
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 UnregisterClient(MxCore *p_client)
[AI] Unregisters (marks for destruction) a previously registered client.
virtual void RegisterClient(MxCore *p_client, MxTime p_interval)
[AI] Registers an MxCore object to receive periodic tickles.
MxLong GetTime()
Returns the current timer value in ms, depending on running state.
const Matrix4 & GetLocal2World() const
Accessor for the current local-to-world transformation matrix.
virtual void VTable0x14()
[AI] Calls VTable0x1c().
void FUN_100a58f0(const Matrix4 &p_transform)
Assigns the given matrix as the local-to-world transformation and enables some internal flags.
unsigned char GetVisibility()
[AI] Returns the visibility flag; true if visible, false if hidden.
void SetVisibility(unsigned char p_visible)
[AI] Sets the visibility flag to the provided value.
#define DECOMP_SIZE_ASSERT(T, S)
#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 FAILURE
[AI] Used to indicate a failed operation in result codes.
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.
LegoCharacterManager * CharacterManager()
[AI] Accessor for the character manager, which manages in-game characters/NPCs. [AI]
LegoSoundManager * SoundManager()
[AI] Accessor for the game's LegoSoundManager subsystem from the global LegoOmni instance....
LegoWorld * CurrentWorld()
[AI] Accessor for the currently active LegoWorld instance. [AI]
MxTimer * Timer()
[AI] Returns the global simulation timer.
MxNotificationManager * NotificationManager()
[AI] Returns the notification manager for system-wide state/update notifications.
MxTickleManager * TickleManager()
[AI] Provides access to the global tickle manager.
@ c_notificationType22
[AI] Unspecified notification type [AI]
@ c_notificationClick
[AI] Mouse click event [AI]