Isle
Loading...
Searching...
No Matches
AmbulanceMissionState Class Reference

Holds state and scoring information for the Ambulance mission. More...

#include <ambulance.h>

Inheritance diagram for AmbulanceMissionState:
Collaboration diagram for AmbulanceMissionState:

Public Member Functions

 AmbulanceMissionState ()
 [AI] Default constructor; initializes all scores, high scores, time and internal state to zero. [AI] More...
 
MxResult Serialize (LegoStorage *p_storage) override
 [AI] Serializes (loads or saves) the mission state information for the Ambulance mission. More...
 
const char * ClassName () const override
 [AI] Returns the class name string. More...
 
MxBool IsA (const char *p_name) const override
 [AI] Runtime type check for class identity or inheritance. More...
 
MxS16 GetHighScore (MxU8 p_actorId)
 [AI] Retrieves the highest score achieved by a specified actor. More...
 
void UpdateScore (ScoreColor p_score, MxS16 p_actorId)
 [AI] Updates the current and high score for a specific actor, if the new score is higher. More...
 
- Public Member Functions inherited from LegoState
 ~LegoState () override
 [AI] Virtual destructor to allow subclass cleanup. More...
 
virtual MxBool IsSerializable ()
 [AI] Returns if this state can be serialized (for game saving/loading support). More...
 
virtual MxBool Reset ()
 [AI] Hook for returning object to default (empty) state; not implemented in this base. More...
 
virtual MxResult Serialize (LegoStorage *p_storage)
 [AI] Serialize state to a storage (for save/load). More...
 
const char * ClassName () const override
 [AI] Gets this class's name for RTTI/IsA functionality. More...
 
MxBool IsA (const char *p_name) const override
 [AI] Tests if this object is of a given class name, directly or through inheritance. More...
 
- Public Member Functions inherited from MxCore
 MxCore ()
 [AI] Constructs a new MxCore object and assigns it a unique id. More...
 
virtual ~MxCore ()
 [AI] Virtual destructor. Required for correct polymorphic cleanup in derived classes. More...
 
virtual MxLong Notify (MxParam &p_param)
 [AI] Virtual callback notification mechanism. More...
 
virtual MxResult Tickle ()
 [AI] Called by tickle managers to allow the object to update itself. More...
 
virtual const char * ClassName () const
 [AI] Returns the runtime class name of this object. More...
 
virtual MxBool IsA (const char *p_name) const
 [AI] Checks whether this object's class type or parents match the given name. More...
 
MxU32 GetId ()
 [AI] Gets the unique (per-process) id assigned to this object instance. More...
 

Public Attributes

undefined4 m_unk0x08
 [AI] Flag/state variable—purpose unclear, likely denotes mission sub-state or phase. [AI_SUGGESTED_NAME: m_progressFlag] More...
 
MxLong m_startTime
 [AI] Mission timer: records when the mission started (in milliseconds?). [AI] More...
 
MxS16 m_peScore
 [AI] Last achieved mission score for Pepper. [AI] More...
 
MxS16 m_maScore
 [AI] Last achieved mission score for Mama. [AI] More...
 
MxS16 m_paScore
 [AI] Last achieved mission score for Papa. [AI] More...
 
MxS16 m_niScore
 [AI] Last achieved mission score for Nick. [AI] More...
 
MxS16 m_laScore
 [AI] Last achieved mission score for Laura. [AI] More...
 
MxS16 m_peHighScore
 [AI] Highest ever mission score for Pepper. [AI] More...
 
MxS16 m_maHighScore
 [AI] Highest ever mission score for Mama. [AI] More...
 
MxS16 m_paHighScore
 [AI] Highest ever mission score for Papa. [AI] More...
 
MxS16 m_niHighScore
 [AI] Highest ever mission score for Nick. [AI] More...
 
MxS16 m_laHighScore
 [AI] Highest ever mission score for Laura. [AI] More...
 

Additional Inherited Members

- Public Types inherited from LegoState
enum  ScoreColor { e_grey = 0 , e_yellow , e_blue , e_red }
 [AI] Score coloring values for in-game display feedback or logic. More...
 

Detailed Description

Holds state and scoring information for the Ambulance mission.

[AI]

[AI] Keeps track of per-actor scores and high scores for the Ambulance gameplay mission, as well as timing and progress flags for mission flow control. The scores are stored per major character ("Pepper", "Mama", "Papa", "Nick", "Laura"). Offers score persistence by serializing to/from storage. [AI]

Definition at line 12 of file ambulance.h.

Constructor & Destructor Documentation

◆ AmbulanceMissionState()

AmbulanceMissionState::AmbulanceMissionState ( )

[AI] Default constructor; initializes all scores, high scores, time and internal state to zero. [AI]

Definition at line 627 of file ambulance.cpp.

Member Function Documentation

◆ ClassName()

const char * AmbulanceMissionState::ClassName ( ) const
overridevirtual

[AI] Returns the class name string.

[AI]

[AI] For runtime type identification. Used by IsA. [AI]

Returns
Static string: "AmbulanceMissionState". [AI]

Reimplemented from MxCore.

◆ GetHighScore()

MxS16 AmbulanceMissionState::GetHighScore ( MxU8  p_actorId)

[AI] Retrieves the highest score achieved by a specified actor.

[AI]

Parameters
p_actorIdThe ID of the actor as defined by LegoActor::c_* enum. [AI]
Returns
The actor's personal high score for the Ambulance mission. [AI]

◆ IsA()

MxBool AmbulanceMissionState::IsA ( const char *  p_name) const
overridevirtual

[AI] Runtime type check for class identity or inheritance.

[AI]

Parameters
p_nameClass name to test. [AI]
Returns
Returns MxTrue if this is or inherits from the requested class. [AI]

Reimplemented from MxCore.

◆ Serialize()

MxResult AmbulanceMissionState::Serialize ( LegoStorage p_storage)
overridevirtual

[AI] Serializes (loads or saves) the mission state information for the Ambulance mission.

[AI]

[AI] Serializes the per-character (Pepper/Mama/Papa/Nick/Laura) scores and high scores from or into a given LegoStorage. Ensures player progress and results persist across sessions. Also defers serialization of parent state (LegoState). [AI]

Parameters
p_storageThe storage interface to read from or write to. [AI]
Returns
SUCCESS on successful operation; otherwise error status. [AI]

Reimplemented from LegoState.

◆ UpdateScore()

void AmbulanceMissionState::UpdateScore ( ScoreColor  p_score,
MxS16  p_actorId 
)

[AI] Updates the current and high score for a specific actor, if the new score is higher.

[AI]

Parameters
p_scoreThe score to record. [AI]
p_actorIdThe target actor as determined by LegoActor::c_* enum values. [AI]

Member Data Documentation

◆ m_laHighScore

MxS16 AmbulanceMissionState::m_laHighScore

[AI] Highest ever mission score for Laura. [AI]

Definition at line 68 of file ambulance.h.

◆ m_laScore

MxS16 AmbulanceMissionState::m_laScore

[AI] Last achieved mission score for Laura. [AI]

Definition at line 57 of file ambulance.h.

◆ m_maHighScore

MxS16 AmbulanceMissionState::m_maHighScore

[AI] Highest ever mission score for Mama. [AI]

Definition at line 62 of file ambulance.h.

◆ m_maScore

MxS16 AmbulanceMissionState::m_maScore

[AI] Last achieved mission score for Mama. [AI]

Definition at line 51 of file ambulance.h.

◆ m_niHighScore

MxS16 AmbulanceMissionState::m_niHighScore

[AI] Highest ever mission score for Nick. [AI]

Definition at line 66 of file ambulance.h.

◆ m_niScore

MxS16 AmbulanceMissionState::m_niScore

[AI] Last achieved mission score for Nick. [AI]

Definition at line 55 of file ambulance.h.

◆ m_paHighScore

MxS16 AmbulanceMissionState::m_paHighScore

[AI] Highest ever mission score for Papa. [AI]

Definition at line 64 of file ambulance.h.

◆ m_paScore

MxS16 AmbulanceMissionState::m_paScore

[AI] Last achieved mission score for Papa. [AI]

Definition at line 53 of file ambulance.h.

◆ m_peHighScore

MxS16 AmbulanceMissionState::m_peHighScore

[AI] Highest ever mission score for Pepper. [AI]

Definition at line 60 of file ambulance.h.

◆ m_peScore

MxS16 AmbulanceMissionState::m_peScore

[AI] Last achieved mission score for Pepper. [AI]

Definition at line 49 of file ambulance.h.

◆ m_startTime

MxLong AmbulanceMissionState::m_startTime

[AI] Mission timer: records when the mission started (in milliseconds?). [AI]

Definition at line 46 of file ambulance.h.

◆ m_unk0x08

undefined4 AmbulanceMissionState::m_unk0x08

[AI] Flag/state variable—purpose unclear, likely denotes mission sub-state or phase. [AI_SUGGESTED_NAME: m_progressFlag]

Definition at line 44 of file ambulance.h.


The documentation for this class was generated from the following files: