Isle
Loading...
Searching...
No Matches
gasstation.cpp
Go to the documentation of this file.
1#include "gasstation.h"
2
3#include "garage_actions.h"
4#include "isle.h"
5#include "islepathactor.h"
6#include "jukebox.h"
7#include "jukebox_actions.h"
9#include "legogamestate.h"
10#include "legoinputmanager.h"
11#include "legomain.h"
12#include "legoutils.h"
13#include "misc.h"
16#include "mxmisc.h"
18#include "mxstillpresenter.h"
19#include "mxticklemanager.h"
20#include "mxtimer.h"
21#include "mxtransitionmanager.h"
22#include "radio.h"
23#include "scripts.h"
24
27
28// GLOBAL: LEGO1 0x100f0160
30
31// GLOBAL: LEGO1 0x100f0164
33
34// FUNCTION: LEGO1 0x100046a0
36{
37 m_currentActorId = LegoActor::c_none;
38 m_state = NULL;
39 m_destLocation = LegoGameState::e_undefined;
40 m_trackLedBitmap = NULL;
41 m_unk0x104 = 0;
42 m_unk0x114 = FALSE;
43 m_unk0x106 = 0;
44 m_unk0x10c = 0;
45 m_unk0x115 = FALSE;
46 m_trackLedTimer = 0;
47
49}
50
51// FUNCTION: LEGO1 0x100048c0
53{
54 InputManager()->UnRegister(this);
55 if (InputManager()->GetWorld() == this) {
57 }
58
63}
64
65// FUNCTION: LEGO1 0x10004990
66// FUNCTION: BETA10 0x100286c0
68{
69 MxResult result = LegoWorld::Create(p_dsAction);
70 if (result == SUCCESS) {
71 InputManager()->SetWorld(this);
72 ControlManager()->Register(this);
73 }
74
76
77 m_state = (GasStationState*) GameState()->GetState("GasStationState");
78 if (!m_state) {
79 m_state = (GasStationState*) GameState()->CreateState("GasStationState");
80 m_state->m_unk0x14 = 1;
81 }
82 else if (m_state->m_unk0x14 == 4) {
83 m_state->m_unk0x14 = 4;
84 }
85 else {
86 m_state->m_unk0x14 = 3;
87 }
88
91
92 InputManager()->Register(this);
94 return result;
95}
96
97// FUNCTION: LEGO1 0x10004a60
98// FUNCTION: BETA10 0x10028883
100{
101 MxNotificationParam& param = (MxNotificationParam&) p_param;
102 MxResult result = 0;
103 LegoWorld::Notify(p_param);
104
105 if (m_worldStarted) {
106 switch (param.GetNotification()) {
108 result = HandleEndAction((MxEndActionNotificationParam&) p_param);
109 break;
111 result = HandleKeyPress((((LegoEventNotificationParam&) p_param)).GetKey());
112 break;
114 result = HandleButtonDown(((LegoControlManagerNotificationParam&) p_param));
115 break;
118 break;
120 assert(m_destLocation != LegoGameState::e_undefined);
121 GameState()->SwitchArea(m_destLocation);
122 break;
123 }
124 }
125
126 return result;
127}
128
129// FUNCTION: LEGO1 0x10004b30
130// FUNCTION: BETA10 0x10028a5e
132{
134
135 m_trackLedBitmap = (MxStillPresenter*) Find("MxStillPresenter", "TrackLed_Bitmap");
136 m_currentActorId = UserActor()->GetActorId();
137
138 switch (m_currentActorId) {
140 switch (m_state->m_pepperAction) {
141 case 0:
142 m_state->m_unk0x14 = 5;
144 m_unk0x106 = 1;
145 break;
146 case 1:
147 m_state->m_unk0x14 = 5;
149 m_unk0x106 = 1;
150 break;
151 case 2:
152 m_state->m_unk0x14 = 5;
154 m_unk0x106 = 1;
155 break;
156 default:
157 m_state->m_unk0x14 = 6;
159 m_unk0x106 = 1;
160 m_unk0x104 = 1;
161 break;
162 }
163
164 if (m_state->m_pepperAction < 5) {
165 m_state->m_pepperAction++;
166 }
167 break;
169 switch (m_state->m_mamaAction) {
170 case 0:
171 m_state->m_unk0x14 = 5;
173 m_unk0x106 = 1;
174 break;
175 case 1:
176 m_state->m_unk0x14 = 5;
178 m_unk0x106 = 1;
179 break;
180 default:
181 m_state->m_unk0x14 = 6;
183 m_unk0x106 = 1;
184 m_unk0x104 = 1;
185 break;
186 }
187
188 if (m_state->m_mamaAction < 5) {
189 m_state->m_mamaAction++;
190 }
191 break;
193 switch (m_state->m_nickAction) {
194 case 0:
195 m_state->m_unk0x14 = 5;
197 m_unk0x106 = 1;
198 break;
199 case 1:
200 m_state->m_unk0x14 = 5;
202 m_unk0x106 = 1;
203 break;
204 default:
205 m_state->m_unk0x14 = 6;
207 m_unk0x106 = 1;
208 m_unk0x104 = 1;
209 break;
210 }
211
212 if (m_state->m_nickAction < 5) {
213 m_state->m_nickAction++;
214 }
215 break;
217 switch (m_state->m_papaAction) {
218 case 0:
219 m_state->m_unk0x14 = 5;
221 m_unk0x106 = 1;
222 break;
223 case 1:
224 m_state->m_unk0x14 = 5;
226 m_unk0x106 = 1;
227 break;
228 default:
229 m_state->m_unk0x14 = 6;
231 m_unk0x106 = 1;
232 m_unk0x104 = 1;
233 break;
234 }
235
236 if (m_state->m_papaAction < 5) {
237 m_state->m_papaAction++;
238 }
239 break;
241 switch (m_state->m_lauraAction) {
242 case 0:
243 m_state->m_unk0x14 = 5;
245 m_unk0x106 = 1;
246 break;
247 case 1:
248 m_state->m_unk0x14 = 5;
250 m_unk0x106 = 1;
251 break;
252 default:
253 m_state->m_unk0x14 = 6;
255 m_unk0x106 = 1;
256 m_unk0x104 = 1;
257 break;
258 }
259
260 if (m_state->m_lauraAction < 5) {
261 m_state->m_lauraAction++;
262 }
263 break;
264 default:
265 break;
266 }
267
269}
270
271// FUNCTION: LEGO1 0x10005590
272// FUNCTION: BETA10 0x10029e30
273inline void GasStation::PlayAction(GarageScript::Script p_objectId)
274{
275 MxDSAction action;
276 action.SetAtomId(*g_garageScript);
277 action.SetObjectId(p_objectId);
278
280 Start(&action);
281 m_state->PlayAction(p_objectId);
282}
283
284// FUNCTION: BETA10 0x10029f00
285inline void GasStation::StopAction(GarageScript::Script p_objectId)
286{
287 if (p_objectId != GarageScript::c_noneGarage) {
290 m_state->StopAction(p_objectId);
291 }
292}
293
294// FUNCTION: LEGO1 0x10005660
295MxLong GasStation::HandleEndAction(MxEndActionNotificationParam& p_param)
296{
297 MxLong result = m_radio.Notify(p_param);
298
299 if (result == 0) {
300 MxDSAction* action = p_param.GetAction();
301
302 if (action->GetAtomId() == m_atomId && action->GetObjectId()) {
303 m_state->StopAction((GarageScript::Script) action->GetObjectId());
304 m_unk0x106 = 0;
305
306 switch (m_state->m_unk0x14) {
307 case 5:
308 g_unk0x100f0160 = 0;
309 m_state->m_unk0x14 = 6;
310 m_unk0x115 = TRUE;
312 m_unk0x106 = 1;
313 m_unk0x104 = 1;
314 break;
315 case 6:
316 g_unk0x100f0160 = 0;
317 m_unk0x115 = TRUE;
318
319 if (m_unk0x104 == 3) {
320 m_state->m_unk0x14 = 8;
322 m_unk0x106 = 1;
323 }
324 else {
325 m_state->m_unk0x14 = 7;
326 m_unk0x114 = TRUE;
327 }
328 break;
329 case 8:
330 m_state->m_unk0x14 = 2;
331 ((Act1State*) GameState()->GetState("Act1State"))->m_unk0x018 = 7;
332 m_destLocation = LegoGameState::e_unk28;
333 m_radio.Stop();
336 break;
337 }
338
339 result = 1;
340 }
341 }
342
343 return result;
344}
345
346// FUNCTION: LEGO1 0x10005920
347MxLong GasStation::HandleKeyPress(MxS8 p_key)
348{
349 if (p_key == VK_SPACE && g_unk0x100f0160 == 0 && m_unk0x106 != 0) {
350 m_state->StopActions();
351 return 1;
352 }
353
354 return 0;
355}
356
357// FUNCTION: LEGO1 0x10005960
358// FUNCTION: BETA10 0x10029319
359MxLong GasStation::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
360{
361 if (m_unk0x104 == 1 || m_unk0x104 == 2) {
362 LegoROI* roi = PickROI(p_param.GetX(), p_param.GetY());
363
364 if (roi != NULL) {
365 if (!strnicmp(roi->GetName(), "capdb", 5) || !strnicmp(roi->GetName(), "*capdb", 6)) {
366 m_unk0x104 = 3;
367 m_unk0x114 = FALSE;
368
369 if (m_state->m_unk0x14 == 7) {
370 m_state->m_unk0x14 = 8;
372 m_unk0x106 = 1;
373 }
374 else {
376 }
377
378 return 1;
379 }
380 }
381 }
382
383 return 0;
384}
385
386// FUNCTION: LEGO1 0x10005b20
387// FUNCTION: BETA10 0x10029445
389{
390 if (p_param.m_unk0x28 == 1) {
391 MxDSAction action;
392
393 switch (p_param.m_clickedObjectId) {
396 m_state->m_unk0x14 = 0;
397 m_destLocation = LegoGameState::Area::e_garadoor;
398
399 m_state->StopActions();
400 m_radio.Stop();
403 break;
405 m_state->m_unk0x14 = 0;
406 m_destLocation = LegoGameState::Area::e_infomain;
407
408 m_state->StopActions();
409 m_radio.Stop();
412 break;
414 m_state->m_unk0x14 = 0;
416
417 m_state->StopActions();
418 m_radio.Stop();
421 break;
422 }
423 }
424
425 return 1;
426}
427
428// FUNCTION: LEGO1 0x10005c40
429// FUNCTION: BETA10 0x10029551
431{
432 LegoWorld::Enable(p_enable);
433
434 if (p_enable) {
435 InputManager()->SetWorld(this);
437 }
438 else {
439 if (InputManager()->GetWorld() == this) {
441 }
442 }
443}
444
445// FUNCTION: LEGO1 0x10005c90
446// FUNCTION: BETA10 0x100295c6
448{
449 if (!m_worldStarted) {
451 return SUCCESS;
452 }
453
454 if (g_unk0x100f0160 != 0) {
456 }
457
458 MxLong time = Timer()->GetTime();
459
460 if (m_unk0x114) {
461 if (time - m_unk0x10c > 15000) {
462 m_unk0x10c = time;
463 if (m_unk0x104 == 1) {
464 m_unk0x104 = 2;
465 }
466 else if (m_unk0x104 != 0) {
467 m_unk0x104 = 0;
468 MxDSAction action;
469 m_state->m_unk0x14 = 9;
471 m_unk0x106 = 1;
472 }
473 }
474 }
475
476 if (m_unk0x115) {
477 if (time - m_trackLedTimer > 300) {
478 m_trackLedTimer = time;
480 m_trackLedBitmap->Enable(g_trackLedEnabled);
481 }
482 }
483
484 return SUCCESS;
485}
486
487// FUNCTION: LEGO1 0x10005e70
489{
490 m_radio.Stop();
491 m_state->StopActions();
492 m_state->m_unk0x14 = 0;
493 m_destLocation = LegoGameState::Area::e_infomain;
494 return TRUE;
495}
496
497// FUNCTION: LEGO1 0x10005eb0
498// FUNCTION: BETA10 0x100296b8
500{
501 m_pepperAction = 0;
502 m_mamaAction = 0;
503 m_papaAction = 0;
504 m_nickAction = 0;
505 m_lauraAction = 0;
507}
508
509// FUNCTION: LEGO1 0x10006300
510// FUNCTION: BETA10 0x10029754
512{
513 LegoState::Serialize(p_storage);
514
515 if (p_storage->IsWriteMode()) {
516 p_storage->WriteS16(m_pepperAction);
517 p_storage->WriteS16(m_mamaAction);
518 p_storage->WriteS16(m_papaAction);
519 p_storage->WriteS16(m_nickAction);
520 p_storage->WriteS16(m_lauraAction);
521 }
522 else if (p_storage->IsReadMode()) {
523 p_storage->ReadS16(m_pepperAction);
524 p_storage->ReadS16(m_mamaAction);
525 p_storage->ReadS16(m_papaAction);
526 p_storage->ReadS16(m_nickAction);
527 p_storage->ReadS16(m_lauraAction);
528 }
529
530 return SUCCESS;
531}
532
533// FUNCTION: LEGO1 0x10006430
535{
536 for (MxS32 i = 0; i < (MxS32) sizeOfArray(m_actions); i++) {
538 m_actions[i] = p_objectId;
539 return;
540 }
541 }
542}
543
544// FUNCTION: LEGO1 0x10006460
546{
547 for (MxS32 i = 0; i < (MxS32) sizeOfArray(m_actions); i++) {
548 if (m_actions[i] == p_objectId) {
550 return;
551 }
552 }
553}
554
555// FUNCTION: LEGO1 0x10006490
557{
558 for (MxS32 i = 0; i < (MxS32) sizeOfArray(m_actions); i++) {
562 }
563 }
564
566}
[AI] Holds state and transient gameplay data for the first act on Lego Island.
Definition: isle.h:29
Maintains persistent, serializable state information for the gas station/garage area,...
Definition: gasstation.h:18
MxS16 m_nickAction
Current animation/action index for Nick actor [AI].
Definition: gasstation.h:63
GarageScript::Script m_actions[3]
List of up to 3 currently running GarageScript actions [AI].
Definition: gasstation.h:58
MxS16 m_pepperAction
Current animation/action index for Pepper actor (cycles variants) [AI].
Definition: gasstation.h:60
void StopAction(GarageScript::Script p_objectId)
Removes the specified GarageScript action from the active set as no longer running [AI].
Definition: gasstation.cpp:545
undefined4 m_unk0x14
[AI_SUGGESTED_NAME: m_actionState] Tracks the phase in scripted action sequence for state machine con...
Definition: gasstation.h:59
MxS16 m_papaAction
Current animation/action index for Papa actor [AI].
Definition: gasstation.h:62
MxResult Serialize(LegoStorage *p_storage) override
Serializes/deserializes the gas station state from the given storage [AI].
Definition: gasstation.cpp:511
GasStationState()
[AI] Creates and resets state for gas station, initializing all actor counters and action lists.
Definition: gasstation.cpp:499
void StopActions()
[AI] Stops all running actions tracked in this state and raises background audio volume.
Definition: gasstation.cpp:556
void PlayAction(GarageScript::Script p_objectId)
Records a running GarageScript action as currently active in this state [AI].
Definition: gasstation.cpp:534
MxS16 m_lauraAction
Current animation/action index for Laura actor [AI].
Definition: gasstation.h:64
MxS16 m_mamaAction
Current animation/action index for Mama actor [AI].
Definition: gasstation.h:61
The in-game gas station (garage) area/world logic controller, handling all interactive gameplay,...
Definition: gasstation.h:73
MxLong Notify(MxParam &p_param) override
[AI] Responds to engine/system notifications (actions, keypress, etc).
Definition: gasstation.cpp:99
virtual MxLong HandleControl(LegoControlManagerNotificationParam &p_param)
[AI] Handles direct control manager notifications (UI interaction, navigation, etc).
Definition: gasstation.cpp:388
MxBool Escape() override
[AI] Cleans up and transitions out of the gas station on user escape [AI].
Definition: gasstation.cpp:488
MxResult Create(MxDSAction &p_dsAction) override
[AI] Creates and activates the gas station world, setting up input/control managers and persistent st...
Definition: gasstation.cpp:67
~GasStation() override
[AI] Destroys gas station logic and unregisters this world from input, control and tick managers,...
Definition: gasstation.cpp:52
void ReadyWorld() override
[AI] Initializes world assets, actors, and interactive scripts according to saved state/current actor...
Definition: gasstation.cpp:131
void Enable(MxBool p_enable) override
[AI] Enables or disables this world (switches input/camera registration, etc) [AI].
Definition: gasstation.cpp:430
MxResult Tickle() override
[AI] Called every frame to update the garage world state for timers and LED animation.
Definition: gasstation.cpp:447
@ c_nick
Nick ([AI])
Definition: legoactor.h:20
@ c_laura
Laura ([AI])
Definition: legoactor.h:21
@ c_mama
Mama ([AI])
Definition: legoactor.h:18
@ c_none
No actor ([AI])
Definition: legoactor.h:16
@ c_pepper
Pepper Roni ([AI])
Definition: legoactor.h:17
@ c_papa
Papa ([AI])
Definition: legoactor.h:19
virtual MxU8 GetActorId()
[AI] Gets this actor's numeric ID, corresponding to a known enumeration/actor.
Definition: legoactor.h:77
[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.
MxS32 GetY() const
Returns Y (vertical) coordinate for the event, usually screen-relative in pixels.
MxS32 GetX() const
Returns X (horizontal) coordinate for the event, usually screen-relative in pixels.
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].
Definition: legogamestate.h:96
@ e_previousArea
Alias: go to previous area. [AI].
Definition: legogamestate.h:94
@ e_dunecarbuild
Vehicle construction: dune buggy. [AI].
@ e_garage
Garage (build vehicle) interior. [AI].
@ e_garadoor
Garage door or doorway. [AI].
@ e_unk28
Used for certain spawn locations. [AI].
@ e_undefined
Undefined or unset area. [AI].
Definition: legogamestate.h:93
void UnRegister(MxCore *)
[AI] Unregister a previously registered recipient so it will no longer receive input notifications.
void ClearWorld()
[AI] Remove any world assignment (used to clear targeting/scene changes). [AI]
void SetCamera(LegoCameraController *p_camera)
[AI] Assigns a new camera controller for mouse/look operations.
void SetWorld(LegoWorld *p_world)
[AI] Assigns the current world to receive mouse/click/pick notifications.
void Register(MxCore *)
[AI] Register a core object as a recipient for keyboard events; safe for concurrent multi-threading.
@ c_clearScreen
[AI] When set, clears the display surface. [AI]
Definition: legomain.h:49
@ c_disable3d
[AI] When set, disables 3D rendering. [AI]
Definition: legomain.h:48
@ c_disableInput
[AI] When set, disables input processing. [AI]
Definition: legomain.h:47
[AI] Represents a Real-time Object Instance enriched with LEGO-specific functionality.
Definition: legoroi.h:43
const LegoChar * GetName() const
[AI] Gets this ROI's name.
Definition: legoroi.h:287
virtual MxResult Serialize(LegoStorage *p_storage)
[AI] Serialize state to a storage (for save/load).
Definition: legostate.h:141
Abstract base class providing an interface for file-like storage with binary and text read/write oper...
Definition: legostorage.h:16
virtual LegoBool IsWriteMode()
Returns TRUE if object was opened in write mode.
Definition: legostorage.h:72
LegoStorage * WriteS16(LegoS16 p_data)
Writes a 16-bit signed value to storage.
Definition: legostorage.h:110
LegoStorage * ReadS16(LegoS16 &p_data)
Reads a 16-bit signed value from storage.
Definition: legostorage.h:217
virtual LegoBool IsReadMode()
Returns TRUE if object was opened in read mode.
Definition: legostorage.h:78
virtual void Enable(MxBool p_enable)
Enables or disables (pauses) the world and its main components.
Definition: legoworld.cpp:684
MxResult Tickle() override
Main world tick/update, especially manages startup countdown.
Definition: legoworld.cpp:810
MxBool m_worldStarted
Indicates if the world has successfully started and is considered active.
Definition: legoworld.h:388
MxCore * Find(const char *p_class, const char *p_name)
Finds an object of a given class and name in the world.
Definition: legoworld.cpp:573
MxLong Notify(MxParam &p_param) override
Notification callback responding to registered events such as EndAction and NewPresenter.
Definition: legoworld.cpp:212
MxResult Create(MxDSAction &p_dsAction) override
Initializes the world using an action, creating entity and sound lists, and camera controller.
Definition: legoworld.cpp:58
MxDSAction * GetAction()
[AI] Direct access to the underlying action.
void RaiseVolume()
[AI] Requests that the background music volume is raised (decrements suppression counter); triggers f...
void LowerVolume()
[AI] Requests a reduction in current background music volume, queuing for fade out (increments suppre...
void Stop()
[AI] Immediately stops all background music, clears all actions and presenters, and resets tickle sta...
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
Definition: mxdsaction.h:17
const MxAtomId & GetAtomId()
[AI] Returns a const-reference to the object's atom identifier.
Definition: mxdsobject.h:133
virtual void SetAtomId(MxAtomId p_atomId)
[AI] Sets the atom id for this object instance, used for indexing or lookup.
Definition: mxdsobject.h:118
void SetObjectId(MxU32 p_objectId)
[AI] Sets the object id (for serialization or lookup).
Definition: mxdsobject.h:147
MxU32 GetObjectId()
[AI] Returns the object id numeric value.
Definition: mxdsobject.h:130
[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.
Definition: mxentity.h:124
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...
Definition: mxparam.h:7
[AI] Presenter for single still image/bitmap media sources in the game.
void Enable(MxBool p_enable) override
[AI] Sets the enabled/disabled state of the presenter, updating the video manager's rendering as need...
virtual void UnregisterClient(MxCore *p_client)
[AI] Unregisters (marks for destruction) a previously registered client.
MxLong GetTime()
Returns the current timer value in ms, depending on running state.
Definition: mxtimer.h:50
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 Stop()
[AI] Stops radio playback if currently active and updates audio state.
Definition: radio.cpp:126
MxLong Notify(MxParam &p_param) override
[AI] Handles system notifications (end actions, control events) relevant to the radio.
Definition: radio.cpp:85
#define TRUE
Definition: d3drmdef.h:28
#define FALSE
Definition: d3drmdef.h:27
#define DECOMP_SIZE_ASSERT(T, S)
Definition: decomp.h:19
unsigned int undefined4
Definition: decomp.h:28
#define sizeOfArray(arr)
Definition: decomp.h:23
[AI] Enumerates all script elements used in the "Garage" sequence of LEGO Island.
MxBool g_trackLedEnabled
Definition: gasstation.cpp:32
undefined4 g_unk0x100f0160
Definition: gasstation.cpp:29
#define NULL
[AI] Null pointer value (C/C++ semantics).
Definition: legotypes.h:26
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.
Definition: legotypes.h:30
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.
Definition: legoutils.cpp:271
LegoROI * PickROI(MxLong p_x, MxLong p_y)
[AI] Picks the ROI (Renderable Object Instance) at screen coordinates.
Definition: legoutils.cpp:39
LegoGameState * GameState()
[AI] Accessor for the game's central game state controller. [AI]
Definition: misc.cpp:61
MxTransitionManager * TransitionManager()
[AI] Accessor for the MxTransitionManager, handling level transitions, fades, and world changes....
Definition: misc.cpp:208
MxBackgroundAudioManager * BackgroundAudioManager()
[AI] Accessor for the background audio manager. Used for background music and ambient sounds....
Definition: misc.cpp:37
LegoControlManager * ControlManager()
[AI] Accessor for the control manager through the input manager; manages higher-level user/game contr...
Definition: misc.cpp:53
void FUN_10015820(MxBool p_disable, MxU16 p_flags)
[AI] Utility for enabling or disabling functionality in LegoOmni based on certain flags.
Definition: misc.cpp:143
void PlayMusic(JukeboxScript::Script p_objectId)
[AI] Starts music playback by scripting the background audio manager to play the music piece referenc...
Definition: misc.cpp:216
LegoPathActor * UserActor()
[AI] Accessor for the user (player-controllable) LegoPathActor. [AI]
Definition: misc.cpp:85
void SetIsWorldActive(MxBool p_isWorldActive)
[AI] Toggles whether the world should be considered active (enables/disables camera/user control etc)...
Definition: misc.cpp:228
LegoInputManager * InputManager()
[AI] Accessor for the input manager, which handles keyboard, mouse, and controller input....
Definition: misc.cpp:45
MxTimer * Timer()
[AI] Returns the global simulation timer.
Definition: mxmisc.cpp:33
MxResult Start(MxDSAction *p_dsAction)
[AI] Schedules and initiates execution of a script action.
Definition: mxmisc.cpp:97
MxNotificationManager * NotificationManager()
[AI] Returns the notification manager for system-wide state/update notifications.
Definition: mxmisc.cpp:17
MxTickleManager * TickleManager()
[AI] Provides access to the global tickle manager.
Definition: mxmisc.cpp:25
@ c_notificationControl
[AI] UI control event [AI]
@ c_notificationButtonDown
[AI] Mouse/gamepad button press [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]
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
MxLong MxResult
[AI]
Definition: mxtypes.h:106
int MxLong
[AI]
Definition: mxtypes.h:83
signed int MxS32
[AI]
Definition: mxtypes.h:38
signed char MxS8
[AI]
Definition: mxtypes.h:14
@ c_Buggy_Ctl
[AI] UI control: buggy button/action. [AI]
@ c_noneGarage
[AI] Sentinel value representing "no action" or "no script" for the Garage context....
@ c_wgs020nu_RunAnim
[AI] Run animation, wgs020nu sequence. [AI]
@ c_wgs029nu_RunAnim
[AI] Run animation, wgs029nu sequence. [AI]
@ c_wgs014nu_RunAnim
[AI] Run animation, wgs014nu sequence. [AI]
@ c_LeftArrow_Ctl
[AI] UI control: left arrow button/action. [AI]
@ c_wgs007nu_RunAnim
[AI] Run animation, wgs007nu sequence. [AI]
@ c_wgs021nu_RunAnim
[AI] Run animation, wgs021nu sequence. [AI]
@ c_wgs004nu_RunAnim
[AI] Run animation, wgs004nu sequence. [AI]
@ c_wgs031nu_RunAnim
[AI] Run animation, wgs031nu sequence. [AI]
@ c_wgs022nu_RunAnim
[AI] Run animation, wgs022nu sequence. [AI]
@ c_wgs008nu_RunAnim
[AI] Run animation, wgs008nu sequence. [AI]
@ c_wgs017nu_RunAnim
[AI] Run animation, wgs017nu sequence. [AI]
@ c_Info_Ctl
[AI] UI control: info button/action. [AI]
@ c_wgs003nu_RunAnim
[AI] Run animation, wgs003nu sequence. [AI]
@ c_RightArrow_Ctl
[AI] UI control: right arrow button/action. [AI]
@ c_wgs006nu_RunAnim
[AI] Run animation, wgs006nu sequence. [AI]
@ c_wgs010nu_RunAnim
[AI] Run animation, wgs010nu sequence. [AI]
@ c_wgs002nu_RunAnim
[AI] Run animation, wgs002nu sequence. [AI]
@ c_wgs012nu_RunAnim
[AI] Run animation, wgs012nu sequence. [AI]
@ c_wgs023nu_RunAnim
[AI] Run animation, wgs023nu sequence. [AI]
@ c_wgs009nu_RunAnim
[AI] Run animation, wgs009nu sequence. [AI]
@ c_JBMusic2
[AI] Jukebox miscellaneous music 2.
[AI] Contains global script AtomId pointers and utility functions for managing script AtomIds in LEGO...
MxAtomId * g_garageScript
[AI] Script AtomId for the vehicle garage/world logic.
Definition: scripts.cpp:60
@ e_stop
[AI] Stop an activity or playback [AI]
Definition: extra.h:31