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

[AI] Holds state and transient gameplay data for the first act on Lego Island. More...

#include <isle.h>

Inheritance diagram for Act1State:
Collaboration diagram for Act1State:

Public Types

enum  ElevatorFloor { c_floor1 = 1 , c_floor2 , c_floor3 }
 [AI] Floor numbers for the info center elevator. More...
 
- 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...
 

Public Member Functions

 Act1State ()
 [AI] Constructs a new instance and resets default state, including initializing cutscene playlist and vehicle pointers. [AI] More...
 
const char * ClassName () const override
 [AI] Returns class name as string literal for run-time type checking. [AI] More...
 
MxBool IsA (const char *p_name) const override
 [AI] Returns whether the provided name matches this class or a parent class. More...
 
MxBool Reset () override
 [AI] Resets all internal state, including planes, pointers, vehicle flags, and clears dynamic memory for re-use or unload. [AI] More...
 
MxResult Serialize (LegoStorage *p_storage) override
 [AI] Serializes all vehicle/named plane and other gameplay state to/from given persistent storage. More...
 
void PlayCptClickDialogue ()
 [AI] Starts the "Captain Click" dialogue cutscene/playlist with audio and triggers background music fade. [AI] More...
 
void StopCptClickDialogue ()
 [AI] Stops the "Captain Click" dialogue cutscene if playing and resets background music. [AI] More...
 
void RemoveActors ()
 [AI] Serializes all current actor locations and status, disassociating them from the world for later restoration. [AI] More...
 
void PlaceActors ()
 [AI] Places all actors/vehicles in the world at their previously-serialized locations and attaches them to the world. [AI] More...
 
MxU32 GetUnknown18 ()
 [AI] Retrieves the internal state variable at offset 0x018 (purpose: current major state, e.g. current minigame/spot) More...
 
ElevatorFloor GetElevatorFloor ()
 [AI] Retrieves the current elevator floor the player is on, as an enum. [AI] More...
 
MxU8 GetUnknown21 ()
 [AI] Returns the internal state variable at 0x021 (unknown, seems to control transitions). More...
 
void SetUnknown18 (MxU32 p_unk0x18)
 [AI] Sets the gameplay progress variable at 0x018 (controls state transitions, gameplay mode changes, e.g. minigames). More...
 
void SetElevatorFloor (ElevatorFloor p_elevFloor)
 [AI] Sets the current elevator floor the player is on. More...
 
void SetUnknown21 (MxU8 p_unk0x21)
 [AI] Sets the state flag at offset 0x021 (purpose: controls certain transitions and checks). 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

Playlist m_cptClickDialogue
 [AI] Playlist object which cycles and holds available "Captain Click" audio scripts for the info center. More...
 
IsleScript::Script m_currentCptClickDialogue
 [AI] Currently playing island script for the cutscene/voiceover event initiated by Captain Click. More...
 
MxU32 m_unk0x018
 [AI] Internal gameplay state variable; see Get/SetUnknown18 for usage. [AI] More...
 
MxS16 m_elevFloor
 [AI] Current floor of the elevator, using enum ElevatorFloor. More...
 
MxBool m_unk0x01e
 [AI] Temporary flag for info center elevator; used to determine if elevator is currently active/transitioning. [AI] More...
 
MxBool m_unk0x01f
 [AI] Temporary flag for info center elevator; often used as a "ready for transition" check. [AI] More...
 
MxBool m_planeActive
 [AI] Indicates that the airplane cutscene is currently active (info center window). [AI] More...
 
undefined m_unk0x021
 [AI] Internal state/transition flag, possibly for initializing/handling world entry. [AI] More...
 
MxBool m_unk0x022
 [AI] Temporary state variable; persists through serialization, often used for logic gating. [AI] More...
 
undefined m_unk0x023
 [AI] State variable for plane/channel transitions; exact meaning unknown. [AI] More...
 
LegoNamedPlane m_motocyclePlane
 [AI] Serialized/deserialized world placement state for motorcycle. More...
 
LegoNamedPlane m_bikePlane
 [AI] Serialized/deserialized world placement state for bike. More...
 
LegoNamedPlane m_skateboardPlane
 [AI] Serialized/deserialized world placement state for skateboard. More...
 
LegoNamedPlane m_helicopterPlane
 [AI] Serialized/deserialized world placement state for helicopter. More...
 
LegoNamedTexturem_helicopterWindshield
 [AI] Named texture for helicopter windshield (needed for state restoration, texture streaming). [AI] More...
 
LegoNamedTexturem_helicopterJetLeft
 [AI] Named texture for left jet on helicopter (needed for restoration/streaming). [AI] More...
 
LegoNamedTexturem_helicopterJetRight
 [AI] Named texture for right jet on helicopter (needed for restoration/streaming). [AI] More...
 
Helicopterm_helicopter
 [AI] Serializable pointer to current helicopter object (NULL when not held in state). [AI] More...
 
LegoNamedPlane m_jetskiPlane
 [AI] Placement state for jetski in world (serializable). [AI] More...
 
LegoNamedTexturem_jetskiFront
 [AI] Named texture for jetski front (state restoration, streaming). [AI] More...
 
LegoNamedTexturem_jetskiWindshield
 [AI] Named texture for jetski windshield (state restoration, streaming). [AI] More...
 
Jetskim_jetski
 [AI] Serializable pointer to current jetski object (NULL when not held in state). [AI] More...
 
LegoNamedPlane m_dunebuggyPlane
 [AI] Placement state for dune buggy in world (serializable). [AI] More...
 
LegoNamedTexturem_dunebuggyFront
 [AI] Named texture for dune buggy front (state restoration, streaming). [AI] More...
 
DuneBuggym_dunebuggy
 [AI] Serializable pointer to current dune buggy object (NULL when not held in state). [AI] More...
 
LegoNamedPlane m_racecarPlane
 [AI] Placement state for racecar in world (serializable). [AI] More...
 
LegoNamedTexturem_racecarFront
 [AI] Named texture for racecar front (state restoration, streaming). [AI] More...
 
LegoNamedTexturem_racecarBack
 [AI] Named texture for racecar back (state restoration, streaming). [AI] More...
 
LegoNamedTexturem_racecarTail
 [AI] Named texture for racecar tail (state restoration, streaming). [AI] More...
 
RaceCarm_racecar
 [AI] Serializable pointer to current racecar object (NULL when not held in state). [AI] More...
 

Detailed Description

[AI] Holds state and transient gameplay data for the first act on Lego Island.

Manages elevator floor logic, cutscene dialogue cycling, and serialization of all vehicle/named planes for state restoration. Closely tied to "Isle" and used per-"Act" state management.

[AI] Responsible for saving/loading the locations and statuses of various actors/vehicles during Act 1, as well as for session gameplay variables such as which elevator floor is active and which cutscene dialogue is being played.

Definition at line 29 of file isle.h.

Member Enumeration Documentation

◆ ElevatorFloor

[AI] Floor numbers for the info center elevator.

Enumerator
c_floor1 

[AI] 1st floor

c_floor2 

[AI] 2nd floor

c_floor3 

[AI] 3rd floor

Definition at line 32 of file isle.h.

Constructor & Destructor Documentation

◆ Act1State()

Act1State::Act1State ( )

[AI] Constructs a new instance and resets default state, including initializing cutscene playlist and vehicle pointers. [AI]

Definition at line 1293 of file isle.cpp.

Member Function Documentation

◆ ClassName()

const char * Act1State::ClassName ( ) const
overridevirtual

[AI] Returns class name as string literal for run-time type checking. [AI]

Reimplemented from MxCore.

◆ GetElevatorFloor()

ElevatorFloor Act1State::GetElevatorFloor ( )
inline

[AI] Retrieves the current elevator floor the player is on, as an enum. [AI]

Definition at line 71 of file isle.h.

◆ GetUnknown18()

MxU32 Act1State::GetUnknown18 ( )
inline

[AI] Retrieves the internal state variable at offset 0x018 (purpose: current major state, e.g. current minigame/spot)

Definition at line 68 of file isle.h.

◆ GetUnknown21()

MxU8 Act1State::GetUnknown21 ( )
inline

[AI] Returns the internal state variable at 0x021 (unknown, seems to control transitions).

Definition at line 74 of file isle.h.

◆ IsA()

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

[AI] Returns whether the provided name matches this class or a parent class.

Parameters
p_name[AI] Name of the class to check against.

Reimplemented from MxCore.

◆ PlaceActors()

void Act1State::PlaceActors ( )

[AI] Places all actors/vehicles in the world at their previously-serialized locations and attaches them to the world. [AI]

Definition at line 1609 of file isle.cpp.

◆ PlayCptClickDialogue()

void Act1State::PlayCptClickDialogue ( )

[AI] Starts the "Captain Click" dialogue cutscene/playlist with audio and triggers background music fade. [AI]

Definition at line 1462 of file isle.cpp.

◆ RemoveActors()

void Act1State::RemoveActors ( )

[AI] Serializes all current actor locations and status, disassociating them from the world for later restoration. [AI]

Definition at line 1563 of file isle.cpp.

◆ Reset()

MxBool Act1State::Reset ( )
overridevirtual

[AI] Resets all internal state, including planes, pointers, vehicle flags, and clears dynamic memory for re-use or unload. [AI]

Reimplemented from LegoState.

Definition at line 1483 of file isle.cpp.

◆ Serialize()

MxResult Act1State::Serialize ( LegoStorage p_storage)
overridevirtual

[AI] Serializes all vehicle/named plane and other gameplay state to/from given persistent storage.

Parameters
p_storage[AI] Persistent storage object to serialize to (write mode) or from (read mode).

Reimplemented from LegoState.

Definition at line 1322 of file isle.cpp.

◆ SetElevatorFloor()

void Act1State::SetElevatorFloor ( ElevatorFloor  p_elevFloor)
inline

[AI] Sets the current elevator floor the player is on.

Definition at line 80 of file isle.h.

◆ SetUnknown18()

void Act1State::SetUnknown18 ( MxU32  p_unk0x18)
inline

[AI] Sets the gameplay progress variable at 0x018 (controls state transitions, gameplay mode changes, e.g. minigames).

Definition at line 77 of file isle.h.

◆ SetUnknown21()

void Act1State::SetUnknown21 ( MxU8  p_unk0x21)
inline

[AI] Sets the state flag at offset 0x021 (purpose: controls certain transitions and checks).

Definition at line 83 of file isle.h.

◆ StopCptClickDialogue()

void Act1State::StopCptClickDialogue ( )

[AI] Stops the "Captain Click" dialogue cutscene if playing and resets background music. [AI]

Definition at line 1474 of file isle.cpp.

Member Data Documentation

◆ m_bikePlane

LegoNamedPlane Act1State::m_bikePlane

[AI] Serialized/deserialized world placement state for bike.

Definition at line 119 of file isle.h.

◆ m_cptClickDialogue

Playlist Act1State::m_cptClickDialogue

[AI] Playlist object which cycles and holds available "Captain Click" audio scripts for the info center.

Definition at line 86 of file isle.h.

◆ m_currentCptClickDialogue

IsleScript::Script Act1State::m_currentCptClickDialogue

[AI] Currently playing island script for the cutscene/voiceover event initiated by Captain Click.

Definition at line 89 of file isle.h.

◆ m_dunebuggy

DuneBuggy* Act1State::m_dunebuggy

[AI] Serializable pointer to current dune buggy object (NULL when not held in state). [AI]

Definition at line 158 of file isle.h.

◆ m_dunebuggyFront

LegoNamedTexture* Act1State::m_dunebuggyFront

[AI] Named texture for dune buggy front (state restoration, streaming). [AI]

Definition at line 155 of file isle.h.

◆ m_dunebuggyPlane

LegoNamedPlane Act1State::m_dunebuggyPlane

[AI] Placement state for dune buggy in world (serializable). [AI]

Definition at line 152 of file isle.h.

◆ m_elevFloor

MxS16 Act1State::m_elevFloor

[AI] Current floor of the elevator, using enum ElevatorFloor.

Definition at line 95 of file isle.h.

◆ m_helicopter

Helicopter* Act1State::m_helicopter

[AI] Serializable pointer to current helicopter object (NULL when not held in state). [AI]

Definition at line 137 of file isle.h.

◆ m_helicopterJetLeft

LegoNamedTexture* Act1State::m_helicopterJetLeft

[AI] Named texture for left jet on helicopter (needed for restoration/streaming). [AI]

Definition at line 131 of file isle.h.

◆ m_helicopterJetRight

LegoNamedTexture* Act1State::m_helicopterJetRight

[AI] Named texture for right jet on helicopter (needed for restoration/streaming). [AI]

Definition at line 134 of file isle.h.

◆ m_helicopterPlane

LegoNamedPlane Act1State::m_helicopterPlane

[AI] Serialized/deserialized world placement state for helicopter.

Definition at line 125 of file isle.h.

◆ m_helicopterWindshield

LegoNamedTexture* Act1State::m_helicopterWindshield

[AI] Named texture for helicopter windshield (needed for state restoration, texture streaming). [AI]

Definition at line 128 of file isle.h.

◆ m_jetski

Jetski* Act1State::m_jetski

[AI] Serializable pointer to current jetski object (NULL when not held in state). [AI]

Definition at line 149 of file isle.h.

◆ m_jetskiFront

LegoNamedTexture* Act1State::m_jetskiFront

[AI] Named texture for jetski front (state restoration, streaming). [AI]

Definition at line 143 of file isle.h.

◆ m_jetskiPlane

LegoNamedPlane Act1State::m_jetskiPlane

[AI] Placement state for jetski in world (serializable). [AI]

Definition at line 140 of file isle.h.

◆ m_jetskiWindshield

LegoNamedTexture* Act1State::m_jetskiWindshield

[AI] Named texture for jetski windshield (state restoration, streaming). [AI]

Definition at line 146 of file isle.h.

◆ m_motocyclePlane

LegoNamedPlane Act1State::m_motocyclePlane

[AI] Serialized/deserialized world placement state for motorcycle.

Definition at line 116 of file isle.h.

◆ m_planeActive

MxBool Act1State::m_planeActive

[AI] Indicates that the airplane cutscene is currently active (info center window). [AI]

Definition at line 104 of file isle.h.

◆ m_racecar

RaceCar* Act1State::m_racecar

[AI] Serializable pointer to current racecar object (NULL when not held in state). [AI]

Definition at line 173 of file isle.h.

◆ m_racecarBack

LegoNamedTexture* Act1State::m_racecarBack

[AI] Named texture for racecar back (state restoration, streaming). [AI]

Definition at line 167 of file isle.h.

◆ m_racecarFront

LegoNamedTexture* Act1State::m_racecarFront

[AI] Named texture for racecar front (state restoration, streaming). [AI]

Definition at line 164 of file isle.h.

◆ m_racecarPlane

LegoNamedPlane Act1State::m_racecarPlane

[AI] Placement state for racecar in world (serializable). [AI]

Definition at line 161 of file isle.h.

◆ m_racecarTail

LegoNamedTexture* Act1State::m_racecarTail

[AI] Named texture for racecar tail (state restoration, streaming). [AI]

Definition at line 170 of file isle.h.

◆ m_skateboardPlane

LegoNamedPlane Act1State::m_skateboardPlane

[AI] Serialized/deserialized world placement state for skateboard.

Definition at line 122 of file isle.h.

◆ m_unk0x018

MxU32 Act1State::m_unk0x018

[AI] Internal gameplay state variable; see Get/SetUnknown18 for usage. [AI]

Definition at line 92 of file isle.h.

◆ m_unk0x01e

MxBool Act1State::m_unk0x01e

[AI] Temporary flag for info center elevator; used to determine if elevator is currently active/transitioning. [AI]

Definition at line 98 of file isle.h.

◆ m_unk0x01f

MxBool Act1State::m_unk0x01f

[AI] Temporary flag for info center elevator; often used as a "ready for transition" check. [AI]

Definition at line 101 of file isle.h.

◆ m_unk0x021

undefined Act1State::m_unk0x021

[AI] Internal state/transition flag, possibly for initializing/handling world entry. [AI]

Definition at line 107 of file isle.h.

◆ m_unk0x022

MxBool Act1State::m_unk0x022

[AI] Temporary state variable; persists through serialization, often used for logic gating. [AI]

Definition at line 110 of file isle.h.

◆ m_unk0x023

undefined Act1State::m_unk0x023

[AI] State variable for plane/channel transitions; exact meaning unknown. [AI]

Definition at line 113 of file isle.h.


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