40 m_hospitalState =
NULL;
44 m_copLedBitmap =
NULL;
45 m_pizzaLedBitmap =
NULL;
47 m_copLedAnimTimer = 0;
48 m_pizzaLedAnimTimer = 0;
82 if (!m_hospitalState) {
86 else if (m_hospitalState->
m_unk0x08 == 4) {
150 switch (m_currentActorId) {
203 m_currentAction = hospitalScript[m_hospitalState->
m_unk0x0c];
267 switch (m_currentActorId) {
370 if (m_unk0x128 == 0) {
379 if (m_unk0x128 == 0) {
398 if (m_unk0x100 == 1) {
403 if (roiName[0] ==
'*') {
407 if (!strcmpi(
"actor_ha", roiName)) {
413 if (m_unk0x128 == 0) {
445 switch (m_currentActorId) {
562 if (m_unk0x100 == 1) {
569 else if (m_unk0x128 == 0) {
583 if (m_unk0x100 == 1) {
590 else if (m_unk0x128 == 0) {
646 if (m_unk0x118 != 0) {
647 if (time - m_copLedAnimTimer > 300) {
648 m_copLedAnimTimer = time;
653 if (time - m_pizzaLedAnimTimer > 200) {
654 m_pizzaLedAnimTimer = time;
[AI] Holds state and transient gameplay data for the first act on Lego Island.
void SetUnknown18(MxU32 p_unk0x18)
[AI] Sets the gameplay progress variable at 0x018 (controls state transitions, gameplay mode changes,...
MxU32 m_unk0x018
[AI] Internal gameplay state variable; see Get/SetUnknown18 for usage. [AI]
[AI] State-holding class for the hospital area; persists area-specific progress and variables between...
MxS16 m_unk0x0c
[AI] General area progress/counter for current actor (mirrors one of the counters below depending on ...
MxS16 m_unk0x16
[AI] Progress counter for LAURA character's hospital actions or visit.
MxS16 m_unk0x12
[AI] Progress counter for PAPA character's hospital actions or visit.
MxS16 m_unk0x14
[AI] Progress counter for NICK character's hospital actions or visit.
MxS16 m_unk0x0e
[AI] Progress counter for PEPPER character's hospital actions or visit.
MxResult Serialize(LegoStorage *p_storage) override
[AI] (De)serializes this state to or from the provided LegoStorage handler.
undefined4 m_unk0x08
[AI] State machine/counter variable determining narrative step or branch.
HospitalState()
[AI] Constructs a new HospitalState object and initializes all progression counters to zero.
MxS16 m_unk0x10
[AI] Progress counter for MAMA character's hospital actions or visit.
[AI] Implements the main 3D area and logic flow for the Hospital location/scene in LEGO Island.
MxResult Create(MxDSAction &p_dsAction) override
[AI] Loads/sets up this world using the provided data-driven action.
MxLong Notify(MxParam &p_param) override
[AI] Receives notifications (such as keypresses, control input, and completion of scripted actions) a...
MxResult Tickle() override
[AI] Advances the hospital's world logic per tick; animates cop/pizza LED icons, handles script step ...
MxBool Escape() override
[AI] Cleans up objects and switches the main menu or outside area, if requested; used for ESC or Info...
void Enable(MxBool p_enable) override
[AI] Enables or disables the hospital world; hooks/unhooks input, marks world active state.
void PlayAction(MxU32 p_objectId)
[AI] Triggers a new MxDSAction for the specified script object (e.g.
~Hospital() override
[AI] Tears down Hospital world handlers, unregisters from input/notification/tickle systems and reset...
void ReadyWorld() override
[AI] Initializes the hospital gameplay; loads area animations, resets scores/progress for the current...
@ 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_undefined
Undefined or unset area. [AI].
@ e_hospital
Hospital interior. [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...
[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).
[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.
#define DECOMP_SIZE_ASSERT(T, S)
undefined4 g_unk0x100f7918
#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 SUCCESS
[AI] Used to indicate a successful operation in result codes.
void EnableAnimations(MxBool p_enable)
[AI] Enables or disables animation playback globally.
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]
void DeleteObjects(MxAtomId *p_id, MxS32 p_first, MxS32 p_last)
[AI] Batch deletes objects, given by atom id, and within the entity id range [p_first,...
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_Hospital_Music
[AI] Background music for the hospital.
[AI] Contains global script AtomId pointers and utility functions for managing script AtomIds in LEGO...
MxAtomId * g_hospitalScript
[AI] Script AtomId for the hospital SI logic.