Isle
Loading...
Searching...
No Matches
towtrack.cpp
Go to the documentation of this file.
1#include "towtrack.h"
2
3#include "isle.h"
4#include "isle_actions.h"
5#include "jukebox_actions.h"
8#include "legogamestate.h"
9#include "legonavcontroller.h"
10#include "legopathstruct.h"
11#include "legoutils.h"
12#include "legovariables.h"
13#include "legoworld.h"
14#include "misc.h"
17#include "mxmisc.h"
18#include "mxsoundpresenter.h"
19#include "mxtimer.h"
20#include "mxtransitionmanager.h"
21#include "mxvariabletable.h"
22
25
26// Flags used in isle.cpp
27extern MxU32 g_isleFlags;
28
29// FUNCTION: LEGO1 0x1004c720
31{
32 m_unk0x168 = 0;
33 m_actorId = -1;
34 m_state = NULL;
35 m_unk0x16c = 0;
36 m_lastAction = IsleScript::c_noneIsle;
37 m_unk0x16e = 0;
38 m_lastAnimation = IsleScript::c_noneIsle;
39 m_maxLinearVel = 40.0;
40 m_fuel = 1.0;
41}
42
43// FUNCTION: LEGO1 0x1004c970
45{
47}
48
49// FUNCTION: LEGO1 0x1004c9e0
50// FUNCTION: BETA10 0x100f6bf1
52{
53 MxResult result = IslePathActor::Create(p_dsAction);
54
55 if (result == SUCCESS) {
57
58 if (m_world) {
59 m_world->Add(this);
60 }
61
62 m_state = (TowTrackMissionState*) GameState()->GetState("TowTrackMissionState");
63 if (!m_state) {
64 m_state = new TowTrackMissionState();
65 m_state->m_unk0x08 = 0;
66 GameState()->RegisterState(m_state);
67 }
68 }
69
71 m_fuel = 1.0;
72 m_time = Timer()->GetTime();
73 return result;
74}
75
76// FUNCTION: LEGO1 0x1004cb10
77void TowTrack::Animate(float p_time)
78{
80
81 if (UserActor() == this) {
82 char buf[200];
83 float speed = abs(m_worldSpeed);
84 float maxLinearVel = NavController()->GetMaxLinearVel();
85
86 sprintf(buf, "%g", speed / maxLinearVel);
88
89 m_fuel += (p_time - m_time) * -3.333333333e-06f;
90 if (m_fuel < 0) {
91 m_fuel = 0;
92 }
93
94 m_time = p_time;
95
96 sprintf(buf, "%g", m_fuel);
98
99 if (p_time - m_state->m_startTime > 100000.0f && m_state->m_unk0x08 == 1 && !m_state->m_unk0x10) {
101 m_state->m_unk0x10 = TRUE;
102 }
103 }
104}
105
106// FUNCTION: LEGO1 0x1004cc40
108{
109 m_state = (TowTrackMissionState*) GameState()->GetState("TowTrackMissionState");
110 if (m_state == NULL) {
111 m_state = (TowTrackMissionState*) GameState()->CreateState("TowTrackMissionState");
112 }
113}
114
115// FUNCTION: LEGO1 0x1004cc80
116// FUNCTION: BETA10 0x100f6de2
118{
119 MxLong result = 0;
120 MxNotificationParam& param = (MxNotificationParam&) p_param;
121
122 switch (param.GetNotification()) {
124 result = HandleNotification0();
125 break;
128 break;
130 result = HandleClick();
131 break;
134 break;
136 result = HandleEndAnim((LegoEndAnimNotificationParam&) p_param);
137 break;
140 break;
141 }
142
143 return result;
144}
145
146// FUNCTION: LEGO1 0x1004cd30
148{
149 return 1;
150}
151
152// FUNCTION: LEGO1 0x1004cd40
153// FUNCTION: BETA10 0x100f6f1f
155{
156 if (p_param.GetAction() != NULL) {
158
159 if (m_lastAnimation == objectId) {
160 m_lastAnimation = IsleScript::c_noneIsle;
161 }
162
163 if (m_lastAction == objectId) {
164 if (m_lastAnimation == IsleScript::c_noneIsle) {
166 }
167
168 m_lastAction = IsleScript::c_noneIsle;
169 }
170 else if (objectId == IsleScript::c_wrt060bm_RunAnim) {
171 if (m_actorId < LegoActor::c_pepper || m_actorId > LegoActor::c_laura) {
172 m_actorId = LegoActor::c_laura;
173 }
174
175 switch ((rand() % ((m_actorId != 4 ? 4 : 3))) + 1) {
176 case 1:
177 PlayFinalAnimation(IsleScript::c_wrt074sl_RunAnim);
178 break;
179 case 2:
180 PlayFinalAnimation(IsleScript::c_wrt075rh_RunAnim);
181 break;
182 case 3:
183 PlayFinalAnimation(IsleScript::c_wrt076df_RunAnim);
184 break;
185 case 4:
186 PlayFinalAnimation(IsleScript::c_wrt078ni_RunAnim);
187 break;
188 }
189 }
191 m_state->m_unk0x08 = 2;
193 HandleClick();
194 }
195 else if (objectId == IsleScript::c_wgs083nu_RunAnim) {
196 if (m_actorId < LegoActor::c_pepper || m_actorId > LegoActor::c_laura) {
197 m_actorId = LegoActor::c_laura;
198 }
199
200 switch (m_actorId) {
201 case c_pepper:
202 FUN_1004dcb0(IsleScript::c_wgs085nu_RunAnim);
203 break;
204 case c_mama:
205 FUN_1004dcb0(IsleScript::c_wgs086nu_RunAnim);
206 break;
207 case c_papa:
208 FUN_1004dcb0(IsleScript::c_wgs088nu_RunAnim);
209 break;
210 case c_nick:
211 FUN_1004dcb0(IsleScript::c_wgs087nu_RunAnim);
212 break;
213 case c_laura:
214 FUN_1004dcb0(IsleScript::c_wgs089nu_RunAnim);
215 break;
216 }
217
218 m_state->UpdateScore(LegoState::e_red, m_actorId);
219
223 }
224 else if (objectId == IsleScript::c_wgs090nu_RunAnim) {
225 if (m_actorId < LegoActor::c_pepper || m_actorId > LegoActor::c_laura) {
226 m_actorId = LegoActor::c_laura;
227 }
228
229 switch (m_actorId) {
230 case c_pepper:
231 FUN_1004dcb0(IsleScript::c_wgs091nu_RunAnim);
232 break;
233 case c_mama:
234 FUN_1004dcb0(IsleScript::c_wgs092nu_RunAnim);
235 break;
236 case c_papa:
237 FUN_1004dcb0(IsleScript::c_wgs094nu_RunAnim);
238 break;
239 case c_nick:
240 FUN_1004dcb0(IsleScript::c_wgs093nu_RunAnim);
241 break;
242 case c_laura:
243 FUN_1004dcb0(IsleScript::c_wgs095nu_RunAnim);
244 break;
245 }
246
247 m_state->UpdateScore(LegoState::e_blue, m_actorId);
248 }
249 else if (objectId == IsleScript::c_wgs097nu_RunAnim) {
250 if (m_actorId < LegoActor::c_pepper || m_actorId > LegoActor::c_laura) {
251 m_actorId = LegoActor::c_laura;
252 }
253
254 switch (m_actorId) {
255 case c_pepper:
256 FUN_1004dcb0(IsleScript::c_wgs098nu_RunAnim);
257 break;
258 case c_mama:
259 FUN_1004dcb0(IsleScript::c_wgs099nu_RunAnim);
260 break;
261 case c_papa:
262 FUN_1004dcb0(IsleScript::c_wgs101nu_RunAnim);
263 break;
264 case c_nick:
265 FUN_1004dcb0(IsleScript::c_wgs100nu_RunAnim);
266 break;
267 case c_laura:
268 FUN_1004dcb0(IsleScript::c_wgs102nu_RunAnim);
269 break;
270 }
271
272 m_state->UpdateScore(LegoState::e_yellow, m_actorId);
273 }
275 ((Act1State*) GameState()->GetState("Act1State"))->m_unk0x018 = 0;
279 }
280 }
281
282 return 1;
283}
284
285// FUNCTION: LEGO1 0x1004d330
286// FUNCTION: BETA10 0x100f74c0
288{
289 MxDSAction action;
290
291 // 0x168 corresponds to the path at the gas station
292 if (p_param.GetData() == 0x168) {
293 m_fuel = 1.0f;
294 }
295
296 if (UserActor() != this) {
297 return 0;
298 }
299
300 if (m_state->m_unk0x08 == 2 &&
301 ((p_param.GetTrigger() == LegoPathStruct::c_camAnim && (p_param.GetData() == 9 || p_param.GetData() == 8)) ||
302 (p_param.GetTrigger() == LegoPathStruct::c_w && p_param.GetData() == 0x169))) {
303 m_state->m_unk0x08 = 0;
304
305 MxLong time = Timer()->GetTime() - m_state->m_startTime;
306 Leave();
307
308 if (time < 200000) {
309 PlayFinalAnimation(IsleScript::c_wgs083nu_RunAnim);
310 }
311 else if (time < 300000) {
312 PlayFinalAnimation(IsleScript::c_wgs090nu_RunAnim);
313 }
314 else {
315 PlayFinalAnimation(IsleScript::c_wgs097nu_RunAnim);
316 }
317 }
318 else if (m_state->m_unk0x08 == 1 && p_param.GetTrigger() == LegoPathStruct::c_camAnim && p_param.GetData() == 0x37) {
319 m_state->m_unk0x08 = 3;
320 StopActions();
321
322 if (m_lastAction != IsleScript::c_noneIsle) {
324 }
325
326 Leave();
327 PlayFinalAnimation(IsleScript::c_wrt060bm_RunAnim);
328 }
329 else if (p_param.GetTrigger() == LegoPathStruct::c_w && m_state->m_unk0x08 == 1) {
330 if (p_param.GetData() == 0x15f) {
331 if (m_unk0x16c == 0) {
332 m_unk0x16c = 1;
334 }
335 }
336 else if (p_param.GetData() == 0x160) {
337 if (m_unk0x16e == 0) {
338 m_unk0x16e = 1;
340 }
341
342 if (!m_state->m_unk0x10 && m_lastAction == IsleScript::c_noneIsle) {
343 if (m_actorId < LegoActor::c_pepper || m_actorId > LegoActor::c_laura) {
344 m_actorId = LegoActor::c_laura;
345 }
346
347 IsleScript::Script objectId;
348
349 switch (m_actorId) {
350 case c_pepper:
352 break;
353 case c_mama:
354 switch ((rand() % 2) + 1) {
355 case 1:
357 break;
358 case 2:
360 break;
361 }
362 break;
363 case c_papa:
364 switch ((rand() % 2) + 1) {
365 case 1:
367 break;
368 case 2:
370 break;
371 }
372 break;
373 case c_nick:
374 switch ((rand() % 2) + 1) {
375 case 1:
377 break;
378 case 2:
380 break;
381 }
382 break;
383 case c_laura:
384 switch ((rand() % 2) + 1) {
385 case 1:
387 break;
388 case 2:
390 break;
391 }
392 break;
393 }
394
395 PlayAction(objectId);
396 }
397 }
398 }
399
400 return 0;
401}
402
403// FUNCTION: LEGO1 0x1004d690
405{
406 if (((Act1State*) GameState()->GetState("Act1State"))->m_unk0x018 != 8) {
407 return 1;
408 }
409
410 if (m_state->m_unk0x08 == 3) {
411 return 1;
412 }
413
414 FUN_10015820(TRUE, 0);
415 ((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_towtrack);
417
418 if (UserActor()->GetActorId() != GameState()->GetActorId()) {
419 ((IslePathActor*) UserActor())->Exit();
420 }
421
422 m_time = Timer()->GetTime();
423 m_actorId = UserActor()->GetActorId();
424
425 Enter();
427 ControlManager()->Register(this);
428
429 if (m_state->m_unk0x08 == 0) {
430 return 1;
431 }
432
433 if (m_state->m_unk0x08 == 2) {
435 FindROI("rcred")->SetVisibility(FALSE);
436 }
437 else {
439 m_lastAction = IsleScript::c_noneIsle;
440 m_lastAnimation = IsleScript::c_noneIsle;
441 m_state->m_startTime = Timer()->GetTime();
442 m_state->m_unk0x10 = FALSE;
450 }
451
452 return 1;
453}
454
455// FUNCTION: LEGO1 0x1004d8f0
457{
459 StopActions();
460 FUN_1004dbe0();
461 Leave();
462}
463
464// FUNCTION: LEGO1 0x1004d920
465void TowTrack::Leave()
466{
468 CurrentWorld()->RemoveActor(this);
477 ControlManager()->Unregister(this);
478}
479
480// FUNCTION: LEGO1 0x1004d9e0
482{
483 MxLong result = 0;
484
485 if (p_param.m_unk0x28 == 1) {
486 switch (p_param.m_clickedObjectId) {
488 Exit();
490 result = 1;
491 break;
493 ((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_infomain);
495 Exit();
497 result = 1;
498 break;
500 MxSoundPresenter* presenter = (MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "TowHorn_Sound");
501 presenter->Enable(p_param.m_unk0x28);
502 break;
503 }
504 }
505
506 return result;
507}
508
509// FUNCTION: LEGO1 0x1004dab0
511{
512 m_state->m_unk0x08 = 1;
513 HandleClick();
514}
515
516// FUNCTION: LEGO1 0x1004dad0
518{
520
521 if (m_state->m_unk0x08 != 0) {
522 if (m_state->m_unk0x08 == 2) {
524 }
525 else {
527 }
528 }
529}
530
531// FUNCTION: LEGO1 0x1004db10
533{
543}
544
545// FUNCTION: LEGO1 0x1004dbe0
547{
548 if (m_lastAction != -1) {
550 }
551
552 ((Act1State*) GameState()->GetState("Act1State"))->m_unk0x018 = 0;
553 m_state->m_unk0x08 = 0;
557 m_state->m_startTime = INT_MIN;
558 m_state->m_unk0x10 = FALSE;
559 m_state = NULL;
560 m_unk0x16c = 0;
561 m_unk0x16e = 0;
562}
563
564// FUNCTION: LEGO1 0x1004dc80
565// FUNCTION: BETA10 0x100f86a0
566void TowTrack::PlayFinalAnimation(IsleScript::Script p_objectId)
567{
570 m_lastAnimation = p_objectId;
571}
572
573// FUNCTION: LEGO1 0x1004dcb0
574void TowTrack::FUN_1004dcb0(IsleScript::Script p_objectId)
575{
579 m_lastAnimation = p_objectId;
580}
581
582// FUNCTION: LEGO1 0x1004dcf0
583void TowTrack::PlayAction(IsleScript::Script p_objectId)
584{
585 if (p_objectId != IsleScript::c_noneIsle) {
587 }
588
589 m_lastAction = p_objectId;
591}
592
593// FUNCTION: LEGO1 0x1004dd30
595{
596 m_unk0x08 = 0;
597 m_startTime = 0;
599 m_peScore = 0;
600 m_maScore = 0;
601 m_paScore = 0;
602 m_niScore = 0;
603 m_laScore = 0;
604 m_peHighScore = 0;
605 m_maHighScore = 0;
606 m_paHighScore = 0;
607 m_niHighScore = 0;
608 m_laHighScore = 0;
609}
MxU32 g_isleFlags
Definition: isle.cpp:46
[AI] Holds state and transient gameplay data for the first act on Lego Island.
Definition: isle.h:29
Derived path actor type for handling player transitions and activities on LEGO Island.
Definition: islepathactor.h:23
MxResult Create(MxDSAction &p_dsAction) override
[AI] Initialize this actor from a DSAction.
virtual void SpawnPlayer(LegoGameState::Area p_area, MxBool p_enter, MxU8 p_flags)
[AI] Spawns the player in a specific area/location, potentially triggering music and animation.
virtual MxLong HandleNotification0()
[AI] Handles custom notification type 0 for this actor.
virtual void Exit()
[AI] Called when the actor is deactivated or moved out of player control, restoring previous actor if...
LegoWorld * m_world
[AI] Pointer to the current world instance actor is existing in. [AI]
virtual void Enter()
[AI] Called when the actor is made active in a new area or context, setting navigation and visibility...
[AI] Represents the main overworld (LEGO Island) in the game, acting as the central hub and state mac...
Definition: isle.h:179
@ c_playMusic
[AI] If set, background music plays.
Definition: isle.h:184
@ 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_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
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.
@ e_unk1
[AI] Unknown/unspecified play mode
@ e_unk0
[AI] Unknown/unspecified play mode
void EnableCamAnims(MxBool p_enableCamAnims)
[AI] Sets whether camera-based queued animations are enabled for the world.
void FUN_1005f6d0(MxBool p_unk0x400)
[AI] Enables or disables extras (extra actors).
[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 for signaling the end of an animation in the LEGO Island engine.
MxFloat m_worldSpeed
[AI] World-relative speed (can affect animation/movement logic). [AI]
Definition: legoentity.h:212
LegoROI * m_roi
[AI] Pointer to this entity's currently assigned ROI (3D instance in the world). [AI]
Definition: legoentity.h:215
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 RegisterState(LegoState *p_state)
Registers a state object, replacing by class if already present.
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_unk66
Used for some spawn locations. [AI].
@ e_garageExterior
Garage (vehicle construction) exterior. [AI].
@ e_unk28
Used for certain spawn locations. [AI].
@ e_towtrack
Towtruck (vehicle, spawn). [AI].
@ e_unk52
Unknown [AI].
MxFloat GetMaxLinearVel()
[AI] Returns the current maximum linear velocity (units per sec).
virtual void Animate(float p_time)
[AI] Per-frame animation update.
[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.
@ c_camAnim
[AI] Camera animation trigger.
@ c_w
[AI] World notification trigger.
@ e_red
[AI] Warning/critical color (3) [AI]
Definition: legostate.h:26
@ e_yellow
[AI] First colored highlight (1) [AI]
Definition: legostate.h:24
@ e_blue
[AI] Second color, e.g. better score (2) [AI]
Definition: legostate.h:25
MxResult PlaceActor(LegoPathActor *p_actor, const char *p_name, MxS32 p_src, float p_srcScale, MxS32 p_dest, float p_destScale)
Places an actor along a path, from source to destination, using named references and scaling.
Definition: legoworld.cpp:267
virtual void Add(MxCore *p_object)
Adds an object (entity, presenter, ROI, etc.) to the appropriate world-managed list or set.
Definition: legoworld.cpp:418
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
void RemoveActor(LegoPathActor *p_actor)
Removes an actor from all known path controllers.
Definition: legoworld.cpp:325
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...
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
Definition: mxdsaction.h:17
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...
void Enable(MxBool p_enable) override
[AI] Enables or disables media stream playback and transitions state as needed.
[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] Concrete presenter for sound playback and control within the LEGO Island engine.
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 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.
Definition: roi.h:235
[AI] State class for the TowTrack mini-game, storing scores by character and handling their serializa...
Definition: towtrack.h:17
void UpdateScore(ScoreColor p_score, MxS16 p_actorId)
[AI] Updates the score for an actor and also updates the highscore if the new score exceeds the previ...
MxS16 m_peScore
[AI] Current Pepper score in the mission.
Definition: towtrack.h:64
MxLong m_startTime
[AI] Start time of the mission attempt, used to track performance.
Definition: towtrack.h:62
MxS16 m_paScore
[AI] Current Papa score in the mission.
Definition: towtrack.h:66
MxS16 m_maHighScore
[AI] Highscore for Mama achieved so far in the mission.
Definition: towtrack.h:70
MxBool m_unk0x10
[AI] Flag for one-time event in end-sequence (prevents repeated trigger).
Definition: towtrack.h:63
MxS16 m_niHighScore
[AI] Highscore for Nick achieved so far in the mission.
Definition: towtrack.h:72
MxS16 m_laScore
[AI] Current Laura score in the mission.
Definition: towtrack.h:68
MxS16 m_laHighScore
[AI] Highscore for Laura achieved so far in the mission.
Definition: towtrack.h:73
MxS16 m_niScore
[AI] Current Nick score in the mission.
Definition: towtrack.h:67
MxS16 m_paHighScore
[AI] Highscore for Papa achieved so far in the mission.
Definition: towtrack.h:71
MxS16 m_maScore
[AI] Current Mama score in the mission.
Definition: towtrack.h:65
TowTrackMissionState()
[AI] Constructs and initializes all score and state values for the Tow Track mini-game.
Definition: towtrack.cpp:594
undefined4 m_unk0x08
[AI] Mission substage/step flag for Tow Track, typically takes 0,1,2,3 (purpose per stage flow).
Definition: towtrack.h:61
MxS16 m_peHighScore
[AI] Highscore for Pepper achieved so far in the mission.
Definition: towtrack.h:69
[AI] 3D world actor for the Tow Track mini-game; manages Tow Track mission logic, scene activation an...
Definition: towtrack.h:83
void Animate(float p_time) override
[AI] Main per-frame update.
Definition: towtrack.cpp:77
~TowTrack() override
[AI] Destructor unregisters this TowTrack from control handlers and performs cleanup.
Definition: towtrack.cpp:44
MxLong HandlePathStruct(LegoPathStructNotificationParam &p_param) override
[AI] Handles path-structure trigger events (e.g., player crossing locations on path networks).
Definition: towtrack.cpp:287
void StopActions()
[AI] Halts all ongoing Tow Track mini-game actions.
Definition: towtrack.cpp:532
MxLong HandleControl(LegoControlManagerNotificationParam &p_param) override
[AI] Handles user input or control notifications (such as UI widget actions) directed at TowTrack.
Definition: towtrack.cpp:481
void FUN_1004dbe0()
[AI] Handles cleanup tasks upon mini-game exit, including resetting state variables and unregistering...
Definition: towtrack.cpp:546
virtual MxLong HandleEndAction(MxEndActionNotificationParam &p_param)
[AI] Handles end of scripted in-game action (or cutscene) for the TowTrack.
Definition: towtrack.cpp:154
void Exit() override
[AI] Called when the TowTrack mini-game is exited (by player or action/trigger).
Definition: towtrack.cpp:456
void ActivateSceneActions()
[AI] Triggers scene-based scripted actions according to mission state.
Definition: towtrack.cpp:517
MxLong HandleEndAnim(LegoEndAnimNotificationParam &p_param) override
[AI] Called when an animation finishes; used for state progression in the mini-game.
Definition: towtrack.cpp:147
MxLong Notify(MxParam &p_param) override
[AI] Notifies the TowTrack actor of an event.
Definition: towtrack.cpp:117
void CreateState()
[AI] Ensures the TowTrackMissionState exists and is registered in the global state manager.
Definition: towtrack.cpp:107
MxLong HandleClick() override
[AI] Handles user (mouse) click event on the TowTrack, including state setup and spawning side-effect...
Definition: towtrack.cpp:404
MxResult Create(MxDSAction &p_dsAction) override
[AI] Instantiates or restores this actor in the current world according to DSAction.
Definition: towtrack.cpp:51
void FUN_1004dab0()
[AI] Begins the Tow Track mission, sets state variable, and triggers click-handling sequence.
Definition: towtrack.cpp:510
#define TRUE
Definition: d3drmdef.h:28
#define FALSE
Definition: d3drmdef.h:27
#define DECOMP_SIZE_ASSERT(T, S)
Definition: decomp.h:19
#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
MxBool RemoveFromCurrentWorld(const MxAtomId &p_atomId, MxS32 p_id)
[AI] Removes an entity or presenter with specified AtomId and ID from the current world; triggers End...
Definition: legoutils.cpp:495
MxAtomId * g_isleScript
[AI] Node used in hierarchical scene graphs and animation trees. [AI]
Definition: scripts.cpp:32
const char * g_varTOWFUEL
[AI] Global variable key for tow truck fuel.
const char * g_varTOWSPEED
[AI] Global variable key for tow truck speed.
LegoGameState * GameState()
[AI] Accessor for the game's central game state controller. [AI]
Definition: misc.cpp:61
LegoAnimationManager * AnimationManager()
[AI] Accessor for the animation manager, which controls Lego character/world animation state....
Definition: misc.cpp:69
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
LegoWorld * CurrentWorld()
[AI] Accessor for the currently active LegoWorld instance. [AI]
Definition: misc.cpp:93
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
LegoNavController * NavController()
[AI] Accessor for the navigation controller, managing player/camera navigation. [AI]
Definition: misc.cpp:77
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
LegoROI * FindROI(const char *p_name)
[AI] Looks up a LegoROI (Real-time Object Instance) by name in the current world or global registry.
Definition: misc.cpp:151
MxTimer * Timer()
[AI] Returns the global simulation timer.
Definition: mxmisc.cpp:33
MxVariableTable * VariableTable()
[AI] Returns the variable table used for script variables and global key/value state.
Definition: mxmisc.cpp:73
@ c_notificationControl
[AI] UI control event [AI]
@ c_notificationEndAnim
[AI] End of an animation [AI]
@ c_notificationType0
[AI] Undefined/Generic notification type [AI]
@ c_notificationEndAction
[AI] Indicates the end of an action [AI]
@ c_notificationClick
[AI] Mouse click event [AI]
@ c_notificationPathStruct
[AI] Data related to a path structure [AI]
MxLong MxResult
[AI]
Definition: mxtypes.h:106
int MxLong
[AI]
Definition: mxtypes.h:83
unsigned int MxU32
[AI]
Definition: mxtypes.h:32
@ c_wns050p1_RunAnim
Definition: isle_actions.h:419
@ c_wrt082na_PlayWav
Definition: isle_actions.h:944
@ c_wns039na_PlayWav
Definition: isle_actions.h:937
@ c_wgs095nu_RunAnim
Definition: isle_actions.h:797
@ c_wns043na_PlayWav
Definition: isle_actions.h:941
@ c_TowTrackArms_Ctl
Definition: isle_actions.h:191
@ c_wgs098nu_RunAnim
Definition: isle_actions.h:800
@ c_wgs091nu_RunAnim
Definition: isle_actions.h:793
@ c_wgs097nu_RunAnim
Definition: isle_actions.h:799
@ c_wgs101nu_RunAnim
Definition: isle_actions.h:803
@ c_wgs090nu_RunAnim
Definition: isle_actions.h:792
@ c_wgs100nu_RunAnim
Definition: isle_actions.h:802
@ c_wgs085nu_RunAnim
Definition: isle_actions.h:787
@ c_wns037na_PlayWav
Definition: isle_actions.h:935
@ c_wgs102nu_RunAnim
Definition: isle_actions.h:804
@ c_wns045di_RunAnim
Definition: isle_actions.h:424
@ c_wgs086nu_RunAnim
Definition: isle_actions.h:788
@ c_wrt060bm_RunAnim
Definition: isle_actions.h:806
@ c_wns053pr_RunAnim
Definition: isle_actions.h:425
@ c_wns049p1_RunAnim
Definition: isle_actions.h:420
@ c_wgs083nu_RunAnim
Definition: isle_actions.h:786
@ c_wns042na_PlayWav
Definition: isle_actions.h:940
@ c_wrt075rh_RunAnim
Definition: isle_actions.h:808
@ c_wns040na_PlayWav
Definition: isle_actions.h:938
@ c_wgs094nu_RunAnim
Definition: isle_actions.h:796
@ c_wns041na_PlayWav
Definition: isle_actions.h:939
@ c_Avo909In_PlayWav
Definition: isle_actions.h:946
@ c_wns051bd_RunAnim
Definition: isle_actions.h:427
@ c_wns046mg_RunAnim
Definition: isle_actions.h:426
@ c_wns048p1_RunAnim
Definition: isle_actions.h:421
@ c_wgs099nu_RunAnim
Definition: isle_actions.h:801
@ c_wgs093nu_RunAnim
Definition: isle_actions.h:795
@ c_wgs092nu_RunAnim
Definition: isle_actions.h:794
@ c_wrt074sl_RunAnim
Definition: isle_actions.h:807
@ c_wgs089nu_RunAnim
Definition: isle_actions.h:791
@ c_pns123pr_RunAnim
Definition: isle_actions.h:423
@ c_wgs032nu_PlayWav
Definition: isle_actions.h:930
@ c_wrt078ni_RunAnim
Definition: isle_actions.h:810
@ c_wns038na_PlayWav
Definition: isle_actions.h:936
@ c_wgs087nu_RunAnim
Definition: isle_actions.h:789
@ c_wrt076df_RunAnim
Definition: isle_actions.h:809
@ c_wns044na_PlayWav
Definition: isle_actions.h:942
@ c_wgs088nu_RunAnim
Definition: isle_actions.h:790
@ c_wns034na_PlayWav
Definition: isle_actions.h:932
@ c_TowTrackDashboard
Definition: isle_actions.h:189
@ c_wns057rd_RunAnim
Definition: isle_actions.h:422
@ c_TowTrackDashboard_Bitmap
Definition: isle_actions.h:190
@ c_JBMusic2
[AI] Jukebox miscellaneous music 2.
@ e_stop
[AI] Stop an activity or playback [AI]
Definition: extra.h:31
@ e_start
[AI] Start an activity or playback [AI]
Definition: extra.h:30
MxU32 g_isleFlags
Definition: isle.cpp:46