Isle
Loading...
Searching...
No Matches
infocenter.h
Go to the documentation of this file.
1#ifndef INFOCENTER_H
2#define INFOCENTER_H
3
4#include "actionsfwd.h"
5#include "legogamestate.h"
6#include "legostate.h"
7#include "legoworld.h"
8#include "misc.h"
9#include "mxgeometry.h"
10#include "radio.h"
11
15
16// VTABLE: LEGO1 0x100d93a8
17// VTABLE: BETA10 0x101b9b88
18// SIZE 0x94
23class InfocenterState : public LegoState {
24public:
29
33 ~InfocenterState() override;
34
39 MxBool IsSerializable() override { return FALSE; } // vtable+0x14
40
45 const char* ClassName() const override // vtable+0x0c
46 {
47 return "InfocenterState";
48 }
49
55 MxBool IsA(const char* p_name) const override // vtable+0x10
56 {
57 return !strcmp(p_name, InfocenterState::ClassName()) || LegoState::IsA(p_name);
58 }
59
65
70 MxStillPresenter* GetNameLetter(MxS32 p_index) { return m_letters[p_index]; }
71
77 void SetNameLetter(MxS32 p_index, MxStillPresenter* p_letter) { m_letters[p_index] = p_letter; }
78
83 MxBool HasRegistered() { return m_letters[0] != NULL; }
84
90 {
92 }
93
99 {
101 }
102
107
112
117
118 // SYNTHETIC: LEGO1 0x10071900
119 // InfocenterState::`scalar deleting destructor'
120
125
130
135
140
145
150
155};
156
168
173
178
183};
184
185// VTABLE: LEGO1 0x100d9338
186// VTABLE: BETA10 0x101b9b10
187// SIZE 0x1d8
192class Infocenter : public LegoWorld {
193public:
198 enum Cutscene {
206 };
207
217 e_laura
218 };
219
223 Infocenter();
224
228 ~Infocenter() override;
229
235 MxLong Notify(MxParam& p_param) override; // vtable+0x04
236
241 MxResult Tickle() override; // vtable+0x08
242
246 const char* ClassName() const override // vtable+0x0c
247 {
248 return "Infocenter";
249 }
250
256 MxBool IsA(const char* p_name) const override // vtable+0x10
257 {
258 return !strcmp(p_name, Infocenter::ClassName()) || LegoWorld::IsA(p_name);
259 }
260
266 MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
267
271 void ReadyWorld() override; // vtable+0x50
272
276 MxBool VTable0x5c() override; // vtable+0x5c
277
282 MxBool Escape() override; // vtable+0x64
283
288 void Enable(MxBool p_enable) override; // vtable+0x68
289
290 // SYNTHETIC: LEGO1 0x1006ec60
291 // Infocenter::`scalar deleting destructor'
292
293private:
297 void InitializeBitmaps();
298
304 MxLong HandleKeyPress(MxS8 p_key);
305
312 MxU8 HandleMouseMove(MxS32 p_x, MxS32 p_y);
313
320 MxU8 HandleButtonUp(MxS32 p_x, MxS32 p_y);
321
327 MxU8 HandleControl(LegoControlManagerNotificationParam& p_param);
328
334 MxLong HandleEndAction(MxEndActionNotificationParam& p_param);
335
341 MxLong HandleNotification0(MxNotificationParam& p_param);
342
347 void UpdateFrameHot(MxBool p_display);
348
352 void Reset();
353
359 void PlayCutscene(Cutscene p_entityId, MxBool p_scale);
360
364 void StopCutscene();
365
371 void FUN_10070d10(MxS32 p_x, MxS32 p_y);
372
376 void StartCredits();
377 void StopCredits();
378
383 void PlayAction(InfomainScript::Script p_script);
384
388 void StopCurrentAction();
389
393 void PlayBookAnimation();
394
398 void StopBookAnimation();
399
403 InfomainScript::Script m_currentInfomainScript; // 0xf8
404
408 MxS16 m_selectedCharacter; // 0xfc
409
413 InfocenterState* m_infocenterState; // 0x100
414
418 LegoGameState::Area m_destLocation; // 0x104
419
423 Cutscene m_currentCutscene; // 0x108
424
428 Radio m_radio; // 0x10c
429
433 MxStillPresenter* m_dragPresenter; // 0x11c
434
438 InfocenterMapEntry m_glowInfo[7]; // 0x120
439
443 MxS16 m_unk0x1c8; // 0x1c8
444
448 MxStillPresenter* m_frame; // 0x1cc
449
453 MxS16 m_infoManDialogueTimer; // 0x1d0
454
458 MxS16 m_bookAnimationTimer; // 0x1d2
459
463 MxU16 m_unk0x1d4; // 0x1d4
464
468 MxS16 m_unk0x1d6; // 0x1d6
469};
470
471#endif // INFOCENTER_H
[AI] Represents the state of the Infocenter area, storing scripts, dialogue playlists and UI letter p...
Definition: infocenter.h:23
Playlist m_leaveDialogue[3]
[AI] Playlists for leave dialogue, one per act (indices: 0=act1, 1=act2, 2=act3).
Definition: infocenter.h:139
const char * ClassName() const override
[AI] Returns the runtime class name.
Definition: infocenter.h:45
MxBool IsSerializable() override
[AI] Indicates the state is not serializable—InfocenterState is not saved to disk.
Definition: infocenter.h:39
MxS16 GetMaxNameLength()
[AI] Returns the maximum number of letters in the UI registration name (always 7).
Definition: infocenter.h:64
Playlist & GetExitDialogueAct23()
[AI] Returns the exit dialogue playlist for act 2 and 3.
Definition: infocenter.h:111
Playlist m_exitDialogueAct1
[AI] Playlist of exit dialogue scripts for Act 1.
Definition: infocenter.h:124
MxStillPresenter * m_letters[7]
[AI] UI presenters for each slot in the 7-letter name entry field (could be player's registered name)...
Definition: infocenter.h:154
Playlist m_bricksterDialogue
[AI] Playlist for Brickster special dialogue events ("heckling").
Definition: infocenter.h:144
Playlist & GetBricksterDialogue()
[AI] Returns the Brickster random interjection dialogue playlist.
Definition: infocenter.h:116
void SetNameLetter(MxS32 p_index, MxStillPresenter *p_letter)
[AI] Sets the UI presenter for a specific name letter slot.
Definition: infocenter.h:77
Playlist m_returnDialogue[3]
[AI] Playlists for return dialogue, one per act (indices: 0=act1, 1=act2, 2=act3).
Definition: infocenter.h:134
Playlist & GetExitDialogueAct1()
[AI] Returns the exit dialogue playlist for act 1.
Definition: infocenter.h:106
InfomainScript::Script GetNextReturnDialogue()
[AI] Gets the next "return" dialogue script for the current act, looping within the act's playlist.
Definition: infocenter.h:98
Playlist m_exitDialogueAct23
[AI] Playlist of exit dialogue scripts for Act 2/3.
Definition: infocenter.h:129
InfomainScript::Script GetNextLeaveDialogue()
[AI] Gets the next "leave" dialogue script for the current act, looping within the act's playlist.
Definition: infocenter.h:89
MxBool HasRegistered()
[AI] True if any letter slot is filled (indicating the player has registered).
Definition: infocenter.h:83
~InfocenterState() override
[AI] Destroys the InfocenterState, cleaning up letter presenters and their associated actions.
MxStillPresenter * GetNameLetter(MxS32 p_index)
[AI] Returns the pointer to the UI presenter for a specific letter in the name field.
Definition: infocenter.h:70
MxU32 m_unk0x74
[AI] State machine variable tracking the Infocenter flow (e.g., 0=intro, 3=NA, 4=goto book,...
Definition: infocenter.h:149
InfocenterState()
[AI] Constructs the InfocenterState, initializing all dialogue playlists and clearing letter pointers...
MxBool IsA(const char *p_name) const override
[AI] Type check for InfocenterState and base classes by name.
Definition: infocenter.h:55
[AI] Manages Infocenter world logic, UI, cutscenes, dialogue, and area transitions.
Definition: infocenter.h:192
MxResult Tickle() override
[AI] Advances the Infocenter tick/update logic (timers, dialogue triggers, animation triggers,...
Infocenter()
[AI] Constructs Infocenter world, initializes state and registers for notifications.
Definition: infocenter.cpp:129
MxResult Create(MxDSAction &p_dsAction) override
[AI] Creates the Infocenter world and performs all Infocenter-specific setup logic.
Definition: infocenter.cpp:182
MxBool Escape() override
[AI] Handles Escape key (or similar) logic—exits cutscenes, cancels credits, or advances dialog state...
MxLong Notify(MxParam &p_param) override
[AI] Handles all notifications/events for Infocenter, routing them to specialized handlers.
Definition: infocenter.cpp:233
const char * ClassName() const override
[AI] Returns the runtime class name ("Infocenter").
Definition: infocenter.h:246
MxBool VTable0x5c() override
[AI] Returns TRUE unconditionally.
void ReadyWorld() override
[AI] Loads initial Infocenter state and presents the background, name registration,...
Definition: infocenter.cpp:440
MxBool IsA(const char *p_name) const override
[AI] Checks whether this object or any base is of type @p_name.
Definition: infocenter.h:256
Cutscene
[AI] Enum for cutscene (movie) types played within Infocenter.
Definition: infocenter.h:198
@ e_legoMovie
[AI] The LEGO logo intro movie.
Definition: infocenter.h:200
@ e_noIntro
[AI] Sentinel for no movie/cutscene running.
Definition: infocenter.h:199
@ e_badEndMovie
[AI] Bad ending cutscene.
Definition: infocenter.h:204
@ e_introMovie
[AI] Main introduction movie.
Definition: infocenter.h:202
@ e_mindscapeMovie
[AI] The Mindscape logo intro movie.
Definition: infocenter.h:201
@ e_outroMovie
[AI] Generic outro (may reference any ending).
Definition: infocenter.h:203
@ e_goodEndMovie
[AI] Good ending cutscene.
Definition: infocenter.h:205
Character
[AI] Enum for characters selectable in the Infocenter (i.e., for player/avatar registration).
Definition: infocenter.h:211
@ e_pepper
[AI] Pepper Roni.
Definition: infocenter.h:213
@ e_mama
[AI] Mama Brickolini.
Definition: infocenter.h:214
@ e_nick
[AI] Nick Brick.
Definition: infocenter.h:216
@ e_noCharacter
[AI] No selection.
Definition: infocenter.h:212
@ e_laura
[AI] Laura Brick.
Definition: infocenter.h:217
@ e_papa
[AI] Papa Brickolini.
Definition: infocenter.h:215
~Infocenter() override
[AI] Destroys Infocenter world, unregisters and cleans up all state and UI/presenters.
Definition: infocenter.cpp:157
void Enable(MxBool p_enable) override
[AI] Enables or disables the Infocenter world, managing input and activity appropriately.
[AI] Notification parameter for the LegoControlManager, used to propagate information about control e...
Act GetCurrentAct()
Returns the active act that is currently in play. [AI].
Area
Enumeration of all major in-game locations ("areas") for area/scene management and serialization.
Definition: legogamestate.h:92
[AI] Base class for game state blocks which encapsulate serializable and/or resettable aspects of the...
Definition: legostate.h:17
MxBool IsA(const char *p_name) const override
[AI] Tests if this object is of a given class name, directly or through inheritance.
Definition: legostate.h:169
Represents the active 3D world, holding all entity, animation, sound, path, and ROI objects.
Definition: legoworld.h:49
MxBool IsA(const char *p_name) const override
Runtime type checking; checks class hierarchy.
Definition: legoworld.h:153
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
Definition: mxdsaction.h:17
[AI] Notification parameter marking the end of an action, specialization of MxActionNotificationParam...
[AI] Parameter object representing a single notification or event, carrying an identifier and sender ...
[AI] MxParam serves as a polymorphic base class for parameter passing in event and notification syste...
Definition: mxparam.h:7
[AI] 2D rectangle class templated on its value type.
Definition: mxgeometry.h:165
[AI] Presenter for single still image/bitmap media sources in the game.
[AI] High-level manager for the in-game radio, handling notifications, playing/stopping,...
Definition: radio.h:77
#define override
Definition: compat.h:21
#define FALSE
Definition: d3drmdef.h:27
unsigned int undefined4
Definition: decomp.h:28
#define sizeOfArray(arr)
Definition: decomp.h:23
#define NULL
[AI] Null pointer value (C/C++ semantics).
Definition: legotypes.h:26
LegoGameState * GameState()
[AI] Accessor for the game's central game state controller. [AI]
Definition: misc.cpp:61
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
MxLong MxResult
[AI]
Definition: mxtypes.h:106
int MxLong
[AI]
Definition: mxtypes.h:83
signed short MxS16
[AI]
Definition: mxtypes.h:26
unsigned char MxU8
[AI]
Definition: mxtypes.h:8
signed int MxS32
[AI]
Definition: mxtypes.h:38
unsigned short MxU16
[AI]
Definition: mxtypes.h:20
unsigned int MxU32
[AI]
Definition: mxtypes.h:32
signed char MxS8
[AI]
Definition: mxtypes.h:14
[AI] Maps a UI region in the Infocenter to a destination presenter for glow effects.
Definition: infocenter.h:163
undefined4 m_unk0x04
[AI] Action/group/area identifier; used for routing (e.g., 3=main, 10=boat, ...).
Definition: infocenter.h:177
InfocenterMapEntry()
[AI] Default constructor, does not initialize members.
Definition: infocenter.cpp:152
MxStillPresenter * m_destCtl
[AI] The bitmap/still presenter to enable/disable when the region is active.
Definition: infocenter.h:172
MxRect< MxS32 > m_area
[AI] The rectangular screen area for this map entry.
Definition: infocenter.h:182
[AI] Playlist structure representing an indexed list of object IDs with next-item selection strategie...
Definition: legostate.h:36
MxU32 Next()
[AI] Retrieves the object ID at the current position, advances next index according to playlist mode.
Definition: legostate.cpp:10