40MxS32 CarRace::g_unk0x100d5d30[] = {
48MxS32 CarRace::g_unk0x100d5d40[] =
52MxS32 CarRace::g_unk0x100d5d50[] =
56MxS32 CarRace::g_unk0x100d5d60[] =
129 m_unk0x144 = g_unk0x100d5d10[rand() & 7];
152 if (m_unk0x144 == objectId) {
164 else if (m_unk0x148 == objectId) {
168 else if (m_unk0x14c == objectId) {
188 if (paramData <= m_unk0x104 || paramData >=
m_unk0x104 + 5) {
222 m_unk0x148 = g_unk0x100d5d40[rand() % 3];
223 m_unk0x14c = g_unk0x100d5d60[rand() % 3];
228 m_unk0x148 = g_unk0x100d5d30[rand() % 4];
229 m_unk0x14c = g_unk0x100d5d60[rand() % 3];
232 m_unk0x148 = g_unk0x100d5d50[rand() % 3];
233 m_unk0x14c = g_unk0x100d5d40[rand() % 3];
238 m_unk0x148 = g_unk0x100d5d30[rand() % 4];
239 m_unk0x14c = g_unk0x100d5d50[rand() % 3];
275 if (paramData <= m_unk0x108 || paramData >=
m_unk0x108 + 5) {
302 if (paramData <= m_unk0x10c || paramData >=
m_unk0x10c + 5) {
392 if (p_param1 == 11) {
396 else if (p_param1 == 12) {
const LegoChar * g_strCRCEDGEY0
const LegoChar * g_strCRCFRNTY6
MxU32 m_unk0x018
[AI] Internal gameplay state variable; see Get/SetUnknown18 for usage. [AI]
Implements the LEGO Island car race game mode.
MxLong HandleClick(LegoEventNotificationParam &) override
Handles click input in the context of the car race UI (such as quit buttons).
MxLong HandlePathStruct(LegoPathStructNotificationParam &) override
Handles race progress triggers from path segments.
MxLong HandleType0Notification(MxNotificationParam &) override
Handles notifications of an unclassified ("type 0") game event in this game mode.
MxResult Create(MxDSAction &p_dsAction) override
Initializes the car racing game mode and underlying state based on the supplied DSAction.
MxLong HandleEndAction(MxEndActionNotificationParam &) override
Handles the ending of scripted race actions.
CarRace()
Constructs a CarRace instance and initializes member variables.
void FUN_10017820(MxS32 p_param1, MxS16 p_param2)
Updates the location of still presenters for UI progress based on race advancement.
void ReadyWorld() override
Prepares the car race world and all interactive actors, UI, and animations.
MxBool Escape() override
Handles the user-initiated escape/action to quit or exit the car race mini-game.
static MxS32 GetColorOffset(const char *p_variable)
[AI] Determines the color offset index for the dune buggy dashboard based on a variable.
void Mute(MxBool p_muted)
[AI] Mutes or unmutes the actor's current sound.
virtual void ClearMaps()
[AI] Deallocates all animation map structures and selects no animation; resets current animation inde...
MxResult FUN_10060dc0(MxU32 p_objectId, MxMatrix *p_matrix, MxBool p_param3, MxU8 p_param4, LegoROI *p_roi, MxBool p_param6, MxBool p_param7, MxBool p_param8, MxBool p_param9)
[AI] Helper for starting a specific animation, including world matrix and camera settings.
void FUN_10061010(MxBool p_und)
[AI] Cancels all camera/transition animations and resets camera after completion.
@ e_unk0
[AI] Unknown/unspecified play mode
void Resume()
[AI] Resumes animation manager from suspension, restoring all previously suspended state.
void SetValue(const char *p_colorString) override
Sets the value of the background color using a command string.
[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]
LegoROI * GetROI()
[AI] Gets the ROI (Realtime Object Instance) associated with this entity. [AI]
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,...
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.
LegoBackgroundColor * GetBackgroundColor()
Gets the main background color variable object. [AI].
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_carrace
Car race (track, main). [AI].
@ e_undefined
Undefined or unset area. [AI].
@ e_carraceExterior
Car race exterior/transition. [AI].
void FUN_1006db40(LegoTime p_time)
[AI] Traverses the animation node hierarchy starting at the root and synchronizes visibility flags fo...
void SetDeadZone(MxS32 p_deadZone)
[AI] Sets the deadzone radius for input processing (region within which inputs are ignored).
void SetTrackDefault(MxS32 p_trackDefault)
[AI] Marks the controller to track global/default navigation parameters rather than custom overrides.
@ 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]
virtual void SetMaxLinearVel(MxFloat p_maxLinearVel)
[AI] Sets the maximum linear velocity for actor navigation.
[AI] Specialized notification parameter used for path structure related events in LEGO Island.
MxS16 GetData()
[AI] Retrieves the supplemental data associated with the notification.
MxU8 GetTrigger()
[AI] Returns the trigger type associated with this notification.
[AI] Represents a Real-time Object Instance enriched with LEGO-specific functionality.
static void InitSoundIndices()
[AI] Initializes sound playback array indices for collision sounds to randomized values.
static void FUN_10012de0()
[AI] Resets static sound state variables for the car (last sound time, stopped flag,...
MxStillPresenter * m_unk0x128
[AI] Unknown, likely for presenting stills during race transitions or cutscenes.
MxResult Create(MxDSAction &p_dsAction) override
[AI] Creates and initializes LegoRace world/logic for a DS action.
MxS32 m_unk0x104
[AI] Unknown (race-specific state/control variable).
MxS32 m_unk0x10c
[AI] Unknown (race-specific state/control variable).
RaceState * m_raceState
[AI] Stores persistent race state/results for the race world instance.
MxS32 m_unk0xfc
[AI] Unknown (race-specific state/control variable).
LegoGameState::Area m_destLocation
[AI] Destination location (area to switch to after race/transition).
MxRect32 m_unk0x130
[AI] Unknown 32-bit rectangle, possible HUD/viewport region.
LegoRaceMap * m_maps[3]
[AI] Map objects used by this race (main, alternate, or lap variants).
Act1State * m_act1State
[AI] Pointer to Act1State (first act/sequence logic).
MxStillPresenter * m_unk0x12c
[AI] Unknown, likely for presenting stills during race transitions or cutscenes.
MxS32 m_unk0x100
[AI] Unknown (race-specific state/control variable).
MxS32 m_unk0x108
[AI] Unknown (race-specific state/control variable).
MxS32 m_unk0xf8
[AI] Unknown (race-specific state/control variable).
virtual void ReadyWorld()
Called when the world is ready to be used—typically for custom scene setup after startup.
LegoHideAnimPresenter * m_hideAnim
Animation presenter for ROI hide (vanish, fade, etc.) sequences.
MxCore * Find(const char *p_class, const char *p_name)
Finds an object of a given class and name in the world.
void RemoveActor(LegoPathActor *p_actor)
Removes an actor from all known path controllers.
MxDSAction * GetAction()
[AI] Direct access to the underlying action.
MxResult PlayMusic(MxDSAction &p_action, undefined4 p_speed, MxPresenter::TickleState p_tickleState)
[AI] Initiates playback of a new background music action with specified speed and target tickle state...
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
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...
MxEntity is a base class for game entities which are uniquely identified by an integer ID and an Atom...
MxS32 GetEntityId()
Returns the current entity ID.
MxAtomId m_atomId
The AtomId associated with this entity, used for resource and script identification.
MxResult Send(MxCore *p_listener, const MxNotificationParam &p_param)
[AI] Queues a notification to be sent to a specific registered listener.
[AI] Parameter object representing a single notification or event, carrying an identifier and sender ...
MxCore * GetSender() const
[AI] Retrieves the sender pointer associated with this notification.
@ e_repeating
[AI] Presentation is repeating (e.g., looping media).
[AI] Rectangle using 32-bit signed integer coordinates.
T GetTop() const
[AI] Get the top edge.
T GetRight() const
[AI] Get the right edge.
T GetLeft() const
[AI] Get the left edge.
T GetBottom() const
[AI] Get the bottom edge.
[AI] Presenter for single still image/bitmap media sources in the game.
virtual void SetPosition(MxS32 p_x, MxS32 p_y)
[AI] Sets the pixel-based position of the presented image.
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 SetVariable(const char *p_key, const char *p_value)
Sets a variable by key and value, replacing or updating if it exists.
void SetVisibility(unsigned char p_visible)
[AI] Sets the visibility flag to the provided value.
[AI] Maintains persistent information about race progress, results, and high scores for up to five ra...
undefined4 m_unk0x28
[AI] Unknown extra field, always initialized to zero.
Entry * GetState(MxU8 p_id)
[AI] Fetches a race state entry matching the given entry ID, or NULL if not found in the array.
#define DECOMP_SIZE_ASSERT(T, S)
const char * g_strHIT_WALL_SOUND
[AI] Variable table name for the wall hit sound [AI]
const char * g_raceState
[AI] Global variable storing the name of the race state variable (used for checking or setting state ...
const char * g_racing
[AI] Global variable storing the name of the racing state (used to check if the race is currently ong...
#define NULL
[AI] Null pointer value (C/C++ semantics).
char LegoChar
[AI] Alias for char, for use in character/byte data and string handling.
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.
LegoGameState * GameState()
[AI] Accessor for the game's central game state controller. [AI]
LegoAnimationManager * AnimationManager()
[AI] Accessor for the animation manager, which controls Lego character/world animation state....
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....
void FUN_10015820(MxBool p_disable, MxU16 p_flags)
[AI] Utility for enabling or disabling functionality in LegoOmni based on certain flags.
LegoNavController * NavController()
[AI] Accessor for the navigation controller, managing player/camera navigation. [AI]
LegoInputManager * InputManager()
[AI] Accessor for the input manager, which handles keyboard, mouse, and controller input....
LegoROI * FindROI(const char *p_name)
[AI] Looks up a LegoROI (Real-time Object Instance) by name in the current world or global registry.
MxVariableTable * VariableTable()
[AI] Returns the variable table used for script variables and global key/value state.
MxNotificationManager * NotificationManager()
[AI] Returns the notification manager for system-wide state/update notifications.
@ c_srt013sl_RunAnim
[AI] Action to run animation for SRT013SL.
@ c_srt005sl_RunAnim
[AI] Action to run animation for SRT005SL.
@ c_srt009rh_RunAnim
[AI] Action to run animation for SRT009RH.
@ c_srt003rh_RunAnim
[AI] Action to run animation for SRT003RH.
@ c_srt010rh_RunAnim
[AI] Action to run animation for SRT010RH.
@ c_srt012sl_RunAnim
[AI] Action to run animation for SRT012SL.
@ c_srt011rh_RunAnim
[AI] Action to run animation for SRT011RH.
@ c_srt008rh_RunAnim
[AI] Action to run animation for SRT008RH.
@ c_srt001sl_RunAnim
[AI] Action to run animation for SRT001SL.
@ c_srt003sl_RunAnim
[AI] Action to run animation for SRT003SL.
@ c_srt012rh_RunAnim
[AI] Action to run animation for SRT012RH.
@ c_srt016sl_RunAnim
[AI] Action to run animation for SRT016SL.
@ c_srt001rh_RunAnim
[AI] Action to run animation for SRT001RH.
@ c_srt002sl_RunAnim
[AI] Action to run animation for SRT002SL.
@ c_irtx08ra_PlayWav
[AI] Embedded script object to play a WAV sound, associated with the irtx08ra marker.
@ c_srt011sl_RunAnim
[AI] Action to run animation for SRT011SL.
@ c_srt015sl_RunAnim
[AI] Action to run animation for SRT015SL.
@ c_srt007rh_RunAnim
[AI] Action to run animation for SRT007RH.
@ c_RaceCarDashboard
[AI] General dashboard for race car.
@ c_srt004sl_RunAnim
[AI] Action to run animation for SRT004SL.
@ c_srt014sl_RunAnim
[AI] Action to run animation for SRT014SL.
@ c_srt017sl_RunAnim
[AI] Action to run animation for SRT017SL.
@ c_srt002rh_RunAnim
[AI] Action to run animation for SRT002RH.
@ c_RaceTrackRoad_Music
[AI] Music for the racetrack roads.
[AI] Contains global script AtomId pointers and utility functions for managing script AtomIds in LEGO...
MxAtomId * g_jukeboxScript
[AI] Script AtomId for the Jukebox entity/event script.
MxAtomId * g_carraceScript
[AI] Script AtomId for the car racing event script.
[AI] Entry for an individual race event/state, holding its identifier, unknown field,...
MxS16 m_unk0x02
[AI] Unknown field (usage unclear).
MxS16 m_score
[AI] High score for this race/entry.