Isle
Loading...
Searching...
No Matches
legopathstruct.h
Go to the documentation of this file.
1#ifndef LEGOPATHSTRUCT_H
2#define LEGOPATHSTRUCT_H
3
4#include "decomp.h"
5#include "mxatom.h"
7#include "mxtypes.h"
8
9class LegoPathActor;
10class LegoWorld;
11
16// VTABLE: LEGO1 0x100d6230
17// SIZE 0x10
19public:
25 LegoPathStructNotificationParam(NotificationId p_type, MxCore* p_sender, MxU8 p_trigger, MxS16 p_data)
27 {
28 m_type = p_type;
29 m_sender = p_sender;
30 m_data = p_data;
31 m_trigger = p_trigger;
32 }
33
37 // FUNCTION: LEGO1 0x1001bac0
38 MxNotificationParam* Clone() const override
39 {
41 } // vtable+0x04
42
45 // FUNCTION: BETA10 0x10024270
47
50 // FUNCTION: BETA10 0x100242a0
51 MxS16 GetData() { return m_data; }
52
53protected:
56};
57
61// VTABLE: LEGO1 0x100d7d9c
62// SIZE 0x0c
64public:
66 enum {
67 c_bit1 = 0x01 << 24,
68 c_bit2 = 0x02 << 24,
69 c_bit3 = 0x04 << 24,
70 c_bit4 = 0x08 << 24,
71 c_bit5 = 0x10 << 24,
72 c_bit6 = 0x20 << 24,
73 c_bit7 = 0x40 << 24
74 };
75
78
80 // FUNCTION: LEGO1 0x10047420
82 {
83 if (m_name != NULL) {
84 delete[] m_name;
85 }
86 }
87
88 char* m_name;
90};
91
96// VTABLE: LEGO1 0x100d7da0
97// SIZE 0x14
99public:
102 enum Trigger {
103 c_camAnim = 'C',
104 c_d = 'D',
105 c_e = 'E',
106 c_g = 'G',
107 c_h = 'H',
108 c_music = 'M',
109 c_s = 'S',
110 c_w = 'W'
111 };
112
114 // FUNCTION: LEGO1 0x100473a0
115 LegoPathStruct() : m_world(NULL) {}
116
118 // FUNCTION: LEGO1 0x10047470
119 ~LegoPathStruct() override {}
120
126 virtual void HandleTrigger(LegoPathActor* p_actor, MxBool p_direction, MxU32 p_data); // vtable+0x04
127
130 void SetWorld(LegoWorld* p_world) { m_world = p_world; }
131
134 void SetAtomId(const MxAtomId& p_atomId) { m_atomId = p_atomId; }
135
136private:
143 MxBool HandleTrigger(LegoPathActor* p_actor, MxBool p_direction, MxU32 p_data, MxBool p_bool);
144
149 void FUN_1001bc40(const char* p_name, MxU32 p_data, MxBool p_bool);
150
154 void PlayMusic(MxBool p_direction, MxU32 p_data);
155
156 LegoWorld* m_world;
157 MxAtomId m_atomId;
158};
159
160// SYNTHETIC: LEGO1 0x1001bb80
161// LegoPathStructNotificationParam::`scalar deleting destructor'
162
163// SYNTHETIC: LEGO1 0x1001bbf0
164// LegoPathStructNotificationParam::~LegoPathStructNotificationParam
165
166// SYNTHETIC: LEGO1 0x10047440
167// LegoPathStructBase::`scalar deleting destructor'
168
169// SYNTHETIC: LEGO1 0x10047890
170// LegoPathStruct::`vector deleting destructor'
171
172#endif // LEGOPATHSTRUCT_H
[AI] An actor that moves along a predefined path, supporting boundary transitions,...
Definition: legopathactor.h:32
[AI] Specialized notification parameter used for path structure related events in LEGO Island.
LegoPathStructNotificationParam(NotificationId p_type, MxCore *p_sender, MxU8 p_trigger, MxS16 p_data)
[AI] Constructor for LegoPathStructNotificationParam.
MxS16 GetData()
[AI] Retrieves the supplemental data associated with the notification.
MxS16 m_data
[AI] Context-dependent data relevant to the trigger event (e.g. object id, animation id).
MxU8 GetTrigger()
[AI] Returns the trigger type associated with this notification.
MxU8 m_trigger
[AI] Trigger type character - specifies which trigger caused the event (e.g. 'D' for door/passage,...
MxNotificationParam * Clone() const override
[AI] Creates a deep copy of this notification parameter.
[AI] Represents a trigger/control element in the LEGO world's path system, linked logically to the wo...
Trigger
[AI] Enumerated list of recognized path trigger types.
@ c_camAnim
[AI] Camera animation trigger.
@ c_e
[AI] Event trigger.
@ c_music
[AI] Music control trigger.
@ c_s
[AI] State change trigger.
@ c_d
[AI] Door or passage transition trigger.
@ c_w
[AI] World notification trigger.
@ c_h
[AI] Hide animation trigger.
@ c_g
[AI] Generic placeholder trigger.
LegoPathStruct()
[AI] Default constructor; sets world pointer to NULL.
~LegoPathStruct() override
[AI] Destructor.
virtual void HandleTrigger(LegoPathActor *p_actor, MxBool p_direction, MxU32 p_data)
[AI] Main trigger handler; evaluates flags and name-based script to decide what action to take when a...
void SetWorld(LegoWorld *p_world)
[AI] Binds a world instance to this path struct for context-specific handling.
void SetAtomId(const MxAtomId &p_atomId)
[AI] Sets this struct's AtomId for data/action lookup and dispatch.
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] Base virtual class for all Mindscape engine (Mx) objects.
Definition: mxcore.h:15
[AI] Parameter object representing a single notification or event, carrying an identifier and sender ...
MxCore * m_sender
[AI] Pointer to the MxCore instance that sent or originated this notification.
NotificationId m_type
[AI] Type of notification/event carried by this object (see NotificationId).
#define NULL
[AI] Null pointer value (C/C++ semantics).
Definition: legotypes.h:26
NotificationId
Several of those should be defined in LegoOmni.
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
signed short MxS16
[AI]
Definition: mxtypes.h:26
unsigned char MxU8
[AI]
Definition: mxtypes.h:8
unsigned int MxU32
[AI]
Definition: mxtypes.h:32
[AI] Abstract base describing named, flag-based elements of the LEGO world path system.
LegoPathStructBase()
[AI] Default constructor. Initializes name pointer to NULL and flags to 0.
MxU32 m_flags
[AI] Bitfield of state and trigger flags for fast matching in trigger logic.
char * m_name
[AI] Dynamically allocated name for this path struct instance (e.g., a label or trigger identifier).
@ c_bit2
[AI] Bitmask for actor direction/state.
@ c_bit7
[AI] Extra bit, typically used for advanced logic/filtering [AI].
@ c_bit4
[AI] Bitmask for extra control/state.
@ c_bit6
[AI] Bitmask for direction or branch 'false' (see HandleTrigger) [AI].
@ c_bit3
[AI] Bitmask for direction filter/type.
@ c_bit5
[AI] Bitmask for direction or branch 'true' (see HandleTrigger) [AI].
@ c_bit1
[AI] Bitmask for camera flag/actor trigger logic.
virtual ~LegoPathStructBase()
[AI] Virtual destructor. Frees the name buffer if allocated.