18 memset(m_alphabet, 0,
sizeof(m_alphabet));
19 memset(m_name, 0,
sizeof(m_name));
20 memset(m_scores, 0,
sizeof(m_scores));
29 if (m_scores[scoreIndex]) {
31 delete m_scores[scoreIndex];
32 m_scores[scoreIndex] =
NULL;
36 if (m_name[scoreIndex][letterIndex]) {
37 delete m_name[scoreIndex][letterIndex]->
GetAction();
38 delete m_name[scoreIndex][letterIndex];
39 m_name[scoreIndex][letterIndex] =
NULL;
96 undefined2 dummy1 = 0x90, dummy2 = 0x79, dummy3 = 0xc8, dummy4 = 0x17, dummy5 = 0x1b;
102 char bitmap[] =
"A_Bitmap";
105 for (i = 0; i < 26; i++) {
110 assert(m_alphabet[i]);
116 MxU8 scoreColors[3] =
124 m_scores[i] = scoreboxMaster->
Clone();
135 for (
MxS32 scoreState = 0, scoreboxX = 1; scoreState < 5; scoreState++, scoreboxX += 5) {
136 for (
MxS32 scoreBoxColumn = 0, scoreboxY = 1; scoreBoxColumn < 5; scoreBoxColumn++, scoreboxY += 5) {
137 MxU8 color = score->
m_scores[scoreState][scoreBoxColumn];
140 for (
MxS32 lax = 0; lax < 4; lax++) {
142 memset(m_scores[i]->GetBitmapStart(scoreboxX, scoreboxY + lax), scoreColors[color - 1], 4);
144 if (m_scores[i]->GetAlphaMask() !=
NULL) {
145 memset(
NULL, scoreColors[color - 1], 4);
149 m_scores[i]->GetBitmap()->GetStart(scoreboxX, lax + scoreboxY),
150 scoreColors[color - 1],
172 assert(m_name[i][j]);
[AI] The HistoryBook class represents the "History Book" world/scene shown in LEGO Island,...
~HistoryBook() override
[AI] Destructor for HistoryBook.
void ReadyWorld() override
[AI] Prepares the HistoryBook for display, populates bitmap presenters with alphabet letters,...
MxResult Create(MxDSAction &p_dsAction) override
[AI] Sets up the world based on the provided action, registers for input/control, and enters the hist...
MxLong Notify(MxParam &p_param) override
[AI] Notification handler processing game events for this world, such as button presses and transitio...
MxBool Escape() override
[AI] Handles Escape key/input, setting the world to transition to the Info Main area.
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.
void SwitchArea(Area p_area)
Switches the whole game state into a new area/world; manages transitions/scene loads.
History m_history
High score table/history for current game. [AI].
Area m_currentArea
Area/world the player is presently in. [AI].
void StopArea(Area p_area)
Calls cleanup logic for the specified area (removes actors, VMs, closes handles, etc....
@ 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].
virtual void ReadyWorld()
Called when the world is ready to be used—typically for custom scene setup after startup.
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.
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
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...
virtual void SetTickleState(TickleState p_tickleState)
[AI] Forces the tickle state, advancing to the requested lifecycle stage.
@ e_repeating
[AI] Presentation is repeating (e.g., looping media).
MxDSAction * GetAction() const
[AI] Returns the current action being presented.
[AI] Presenter for single still image/bitmap media sources in the game.
virtual MxStillPresenter * Clone()
[AI] Clones the presenter, attempting to fully duplicate internal state and associated memory resourc...
virtual void SetPosition(MxS32 p_x, MxS32 p_y)
[AI] Sets the pixel-based position of the presented image.
void Enable(MxBool p_enable) override
[AI] Sets the enabled/disabled state of the presenter, updating the video manager's rendering as need...
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)
unsigned short undefined2
#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]
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 PlayMusic(JukeboxScript::Script p_objectId)
[AI] Starts music playback by scripting the background audio manager to play the music piece referenc...
LegoInputManager * InputManager()
[AI] Accessor for the input manager, which handles keyboard, mouse, and controller input....
MxNotificationManager * NotificationManager()
[AI] Returns the notification manager for system-wide state/update notifications.
@ c_notificationButtonUp
[AI] Mouse/gamepad button release [AI]
@ c_notificationTransitioned
[AI] Object has transitioned states or locations [AI]
@ c_InformationCenter_Music
[AI] Background music for the information center.
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.
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].
MxU8 m_scores[5][5]
Scores by (minigame,row,column): custom packed format for all 5 game types. [AI].
MxS16 m_letters[7]
Array of 7 wide characters: player name (filled by registration). [AI].