1#ifndef LEGOBUILDINGMANAGER_H
2#define LEGOBUILDINGMANAGER_H
72 return "LegoBuildingManager";
195 static char* g_customizeAnimFile;
198 static MxS32 g_maxMove[16];
201 static MxU32 g_maxSound;
205 AnimEntry* m_entries[5];
[AI] Manages LEGO buildings in the world, including their state, animation, switching,...
~LegoBuildingManager() override
[AI] Destructor. Cleans up scheduled animation file string and resets manager state.
void FUN_10030800()
[AI] Copies the current m_unk0x11 demo/counter into m_initialUnk0x11 for all buildings (for persisten...
MxBool SwitchSound(LegoEntity *p_entity)
[AI] Cycles the current active sound for a building (if sounds available).
void AdjustHeight(MxS32 p_index)
[AI] Adjusts (recalculates) a building's world Y position based on its current demo/build counter,...
const char * ClassName() const override
[AI] Returns the runtime class name for this manager.
MxResult Read(LegoStorage *p_storage)
[AI] Restores data from serialized building state in the given storage.
void FUN_100307b0(LegoEntity *p_entity, MxS32 p_adjust)
[AI] Adjusts the construction/demolition counter for a building entity, incrementing or decrementing ...
void Reset()
[AI] Removes all building-state links to world entities and cancels/cleans any scheduled animation en...
MxBool SwitchMove(LegoEntity *p_entity)
[AI] Cycles the current move/animation state for a building (if moves available).
void LoadWorldInfo()
[AI] Loads/creates building models for the current world, sets up variants appropriately for current ...
LegoBuildingInfo * GetInfoArray(MxS32 &p_length)
[AI] Returns the full set of LegoBuildingInfo entries, checks/initializes boundary data if needed.
static void SetCustomizeAnimFile(const char *p_value)
[AI] Sets the global filename for a custom "customize animation" SMK/FLC file.
MxBool FUN_10030110(LegoBuildingInfo *p_data)
[AI] Forwards to FUN_10030030 with lookup by pointer; used for pointer-based demolition/motion trigge...
static const char * GetCustomizeAnimFile()
[AI] Gets the current static filename for custom "customize" animations.
LegoBuildingInfo * GetInfo(LegoEntity *p_entity)
[AI] Locates the building info entry for a specific building entity.
void FUN_10030590()
[AI] Resets all buildings' construction/demolition status to "unbuilt" (-1), updates heights/visibili...
LegoBuildingManager()
[AI] Constructor. Initializes state and building info array (see Init()).
void CreateBuilding(MxS32 p_index, LegoWorld *p_world)
[AI] Spawns and configures a building entity and its ROI based on world/array index.
void Init()
[AI] Initializes all manager fields, resets animation tracking, and loads the default building info a...
MxBool SwitchVariant(LegoEntity *p_entity)
[AI] Attempts to switch the building variant for the specified entity (e.g.
MxBool SwitchMood(LegoEntity *p_entity)
[AI] Cycles the current mood state for a building (if moods available, mood in 0.....
MxU32 GetSoundId(LegoEntity *p_entity, MxBool p_state)
[AI] Returns the sound id for a building entity, using either mood or active sound state.
MxBool FUN_10030000(LegoEntity *p_entity)
[AI] Attempts to "progress" demolition/animation of a building entity by calling FUN_10030030 on its ...
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...
static void configureLegoBuildingManager(MxS32 p_buildingManagerConfig)
[AI] Configure static settings for the LegoBuildingManager globally.
MxResult Tickle() override
[AI] Tick updates for scheduled animation: animates buildings scheduled in m_entries,...
MxU32 GetAnimationId(LegoEntity *p_entity)
[AI] Returns the animation id for a building entity, factoring in base animation id and move offset.
MxBool FUN_10030030(MxS32 p_index)
[AI] Internal: progresses the demolition/animation state/counter of the indexed building,...
MxResult FUN_10030630()
[AI] Performs a boundary existence/consistency check for each building, resolving path boundaries and...
MxResult Write(LegoStorage *p_storage)
[AI] Serializes current building state to the given storage.
Sound cache object managing DirectSound buffers and 3D positioning for preloaded sound data.
[AI] Represents an entity that can be placed and managed in the LEGO Island world.
[AI] Represents a path segment or boundary in the navigation network for actors (vehicles,...
[AI] Represents a Real-time Object Instance enriched with LEGO-specific functionality.
Abstract base class providing an interface for file-like storage with binary and text read/write oper...
Represents the active 3D world, holding all entity, animation, sound, path, and ROI objects.
[AI] Base virtual class for all Mindscape engine (Mx) objects.
[AI] Defines basic fixed-width data types and platform-neutral constants for LEGO Island codebase.
[AI] Describes the state, configuration, and world placement of a single LEGO building entity,...
MxU32 m_move
[AI] Index or ID of current animation state [AI]
const char * m_variant
[AI] Name of the building's current variant (model name/ID) [AI]
float m_y
[AI] World Y coordinate for the building's ground placement [AI]
LegoEntity * m_entity
[AI] Associated entity in the world for this building [AI]
@ c_hasMoves
[AI] This building supports animation cycling [AI]
@ c_hasVariants
[AI] This building has multiple variant models (for switching appearance) [AI]
@ c_hasMoods
[AI] This building supports mood changes [AI]
@ c_hasSounds
[AI] This building supports multiple sounds [AI]
MxU32 m_sound
[AI] Index or ID of current sound selection [AI]
MxU8 m_mood
[AI] Current mood index (0-3) [AI]
const char * m_boundaryName
[AI] Name label of the boundary zone for this building (used to find LegoPathBoundary) [AI]
MxS8 m_initialUnk0x11
[AI] Initial value for m_unk0x11, used for state resets or persistence [AI]
float m_x
[AI] World X coordinate for the building's ground placement [AI]
float m_z
[AI] World Z coordinate for the building's ground placement [AI]
float m_unk0x14
[AI] World height or vertical offset for this building [AI]
LegoPathBoundary * m_boundary
[AI] Pointer to the world boundary (collision/trigger volume) [AI]
MxU8 m_flags
[AI] Bitfield of building properties (see enum above) [AI]
MxS8 m_unk0x11
[AI] Counter or state value for construction/demolition progress [AI]
[AI] Tracks and schedules a single animation entry for a building with sound and timer information,...
LegoEntity * m_entity
[AI] The building entity being animated [AI]
float m_unk0x0c
[AI] Internal Y offset for vertical bouncy animation (demolition effect) [AI]
MxBool m_muted
[AI] TRUE if sound should be muted for this animation [AI]
MxLong m_time
[AI] Target future time when the animation should complete [AI]
LegoROI * m_roi
[AI] ROI used for transformations and updates [AI]