Isle
Loading...
Searching...
No Matches
PizzaMissionState::Mission Struct Reference

Holds all data for a single pizza mission for a specific actor. More...

#include <pizza.h>

Public Member Functions

 Mission ()
 Default mission constructor. More...
 
 Mission (MxU8 p_actorId, undefined2 p_unk0x04, MxLong *p_finishTimes, IsleScript::Script *p_actions, MxS16 p_numActions)
 Initializes the mission with actor, time thresholds, scripts array, and number of actions. More...
 
Missionoperator= (const Mission &p_mission)
 Assignment operator for copying all mission data. More...
 
IsleScript::Script GetRedFinishAction ()
 Gets the script for the "red" (best time) mission finish. More...
 
IsleScript::Script GetBlueFinishAction ()
 Gets the script for the "blue" (medium time) mission finish. More...
 
IsleScript::Script GetYellowFinishAction ()
 Gets the script for the "yellow" (slowest success) finish. More...
 
MxLong GetRedFinishTime ()
 Gets the maximum allowed time for a "red" (perfect) finish. More...
 
MxLong GetBlueFinishTime ()
 Gets the maximum allowed time for a "blue" finish. More...
 
void UpdateScore (ScoreColor p_score)
 Updates both current and high score with the supplied new score color, raising high score if necessary. More...
 
IsleScript::ScriptGetActions ()
 Returns pointer to array of all action scripts for this mission. More...
 
IsleScript::Script GetUnknownFinishAction ()
 Gets the script corresponding to the "unknown finish", used as an alternative timeout/decline action. More...
 
MxLong GetTimeoutTime ()
 Gets the threshold time used for mission timeout events. More...
 

Public Attributes

MxS16 m_numActions
 Number of standard actions in script (before special finish actions) [AI]. More...
 
MxU8 m_actorId
 Actor (character) ID for this mission [AI]. More...
 
undefined2 m_unk0x04
 Used by mission logic, typically 2. [AI]. More...
 
MxS16 m_unk0x06
 Used by serialization and progress tracking (mission attempt counter/state) [AI]. More...
 
undefined m_unk0x08
 Unknown, always set to 1 at construction. [AI]. More...
 
MxLongm_finishTimes
 Pointer to array of finish time thresholds, 4 per mission [AI]. More...
 
MxLong m_startTime
 Time when mission started (INT_MIN if not started) [AI]. More...
 
MxS16 m_unk0x14
 Used by helicopter and special mission checks [AI]. More...
 
MxS16 m_score
 Current completion score (LegoState color encoding) [AI]. More...
 
MxS16 m_hiScore
 Historical best (high score) for this mission/color [AI]. More...
 
IsleScript::Scriptm_actions
 Script array for actions and finish events for the mission [AI]. More...
 

Detailed Description

Holds all data for a single pizza mission for a specific actor.

[AI]

Each Mission contains finish time thresholds, action scripts for standard and finish actions, and current/high score. [AI]

Definition at line 28 of file pizza.h.

Constructor & Destructor Documentation

◆ Mission() [1/2]

PizzaMissionState::Mission::Mission ( )
inline

Default mission constructor.

[AI]

Definition at line 34 of file pizza.h.

◆ Mission() [2/2]

PizzaMissionState::Mission::Mission ( MxU8  p_actorId,
undefined2  p_unk0x04,
MxLong p_finishTimes,
IsleScript::Script p_actions,
MxS16  p_numActions 
)
inline

Initializes the mission with actor, time thresholds, scripts array, and number of actions.

[AI]

Parameters
p_actorIdThe actor ID (Pepper, Mama, etc.). [AI]
p_unk0x04Unknown purpose. Used by game logic for mission state (typically 2). [AI]
p_finishTimesPointer to array of finish time thresholds for red, blue, yellow, and timeout. [AI]
p_actionsPointer to array of scripts used for this mission. [AI]
p_numActionsNumber of standard actions before finish actions. [AI]

Definition at line 45 of file pizza.h.

Member Function Documentation

◆ GetActions()

IsleScript::Script * PizzaMissionState::Mission::GetActions ( )
inline

Returns pointer to array of all action scripts for this mission.

[AI]

Returns
Pointer to the script array. [AI]

Definition at line 139 of file pizza.h.

◆ GetBlueFinishAction()

IsleScript::Script PizzaMissionState::Mission::GetBlueFinishAction ( )
inline

Gets the script for the "blue" (medium time) mission finish.

[AI]

Returns the script after m_numActions+7 in the array. [AI]

Definition at line 100 of file pizza.h.

◆ GetBlueFinishTime()

MxLong PizzaMissionState::Mission::GetBlueFinishTime ( )
inline

Gets the maximum allowed time for a "blue" finish.

[AI]

Definition at line 119 of file pizza.h.

◆ GetRedFinishAction()

IsleScript::Script PizzaMissionState::Mission::GetRedFinishAction ( )
inline

Gets the script for the "red" (best time) mission finish.

[AI]

Returns the script after m_numActions+6 in the array. [AI]

Definition at line 93 of file pizza.h.

◆ GetRedFinishTime()

MxLong PizzaMissionState::Mission::GetRedFinishTime ( )
inline

Gets the maximum allowed time for a "red" (perfect) finish.

[AI]

Definition at line 113 of file pizza.h.

◆ GetTimeoutTime()

MxLong PizzaMissionState::Mission::GetTimeoutTime ( )
inline

Gets the threshold time used for mission timeout events.

[AI]

Returns value at m_finishTimes[3]. [AI]

Definition at line 153 of file pizza.h.

◆ GetUnknownFinishAction()

IsleScript::Script PizzaMissionState::Mission::GetUnknownFinishAction ( )
inline

Gets the script corresponding to the "unknown finish", used as an alternative timeout/decline action.

[AI]

Returns script at (m_numActions + 2). [AI]

Definition at line 146 of file pizza.h.

◆ GetYellowFinishAction()

IsleScript::Script PizzaMissionState::Mission::GetYellowFinishAction ( )
inline

Gets the script for the "yellow" (slowest success) finish.

[AI]

Returns script at offset m_numActions+8. [AI]

Definition at line 107 of file pizza.h.

◆ operator=()

Mission & PizzaMissionState::Mission::operator= ( const Mission p_mission)
inline

Assignment operator for copying all mission data.

[AI]

Parameters
p_missionThe mission to copy from. [AI]
Returns
Reference to this. [AI]

Definition at line 72 of file pizza.h.

◆ UpdateScore()

void PizzaMissionState::Mission::UpdateScore ( ScoreColor  p_score)
inline

Updates both current and high score with the supplied new score color, raising high score if necessary.

[AI]

Parameters
p_scoreNew score to set. [AI]

Definition at line 126 of file pizza.h.

Member Data Documentation

◆ m_actions

IsleScript::Script* PizzaMissionState::Mission::m_actions

Script array for actions and finish events for the mission [AI].

Definition at line 165 of file pizza.h.

◆ m_actorId

MxU8 PizzaMissionState::Mission::m_actorId

Actor (character) ID for this mission [AI].

Definition at line 156 of file pizza.h.

◆ m_finishTimes

MxLong* PizzaMissionState::Mission::m_finishTimes

Pointer to array of finish time thresholds, 4 per mission [AI].

Definition at line 160 of file pizza.h.

◆ m_hiScore

MxS16 PizzaMissionState::Mission::m_hiScore

Historical best (high score) for this mission/color [AI].

Definition at line 164 of file pizza.h.

◆ m_numActions

MxS16 PizzaMissionState::Mission::m_numActions

Number of standard actions in script (before special finish actions) [AI].

Definition at line 155 of file pizza.h.

◆ m_score

MxS16 PizzaMissionState::Mission::m_score

Current completion score (LegoState color encoding) [AI].

Definition at line 163 of file pizza.h.

◆ m_startTime

MxLong PizzaMissionState::Mission::m_startTime

Time when mission started (INT_MIN if not started) [AI].

Definition at line 161 of file pizza.h.

◆ m_unk0x04

undefined2 PizzaMissionState::Mission::m_unk0x04

Used by mission logic, typically 2. [AI].

Definition at line 157 of file pizza.h.

◆ m_unk0x06

MxS16 PizzaMissionState::Mission::m_unk0x06

Used by serialization and progress tracking (mission attempt counter/state) [AI].

Definition at line 158 of file pizza.h.

◆ m_unk0x08

undefined PizzaMissionState::Mission::m_unk0x08

Unknown, always set to 1 at construction. [AI].

Definition at line 159 of file pizza.h.

◆ m_unk0x14

MxS16 PizzaMissionState::Mission::m_unk0x14

Used by helicopter and special mission checks [AI].

Definition at line 162 of file pizza.h.


The documentation for this struct was generated from the following file: