15typedef unsigned char (*
ColorOverride)(
const char*,
char*,
unsigned int);
25typedef unsigned char (*
TextureHandler)(
const char*,
unsigned char*,
unsigned int);
[AI] Represents an axis-aligned bounding box in 3D space, using minimum and maximum points.
[AI] Represents a bounding sphere in 3D space with center and radius.
[AI] Holds per-node animation data for a model's animation tree.
[AI] Root class for all node-based animation blending/structure.
[AI] Represents an entity that can be placed and managed in the LEGO Island world.
[AI] Represents a Real-time Object Instance enriched with LEGO-specific functionality.
LegoResult FUN_100a8da0(LegoTreeNode *p_node, const Matrix4 &p_matrix, LegoTime p_time, LegoROI *p_roi)
[AI] [Unknown function.
LegoU32 FUN_100a9410(Vector3 &p_v1, Vector3 &p_v2, float p_f1, float p_f2, Vector3 &p_v3, LegoBool p_collideBox)
[AI] Tests for collision along or within sphere/box, and computes intersection point as needed.
void SetUnknown0x80(const BoundingBox &p_unk0x80)
[AI] Sets the local bounding box from read data.
LegoResult FUN_100a93b0(const LegoChar *p_name)
[AI] Like SetLodColor, but uses a different implementation or legacy style.
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() override
[AI] Destroys the LegoROI, cleaning up children and name resources.
void SetBoundingSphere(const BoundingSphere &p_sphere)
[AI] Sets the local and world bounding spheres.
static void configureLegoROI(int p_roi)
[AI] [Static] Configures the global ROI loading limit, controlling max LODs at load time.
LegoResult GetTextureInfo(LegoTextureInfo *&p_textureInfo)
[AI] Attempts to retrieve a texture info pointer used by any LOD in this ROI or its children.
LegoResult SetTextureInfo(LegoTextureInfo *p_textureInfo)
[AI] Associates every LOD in this ROI (and sub-ROIs) with a given texture (palette/material informati...
static void SetColorOverride(ColorOverride p_colorOverride)
[AI] [Static] Sets the global color override callback function to allow palette remapping or customiz...
void SetEntity(LegoEntity *p_entity)
[AI] Associates a LegoEntity with this ROI (typically called by parent entity/logic).
LegoROI * FindChildROI(const LegoChar *p_name, LegoROI *p_roi)
[AI] Recursively searches for a child ROI by name, starting at the given ROI.
void ClearMeshOffset()
[AI] Resets mesh offset for all LODs in this ROI.
static LegoResult FUN_100a8cb0(LegoAnimNodeData *p_data, LegoTime p_time, Matrix4 &p_matrix)
[AI] [Static] Sets the transform matrix for a given animation node at a specific time.
LegoResult FUN_100a9330(LegoFloat p_red, LegoFloat p_green, LegoFloat p_blue, LegoFloat p_alpha)
[AI] Alias to SetLodColor; applies color to all LODs and children.
LegoResult SetFrame(LegoAnim *p_anim, LegoTime p_time)
[AI] Sets the current animation frame for this ROI based on a parsed animation structure.
static LegoBool ColorAliasLookup(const LegoChar *p_param, float &p_red, float &p_green, float &p_blue, float &p_alpha)
[AI] [Static] Looks up a color alias in the static alias table and sets p_red/p_green/p_blue/p_alpha ...
void UpdateWorldBoundingVolumes() override
[AI] Updates this ROI's world-space bounding volumes based on its local-to-world transform.
LegoResult SetLodColor(LegoFloat p_red, LegoFloat p_green, LegoFloat p_blue, LegoFloat p_alpha)
[AI] Sets the RGBA color for all LODs and recursively for all children.
static void FUN_100a8fd0(LegoTreeNode *p_node, Matrix4 &p_matrix, LegoTime p_time, LegoROI **p_roiMap)
[AI] [Static] Similar to FUN_100a8e80, but only updates transformation matrices, not visibility or in...
void SetComp(CompoundObject *p_comp)
[AI] Attaches a new CompoundObject pointer (container for child ROIs).
static void FUN_100a81b0(const LegoChar *p_error, const LegoChar *p_name)
[AI] [Static] Prints or logs an error message about missing ROI for animation (no-op in release).
static LegoBool GetPaletteEntries(const LegoChar *p_name, unsigned char *paletteEntries, LegoU32 p_numEntries)
[AI] [Static] Fetches palette entries for a named texture using current texture handler.
float IntrinsicImportance() const override
[AI] Returns the importance rating for LOD/visibility management (fixed value).
LegoResult Read(OrientableROI *p_unk0xd4, Tgl::Renderer *p_renderer, ViewLODListManager *p_viewLODListManager, LegoTextureContainer *p_textureContainer, LegoStorage *p_storage)
[AI] Reads and initializes this ROI from a LEGO project resource stream, populating geometry,...
void SetDisplayBB(int p_displayBB)
[AI] Sets whether to display or hide the bounding box.
const LegoChar * GetName() const
[AI] Gets this ROI's name.
BoundingSphere & GetBoundingSphere()
[AI] Accesses the local bounding sphere object.
LegoEntity * GetEntity()
[AI] Gets the entity associated with this ROI (or NULL).
void SetName(const LegoChar *p_name)
[AI] Sets this ROI's name, replacing the previous (converted to lower-case).
static LegoBool GetRGBAColor(const LegoChar *p_name, float &p_red, float &p_green, float &p_blue, float &p_alpha)
[AI] [Static] Resolves a logical color alias into RGBA floats.
Abstract base class providing an interface for file-like storage with binary and text read/write oper...
Specialized LegoContainer handling LegoTextureInfo objects and their DirectDraw/Direct3D caching.
[AI] Contains DirectDraw and Direct3DRM handles and metadata for a texture used in the LEGO Island re...
[AI] Represents a node within a general, N-ary tree structure.
4x4 Matrix class with virtual interface for manipulation and transformation.
[AI] Represents an ROI (Real-time Object Instance) that can be oriented in world space,...
BoundingBox m_unk0x80
An unknown bounding box; usage unclear, could be related to extended collision or volume testing.
BoundingSphere m_world_bounding_sphere
The object's bounding sphere in world space, recalculated from m_local2world.
CompoundObject * comp
[AI] List of sub-ROIs composing this ROI (compound object), or NULL. [AI]
[AI] Main interface/factory for rendering resources and scene graphs.
[AI] An extension of LegoROI that adds support for keeping and applying a base time reference (used f...
void FUN_100a9b40(Matrix4 &p_matrix, LegoTime p_time)
[AI] Updates animated position/offset by integrating movement since last update (applying time delta)...
[AI] 3D vector class, providing vector and cross-product operations in 3D space.
[AI] Manages the lifecycle, lookup, and sharing of ViewLODList instances for different ROI names.
[AI] Reference-counted list of Level-of-Detail (LOD) objects associated with a single ROI (Realtime O...
[AI] ViewROI objects represent viewable and placeable objects in the scene, each holding their own tr...
unsigned char(* ColorOverride)(const char *, char *, unsigned int)
[AI] Function pointer type for overriding color.
unsigned char(* TextureHandler)(const char *, unsigned char *, unsigned int)
[AI] Function pointer type for custom palette lookup or texture palette fetching.
[AI] Defines basic fixed-width data types and platform-neutral constants for LEGO Island codebase.
unsigned long LegoU32
[AI] Unsigned 32-bit integer type for cross-platform compatibility.
LegoS32 LegoTime
[AI] Time value, typically used for tick counts, durations, or timing; defined as a signed 32-bit int...
char LegoChar
[AI] Alias for char, for use in character/byte data and string handling.
LegoS32 LegoResult
[AI] Function result type (return code): typically SUCCESS (0) or FAILURE (-1).
float LegoFloat
[AI] Floating point type used throughout LEGO Island.
LegoU8 LegoBool
[AI] Boolean value used throughout the codebase.
list< ROI * > CompoundObject
[AI] Describes a single actor or model referenced by an animation.