40 m_trackLedBitmap =
NULL;
138 switch (m_currentActorId) {
319 if (m_unk0x104 == 3) {
361 if (m_unk0x104 == 1 || m_unk0x104 == 2) {
365 if (!strnicmp(roi->
GetName(),
"capdb", 5) || !strnicmp(roi->
GetName(),
"*capdb", 6)) {
461 if (time - m_unk0x10c > 15000) {
463 if (m_unk0x104 == 1) {
466 else if (m_unk0x104 != 0) {
477 if (time - m_trackLedTimer > 300) {
478 m_trackLedTimer = time;
[AI] Holds state and transient gameplay data for the first act on Lego Island.
Maintains persistent, serializable state information for the gas station/garage area,...
MxS16 m_nickAction
Current animation/action index for Nick actor [AI].
GarageScript::Script m_actions[3]
List of up to 3 currently running GarageScript actions [AI].
MxS16 m_pepperAction
Current animation/action index for Pepper actor (cycles variants) [AI].
void StopAction(GarageScript::Script p_objectId)
Removes the specified GarageScript action from the active set as no longer running [AI].
undefined4 m_unk0x14
[AI_SUGGESTED_NAME: m_actionState] Tracks the phase in scripted action sequence for state machine con...
MxS16 m_papaAction
Current animation/action index for Papa actor [AI].
MxResult Serialize(LegoStorage *p_storage) override
Serializes/deserializes the gas station state from the given storage [AI].
GasStationState()
[AI] Creates and resets state for gas station, initializing all actor counters and action lists.
void StopActions()
[AI] Stops all running actions tracked in this state and raises background audio volume.
void PlayAction(GarageScript::Script p_objectId)
Records a running GarageScript action as currently active in this state [AI].
MxS16 m_lauraAction
Current animation/action index for Laura actor [AI].
MxS16 m_mamaAction
Current animation/action index for Mama actor [AI].
The in-game gas station (garage) area/world logic controller, handling all interactive gameplay,...
MxLong Notify(MxParam &p_param) override
[AI] Responds to engine/system notifications (actions, keypress, etc).
virtual MxLong HandleControl(LegoControlManagerNotificationParam &p_param)
[AI] Handles direct control manager notifications (UI interaction, navigation, etc).
MxBool Escape() override
[AI] Cleans up and transitions out of the gas station on user escape [AI].
MxResult Create(MxDSAction &p_dsAction) override
[AI] Creates and activates the gas station world, setting up input/control managers and persistent st...
~GasStation() override
[AI] Destroys gas station logic and unregisters this world from input, control and tick managers,...
void ReadyWorld() override
[AI] Initializes world assets, actors, and interactive scripts according to saved state/current actor...
void Enable(MxBool p_enable) override
[AI] Enables or disables this world (switches input/camera registration, etc) [AI].
MxResult Tickle() override
[AI] Called every frame to update the garage world state for timers and LED animation.
@ c_pepper
Pepper Roni ([AI])
virtual MxU8 GetActorId()
[AI] Gets this actor's numeric ID, corresponding to a known enumeration/actor.
[AI] Notification parameter for the LegoControlManager, used to propagate information about control e...
MxS32 m_clickedObjectId
[AI] Object ID of the clicked control/presenter (or -1 if not set). [AI]
MxS16 m_unk0x28
[AI] Undetermined; settable via SetUnknown0x28. [AI]
void Register(MxCore *p_listener)
[AI] Adds a listener to be notified of control events.
void Unregister(MxCore *p_listener)
[AI] Removes a listener so it no longer receives control events.
Notification parameter class for LEGO event notifications such as mouse events and modifier keys.
MxS32 GetY() const
Returns Y (vertical) coordinate for the event, usually screen-relative in pixels.
MxS32 GetX() const
Returns X (horizontal) coordinate for the event, usually screen-relative in pixels.
void SwitchArea(Area p_area)
Switches the whole game state into a new area/world; manages transitions/scene loads.
Area m_currentArea
Area/world the player is presently in. [AI].
LegoState * CreateState(const char *p_stateName)
Creates an instance of given state, registers it, and returns pointer.
void StopArea(Area p_area)
Calls cleanup logic for the specified area (removes actors, VMs, closes handles, etc....
LegoState * GetState(const char *p_stateName)
Find an existing state (LegoState-derived) object by its registered script/class name.
@ e_infomain
Information Center, main screen. [AI].
@ e_previousArea
Alias: go to previous area. [AI].
@ e_dunecarbuild
Vehicle construction: dune buggy. [AI].
@ e_garage
Garage (build vehicle) interior. [AI].
@ e_garadoor
Garage door or doorway. [AI].
@ e_unk28
Used for certain spawn locations. [AI].
@ e_undefined
Undefined or unset area. [AI].
@ c_clearScreen
[AI] When set, clears the display surface. [AI]
@ c_disable3d
[AI] When set, disables 3D rendering. [AI]
@ c_disableInput
[AI] When set, disables input processing. [AI]
[AI] Represents a Real-time Object Instance enriched with LEGO-specific functionality.
const LegoChar * GetName() const
[AI] Gets this ROI's name.
virtual MxResult Serialize(LegoStorage *p_storage)
[AI] Serialize state to a storage (for save/load).
Abstract base class providing an interface for file-like storage with binary and text read/write oper...
virtual LegoBool IsWriteMode()
Returns TRUE if object was opened in write mode.
LegoStorage * WriteS16(LegoS16 p_data)
Writes a 16-bit signed value to storage.
LegoStorage * ReadS16(LegoS16 &p_data)
Reads a 16-bit signed value from storage.
virtual LegoBool IsReadMode()
Returns TRUE if object was opened in read mode.
virtual void Enable(MxBool p_enable)
Enables or disables (pauses) the world and its main components.
MxResult Tickle() override
Main world tick/update, especially manages startup countdown.
MxBool m_worldStarted
Indicates if the world has successfully started and is considered active.
MxCore * Find(const char *p_class, const char *p_name)
Finds an object of a given class and name in the world.
MxLong Notify(MxParam &p_param) override
Notification callback responding to registered events such as EndAction and NewPresenter.
MxResult Create(MxDSAction &p_dsAction) override
Initializes the world using an action, creating entity and sound lists, and camera controller.
MxDSAction * GetAction()
[AI] Direct access to the underlying action.
void RaiseVolume()
[AI] Requests that the background music volume is raised (decrements suppression counter); triggers f...
void LowerVolume()
[AI] Requests a reduction in current background music volume, queuing for fade out (increments suppre...
void Stop()
[AI] Immediately stops all background music, clears all actions and presenters, and resets tickle sta...
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
const MxAtomId & GetAtomId()
[AI] Returns a const-reference to the object's atom identifier.
virtual void SetAtomId(MxAtomId p_atomId)
[AI] Sets the atom id for this object instance, used for indexing or lookup.
void SetObjectId(MxU32 p_objectId)
[AI] Sets the object id (for serialization or lookup).
MxU32 GetObjectId()
[AI] Returns the object id numeric value.
[AI] Notification parameter marking the end of an action, specialization of MxActionNotificationParam...
MxAtomId m_atomId
The AtomId associated with this entity, used for resource and script identification.
void Unregister(MxCore *p_listener)
[AI] Removes a previously registered listener and flushes any pending notifications for it.
void Register(MxCore *p_listener)
[AI] Registers a listener object to receive notifications.
[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...
[AI] Presenter for single still image/bitmap media sources in the game.
void Enable(MxBool p_enable) override
[AI] Sets the enabled/disabled state of the presenter, updating the video manager's rendering as need...
virtual void UnregisterClient(MxCore *p_client)
[AI] Unregisters (marks for destruction) a previously registered client.
MxLong GetTime()
Returns the current timer value in ms, depending on running state.
MxResult StartTransition(TransitionType p_animationType, MxS32 p_speed, MxBool p_doCopy, MxBool p_playMusicInAnim)
[AI] Begins a new transition animation of type p_animationType at the specified speed,...
@ e_mosaic
[AI] Complex mosaic block-out effect.
void Stop()
[AI] Stops radio playback if currently active and updates audio state.
MxLong Notify(MxParam &p_param) override
[AI] Handles system notifications (end actions, control events) relevant to the radio.
#define DECOMP_SIZE_ASSERT(T, S)
[AI] Enumerates all script elements used in the "Garage" sequence of LEGO Island.
undefined4 g_unk0x100f0160
#define NULL
[AI] Null pointer value (C/C++ semantics).
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.
void InvokeAction(Extra::ActionType p_actionId, const MxAtomId &p_pAtom, MxS32 p_streamId, LegoEntity *p_sender)
[AI] Dispatches and triggers a game action on the given script or object.
LegoROI * PickROI(MxLong p_x, MxLong p_y)
[AI] Picks the ROI (Renderable Object Instance) at screen coordinates.
LegoGameState * GameState()
[AI] Accessor for the game's central game state controller. [AI]
MxTransitionManager * TransitionManager()
[AI] Accessor for the MxTransitionManager, handling level transitions, fades, and world changes....
MxBackgroundAudioManager * BackgroundAudioManager()
[AI] Accessor for the background audio manager. Used for background music and ambient sounds....
LegoControlManager * ControlManager()
[AI] Accessor for the control manager through the input manager; manages higher-level user/game contr...
void FUN_10015820(MxBool p_disable, MxU16 p_flags)
[AI] Utility for enabling or disabling functionality in LegoOmni based on certain flags.
void PlayMusic(JukeboxScript::Script p_objectId)
[AI] Starts music playback by scripting the background audio manager to play the music piece referenc...
LegoPathActor * UserActor()
[AI] Accessor for the user (player-controllable) LegoPathActor. [AI]
void SetIsWorldActive(MxBool p_isWorldActive)
[AI] Toggles whether the world should be considered active (enables/disables camera/user control etc)...
LegoInputManager * InputManager()
[AI] Accessor for the input manager, which handles keyboard, mouse, and controller input....
MxTimer * Timer()
[AI] Returns the global simulation timer.
MxResult Start(MxDSAction *p_dsAction)
[AI] Schedules and initiates execution of a script action.
MxNotificationManager * NotificationManager()
[AI] Returns the notification manager for system-wide state/update notifications.
MxTickleManager * TickleManager()
[AI] Provides access to the global tickle manager.
@ c_notificationControl
[AI] UI control event [AI]
@ c_notificationButtonDown
[AI] Mouse/gamepad button press [AI]
@ c_notificationKeyPress
[AI] Keyboard key press detected [AI]
@ c_notificationTransitioned
[AI] Object has transitioned states or locations [AI]
@ c_notificationEndAction
[AI] Indicates the end of an action [AI]
@ c_Buggy_Ctl
[AI] UI control: buggy button/action. [AI]
@ c_noneGarage
[AI] Sentinel value representing "no action" or "no script" for the Garage context....
@ c_wgs020nu_RunAnim
[AI] Run animation, wgs020nu sequence. [AI]
@ c_wgs029nu_RunAnim
[AI] Run animation, wgs029nu sequence. [AI]
@ c_wgs014nu_RunAnim
[AI] Run animation, wgs014nu sequence. [AI]
@ c_LeftArrow_Ctl
[AI] UI control: left arrow button/action. [AI]
@ c_wgs007nu_RunAnim
[AI] Run animation, wgs007nu sequence. [AI]
@ c_wgs021nu_RunAnim
[AI] Run animation, wgs021nu sequence. [AI]
@ c_wgs004nu_RunAnim
[AI] Run animation, wgs004nu sequence. [AI]
@ c_wgs031nu_RunAnim
[AI] Run animation, wgs031nu sequence. [AI]
@ c_wgs022nu_RunAnim
[AI] Run animation, wgs022nu sequence. [AI]
@ c_wgs008nu_RunAnim
[AI] Run animation, wgs008nu sequence. [AI]
@ c_wgs017nu_RunAnim
[AI] Run animation, wgs017nu sequence. [AI]
@ c_Info_Ctl
[AI] UI control: info button/action. [AI]
@ c_wgs003nu_RunAnim
[AI] Run animation, wgs003nu sequence. [AI]
@ c_RightArrow_Ctl
[AI] UI control: right arrow button/action. [AI]
@ c_wgs006nu_RunAnim
[AI] Run animation, wgs006nu sequence. [AI]
@ c_wgs010nu_RunAnim
[AI] Run animation, wgs010nu sequence. [AI]
@ c_wgs002nu_RunAnim
[AI] Run animation, wgs002nu sequence. [AI]
@ c_wgs012nu_RunAnim
[AI] Run animation, wgs012nu sequence. [AI]
@ c_wgs023nu_RunAnim
[AI] Run animation, wgs023nu sequence. [AI]
@ c_wgs009nu_RunAnim
[AI] Run animation, wgs009nu sequence. [AI]
@ c_JBMusic2
[AI] Jukebox miscellaneous music 2.
[AI] Contains global script AtomId pointers and utility functions for managing script AtomIds in LEGO...
MxAtomId * g_garageScript
[AI] Script AtomId for the vehicle garage/world logic.