29 {{-47.92, 7.0699968, -31.58}, {-0.999664, 0.0, -0.025916},
"edg01_27",
FALSE},
30 {{-70.393349, 8.07, 3.151935}, {-0.90653503, 0.0, 0.422131},
"int06",
FALSE},
31 {{-47.74, 4.079995, -52.3}, {-0.98293, 0.0, -0.18398},
"edg01_08",
FALSE},
32 {{-26.273487, 0.069, 12.170015}, {0.987199, 0.0, -0.159491},
"INT14",
FALSE},
33 {{26.16499, 0.069, 5.61}, {0.027719, 0.0, 0.999616},
"INT22",
FALSE},
34 {{66.383446, 4.07, 32.387417}, {0.979487, 0.0, -0.201506},
"edg02_27",
FALSE},
35 {{71.843285, 0.069, -49.524852}, {0.99031502, 0.0, 0.13884},
"edg02_39",
FALSE},
36 {{26.470566, 0.069, -44.670845}, {0.004602, 0.0, -0.99998897},
"int26",
FALSE},
37 {{-6.323625, 0.069, -47.96045}, {-0.982068, 0.0, 0.188529},
"edg02_53",
FALSE},
38 {{-36.689, -0.978409, 31.449}, {0.083792, -0.94303, -0.66398698},
"edg00_157",
FALSE},
39 {{-44.6, 0.1, 45.3}, {0.95, 0.0, -0.3},
"edg00_154",
FALSE},
64MxS32 g_unk0x100f0f50[] = {0, 7, 16, 18, 20, 21, 34, 49, 58, 59, 63, 65, 69, 74, -1};
76MxS32 g_unk0x100f0fb8[] = {25, 26, 28, 29, 38, 39, 42, 50, 51, 56, -1};
130 for (
MxS32 i = 0; i < 10; i++) {
148 if (
m_animMaps[i]->GetUnknown0x00() == -1.0f) {
171 if (m_unk0x1f ==
FALSE) {
191 matrix[3][1] -= 3.0f;
196 brickstrMatrix[3][1] -= 3.0f;
221 if (m_unk0x44 != 0.0f && m_unk0x44 < p_time) {
226 if (m_unk0x20 > 600.0f) {
232 m_unk0x20 += local48float;
235 matrix[3][1] += 3.0f;
241 brickstrMatrix[3][1] += 3.0f;
249 if (m_unk0x1e == 2) {
252 m_unk0x30 = m_unk0x2c - 1300.0f;
256 else if (m_unk0x1e == 1) {
265 else if (m_unk0x1e == 0) {
269 m_unk0x30 = m_unk0x2c - 1300.0f;
276 else if (m_unk0x1e == 5) {
283 else if (m_unk0x1e == 4) {
295 if (m_unk0x1e == 5 || m_unk0x1e == 4) {
299 if (m_unk0x1e == 3) {
300 if (p_time - m_unk0x24 > 600.0f) {
321 MxFloat dotproduct = local18.
Dot(local30, local18);
323 if (dotproduct >= 0.0) {
329 if (distance1 < 75.0f) {
346 if (distance3 > distance2) {
351 if (p_time - m_unk0x24 > 3000.0f) {
383 m_unk0x44 = p_param2;
457 MxU16 randomVal = rand() / (RAND_MAX / 2) + 1;
459 if (m_unk0x48 == 8 && m_unk0x1d != 8) {
465 if (randomVal == 1) {
473 if (randomVal == 1) {
481 if (randomVal == 1) {
489 if (randomVal == 1) {
497 if (randomVal == 1) {
505 if (randomVal == 1) {
513 if (randomVal == 1) {
521 if (randomVal == 1) {
529 if (randomVal == 1) {
542 if (newLocation == 7) {
549 assert(newLocation != firstChoice);
553 m_unk0x1d = newLocation;
576 MxTrace(
"nothing left to destroy at location %d\n", m_unk0x1d);
579 if (m_unk0x1d == 8) {
599 if (m_unk0x2c < p_param) {
603 m_unk0x30 = m_unk0x2c - 1300.0f;
613 matrix[3][1] += 1.0f;
722 if (buildingInfo[12].m_unk0x11) {
726 else if (buildingInfo[14].m_unk0x11) {
740 if (buildingInfo[13].m_unk0x11) {
754 if (buildingInfo[9].m_unk0x11) {
758 else if (buildingInfo[11].m_unk0x11) {
772 if (buildingInfo[7].m_unk0x11) {
776 else if (buildingInfo[8].m_unk0x11) {
780 else if (buildingInfo[3].m_unk0x11) {
794 if (buildingInfo[5].m_unk0x11) {
798 else if (buildingInfo[10].m_unk0x11) {
812 if (buildingInfo[4].m_unk0x11) {
826 if (buildingInfo[2].m_unk0x11) {
840 if (buildingInfo[6].m_unk0x11) {
865 if (buildingInfo[15].m_unk0x11) {
undefined4 g_nextInterruptWavIndex
undefined4 g_nextHeadWavIndex
Act2Actor::Location g_brickstrLocations[]
undefined4 g_nextBehindWavIndex
[AI] Act2 mission-specific actor class, with custom state and animation handling for Act 2 of the sto...
void FUN_10018980()
[AI] Searches animation maps for a "shoot" animation, and prepares the mission audio effect.
void FUN_10019250(MxFloat p_speed, MxFloat p_param2)
[AI] Sets current speed and schedules a timed speed change for mission event purposes.
void FUN_10019520()
[AI] Triggers major mission state transition: switches to "escape" mode and moves to special location...
MxResult HitActor(LegoPathActor *, MxBool) override
[AI] Handles being "hit" by another actor—used to trigger mission state transitions,...
Act2Actor()
[AI] Constructs an Act2Actor and initializes all mission-related state.
MxU32 FUN_10019700(MxFloat p_param)
[AI] Handles main shoot animation event and plant/building destruction, manages associated SFX and mi...
void FUN_100192a0(undefined4 p_location)
[AI] Relocates actor to a selected location by generating a path container for new destination.
void SetWorldSpeed(MxFloat p_worldSpeed) override
[AI] Sets the "world speed" (movement, animation, or activity speed) for the actor and resets speed t...
void FUN_10019560()
[AI] Triggers mission state transition: switches to "destroyed" mode and moves to special location 9.
MxS32 VTable0xa0() override
[AI] Selects and moves the actor to a new random, valid mission location.
MxResult VTable0x9c() override
[AI] Handles per-frame mission resolution, cleanup, or ending logic for the Act2Actor.
void FUN_100199f0(MxS8 p_param)
[AI] Plays a specific voice-over cue depending on context and mission state.
LegoEntity * FUN_10019b90(MxBool *p_param)
[AI] Searches for the next building or plant entity to destroy for mission progression at current loc...
void SetROI(LegoROI *p_roi, MxBool p_bool1, MxBool p_bool2) override
[AI] Sets the ROI (rendered object instance) for this actor and disables its visibility immediately.
void Animate(float p_time) override
[AI] Orchestrates all Act2-specific animation logic and state switching each tick.
Lego3DView * GetLego3DView()
[AI] Returns the encapsulated Lego3DView instance.
ViewManager * GetViewManager()
[AI] Returns the ViewManager responsible for managing scene objects and transformations.
Implements the world and game logic for Act 2.
void SetROI(LegoROI *p_roi, MxBool p_bool1, MxBool p_bool2) override
[AI] Sets the Region of Interest (ROI, i.e.
void SetWorldSpeed(MxFloat p_worldSpeed) override
[AI] Sets the current world speed and chooses which animation (from the animation map list) should be...
vector< LegoAnimActorStruct * > m_animMaps
[AI] List of animation structures, each representing a valid animation for different speed/phase rang...
void Animate(float p_time) override
[AI] Performs per-frame update; applies the appropriate animation to mesh ROIs based on speed and sta...
LegoBuildingInfo * GetInfoArray(MxS32 &p_length)
[AI] Returns the full set of LegoBuildingInfo entries, checks/initializes boundary data if needed.
void ScheduleAnimation(LegoEntity *p_entity, MxLong p_length, MxBool p_haveSound, MxBool p_unk0x28)
[AI] Schedules an animation bounce/effect for a given building entity (updates AnimEntry tracking and...
LegoCacheSound * FindSoundByKey(const char *p_key)
[AI] Attempts to find and return a cached sound by its key (case-insensitive).
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 SetDistance(MxS32 p_min, MxS32 p_max)
Sets minimum and maximum audible distances for 3D sound attenuation.
[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]
MxBool m_cameraFlag
[AI] Set to TRUE if this entity is currently the camera target. [AI]
MxFloat m_worldSpeed
[AI] World-relative speed (can affect animation/movement logic). [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,...
LegoPathBoundary * m_boundary
[AI] Current boundary the actor is navigating on. [AI]
LegoPathController * m_pathController
[AI] Path controller/manages permitted boundaries for transitions. [AI]
virtual MxResult VTable0x9c()
[AI] Handles exit transition and next-edge search logic; also used for collision reaction and fallbac...
LegoPathEdgeContainer * m_grec
[AI] Edge/boundary helper for tracking transitions and stateful animation. [AI]
MxFloat m_lastTime
[AI] Time of last update (used for delta calculations). [AI]
[AI] Represents a path segment or boundary in the navigation network for actors (vehicles,...
LegoPathBoundary * GetPathBoundary(const char *p_name)
[AI] Searches for a path boundary by name among owned boundaries.
MxResult FUN_10048310(LegoPathEdgeContainer *p_grec, const Vector3 &p_oldPosition, const Vector3 &p_oldDirection, LegoPathBoundary *p_oldBoundary, const Vector3 &p_newPosition, const Vector3 &p_newDirection, LegoPathBoundary *p_newBoundary, LegoU8 p_mask, MxFloat *p_param9)
[AI] Complex function performing path transition resolution; computes possible edge transition sequen...
void ScheduleAnimation(LegoEntity *p_entity, MxLong p_length)
[AI] Schedules an animation for the given plant, adding an entry to the internal tickle array.
LegoPlantInfo * GetInfoArray(MxS32 &p_length)
[AI] Returns pointer to plant info array and populates its size.
[AI] Represents a Real-time Object Instance enriched with LEGO-specific functionality.
static void FUN_100a8e80(LegoTreeNode *p_node, Matrix4 &p_matrix, LegoTime p_time, LegoROI **p_roiMap)
[AI] [Static] Recursively evaluates animation nodes, updating the transformation matrices and visibil...
LegoROI * FindChildROI(const LegoChar *p_name, LegoROI *p_roi)
[AI] Recursively searches for a child ROI by name, starting at the given ROI.
LegoCacheSoundManager * GetCacheSoundManager()
[AI] Returns the cache sound manager used to cache and reuse sound effects.
[AI] Represents a node within a general, N-ary tree structure.
LegoU32 GetNumChildren()
[AI] Returns the number of direct children of this node. [AI]
LegoTreeNode * GetChild(LegoU32 p_i)
[AI] Gets the child node at the specified index (no bounds checking).
LegoTreeNode * GetRoot()
[AI] Returns a pointer to the root node of the tree. [AI]
Lego3DManager * Get3DManager()
[AI] Returns the Lego3DManager for this manager, which owns all 3D scene representations and view con...
void RemoveActor(LegoPathActor *p_actor)
Removes an actor from all known path controllers.
[AI] Represents a 3D point with floating-point precision, inheriting from Vector3.
[AI] Represents a 4x4 transformation matrix, specialized for the LEGO Island engine and derived from ...
const float * GetWorldPosition() const
Returns a pointer to the world position from the transformation matrix (translation row).
const float * GetWorldDirection() const
Returns a pointer to the world direction vector (forward axis) from the transformation matrix.
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.
void UpdateTransformationRelativeToParent(const Matrix4 &p_transform)
Calculates and updates the world transform relative to this object's parent, then calls UpdateWorldDa...
const BoundingBox & GetWorldBoundingBox() const override
Returns the object's bounding box in world coordinates.
void SetVisibility(unsigned char p_visible)
[AI] Sets the visibility flag to the provided value.
virtual float Dot(const float *p_a, const float *p_b) const
[AI] Compute the dot product of the two float arrays interpreted as vectors of 2 elements.
virtual int Unitize()
[AI] Scales the vector so its norm is 1 (unit vector).
[AI] 3D vector class, providing vector and cross-product operations in 3D space.
virtual void EqualsCross(const Vector3 &p_a, const Vector3 &p_b)
[AI] Sets this vector to be the cross product of p_a and p_b.
[AI] Manages all ViewROI objects that are rendered in a given scene, handles frustum culling,...
unsigned int IsBoundingBoxInFrustum(const BoundingBox &p_bounding_box)
[AI] Determines if a bounding box is (partially) inside the camera's view frustum using frustum-plane...
#define DECOMP_SIZE_ASSERT(T, S)
#define NULL
[AI] Null pointer value (C/C++ semantics).
#define FAILURE
[AI] Used to indicate a failed operation in result codes.
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.
LegoVideoManager * VideoManager()
[AI] Accessor for the game's LegoVideoManager subsystem. Used for managing 3D/video hardware....
LegoBuildingManager * BuildingManager()
[AI] Accessor for the building manager, handles constructible buildings and structures....
LegoSoundManager * SoundManager()
[AI] Accessor for the game's LegoSoundManager subsystem from the global LegoOmni instance....
LegoPlantManager * PlantManager()
[AI] Accessor for the plant manager, handling in-game foliage and plants. [AI]
LegoWorld * CurrentWorld()
[AI] Accessor for the currently active LegoWorld instance. [AI]
LegoROI * FindROI(const char *p_name)
[AI] Looks up a LegoROI (Real-time Object Instance) by name in the current world or global registry.
#define MxTrace(args)
[AI] Macro for trace logging (non-variadic version, MSVC compatibility), expands to nothing.
MxFloat m_position[3]
[AI] 3D world position for the location (x, y, z). [AI]
MxFloat m_direction[3]
[AI] Forward direction vector for the location. [AI]
MxBool m_unk0x1c
[AI] Used to track whether a location has been previously used/marked. [AI]
float GetDuration()
[AI] Gets the length, in seconds, of the animation (delegates to anim tree).
LegoAnim * GetAnimTreePtr()
[AI] Returns the root animation tree node for this mapping.
LegoROI ** GetROIMap()
[AI] Returns the mapping of tree nodes to LegoROI pointers (array of pointers, one per mesh/node).
[AI] Describes the state, configuration, and world placement of a single LEGO building entity,...
LegoEntity * m_entity
[AI] Associated entity in the world for this building [AI]
[AI] Container for path boundary edges, also stores position, direction, and flags.
MxU32 GetBit1()
[AI] Query if the c_bit1 flag is set.
[AI] Struct representing a single plant's static configuration on LEGO Island, including placement,...
LegoEntity * m_entity
[AI] Pointer to the associated entity instance (initialized later at runtime) [AI]
@ c_bit1
[AI] Bit flag 1 for face B connection/properties