38 void SetValue(
const char* p_colorString)
override;
72 void SetValue(
const char* p_option)
override;
367 void SetROIColorOverride();
Variable controlling the sky background color (HSV) and related light color in the game.
void SetLightColor()
Sets the light color according to the current HSV parameters. [AI].
void SetValue(const char *p_colorString) override
Sets the value of the background color using a command string.
void ToggleSkyColor()
Rotates hue to cycle sky color (e.g. progressing through the day), updating all visuals....
void ToggleDayNight(MxBool p_sun)
Adjusts the saturation (day/night) and updates sky color and light accordingly.
Implementation of LegoStorage for file-backed storage using stdio FILE*.
Variable controlling full screen movie playback in the video manager.
void SetValue(const char *p_option) override
Sets the option to enable or disable fullscreen movies.
Comprehensive persistent game state manager: handles save/load, player selection, area switching,...
MxS16 GetPlayerCount()
Gets the number of player slots currently used. [AI].
void GetFileSavePath(MxString *p_outPath, MxS16 p_slotn)
Writes the full save path for the given slot to the output string object.
Username * GetPlayersIndex(MxS32 p_index)
Gets a pointer to a player username in the array by index.
MxS16 m_playerCount
Number of player usernames registered. [AI].
void SwitchPlayer(MxS16 p_playerId)
Make the specified player (by ID/index) the current player.
Act GetCurrentAct()
Returns the active act that is currently in play. [AI].
Area GetUnknown0x42c()
Gets the value of m_unk0x42c (used for act area save/load mechanics). [AI].
void SerializeScoreHistory(MxS16 p_flags)
Serializes the score history table to score file.
MxS16 m_unk0x24
Serial/generation marker used for score records. [AI].
void SwitchArea(Area p_area)
Switches the whole game state into a new area/world; manages transitions/scene loads.
void SetPreviousArea(Area p_previousArea)
Sets the previous area for reload/stop logic.
JukeboxScript::Script m_jukeboxMusic
Which jukebox music is currently set to play. [AI].
History m_history
High score table/history for current game. [AI].
void SetCurrentAct(Act p_currentAct)
Sets the current game act.
const char * GetActorName()
Returns the actor name, based on the current actor ID. [AI].
void Init()
Re-initializes all world/variable state to the current act's defaults. [AI].
void ResetROI()
Re-applies the current actor's ROI to the 3D world (remove/add for update). [AI].
Area m_currentArea
Area/world the player is presently in. [AI].
MxBool m_isDirty
TRUE if unsaved changes present. [AI].
Area m_unk0x42c
Used for act area storage on save/load. [AI].
void SetSavePath(char *p_savePath)
Sets the path for current save slot directory; creates a copy of input string.
void SetActorId(MxU8 p_actorId)
Directly sets the current actor ID (preferred: use SetActor).
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].
Act
Indicates which main storyline section (Act 1/2/3) is currently active.
@ e_act3
Act 3: final main story segment. [AI].
@ e_act1
Act 1: the first main segment of the game. [AI].
@ e_actNotFound
No act currently loaded (does not correspond to valid play). [AI].
@ e_act2
Act 2: main story segment two. [AI].
void StopArea(Area p_area)
Calls cleanup logic for the specified area (removes actors, VMs, closes handles, etc....
undefined2 m_unk0x41a
Unknown (padding or unused). [AI].
void RegisterState(LegoState *p_state)
Registers a state object, replacing by class if already present.
MxResult DeleteState()
Destroys and removes all current state objects, freeing memory and unregistering. [AI].
MxU8 GetActorId()
Returns the current selected actor ID. [AI].
void SerializePlayersInfo(MxS16 p_flags)
Serializes all player info (usernames, player count) to the appropriate storage.
Area m_previousArea
Where player was before last area switch. [AI].
Username m_players[9]
Array of all known player usernames (max 9, ranked). [AI].
MxResult Save(MxULong p_slot)
Saves persistent game state (world variables, actor, etc.) to a file slot.
void RemoveActor()
Removes (and deletes) the current user actor from the world.
void FindLoadedAct()
Analyses the loaded Lego worlds to determine which act is present. [AI].
LegoState * GetState(const char *p_stateName)
Find an existing state (LegoState-derived) object by its registered script/class name.
MxS16 FindPlayer(Username &p_player)
Finds the player index for a username; returns -1 if not found.
Area
Enumeration of all major in-game locations ("areas") for area/scene management and serialization.
@ e_infomain
Information Center, main screen. [AI].
@ e_previousArea
Alias: go to previous area. [AI].
@ e_motocycle
Motorcycle (vehicle, spawn). [AI].
@ e_dunecarbuild
Vehicle construction: dune buggy. [AI].
@ e_racecarbuild
Vehicle construction: racecar. [AI].
@ e_bike
Bike minigame (spawns). [AI].
@ e_police
Police Station interior. [AI].
@ e_elevdown
Elevator moving down (animated). [AI].
@ e_copter
Helicopter (vehicle, spawn). [AI].
@ e_unk66
Used for some spawn locations. [AI].
@ e_hospitalExterior
Hospital, seen from outside. [AI].
@ e_dunecar
Dune buggy (vehicle, for spawn). [AI].
@ e_act3script
Act 3 world/script main. [AI].
@ e_act2main
Act 2 world main screen. [AI].
@ e_jetraceExterior
Jetski race transition? [AI].
@ e_carrace
Car race (track, main). [AI].
@ e_elevride2
Elevator ride/cab down (animated). [AI].
@ e_garageExterior
Garage (vehicle construction) exterior. [AI].
@ e_garage
Garage (build vehicle) interior. [AI].
@ e_garadoor
Garage door or doorway. [AI].
@ e_copterbuild
Vehicle construction: helicopter. [AI].
@ e_jetrace
Jetski race area, "interior"/main. [AI].
@ e_polidoor
Police Station door. [AI].
@ e_jukeboxw
Western Jukebox (special minigame). [AI].
@ e_isle
Open world (LEGO Island main map). [AI].
@ e_regbook
Registration book "new game" area. [AI].
@ e_histbook
History book (scoreboard). [AI].
@ e_jetrace2
Jetski race (exterior). [AI].
@ e_pizzeriaExterior
Pizzeria, seen from outside. [AI].
@ e_unk28
Used for certain spawn locations. [AI].
@ e_infoscor
Info Center hi-score area. [AI].
@ e_towtrack
Towtruck (vehicle, spawn). [AI].
@ e_undefined
Undefined or unset area. [AI].
@ e_unk33
Used for certain player spawns. [AI].
@ e_skateboard
Skateboard (vehicle, spawn). [AI].
@ e_elevride
Elevator ride/cab up (animated). [AI].
@ e_jetskibuild
Vehicle construction: jetski. [AI].
@ e_unk4
Unknown / possibly reserved. [AI].
@ e_jukeboxExterior
Jukebox, seen from outside. [AI].
@ e_elevbott
Elevator bottom. [AI].
@ e_observe
Observatory interior. [AI].
@ e_ambulance
Ambulance (vehicle, spawn). [AI].
@ e_hospital
Hospital interior. [AI].
@ e_policeExterior
Police Station, from outside. [AI].
@ e_carraceExterior
Car race exterior/transition. [AI].
@ e_infodoor
Info Center door/title view. [AI].
@ e_seaview
Ocean-side view at observatory. [AI].
@ e_elevopen
Elevator doors open. [AI].
@ e_jetski
Jetski (vehicle, spawn). [AI].
MxResult Load(MxULong p_slot)
Loads persistent game state from specified save slot.
Area GetPreviousArea()
Gets the last area before the current one. [AI].
Act GetLoadedAct()
Returns the act that is currently loaded in memory. [AI].
void SetActor(MxU8 p_actorId)
Change the player character in the world to the given actor ID.
void SetDirty(MxBool p_isDirty)
Sets whether there are unsaved changes to the state.
MxResult AddPlayer(Username &p_player)
Adds a new player (username), moves others down, manages slot files.
[AI] Base class for game state blocks which encapsulate serializable and/or resettable aspects of the...
Abstract base class providing an interface for file-like storage with binary and text read/write oper...
Mindscape custom string class for managing dynamic C-strings within the game engine.
MxVariableTable is a specialized hash table for storing key/value string variables used by the LEGO I...
[AI] Represents a key-value variable as used in the variable table for the LEGO Island engine.
unsigned short undefined2
const char * g_actorNames[7]
Array of actor names indexed by actor ID. [AI].
MxBool ROIColorOverride(const char *p_input, char *p_output, MxU32 p_copyLen)
Helper for ROI color override mechanism, mapping special part labels to variable table values.
#define NULL
[AI] Null pointer value (C/C++ semantics).
Key-value pair tying a ROI color key name to a LEGO color string.
const char * m_targetName
The internal ROI color key (e.g. "c_rcsidey0"). [AI].
const char * m_colorName
The LEGO color name for that part (e.g. "lego red"). [AI].
Collection of best scores for all recent plays/players (high score table).
ScoreItem * FUN_1003cc90(Username *p_player, MxS16 p_unk0x24, MxS32 &p_unk0x2c)
Looks up a score entry for player and attempt index, or returns NULL if not found.
MxS16 m_unk0x372
Serial/sequence field incremented for each player. [AI].
ScoreItem m_scores[20]
Score history; sorted by total score descending. [AI].
void WriteScoreHistory()
Rebuilds the high score table from current state objects, sorts it descending. [AI].
ScoreItem * GetScore(MxS32 p_index)
Gets pointer to score entry at index, or NULL if out of range.
MxResult Serialize(LegoStorage *p_storage)
Serializes whole history, including all score item slots, to the provided storage/backend....
MxS16 m_count
Count of active/used score history entries. [AI].
MxS16 GetCount()
Current number of score entries in the history. [AI].
Single score record for a player, including high score grids for all major games.
Username m_name
Username this score belongs to. [AI].
MxResult Serialize(LegoStorage *p_storage)
Reads/writes the ScoreItem to/from storage.
MxS16 m_totalScore
The total score calculated from all minigames. [AI].
MxU8 m_scores[5][5]
Scores by (minigame,row,column): custom packed format for all 5 game types. [AI].
MxS16 m_unk0x2a
(Purpose: Each play/attempt index?) [AI]
Player "username", stored as 7 short integers (character codes).
MxS16 m_letters[7]
Array of 7 wide characters: player name (filled by registration). [AI].
void Set(Username &p_other)
Set this username by copying another.
Username & operator=(const Username &p_other)
Assignment, deep-copy of letter buffer [AI].
MxResult Serialize(LegoStorage *p_storage)
Reads or writes username as S16 array to/from the given storage.