Isle
Loading...
Searching...
No Matches
islepathactor.h
Go to the documentation of this file.
1#ifndef ISLEPATHACTOR_H
2#define ISLEPATHACTOR_H
3
4#include "legogamestate.h"
5#include "legopathactor.h"
6#include "mxtypes.h"
7#include "roi/legoroi.h"
8
11class LegoWorld;
13
14// VTABLE: LEGO1 0x100d4398
15// VTABLE: BETA10 0x101b9090
16// SIZE 0x160
24public:
25 enum {
26 c_LOCATIONS_NUM = 29
27 };
28
29 enum {
30 c_spawnBit1 = 0x01,
31 c_playMusic = 0x02,
32 c_spawnBit3 = 0x04
33 };
34
44
60 MxAtomId* p_script,
61 MxS32 p_entityId,
62 const char* p_name,
63 MxS16 p_src,
64 float p_srcScale,
65 MxS16 p_dest,
66 float p_destScale,
67 MxU32 p_location,
69 )
70 {
71 m_area = p_area;
72 m_script = p_script;
73 m_entityId = p_entityId;
74 strcpy(m_name, p_name);
75 m_src = p_src;
76 m_srcScale = p_srcScale;
77 m_dest = p_dest;
78 m_destScale = p_destScale;
79 m_location = p_location;
80 m_music = p_music;
81 }
82
89 {
90 m_area = p_location.m_area;
91 m_script = p_location.m_script;
92 m_entityId = p_location.m_entityId;
93 strcpy(m_name, p_location.m_name);
94 m_src = p_location.m_src;
95 m_srcScale = p_location.m_srcScale;
96 m_dest = p_location.m_dest;
97 m_destScale = p_location.m_destScale;
98 m_location = p_location.m_location;
99 m_music = p_location.m_music;
100 return *this;
101 }
102
106 char m_name[20];
113 };
114
119
124 virtual MxLong HandleClick() { return 0; } // vtable+0xcc
125
130 virtual MxLong HandleNotification0() { return 0; } // vtable+0xd0
131
137 virtual MxLong HandleControl(LegoControlManagerNotificationParam&) { return 0; } // vtable+0xd4
138
144 virtual MxLong HandleEndAnim(LegoEndAnimNotificationParam&) { return 0; } // vtable+0xd8
145
151 virtual MxLong HandlePathStruct(LegoPathStructNotificationParam&) { return 0; } // vtable+0xdc
152
156 virtual void Enter();
157
161 virtual void Exit();
162
169 virtual void SpawnPlayer(LegoGameState::Area p_area, MxBool p_enter, MxU8 p_flags);
170
177 virtual void VTable0xec(MxMatrix p_transform, LegoPathBoundary* p_boundary, MxBool p_reset);
178
184
190 MxLong Notify(MxParam& p_param) override;
191
196 const char* ClassName() const override
197 {
198 return "IslePathActor";
199 }
200
206 MxBool IsA(const char* p_name) const override
207 {
208 return !strcmp(p_name, IslePathActor::ClassName()) || LegoPathActor::IsA(p_name);
209 }
210
215 MxResult Create(MxDSAction& p_dsAction) override;
216
221 void Destroy(MxBool p_fromDestructor) override;
222
227 void FUN_1001b660();
228
233 void SetWorld(LegoWorld* p_world) { m_world = p_world; }
234
239 static void RegisterSpawnLocations();
240
241 // SYNTHETIC: LEGO1 0x10002ff0
242 // IslePathActor::`scalar deleting destructor'
243
244protected:
248};
249
250#endif // ISLEPATHACTOR_H
Derived path actor type for handling player transitions and activities on LEGO Island.
Definition: islepathactor.h:23
virtual MxLong HandleEndAnim(LegoEndAnimNotificationParam &)
[AI] Handles end-of-animation notifications for this actor.
@ c_spawnBit1
[AI] Bit flag to trigger additional camera/animation sequence during spawn. [AI]
Definition: islepathactor.h:30
@ c_playMusic
[AI] Bit flag to trigger background music playback on spawn. [AI]
Definition: islepathactor.h:31
@ c_spawnBit3
[AI] Unused/reserved extra spawn bit in flag set. [AI]
Definition: islepathactor.h:32
void Destroy(MxBool p_fromDestructor) override
[AI] Cleans up the actor and associated resources.
@ c_LOCATIONS_NUM
[AI] Maximum number of spawn locations. [AI]
Definition: islepathactor.h:26
virtual MxLong HandlePathStruct(LegoPathStructNotificationParam &)
[AI] Handles structure/path-related notifications for this actor.
const char * ClassName() const override
[AI] Get class name string for RTTI/comparison.
MxFloat m_previousVel
[AI] Stores previous navigation velocity for actor/handoffs. [AI]
virtual MxLong HandleControl(LegoControlManagerNotificationParam &)
[AI] Handles in-game player controls notifications for this actor.
MxResult Create(MxDSAction &p_dsAction) override
[AI] Initialize this actor from a DSAction.
virtual MxLong HandleClick()
[AI] Handles a click event for interaction with this actor.
virtual void VTable0xec(MxMatrix p_transform, LegoPathBoundary *p_boundary, MxBool p_reset)
[AI] Places this actor in the current world with a given transformation, resets input if requested.
virtual void SpawnPlayer(LegoGameState::Area p_area, MxBool p_enter, MxU8 p_flags)
[AI] Spawns the player in a specific area/location, potentially triggering music and animation.
MxBool IsA(const char *p_name) const override
[AI] Checks if class or any superclass matches the given type string.
void FUN_1001b660()
[AI] Synchronizes the actor's world transformation and ROI.
virtual MxLong HandleNotification0()
[AI] Handles custom notification type 0 for this actor.
IslePathActor()
[AI] Constructs a new IslePathActor and resets its world state.
void SetWorld(LegoWorld *p_world)
[AI] Sets the current world this actor belongs to, updating its reference for placement.
virtual void Exit()
[AI] Called when the actor is deactivated or moved out of player control, restoring previous actor if...
MxLong Notify(MxParam &p_param) override
[AI] Dispatches notifications to specialized handlers based on notification type.
LegoPathActor * m_previousActor
[AI] The last active path actor before this one; for restoration after exit. [AI]
LegoWorld * m_world
[AI] Pointer to the current world instance actor is existing in. [AI]
~IslePathActor() override
[AI] Destructor; performs resource cleanup by delegating to Destroy(TRUE).
virtual void Enter()
[AI] Called when the actor is made active in a new area or context, setting navigation and visibility...
static void RegisterSpawnLocations()
[AI] Static: Registers all known player spawn locations into the global location table.
[AI] Notification parameter for the LegoControlManager, used to propagate information about control e...
Notification parameter for signaling the end of an animation in the LEGO Island engine.
Area
Enumeration of all major in-game locations ("areas") for area/scene management and serialization.
Definition: legogamestate.h:92
[AI] An actor that moves along a predefined path, supporting boundary transitions,...
Definition: legopathactor.h:32
MxBool IsA(const char *p_name) const override
[AI] RTTI-like check, matches against own or base class name for IsA hierarchy checks.
[AI] Represents a path segment or boundary in the navigation network for actors (vehicles,...
[AI] Specialized notification parameter used for path structure related events in LEGO Island.
Represents the active 3D world, holding all entity, animation, sound, path, and ROI objects.
Definition: legoworld.h:49
[AI] Atomized (unique) string identifier, managed by reference counting.
Definition: mxatom.h:124
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
Definition: mxdsaction.h:17
[AI] Represents a 4x4 transformation matrix, specialized for the LEGO Island engine and derived from ...
Definition: mxmatrix.h:16
[AI] MxParam serves as a polymorphic base class for parameter passing in event and notification syste...
Definition: mxparam.h:7
#define TRUE
Definition: d3drmdef.h:28
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
MxLong MxResult
[AI]
Definition: mxtypes.h:106
int MxLong
[AI]
Definition: mxtypes.h:83
signed short MxS16
[AI]
Definition: mxtypes.h:26
float MxFloat
[AI]
Definition: mxtypes.h:68
unsigned char MxU8
[AI]
Definition: mxtypes.h:8
signed int MxS32
[AI]
Definition: mxtypes.h:38
unsigned int MxU32
[AI]
Definition: mxtypes.h:32
Information for each player spawn location on LEGO Island.
Definition: islepathactor.h:41
float m_destScale
[AI] Fractional scale for placement at the destination. [AI]
SpawnLocation(LegoGameState::Area p_area, MxAtomId *p_script, MxS32 p_entityId, const char *p_name, MxS16 p_src, float p_srcScale, MxS16 p_dest, float p_destScale, MxU32 p_location, JukeboxScript::Script p_music)
[AI] Initializes a SpawnLocation with full data for area, entity, transform and music.
Definition: islepathactor.h:58
MxS32 m_entityId
[AI] Entity id used by world placement. [AI]
float m_srcScale
[AI] Fractional scale for placement at the source. [AI]
SpawnLocation & operator=(const SpawnLocation &p_location)
[AI] Assignment operator, deep copies fields (including string buffer).
Definition: islepathactor.h:88
MxAtomId * m_script
[AI] Pointer to the atom id of the script associated with this location. [AI]
char m_name[20]
[AI] String identifier of this spawn (safe up to 19 chars, zero-terminated). [AI]
MxU32 m_location
[AI] Optional location code (used for certain logic branches or animation). [AI]
LegoGameState::Area m_area
[AI] Which overall map are the spawn is located in. [AI]
SpawnLocation()
[AI] Default constructor.
Definition: islepathactor.h:43
MxS16 m_dest
[AI] Destination boundary/index. [AI]
MxS16 m_src
[AI] Integer for input boundary or index at the source. [AI]
JukeboxScript::Script m_music
[AI] What music Jukebox Script enum to play on spawn. [AI]