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

[AI] State class for the TowTrack mini-game, storing scores by character and handling their serialization. More...

#include <towtrack.h>

Inheritance diagram for TowTrackMissionState:
Collaboration diagram for TowTrackMissionState:

Public Member Functions

 TowTrackMissionState ()
 [AI] Constructs and initializes all score and state values for the Tow Track mini-game. More...
 
MxResult Serialize (LegoStorage *p_storage) override
 [AI] Serializes or deserializes the mission state, including per-actor scores and highscores, to/from LegoStorage. More...
 
const char * ClassName () const override
 [AI] Returns the class name for RTTI/dispatch. More...
 
MxBool IsA (const char *p_name) const override
 [AI] Checks if this instance is of the provided name or derives from a parent with that name. More...
 
MxS16 GetHighScore (MxU8 p_actorId)
 [AI] Retrieves the highscore for a given actor in the Tow Track mini-game. More...
 
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 previous highscore. 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] Mission substage/step flag for Tow Track, typically takes 0,1,2,3 (purpose per stage flow). More...
 
MxLong m_startTime
 [AI] Start time of the mission attempt, used to track performance. More...
 
MxBool m_unk0x10
 [AI] Flag for one-time event in end-sequence (prevents repeated trigger). More...
 
MxS16 m_peScore
 [AI] Current Pepper score in the mission. More...
 
MxS16 m_maScore
 [AI] Current Mama score in the mission. More...
 
MxS16 m_paScore
 [AI] Current Papa score in the mission. More...
 
MxS16 m_niScore
 [AI] Current Nick score in the mission. More...
 
MxS16 m_laScore
 [AI] Current Laura score in the mission. More...
 
MxS16 m_peHighScore
 [AI] Highscore for Pepper achieved so far in the mission. More...
 
MxS16 m_maHighScore
 [AI] Highscore for Mama achieved so far in the mission. More...
 
MxS16 m_paHighScore
 [AI] Highscore for Papa achieved so far in the mission. More...
 
MxS16 m_niHighScore
 [AI] Highscore for Nick achieved so far in the mission. More...
 
MxS16 m_laHighScore
 [AI] Highscore for Laura achieved so far in the mission. 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

[AI] State class for the TowTrack mini-game, storing scores by character and handling their serialization.

[AI] The TowTrackMissionState class stores both the current scores and high scores for each actor in the Tow Track mini-game. It is responsible for serialization/deserialization of these values for save/load functionality. It provides update and retrieval methods for handling actor-specific scores, and inherits from LegoState.

Definition at line 17 of file towtrack.h.

Constructor & Destructor Documentation

◆ TowTrackMissionState()

TowTrackMissionState::TowTrackMissionState ( )

[AI] Constructs and initializes all score and state values for the Tow Track mini-game.

Definition at line 594 of file towtrack.cpp.

Member Function Documentation

◆ ClassName()

const char * TowTrackMissionState::ClassName ( ) const
overridevirtual

[AI] Returns the class name for RTTI/dispatch.

Returns
"TowTrackMissionState" [AI]

Reimplemented from LegoState.

◆ GetHighScore()

MxS16 TowTrackMissionState::GetHighScore ( MxU8  p_actorId)

[AI] Retrieves the highscore for a given actor in the Tow Track mini-game.

Parameters
p_actorId[AI] The identifier for the actor (see LegoActor constant IDs).
Returns
High score associated with the actor. [AI]

◆ IsA()

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

[AI] Checks if this instance is of the provided name or derives from a parent with that name.

Parameters
p_name[AI] The name to check against.
Returns
True if name matches this class or parent class. [AI]

Reimplemented from LegoState.

◆ Serialize()

MxResult TowTrackMissionState::Serialize ( LegoStorage p_storage)
overridevirtual

[AI] Serializes or deserializes the mission state, including per-actor scores and highscores, to/from LegoStorage.

Parameters
p_storage[AI] The storage object used for reading or writing the state.
Returns
SUCCESS on success. [AI]

Reimplemented from LegoState.

◆ UpdateScore()

void TowTrackMissionState::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 previous highscore.

Parameters
p_score[AI] The new score value.
p_actorId[AI] The actor identifier.

Member Data Documentation

◆ m_laHighScore

MxS16 TowTrackMissionState::m_laHighScore

[AI] Highscore for Laura achieved so far in the mission.

Definition at line 73 of file towtrack.h.

◆ m_laScore

MxS16 TowTrackMissionState::m_laScore

[AI] Current Laura score in the mission.

Definition at line 68 of file towtrack.h.

◆ m_maHighScore

MxS16 TowTrackMissionState::m_maHighScore

[AI] Highscore for Mama achieved so far in the mission.

Definition at line 70 of file towtrack.h.

◆ m_maScore

MxS16 TowTrackMissionState::m_maScore

[AI] Current Mama score in the mission.

Definition at line 65 of file towtrack.h.

◆ m_niHighScore

MxS16 TowTrackMissionState::m_niHighScore

[AI] Highscore for Nick achieved so far in the mission.

Definition at line 72 of file towtrack.h.

◆ m_niScore

MxS16 TowTrackMissionState::m_niScore

[AI] Current Nick score in the mission.

Definition at line 67 of file towtrack.h.

◆ m_paHighScore

MxS16 TowTrackMissionState::m_paHighScore

[AI] Highscore for Papa achieved so far in the mission.

Definition at line 71 of file towtrack.h.

◆ m_paScore

MxS16 TowTrackMissionState::m_paScore

[AI] Current Papa score in the mission.

Definition at line 66 of file towtrack.h.

◆ m_peHighScore

MxS16 TowTrackMissionState::m_peHighScore

[AI] Highscore for Pepper achieved so far in the mission.

Definition at line 69 of file towtrack.h.

◆ m_peScore

MxS16 TowTrackMissionState::m_peScore

[AI] Current Pepper score in the mission.

Definition at line 64 of file towtrack.h.

◆ m_startTime

MxLong TowTrackMissionState::m_startTime

[AI] Start time of the mission attempt, used to track performance.

Definition at line 62 of file towtrack.h.

◆ m_unk0x08

undefined4 TowTrackMissionState::m_unk0x08

[AI] Mission substage/step flag for Tow Track, typically takes 0,1,2,3 (purpose per stage flow).

Definition at line 61 of file towtrack.h.

◆ m_unk0x10

MxBool TowTrackMissionState::m_unk0x10

[AI] Flag for one-time event in end-sequence (prevents repeated trigger).

Definition at line 63 of file towtrack.h.


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