Isle
Loading...
Searching...
No Matches
pizza.cpp
Go to the documentation of this file.
1#include "pizza.h"
2
3#include "isle.h"
4#include "isle_actions.h"
5#include "jukebox_actions.h"
8#include "legogamestate.h"
9#include "legoinputmanager.h"
10#include "legopathstruct.h"
11#include "legoutils.h"
12#include "legoworld.h"
13#include "misc.h"
16#include "mxdebug.h"
17#include "mxmisc.h"
18#include "mxticklemanager.h"
19#include "mxtimer.h"
20#include "mxtransitionmanager.h"
21#include "pizzeria.h"
22#include "skateboard.h"
23#include "sndanim_actions.h"
24
28
29// Flags used in isle.cpp
30extern MxU32 g_isleFlags;
31
32// GLOBAL: LEGO1 0x100f3a80
33IsleScript::Script PizzaMissionState::g_pepperActions[] = {
47};
48
49// GLOBAL: LEGO1 0x100f3ab8
50MxLong PizzaMissionState::g_pepperFinishTimes[] = {100000, 200000, 300000, 350000};
51
52// GLOBAL: LEGO1 0x100f3ac8
67};
68
69// GLOBAL: LEGO1 0x100f3b00
70MxLong PizzaMissionState::g_lauraFinishTimes[] = {100000, 200000, 300000, 350000};
71
72// GLOBAL: LEGO1 0x100f3b10
87};
88
89// GLOBAL: LEGO1 0x100f3b48
90MxLong PizzaMissionState::g_nickFinishTimes[] = {100000, 200000, 300000, 350000};
91
92// GLOBAL: LEGO1 0x100f3b58
107};
108
109// GLOBAL: LEGO1 0x100f3b90
110MxLong PizzaMissionState::g_mamaFinishTimes[] = {100000, 200000, 300000, 350000};
111
112// GLOBAL: LEGO1 0x100f3ba0
127};
128
129// GLOBAL: LEGO1 0x100f3bd8
130MxLong PizzaMissionState::g_papaFinishTimes[] = {100000, 200000, 300000, 350000};
131
132// FUNCTION: LEGO1 0x10037ef0
134{
135 m_state = NULL;
136 m_mission = NULL;
137 m_skateBoard = NULL;
138 m_act1state = NULL;
139 m_unk0x8c = IsleScript::c_noneIsle;
140 m_unk0x98 = FALSE;
141 m_unk0x90 = INT_MIN;
142}
143
144// FUNCTION: LEGO1 0x10038100
146{
148}
149
150// FUNCTION: LEGO1 0x10038170
152{
153 MxResult result = IsleActor::Create(p_dsAction);
154
155 if (result == SUCCESS) {
156 CreateState();
158 }
159
160 return result;
161}
162
163// FUNCTION: LEGO1 0x100381b0
164// FUNCTION: BETA10 0x100edaec
166{
167 m_state = (PizzaMissionState*) GameState()->GetState("PizzaMissionState");
168 if (m_state == NULL) {
169 m_state = (PizzaMissionState*) GameState()->CreateState("PizzaMissionState");
170 }
171
172 m_act1state = (Act1State*) GameState()->GetState("Act1State");
173 if (m_act1state == NULL) {
174 m_act1state = (Act1State*) GameState()->CreateState("Act1State");
175 }
176}
177
178// FUNCTION: LEGO1 0x10038220
179// FUNCTION: BETA10 0x100edb81
181{
183 m_mission = m_state->GetMission(GameState()->GetActorId());
184 m_state->m_unk0x0c = 1;
185 m_act1state->m_unk0x018 = 3;
186 m_mission->m_startTime = INT_MIN;
187 g_isleFlags &= ~Isle::c_playMusic;
190 PlayAction(p_objectId, FALSE);
191 m_unk0x8c = IsleScript::c_noneIsle;
192}
193
194// FUNCTION: LEGO1 0x100382b0
195// FUNCTION: BETA10 0x100edc9b
197{
198 if (m_state->m_unk0x0c != 8) {
199 if (m_unk0x8c != IsleScript::c_noneIsle) {
201 }
202
203 m_act1state->m_unk0x018 = 0;
204 m_state->m_unk0x0c = 0;
209 m_mission->m_startTime = INT_MIN;
210 m_mission = NULL;
211 m_unk0x98 = FALSE;
212 m_unk0x8c = IsleScript::c_noneIsle;
215 m_unk0x90 = INT_MIN;
216 m_skateBoard->EnableScenePresentation(FALSE);
217 m_skateBoard->SetPizzaVisible(FALSE);
218 MxTrace("Pizza mission: idle\n");
219 }
220}
221
222// FUNCTION: LEGO1 0x10038380
224{
227
228 PizzaMissionState::Mission* mission = m_mission;
229 if (mission != NULL) {
230 for (MxS32 i = 0; i < mission->m_numActions; i++) {
232 }
233 }
234}
235
236// FUNCTION: LEGO1 0x100383f0
237// FUNCTION: BETA10 0x100edd10
239{
240 if (m_state->m_unk0x0c == 1) {
241 m_state->m_unk0x0c = 2;
242 m_mission->m_startTime = Timer()->GetTime();
243 TickleManager()->RegisterClient(this, 200);
245 }
246
247 if (m_state->m_unk0x0c == 2) {
248 m_act1state->m_unk0x018 = 3;
249
250 if (m_skateBoard == NULL) {
252 assert(m_skateBoard);
253 }
254
255 IsleScript::Script action;
256
257 switch (m_state->FUN_10039540()) {
258 case 0:
259 action = m_mission->m_actions[m_mission->m_numActions + 3];
260 break;
261 case 1:
262 action = m_mission->m_actions[m_mission->m_numActions + 4];
263 break;
264 default:
265 action = m_mission->m_actions[m_mission->m_numActions + 5];
266 }
267
268 PlayAction(action, TRUE);
269 m_state->m_unk0x0c = 3;
271 return 1;
272 }
273
274 return 0;
275}
276
277// FUNCTION: LEGO1 0x100384f0
278// FUNCTION: BETA10 0x100ede53
280{
281 if (m_state->m_unk0x0c == 4) {
282 MxLong time = Timer()->GetTime() - m_mission->m_startTime;
283
284 if (p_param.GetTrigger() == LegoPathStruct::c_s && p_param.GetData() == 0x12e &&
286 m_state->m_unk0x0c = 5;
288
289 if (time < m_mission->GetRedFinishTime()) {
290 m_mission->UpdateScore(LegoState::e_red);
291 }
292 else if (time < m_mission->GetBlueFinishTime()) {
293 m_mission->UpdateScore(LegoState::e_blue);
294 }
295 else {
297 }
298
299 MxTrace("Pizza mission: ending\n");
300 }
301 else if ((p_param.GetTrigger() == LegoPathStruct::c_camAnim && (
302 ((p_param.GetData() == 0x24 || p_param.GetData() == 0x22) && GameState()->GetActorId() == LegoActor::c_mama) ||
303 (p_param.GetData() == 0x33 && GameState()->GetActorId() == LegoActor::c_papa) ||
304 ((p_param.GetData() == 0x08 || p_param.GetData() == 0x09) && GameState()->GetActorId() == LegoActor::c_nick) ||
305 (p_param.GetData() == 0x0b && GameState()->GetActorId() == LegoActor::c_laura)
306 )) || (p_param.GetTrigger() == LegoPathStruct::c_w && p_param.GetData() == 0x169 && GameState()->GetActorId() == LegoActor::c_nick)) {
307 IsleScript::Script action;
308
309 if (time < m_mission->GetRedFinishTime()) {
310 action = m_mission->GetRedFinishAction();
311 m_mission->UpdateScore(LegoState::e_red);
312 }
313 else if (time < m_mission->GetBlueFinishTime()) {
314 action = m_mission->GetBlueFinishAction();
315 m_mission->UpdateScore(LegoState::e_blue);
316 }
317 else {
318 action = m_mission->GetYellowFinishAction();
320 }
321
322 StopActions();
323
324 switch (action) {
328 m_unk0x90 = Timer()->GetTime();
329 m_unk0x94 = 3800;
330 break;
334 m_unk0x90 = Timer()->GetTime();
335 m_unk0x94 = 6400;
336 break;
340 m_unk0x90 = Timer()->GetTime();
341 m_unk0x94 = 7000;
342 break;
346 m_unk0x90 = Timer()->GetTime();
347 m_unk0x94 = 6500;
348 break;
349 }
350
351 m_state->m_unk0x0c = 5;
352 PlayAction(action, TRUE);
353
354 MxTrace("Pizza mission: ending\n");
355 }
356 else if (p_param.GetTrigger() == LegoPathStruct::c_w) {
357 if (p_param.GetData() == 0x15e && GameState()->GetActorId() == LegoActor::c_pepper) {
358 if (!m_unk0x98) {
359 m_unk0x98 = TRUE;
361 }
362 }
363 else if (p_param.GetData() == 0x15f && GameState()->GetActorId() == LegoActor::c_papa && !m_unk0x98) {
364 m_unk0x98 = TRUE;
366 }
367 }
368 }
369
370 return 0;
371}
372
373// FUNCTION: LEGO1 0x100388a0
374// FUNCTION: BETA10 0x100ee2d9
376{
377 MxLong time = Timer()->GetTime();
378
379 if (m_unk0x90 != INT_MIN && m_unk0x94 + m_unk0x90 <= time) {
380 m_unk0x90 = INT_MIN;
381 m_skateBoard->EnableScenePresentation(FALSE);
382 m_skateBoard->SetPizzaVisible(FALSE);
384 }
385
386 if (m_mission != NULL && m_mission->m_startTime != INT_MIN) {
387 if (m_state->m_unk0x0c == 4) {
388 assert(m_mission);
389
390 if (time > m_mission->m_startTime + m_mission->GetTimeoutTime()) {
391 StopActions();
392 m_mission->UpdateScore(LegoState::e_grey);
393 FUN_100382b0();
396 MxTrace("Pizza mission: timeout, stop\n");
397 }
398 else if (time >= m_mission->m_startTime + 35000 && m_unk0x8c == IsleScript::c_noneIsle) {
399 switch (GameState()->GetActorId()) {
402 break;
405 break;
408 break;
411 break;
414 break;
415 }
416
418
419 if (m_unk0x8c != IsleScript::c_noneIsle) {
421 }
422 }
423 }
424 else if (m_state->m_unk0x0c == 2) {
425 assert(m_mission);
426
427 if (Timer()->GetTime() > m_mission->m_startTime + 5000) {
428 m_skateBoard->SetPizzaVisible(FALSE);
429 m_skateBoard->EnableScenePresentation(FALSE);
431 m_mission->UpdateScore(LegoState::e_grey);
432 m_state->m_unk0x0c = 9;
435 MxTrace("Pizza mission: timeout, declining\n");
436 }
437 }
438 }
439
440 return SUCCESS;
441}
442
443// FUNCTION: LEGO1 0x10038b10
444// FUNCTION: BETA10 0x100ee4f5
446{
447 MxLong result = 0;
448 MxU32 objectId = p_param.GetAction()->GetObjectId();
449
450 if (m_unk0x8c == objectId) {
452 return 1;
453 }
454
455 switch (m_state->m_unk0x0c) {
456 case 1:
457 if (m_state->GetUnknown0xb0() == objectId) {
458 m_state->m_unk0x0c = 2;
459 m_mission->m_startTime = Timer()->GetTime();
460 TickleManager()->RegisterClient(this, 200);
461 MxTrace("Pizza mission: proposed\n");
462 }
463 break;
464 case 3:
465 if (m_state->GetUnknown0xb0() == objectId) {
466 m_mission->m_startTime = Timer()->GetTime();
467
468 PizzaMissionState::Mission* mission = m_mission;
469 for (MxS32 i = 0; i < mission->m_numActions; i++) {
471 }
472
473 m_state->m_unk0x0c = 4;
476 m_skateBoard->SetPizzaVisible(TRUE);
477 m_world->PlaceActor(m_skateBoard, "int37", 2, 0.5, 3, 0.5);
478
479#ifdef COMPAT_MODE
480 {
482 m_skateBoard->Notify(param);
483 }
484#else
485 m_skateBoard->Notify(LegoEventNotificationParam(c_notificationClick, NULL, 0, 0, 0, 0));
486#endif
487
488 MxTrace("Pizza mission: continues\n");
489 result = 1;
490 }
491 break;
492 case 5:
493 if (m_state->GetUnknown0xb0() == objectId) {
494 StopActions();
495
498
499 if (!((Isle*) CurrentWorld())->HasHelicopter()) {
500 switch (m_mission->m_unk0x14) {
501 case 1:
503 m_mission->m_unk0x14++;
504 m_state->m_unk0x0c = 6;
505 MxTrace("Pizza mission: succeeds\n");
506 break;
507 case 2:
509 m_unk0x90 = Timer()->GetTime();
510 m_unk0x94 = 500;
511 m_mission->m_unk0x14++;
512 m_state->m_unk0x0c = 6;
513 MxTrace("Pizza mission: succeeds\n");
514 break;
515 case 3:
517 m_unk0x90 = Timer()->GetTime();
518 m_unk0x94 = 500;
519 m_state->m_unk0x0c = 6;
520 break;
521 }
522 }
523 else {
525 m_unk0x90 = Timer()->GetTime();
526 m_unk0x94 = 2300;
527 m_state->m_unk0x0c = 8;
530 MxTrace("Pizza mission: go to Act2\n");
531 }
532
533 PlayAction(action, TRUE);
534 }
535 else {
536 FUN_100382b0();
537 m_state->m_unk0x0c = 0;
539 }
540 }
541 break;
542 case 6:
543 if (m_state->GetUnknown0xb0() == objectId) {
544 if (objectId == IsleScript::c_pja126br_RunAnim) {
546 m_unk0x90 = Timer()->GetTime();
547 m_unk0x94 = 700;
548 }
549 else if (objectId == IsleScript::c_pja129br_RunAnim) {
551 }
552 else {
553 FUN_100382b0();
554 m_state->m_unk0x0c = 0;
556 }
557 }
558 break;
559 case 8:
560 if (m_state->GetUnknown0xb0() == objectId) {
561 m_act1state->m_unk0x018 = 0;
562 m_state->m_unk0x0c = 0;
565 ((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_act2main);
567 }
568 break;
569 case 9:
570 if (m_state->GetUnknown0xb0() == objectId) {
571 FUN_100382b0();
572 }
573 break;
574 }
575
576 return result;
577}
578
579// FUNCTION: LEGO1 0x10038fe0
580// FUNCTION: BETA10 0x100ef520
581void Pizza::PlayAction(MxU32 p_objectId, MxBool p_param7)
582{
583 m_state->SetUnknown0xb0(p_objectId);
584
585 if (m_unk0x8c != IsleScript::c_noneIsle) {
587 }
588
590 ->FUN_10060dc0(p_objectId, NULL, TRUE, LegoAnimationManager::e_unk0, NULL, FALSE, p_param7, TRUE, TRUE);
591}
592
593// FUNCTION: LEGO1 0x10039030
594// FUNCTION: BETA10 0x100eea25
596{
597 m_unk0x0c = 0;
603 m_pizzeriaState = (PizzeriaState*) GameState()->GetState("PizzeriaState");
605}
606
607// FUNCTION: LEGO1 0x100393c0
608// FUNCTION: BETA10 0x100eebf2
610{
611 LegoState::Serialize(p_storage);
612
613 if (p_storage->IsReadMode()) {
614 for (MxS16 i = 0; i < 5; i++) {
615 p_storage->ReadS16(m_missions[i].m_unk0x06);
616 p_storage->ReadS16(m_missions[i].m_unk0x14);
617 p_storage->ReadS16(m_missions[i].m_score);
618 p_storage->ReadS16(m_missions[i].m_hiScore);
619 }
620 }
621 else if (p_storage->IsWriteMode()) {
622 for (MxS16 i = 0; i < 5; i++) {
623 p_storage->WriteS16(m_missions[i].m_unk0x06);
624 p_storage->WriteS16(m_missions[i].m_unk0x14);
625 p_storage->WriteS16(m_missions[i].m_score);
626 p_storage->WriteS16(m_missions[i].m_hiScore);
627 }
628 }
629
630 return SUCCESS;
631}
632
633// FUNCTION: LEGO1 0x10039510
634// FUNCTION: BETA10 0x100eed45
636{
637 for (MxS16 i = 0; i < 5; i++) {
638 if (m_missions[i].m_actorId == p_actorId) {
639 return m_missions + i;
640 }
641 }
642
643 assert("No pizza mission for this character!" == NULL);
644 return NULL;
645}
646
647// FUNCTION: LEGO1 0x10039540
649{
651}
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
MxU32 m_unk0x018
[AI] Internal gameplay state variable; see Get/SetUnknown18 for usage. [AI]
Definition: isle.h:92
LegoWorld * m_world
[AI] Pointer to the LegoWorld this actor currently resides in. May be null if not fully initialized....
Definition: isleactor.h:75
MxResult Create(MxDSAction &p_dsAction) override
[AI] Initializes this IsleActor with a given action.
Definition: isleactor.cpp:12
MxLong Notify(MxParam &p_param) override
[AI] Dispatches notifications to specialized handlers based on notification type.
[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.
void FUN_10061010(MxBool p_und)
[AI] Cancels all camera/transition animations and resets camera after completion.
@ e_unk0
[AI] Unknown/unspecified play mode
void EnableCamAnims(MxBool p_enableCamAnims)
[AI] Sets whether camera-based queued animations are enabled for the world.
MxResult FUN_10064740(Vector3 *p_position)
[AI] Similar to FUN_10064670, but triggers a different special animation event for secondary location...
void FUN_1005f6d0(MxBool p_unk0x400)
[AI] Enables or disables extras (extra actors).
Notification parameter class for LEGO event notifications such as mouse events and modifier keys.
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.
LegoState * GetState(const char *p_stateName)
Find an existing state (LegoState-derived) object by its registered script/class name.
@ e_act2main
Act 2 world main screen. [AI].
@ e_isle
Open world (LEGO Island main map). [AI].
Definition: legogamestate.h:95
void SetUnknown336(MxBool p_unk0x336)
[AI] Enables accepting input only for space-bar events (used in special UI states).
void DisableInputProcessing()
[AI] Block most input processing, allowing only button-down and space events (UI modal input blocking...
@ c_initial
[AI] Default state upon creation or reset. [AI]
Definition: legopathactor.h:37
void SetActorState(MxU32 p_actorState)
[AI] Sets the navigation/path state of the actor.
[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_s
[AI] State change trigger.
@ c_w
[AI] World notification trigger.
virtual MxResult Serialize(LegoStorage *p_storage)
[AI] Serialize state to a storage (for save/load).
Definition: legostate.h:141
@ 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
@ e_grey
[AI] Default/neutral color (0) [AI]
Definition: legostate.h:23
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
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
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
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...
MxAtomId m_atomId
The AtomId associated with this entity, used for resource and script identification.
Definition: mxentity.h:124
virtual void UnregisterClient(MxCore *p_client)
[AI] Unregisters (marks for destruction) a previously registered client.
virtual void RegisterClient(MxCore *p_client, MxTime p_interval)
[AI] Registers an MxCore object to receive periodic tickles.
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.
Pizza mission state for the pizza delivery minigame and related characters.
Definition: pizza.h:21
static MxLong g_nickFinishTimes[]
Definition: pizza.h:251
PizzeriaState * m_pizzeriaState
Pointer to current pizzeria state for delegating cross-mission logic. [AI].
Definition: pizza.h:235
static MxLong g_mamaFinishTimes[]
Definition: pizza.h:249
MxS16 FUN_10039540()
Invokes logic in the PizzeriaState required for mission state transitions.
Definition: pizza.cpp:648
MxU32 m_unk0xb0
Holds currently "pending" action/object for mission transitions. [AI].
Definition: pizza.h:238
MxU32 GetUnknown0xb0()
Gets the m_unk0xb0 member, which holds the object ID associated with current/next mission flow.
Definition: pizza.h:213
static IsleScript::Script g_mamaActions[]
Definition: pizza.h:242
static MxLong g_pepperFinishTimes[]
Finish time thresholds (red/blue/yellow/timeout) for all pizza missions (per-actor) [AI].
Definition: pizza.h:248
static MxLong g_lauraFinishTimes[]
Definition: pizza.h:252
static IsleScript::Script g_lauraActions[]
Definition: pizza.h:245
PizzaMissionState()
Constructs a new PizzaMissionState and initializes missions for all possible actors.
Definition: pizza.cpp:595
Mission * GetMission(MxU8 p_actorId)
Finds the Mission struct belonging to a given actor/character.
Definition: pizza.cpp:635
static MxLong g_papaFinishTimes[]
Definition: pizza.h:250
void SetUnknown0xb0(MxU32 p_unk0xb0)
Sets the m_unk0xb0 member, which holds the current object ID of the pending mission action.
Definition: pizza.h:206
undefined4 m_unk0x0c
Used for internal state machine; controls mission flow/progress (e.g., 0=idle, 1=proposed,...
Definition: pizza.h:236
Mission m_missions[5]
Array with per-actor mission progress. [AI].
Definition: pizza.h:237
static IsleScript::Script g_papaActions[]
Definition: pizza.h:243
static IsleScript::Script g_nickActions[]
Definition: pizza.h:244
MxResult Serialize(LegoStorage *p_storage) override
Serializes custom mission fields (score, progress) for saving/loading game state.
Definition: pizza.cpp:609
static IsleScript::Script g_pepperActions[]
Action scripts for each actor's pizza mission (indexed in Mission::m_actions) [AI].
Definition: pizza.h:241
Interactive pizza entity actor; manages the in-game pizza delivery sequence and reacts to mission tri...
Definition: pizza.h:263
Pizza()
Constructs a new Pizza actor, zeroing mission and UI/logic references.
Definition: pizza.cpp:133
MxLong HandleEndAction(MxEndActionNotificationParam &p_param) override
Handles the end of an action/animation sequence, advancing mission state machine if action matches a ...
Definition: pizza.cpp:445
MxResult Create(MxDSAction &p_dsAction) override
Initializes Pizza and links in-game state and SkateBoard reference after DSAction evaluation.
Definition: pizza.cpp:151
MxResult Tickle() override
Called every tick when Pizza is active; handles mission timers, timeouts, and auto-advances mission s...
Definition: pizza.cpp:375
void StopActions()
Stops all currently running pizza mission actions and resets to an idle state.
Definition: pizza.cpp:223
~Pizza() override
Destroys the Pizza actor and unregisters it as a tickle client.
Definition: pizza.cpp:145
void PlayAction(MxU32 p_objectId, MxBool p_param7)
Plays an animation action for the pizza mission, updating active object ID and handling script concur...
Definition: pizza.cpp:581
MxLong HandlePathStruct(LegoPathStructNotificationParam &p_param) override
Handles notification from a path struct event, e.g., actors walking, object triggers,...
Definition: pizza.cpp:279
void FUN_10038220(IsleScript::Script p_objectId)
Starts mission flow for Pizza with the given action script object.
Definition: pizza.cpp:180
MxLong HandleClick() override
Handles mouse or user interaction with Pizza: advances pizza mission state and starts corresponding a...
Definition: pizza.cpp:238
void FUN_100382b0()
Cancels or resets the Pizza mission, stopping music, resetting camera, and animation state.
Definition: pizza.cpp:196
void CreateState()
Initializes or restores references to PizzaMissionState and Act1State in GameState.
Definition: pizza.cpp:165
[AI] Stores all state information for the pizzeria (Pizza Shop) minigame.
Definition: pizzeria.h:21
MxS16 FUN_10017d50()
[AI] Returns the per-actor progress state index for the actor corresponding to the current player's a...
Definition: pizzeria.cpp:101
[AI] Represents the skateboard vehicle actor used in the minigame and cutscenes.
Definition: skateboard.h:14
void SetPizzaVisible(MxBool p_pizzaVisible)
[AI] Sets whether the pizza bitmap/scene is visible in the skateboard minigame.
Definition: skateboard.h:62
void EnableScenePresentation(MxBool p_enable)
[AI] Enables or disables the presentation (visual display) of pizza in the skateboard scene.
Definition: skateboard.cpp:124
#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
MxAtomId * g_isleScript
[AI] Node used in hierarchical scene graphs and animation trees. [AI]
Definition: scripts.cpp:32
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
LegoWorld * CurrentWorld()
[AI] Accessor for the currently active LegoWorld instance. [AI]
Definition: misc.cpp:93
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
LegoInputManager * InputManager()
[AI] Accessor for the input manager, which handles keyboard, mouse, and controller input....
Definition: misc.cpp:45
#define MxTrace(args)
[AI] Macro for trace logging (non-variadic version, MSVC compatibility), expands to nothing.
Definition: mxdebug.h:55
MxTimer * Timer()
[AI] Returns the global simulation timer.
Definition: mxmisc.cpp:33
MxTickleManager * TickleManager()
[AI] Provides access to the global tickle manager.
Definition: mxmisc.cpp:25
@ c_notificationClick
[AI] Mouse click event [AI]
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 int MxU32
[AI]
Definition: mxtypes.h:32
@ c_wns050p1_RunAnim
Definition: isle_actions.h:419
@ c_pns067gd_RunAnim
Definition: isle_actions.h:436
@ c_pns022pr_RunAnim
Definition: isle_actions.h:445
@ c_ppz011pa_RunAnim
Definition: isle_actions.h:738
@ c_pns122pr_RunAnim
Definition: isle_actions.h:431
@ c_pns021dl_RunAnim
Definition: isle_actions.h:448
@ c_pgs052nu_RunAnim
Definition: isle_actions.h:745
@ c_pns099pr_RunAnim
Definition: isle_actions.h:437
@ c_pgs050nu_RunAnim
Definition: isle_actions.h:743
@ c_ppz086bs_RunAnim
Definition: isle_actions.h:619
@ c_Avo912In_PlayWav
Definition: isle_actions.h:949
@ c_ppz064ma_RunAnim
Definition: isle_actions.h:757
@ c_pho104re_RunAnim
Definition: isle_actions.h:761
@ c_pja132br_RunAnim
Definition: isle_actions.h:779
@ c_pja126br_RunAnim
Definition: isle_actions.h:774
@ c_pns065rd_RunAnim
Definition: isle_actions.h:435
@ c_pns018rd_RunAnim
Definition: isle_actions.h:446
@ c_pns069pr_RunAnim
Definition: isle_actions.h:433
@ c_pns097pr_RunAnim
Definition: isle_actions.h:439
@ c_pja130br_RunAnim
Definition: isle_actions.h:777
@ c_pho105re_RunAnim
Definition: isle_actions.h:762
@ c_ppz061ma_RunAnim
Definition: isle_actions.h:756
@ c_Avo914In_PlayWav
Definition: isle_actions.h:951
@ c_pps026ni_RunAnim
Definition: isle_actions.h:732
@ c_ppz089ma_RunAnim
Definition: isle_actions.h:768
@ c_pja131br_RunAnim
Definition: isle_actions.h:778
@ c_prt072sl_RunAnim
Definition: isle_actions.h:758
@ c_pns050p1_RunAnim
Definition: isle_actions.h:432
@ c_pnsx48pr_RunAnim
Definition: isle_actions.h:428
@ c_pgs051nu_RunAnim
Definition: isle_actions.h:744
@ c_pps027ni_RunAnim
Definition: isle_actions.h:733
@ c_ppz095pe_RunAnim
Definition: isle_actions.h:772
@ c_pns042bm_RunAnim
Definition: isle_actions.h:441
@ c_ppz029rd_RunAnim
Definition: isle_actions.h:695
@ c_pns045p1_RunAnim
Definition: isle_actions.h:442
@ c_Avo917In_PlayWav
Definition: isle_actions.h:954
@ c_ppz117ma_RunAnim
Definition: isle_actions.h:782
@ c_ppz120pa_RunAnim
Definition: isle_actions.h:785
@ c_prt073sl_RunAnim
Definition: isle_actions.h:759
@ c_ppz119ma_RunAnim
Definition: isle_actions.h:784
@ c_pns066db_RunAnim
Definition: isle_actions.h:434
@ c_ppz016pe_RunAnim
Definition: isle_actions.h:742
@ c_pps025ni_RunAnim
Definition: isle_actions.h:731
@ c_pnsx69pr_RunAnim
Definition: isle_actions.h:429
@ c_ppz088ma_RunAnim
Definition: isle_actions.h:767
@ c_ppz037ma_RunAnim
Definition: isle_actions.h:749
@ c_pns125ni_RunAnim
Definition: isle_actions.h:430
@ c_ppz038ma_RunAnim
Definition: isle_actions.h:750
@ c_pns048pr_RunAnim
Definition: isle_actions.h:443
@ c_ppz008rd_RunAnim
Definition: isle_actions.h:620
@ c_Avo911In_PlayWav
Definition: isle_actions.h:948
@ c_pns043en_RunAnim
Definition: isle_actions.h:444
@ c_pns098pr_RunAnim
Definition: isle_actions.h:438
@ c_Avo910In_PlayWav
Definition: isle_actions.h:947
@ c_nja001pr_RunAnim
Definition: isle_actions.h:873
@ c_pho106re_RunAnim
Definition: isle_actions.h:763
@ c_ppz060ma_RunAnim
Definition: isle_actions.h:755
@ c_pja129br_RunAnim
Definition: isle_actions.h:776
@ c_Avo913In_PlayWav
Definition: isle_actions.h:950
@ c_ppz118ma_RunAnim
Definition: isle_actions.h:783
@ c_prt074sl_RunAnim
Definition: isle_actions.h:760
@ c_pns019pr_RunAnim
Definition: isle_actions.h:447
@ c_ppz010pa_RunAnim
Definition: isle_actions.h:737
@ c_pns096pr_RunAnim
Definition: isle_actions.h:440
@ c_ppz059ma_RunAnim
Definition: isle_actions.h:754
@ c_pja127br_RunAnim
Definition: isle_actions.h:775
@ c_ppz013pa_RunAnim
Definition: isle_actions.h:739
@ c_ppz090ma_RunAnim
Definition: isle_actions.h:769
@ c_PizzaMission_Music
[AI] Music for the pizza mission event/sequence.
@ c_TRS302_OpenJailDoor
[AI] Action to open the jail door for TRS302. [AI]
MxU32 g_isleFlags
Definition: isle.cpp:46
@ 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
Holds all data for a single pizza mission for a specific actor.
Definition: pizza.h:28
MxS16 m_numActions
Number of standard actions in script (before special finish actions) [AI].
Definition: pizza.h:155
IsleScript::Script GetBlueFinishAction()
Gets the script for the "blue" (medium time) mission finish.
Definition: pizza.h:100
IsleScript::Script GetUnknownFinishAction()
Gets the script corresponding to the "unknown finish", used as an alternative timeout/decline action.
Definition: pizza.h:146
IsleScript::Script * m_actions
Script array for actions and finish events for the mission [AI].
Definition: pizza.h:165
void UpdateScore(ScoreColor p_score)
Updates both current and high score with the supplied new score color, raising high score if necessar...
Definition: pizza.h:126
IsleScript::Script GetRedFinishAction()
Gets the script for the "red" (best time) mission finish.
Definition: pizza.h:93
MxLong m_startTime
Time when mission started (INT_MIN if not started) [AI].
Definition: pizza.h:161
MxS16 m_unk0x14
Used by helicopter and special mission checks [AI].
Definition: pizza.h:162
MxLong GetTimeoutTime()
Gets the threshold time used for mission timeout events.
Definition: pizza.h:153
IsleScript::Script GetYellowFinishAction()
Gets the script for the "yellow" (slowest success) finish.
Definition: pizza.h:107
IsleScript::Script * GetActions()
Returns pointer to array of all action scripts for this mission.
Definition: pizza.h:139