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

[AI] Represents the state information specific to the Police area of the game. More...

#include <police.h>

Inheritance diagram for PoliceState:
Collaboration diagram for PoliceState:

Public Member Functions

 PoliceState ()
 [AI] Constructs a new PoliceState. Initializes script and internal state. [AI] More...
 
 ~PoliceState () override
 [AI] Default destructor. [AI] More...
 
const char * ClassName () const override
 [AI] Returns the class name for this type; used for RTTI and IsA checks. More...
 
MxBool IsA (const char *p_name) const override
 [AI] Checks whether the given type name matches this class or any ancestor. More...
 
MxResult Serialize (LegoStorage *p_storage) override
 [AI] Serialize the PoliceState to or from the provided storage. More...
 
undefined4 GetUnknown0x0c ()
 [AI] Returns the value of the internal state variable at offset 0x0c. More...
 
void SetUnknown0x0c (undefined4 p_unk0x0c)
 [AI] Set the value of the internal state variable at offset 0x0c. More...
 
void FUN_1005ea40 ()
 [AI] Trigger the "donut" animation event. 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

PoliceScript::Script m_policeScript
 [AI] The currently active animation/script for the Police state (e.g. which minifig or animation runs). [AI] More...
 
undefined4 m_unk0x0c
 [AI] Internal flag to indicate whether the donut animation has started (1), finished (0), or unused. 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] Represents the state information specific to the Police area of the game.

[AI]

This holds the currently active police script/animation and a flag for internal state machine transitions. Serialized as part of the game state when saving/loading. Inherits from LegoState for polymorphic game state management. [AI]

Definition at line 19 of file police.h.

Constructor & Destructor Documentation

◆ PoliceState()

PoliceState::PoliceState ( )

[AI] Constructs a new PoliceState. Initializes script and internal state. [AI]

Definition at line 198 of file police.cpp.

◆ ~PoliceState()

PoliceState::~PoliceState ( )
inlineoverride

[AI] Default destructor. [AI]

Definition at line 25 of file police.h.

Member Function Documentation

◆ ClassName()

const char * PoliceState::ClassName ( ) const
inlineoverridevirtual

[AI] Returns the class name for this type; used for RTTI and IsA checks.

[AI]

Returns
Pointer to string literal "PoliceState". [AI]

Reimplemented from LegoState.

Definition at line 29 of file police.h.

◆ FUN_1005ea40()

void PoliceState::FUN_1005ea40 ( )

[AI] Trigger the "donut" animation event.

[AI]

[AI] Switches the police script according to the user-controlled actor, plays corresponding anim, and marks donut animation as started. [AI]

Definition at line 221 of file police.cpp.

◆ GetUnknown0x0c()

undefined4 PoliceState::GetUnknown0x0c ( )
inline

[AI] Returns the value of the internal state variable at offset 0x0c.

[AI]

Returns
Internal state value (purpose: tracks running donut animation, toggles between allowed actions). [AI]

Definition at line 49 of file police.h.

◆ IsA()

MxBool PoliceState::IsA ( const char *  p_name) const
inlineoverridevirtual

[AI] Checks whether the given type name matches this class or any ancestor.

[AI]

Parameters
p_nameName of the class to match. [AI]
Returns
TRUE if match, FALSE otherwise. [AI]

Reimplemented from LegoState.

Definition at line 37 of file police.h.

◆ Serialize()

MxResult PoliceState::Serialize ( LegoStorage p_storage)
overridevirtual

[AI] Serialize the PoliceState to or from the provided storage.

[AI]

Parameters
p_storageFile or memory storage interface for serialization. [AI]

[AI] Reads or writes the current script from/to storage, as well as base LegoState members. [AI]

Reimplemented from LegoState.

Definition at line 206 of file police.cpp.

◆ SetUnknown0x0c()

void PoliceState::SetUnknown0x0c ( undefined4  p_unk0x0c)
inline

[AI] Set the value of the internal state variable at offset 0x0c.

[AI]

Parameters
p_unk0x0cNew internal state value. [AI]

Definition at line 53 of file police.h.

Member Data Documentation

◆ m_policeScript

PoliceScript::Script PoliceState::m_policeScript

[AI] The currently active animation/script for the Police state (e.g. which minifig or animation runs). [AI]

Definition at line 60 of file police.h.

◆ m_unk0x0c

undefined4 PoliceState::m_unk0x0c

[AI] Internal flag to indicate whether the donut animation has started (1), finished (0), or unused.

[AI] Used to block or allow additional interactions. [AI]

Definition at line 64 of file police.h.


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