168 if (m_state ==
NULL) {
173 if (m_act1state ==
NULL) {
218 MxTrace(
"Pizza mission: idle\n");
229 if (mission !=
NULL) {
250 if (m_skateBoard ==
NULL) {
252 assert(m_skateBoard);
289 if (time < m_mission->GetRedFinishTime()) {
292 else if (time < m_mission->GetBlueFinishTime()) {
299 MxTrace(
"Pizza mission: ending\n");
309 if (time < m_mission->GetRedFinishTime()) {
313 else if (time < m_mission->GetBlueFinishTime()) {
354 MxTrace(
"Pizza mission: ending\n");
379 if (m_unk0x90 != INT_MIN && m_unk0x94 + m_unk0x90 <= time) {
396 MxTrace(
"Pizza mission: timeout, stop\n");
435 MxTrace(
"Pizza mission: timeout, declining\n");
450 if (m_unk0x8c == objectId) {
461 MxTrace(
"Pizza mission: proposed\n");
482 m_skateBoard->
Notify(param);
488 MxTrace(
"Pizza mission: continues\n");
505 MxTrace(
"Pizza mission: succeeds\n");
513 MxTrace(
"Pizza mission: succeeds\n");
530 MxTrace(
"Pizza mission: go to Act2\n");
614 for (
MxS16 i = 0; i < 5; i++) {
622 for (
MxS16 i = 0; i < 5; i++) {
637 for (
MxS16 i = 0; i < 5; i++) {
643 assert(
"No pizza mission for this character!" ==
NULL);
[AI] Holds state and transient gameplay data for the first act on Lego Island.
MxU32 m_unk0x018
[AI] Internal gameplay state variable; see Get/SetUnknown18 for usage. [AI]
LegoWorld * m_world
[AI] Pointer to the LegoWorld this actor currently resides in. May be null if not fully initialized....
MxResult Create(MxDSAction &p_dsAction) override
[AI] Initializes this IsleActor with a given action.
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...
@ c_playMusic
[AI] If set, background music plays.
@ c_pepper
Pepper Roni ([AI])
virtual MxU8 GetActorId()
[AI] Gets this actor's numeric ID, corresponding to a known enumeration/actor.
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].
@ c_initial
[AI] Default state upon creation or reset. [AI]
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).
@ e_red
[AI] Warning/critical color (3) [AI]
@ e_yellow
[AI] First colored highlight (1) [AI]
@ e_blue
[AI] Second color, e.g. better score (2) [AI]
@ e_grey
[AI] Default/neutral color (0) [AI]
Abstract base class providing an interface for file-like storage with binary and text read/write oper...
virtual LegoBool IsWriteMode()
Returns TRUE if object was opened in write mode.
LegoStorage * WriteS16(LegoS16 p_data)
Writes a 16-bit signed value to storage.
LegoStorage * ReadS16(LegoS16 &p_data)
Reads a 16-bit signed value from storage.
virtual LegoBool IsReadMode()
Returns TRUE if object was opened in read mode.
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.
MxCore * Find(const char *p_class, const char *p_name)
Finds an object of a given class and name in the world.
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...
MxU32 GetObjectId()
[AI] Returns the object id numeric value.
[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.
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.
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.
static MxLong g_nickFinishTimes[]
PizzeriaState * m_pizzeriaState
Pointer to current pizzeria state for delegating cross-mission logic. [AI].
static MxLong g_mamaFinishTimes[]
MxS16 FUN_10039540()
Invokes logic in the PizzeriaState required for mission state transitions.
MxU32 m_unk0xb0
Holds currently "pending" action/object for mission transitions. [AI].
MxU32 GetUnknown0xb0()
Gets the m_unk0xb0 member, which holds the object ID associated with current/next mission flow.
static IsleScript::Script g_mamaActions[]
static MxLong g_pepperFinishTimes[]
Finish time thresholds (red/blue/yellow/timeout) for all pizza missions (per-actor) [AI].
static MxLong g_lauraFinishTimes[]
static IsleScript::Script g_lauraActions[]
PizzaMissionState()
Constructs a new PizzaMissionState and initializes missions for all possible actors.
Mission * GetMission(MxU8 p_actorId)
Finds the Mission struct belonging to a given actor/character.
static MxLong g_papaFinishTimes[]
void SetUnknown0xb0(MxU32 p_unk0xb0)
Sets the m_unk0xb0 member, which holds the current object ID of the pending mission action.
undefined4 m_unk0x0c
Used for internal state machine; controls mission flow/progress (e.g., 0=idle, 1=proposed,...
Mission m_missions[5]
Array with per-actor mission progress. [AI].
static IsleScript::Script g_papaActions[]
static IsleScript::Script g_nickActions[]
MxResult Serialize(LegoStorage *p_storage) override
Serializes custom mission fields (score, progress) for saving/loading game state.
static IsleScript::Script g_pepperActions[]
Action scripts for each actor's pizza mission (indexed in Mission::m_actions) [AI].
Interactive pizza entity actor; manages the in-game pizza delivery sequence and reacts to mission tri...
Pizza()
Constructs a new Pizza actor, zeroing mission and UI/logic references.
MxLong HandleEndAction(MxEndActionNotificationParam &p_param) override
Handles the end of an action/animation sequence, advancing mission state machine if action matches a ...
MxResult Create(MxDSAction &p_dsAction) override
Initializes Pizza and links in-game state and SkateBoard reference after DSAction evaluation.
MxResult Tickle() override
Called every tick when Pizza is active; handles mission timers, timeouts, and auto-advances mission s...
void StopActions()
Stops all currently running pizza mission actions and resets to an idle state.
~Pizza() override
Destroys the Pizza actor and unregisters it as a tickle client.
void PlayAction(MxU32 p_objectId, MxBool p_param7)
Plays an animation action for the pizza mission, updating active object ID and handling script concur...
MxLong HandlePathStruct(LegoPathStructNotificationParam &p_param) override
Handles notification from a path struct event, e.g., actors walking, object triggers,...
void FUN_10038220(IsleScript::Script p_objectId)
Starts mission flow for Pizza with the given action script object.
MxLong HandleClick() override
Handles mouse or user interaction with Pizza: advances pizza mission state and starts corresponding a...
void FUN_100382b0()
Cancels or resets the Pizza mission, stopping music, resetting camera, and animation state.
void CreateState()
Initializes or restores references to PizzaMissionState and Act1State in GameState.
[AI] Stores all state information for the pizzeria (Pizza Shop) minigame.
MxS16 FUN_10017d50()
[AI] Returns the per-actor progress state index for the actor corresponding to the current player's a...
[AI] Represents the skateboard vehicle actor used in the minigame and cutscenes.
void SetPizzaVisible(MxBool p_pizzaVisible)
[AI] Sets whether the pizza bitmap/scene is visible in the skateboard minigame.
void EnableScenePresentation(MxBool p_enable)
[AI] Enables or disables the presentation (visual display) of pizza in the skateboard scene.
#define DECOMP_SIZE_ASSERT(T, S)
#define NULL
[AI] Null pointer value (C/C++ semantics).
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.
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.
MxAtomId * g_isleScript
[AI] Node used in hierarchical scene graphs and animation trees. [AI]
LegoGameState * GameState()
[AI] Accessor for the game's central game state controller. [AI]
LegoAnimationManager * AnimationManager()
[AI] Accessor for the animation manager, which controls Lego character/world animation state....
MxTransitionManager * TransitionManager()
[AI] Accessor for the MxTransitionManager, handling level transitions, fades, and world changes....
MxBackgroundAudioManager * BackgroundAudioManager()
[AI] Accessor for the background audio manager. Used for background music and ambient sounds....
LegoWorld * CurrentWorld()
[AI] Accessor for the currently active LegoWorld instance. [AI]
void PlayMusic(JukeboxScript::Script p_objectId)
[AI] Starts music playback by scripting the background audio manager to play the music piece referenc...
LegoPathActor * UserActor()
[AI] Accessor for the user (player-controllable) LegoPathActor. [AI]
LegoInputManager * InputManager()
[AI] Accessor for the input manager, which handles keyboard, mouse, and controller input....
#define MxTrace(args)
[AI] Macro for trace logging (non-variadic version, MSVC compatibility), expands to nothing.
MxTimer * Timer()
[AI] Returns the global simulation timer.
MxTickleManager * TickleManager()
[AI] Provides access to the global tickle manager.
@ c_notificationClick
[AI] Mouse click event [AI]
@ c_PizzaMission_Music
[AI] Music for the pizza mission event/sequence.
@ c_TRS302_OpenJailDoor
[AI] Action to open the jail door for TRS302. [AI]
Holds all data for a single pizza mission for a specific actor.
MxS16 m_numActions
Number of standard actions in script (before special finish actions) [AI].
IsleScript::Script GetBlueFinishAction()
Gets the script for the "blue" (medium time) mission finish.
IsleScript::Script GetUnknownFinishAction()
Gets the script corresponding to the "unknown finish", used as an alternative timeout/decline action.
IsleScript::Script * m_actions
Script array for actions and finish events for the mission [AI].
void UpdateScore(ScoreColor p_score)
Updates both current and high score with the supplied new score color, raising high score if necessar...
IsleScript::Script GetRedFinishAction()
Gets the script for the "red" (best time) mission finish.
MxLong m_startTime
Time when mission started (INT_MIN if not started) [AI].
MxS16 m_unk0x14
Used by helicopter and special mission checks [AI].
MxLong GetTimeoutTime()
Gets the threshold time used for mission timeout events.
IsleScript::Script GetYellowFinishAction()
Gets the script for the "yellow" (slowest success) finish.
IsleScript::Script * GetActions()
Returns pointer to array of all action scripts for this mission.