254 memset(&desc, 0,
sizeof(desc));
255 desc.
dwSize =
sizeof(desc);
258 if (result ==
DD_OK) {
266 for (
MxU8 actor = 1; actor <= 5; actor++) {
275 score = pizzaMissionState ? pizzaMissionState->
GetHighScore(actor) : 0;
278 score = towTrackMissionState ? towTrackMissionState->
GetHighScore(actor) : 0;
281 score = ambulanceMissionState ? ambulanceMissionState->
GetHighScore(actor) : 0;
296 MxS32 local3c[] = {0x2b00, 0x5700, 0x8000, 0xab00, 0xd600};
297 MxS32 local14[] = {0x2a, 0x27, 0x29, 0x29, 0x2a};
298 MxS32 local50[] = {0x2f, 0x56, 0x81, 0xaa, 0xd4};
299 MxS32 local28[] = {0x25, 0x29, 0x27, 0x28, 0x28};
300 MxS32 colors[] = {0x11, 0x0f, 0x08, 0x05};
302 assert(i_activity >= 0 && i_activity < 5);
303 assert(i_actor >= 0 && i_actor < 5);
304 assert(score >= 0 && score < 4);
306 MxU8* ptr =
m_surface + local3c[i_actor] + local50[i_activity];
307 MxS32 color = colors[score];
308 MxS32 size = local28[i_activity];
310 for (
MxS32 i = 0; i < local14[i_actor]; i++) {
311 memset(ptr, color, size);
Holds state and scoring information for the Ambulance mission.
MxS16 GetHighScore(MxU8 p_actorId)
[AI] Retrieves the highest score achieved by a specified actor.
The state object used for the car race mini-game.
[AI] Per-race state data and logic holder for JetskiRace, used for tracking player and AI standings,...
T * Get(const char *p_name)
Retrieve the element mapped to the given name, or nullptr if missing.
[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.
Comprehensive persistent game state manager: handles save/load, player selection, area switching,...
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_histbook
History book (scoreboard). [AI].
@ e_infoscor
Info Center hi-score area. [AI].
@ e_undefined
Undefined or unset area. [AI].
@ e_infodoor
Info Center door/title view. [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] Contains DirectDraw and Direct3DRM handles and metadata for a texture used in the LEGO Island re...
LPDIRECTDRAWSURFACE m_surface
[AI] DirectDraw surface holding the 8-bit indexed image for the texture.
LPDIRECT3DRMTEXTURE2 m_texture
[AI] Direct3DRM texture object used by retained-mode rendering.
virtual void ReadyWorld()
Called when the world is ready to be used—typically for custom scene setup after startup.
virtual void Enable(MxBool p_enable)
Enables or disables (pauses) the world and its main components.
MxBool m_worldStarted
Indicates if the world has successfully started and is considered active.
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.
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
void SetUnknown84(MxCore *p_unk0x84)
[AI] Sets the auxiliary core pointer for this action.
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 SetUnknown24(MxS16 p_unk0x24)
[AI] Sets the unknown field at 0x24 (possibly version/state).
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...
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.
Pizza mission state for the pizza delivery minigame and related characters.
MxS16 GetHighScore(MxU8 p_actorId)
Retrieves the historical best (high) score for a given actor's pizza mission.
Entry * GetState(MxU8 p_id)
[AI] Fetches a race state entry matching the given entry ID, or NULL if not found in the array.
[AI] State object used to track the status of the Score/High Score area, particularly whether the edu...
MxBool GetTutorialFlag()
[AI] Get whether the high score cube tutorial should be played.
void SetTutorialFlag(MxBool p_playCubeTutorial)
[AI] Set whether the high score cube tutorial should be played.
[AI] Implements the InfoScore/High Score game world/area, including score table display and handling ...
MxLong FUN_100016d0(LegoControlManagerNotificationParam &p_param)
[AI] Handles user input/control interaction (button/cube click) in the InfoScore area,...
ScoreState * m_state
[AI] Pointer to the current ScoreState for this world's area/session.
void FillArea(MxS32 i_activity, MxS32 i_actor, MxS16 score)
[AI] Helper for painting – fills the correct high score colored area for an activity/actor pair on th...
MxLong FUN_10001510(MxEndActionNotificationParam &p_param)
[AI] Handles notification of a completed action (like an InfoScore script finishing).
void DeleteScript()
[AI] Cancels the tutorial script playback if still running and disables further tutorials for this se...
void ReadyWorld() override
[AI] Called when the world is ready to be started (usually upon area entry); triggers the correct ani...
MxLong Notify(MxParam &p_param) override
[AI] Handles incoming notifications, including control and action completion, and manages state trans...
~Score() override
[AI] Destructor unregisters Score from managers and performs cleanup.
MxResult Create(MxDSAction &p_dsAction) override
[AI] Creates and initializes the Score world with the specified DS action.
MxU8 * m_surface
[AI] Raw surface data pointer for direct pixel manipulation (locked during Paint(); NULL otherwise)....
MxBool Escape() override
[AI] Called when the player is attempting to “escape” (exit) the InfoScore area; deletes script actio...
LegoGameState::Area m_destLocation
[AI] Area/room to switch to after leaving Score (set when the user clicks navigation arrows/books/etc...
void Enable(MxBool p_enable) override
[AI] Called to enable or disable this world, hooking up input as needed.
void Paint()
[AI] Paints the current score cube with the high scores for each activity and actor.
[AI] State class for the TowTrack mini-game, storing scores by character and handling their serializa...
MxS16 GetHighScore(MxU8 p_actorId)
[AI] Retrieves the highscore for a given actor in the Tow Track mini-game.
#define DDLOCK_SURFACEMEMORYPTR
#define DECOMP_SIZE_ASSERT(T, S)
#define NULL
[AI] Null pointer value (C/C++ semantics).
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.
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....
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...
LegoTextureContainer * TextureContainer()
[AI] Accessor for the texture container used for global texture management. [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....
MxResult Start(MxDSAction *p_dsAction)
[AI] Schedules and initiates execution of a script action.
void DeleteObject(MxDSAction &p_dsAction)
[AI] Deletes the specified action object, removing it from the global action list.
MxNotificationManager * NotificationManager()
[AI] Returns the notification manager for system-wide state/update notifications.
@ c_notificationControl
[AI] UI control event [AI]
@ c_notificationStartAction
[AI] Indicates the start of an action [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_InformationCenter_Music
[AI] Background music for the information center.
[AI] Contains global script AtomId pointers and utility functions for managing script AtomIds in LEGO...
MxAtomId * g_infoscorScript
[AI] Script AtomId for the Info Center scoring/stat script.
MxS16 GetHighScore()
[AI] Retrieves the race entry's current high score.