Isle
Loading...
Searching...
No Matches
legoracers.h
Go to the documentation of this file.
1#ifndef LEGORACERS_H
2#define LEGORACERS_H
3
4// clang-format off
5#include "legoracespecial.h"
6// clang-format on
7#include "legoracemap.h"
8
13#define LEGORACECAR_UNKNOWN_0 0
14
19#define LEGORACECAR_UNKNOWN_1 1
20
25#define LEGORACECAR_KICK1 2 // name guessed
26
31#define LEGORACECAR_KICK2 4 // name validated by BETA10 0x100cb659
32
39 const char* m_name;
41};
42
50 float m_lower;
51 float m_upper;
53};
54
61public:
62 LegoJetski();
63 ~LegoJetski() override;
64
69 MxLong Notify(MxParam& p_param) override; // vtable+0x04
70
74 const char* ClassName() const override // vtable+0x0c
75 {
76 return "LegoJetski";
77 }
78
83 MxBool IsA(const char* p_name) const override // vtable+0x10
84 {
85 return !strcmp(p_name, LegoJetski::ClassName()) || LegoJetskiRaceActor::IsA(p_name);
86 }
87
92 void ParseAction(char* p_extra) override; // vtable+0x20
93
98 void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30
99
110 MxU32 VTable0x6c(LegoPathBoundary* p_boundary, Vector3& p_v1, Vector3& p_v2, float p_f1, float p_f2, Vector3& p_v3)
111 override
112 {
113 return LegoJetskiRaceActor::VTable0x6c(p_boundary, p_v1, p_v2, p_f1, p_f2, p_v3);
114 } // vtable+0x6c
115
120 void Animate(float p_time) override; // vtable+0x70
121
128 MxResult HitActor(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94
129
136 void SwitchBoundary(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4) override
137 {
138 LegoJetskiRaceActor::SwitchBoundary(p_boundary, p_edge, p_unk0xe4);
139 } // vtable+0x98
140
144 MxResult VTable0x9c() override { return LegoJetskiRaceActor::VTable0x9c(); } // vtable+0x9c
145
150 virtual void FUN_100136f0(float p_worldSpeed);
151
155 static void InitSoundIndices();
156
157 // SYNTHETIC: LEGO1 0x10013e30
158 // LegoJetski::`scalar deleting destructor'
159};
160
161
168public:
169 LegoRaceCar();
170 ~LegoRaceCar() override;
171
176 MxLong Notify(MxParam& p_param) override; // vtable+0x04
177
181 const char* ClassName() const override // vtable+0x0c
182 {
183 return "LegoRaceCar";
184 }
185
190 MxBool IsA(const char* p_name) const override // vtable+0x10
191 {
192 return !strcmp(p_name, LegoRaceCar::ClassName()) || LegoCarRaceActor::IsA(p_name);
193 }
194
200 void ParseAction(char* p_extra) override; // vtable+0x20
201
206 void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30
207
217 MxU32 VTable0x6c(LegoPathBoundary* p_boundary, Vector3& p_v1, Vector3& p_v2, float p_f1, float p_f2, Vector3& p_v3)
218 override
219 {
220 return LegoCarRaceActor::VTable0x6c(p_boundary, p_v1, p_v2, p_f1, p_f2, p_v3);
221 } // vtable+0x6c
222
228 void Animate(float p_time) override; // vtable+0x70
229
235 MxResult HitActor(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94
236
243 void SwitchBoundary(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4) override
244 {
245 LegoCarRaceActor::SwitchBoundary(p_boundary, p_edge, p_unk0xe4);
246 } // vtable+0x98
247
252 MxResult VTable0x9c() override; // vtable+0x9c
253
258 virtual void SetMaxLinearVelocity(float p_maxLinearVelocity);
259
264 virtual void FUN_10012ff0(float p_param);
265
271 virtual MxU32 HandleSkeletonKicks(float p_param1);
272
276 static void FUN_10012de0();
277
281 static void InitSoundIndices();
282
283 // SYNTHETIC: LEGO1 0x10014240
284 // LegoRaceCar::`scalar deleting destructor'
285
286private:
287 undefined m_userState;
288 float m_unk0x58;
289 Mx3DPointFloat m_unk0x5c;
290 LegoAnimActorStruct* m_skelKick1Anim;
291 LegoAnimActorStruct* m_skelKick2Anim;
292 LegoPathBoundary* m_kick1B;
293 LegoPathBoundary* m_kick2B;
294};
295
296#endif // LEGORACERS_H
[AI] Specialized actor class for car-based racing in LEGO Island racing sequences....
MxU32 VTable0x6c(LegoPathBoundary *p_boundary, Vector3 &p_v1, Vector3 &p_v2, float p_f1, float p_f2, Vector3 &p_v3) override
[AI] Performs collision detection and/or special logic while moving the car actor along a boundary.
void SwitchBoundary(LegoPathBoundary *&p_boundary, LegoUnknown100db7f4 *&p_edge, float &p_unk0xe4) override
[AI] Handles switching from one path boundary to another, updating relevant edge and position paramet...
MxBool IsA(const char *p_name) const override
[AI] Checks if the object is a given class name (used for runtime type identification).
[AI] A racing actor subclass representing jetski (water-based) vehicles. Modifies car parameters and ...
MxU32 VTable0x6c(LegoPathBoundary *p_boundary, Vector3 &p_v1, Vector3 &p_v2, float p_f1, float p_f2, Vector3 &p_v3) override
[AI] Collision and path interaction routine specialized for jetski actors.
MxBool IsA(const char *p_name) const override
[AI] Checks if the object is a given class name (used for runtime type identification).
[AI] Represents a Jetski actor in the race, combining behavior from LegoJetskiRaceActor and LegoRaceM...
Definition: legoracers.h:60
void SwitchBoundary(LegoPathBoundary *&p_boundary, LegoUnknown100db7f4 *&p_edge, float &p_unk0xe4) override
[AI] Switches the current boundary and tracking edge based on race logic.
Definition: legoracers.h:136
MxU32 VTable0x6c(LegoPathBoundary *p_boundary, Vector3 &p_v1, Vector3 &p_v2, float p_f1, float p_f2, Vector3 &p_v3) override
[AI] Thin override that delegates path boundary-related animation calculation to base implementation.
Definition: legoracers.h:110
static void InitSoundIndices()
[AI] Initializes static indices for jetski-specific sound arrays to randomized starting positions.
Definition: legoracers.cpp:570
void ParseAction(char *p_extra) override
[AI] Parses an action string to configure or trigger Jetski behaviors such as switching race boundari...
Definition: legoracers.cpp:650
void SetWorldSpeed(MxFloat p_worldSpeed) override
[AI] Sets world speed for the jetski, influencing both physics and animation logic.
Definition: legoracers.cpp:579
MxLong Notify(MxParam &p_param) override
[AI] Processes notifications/events for the LegoJetski instance (see MxCore).
Definition: legoracers.cpp:665
const char * ClassName() const override
[AI] Returns the runtime class name ("LegoJetski").
Definition: legoracers.h:74
MxBool IsA(const char *p_name) const override
[AI] Determines if this object is of the given class type or derives from it.
Definition: legoracers.h:83
MxResult VTable0x9c() override
[AI] Used for post-animation logic (purpose inferred as clean up or ready-check; see base classes).
Definition: legoracers.h:144
virtual void FUN_100136f0(float p_worldSpeed)
[AI] Custom world speed handler for clamping or setting maximum velocity for the jetski.
Definition: legoracers.cpp:594
~LegoJetski() override
Definition: legoracers.cpp:643
MxResult HitActor(LegoPathActor *p_actor, MxBool p_bool) override
[AI] Handles collision/hit logic between this jetski and another race actor.
Definition: legoracers.cpp:671
void Animate(float p_time) override
[AI] Updates jetski animation for the current frame.
Definition: legoracers.cpp:608
[AI] An actor that moves along a predefined path, supporting boundary transitions,...
Definition: legopathactor.h:32
virtual void SwitchBoundary(LegoPathBoundary *&p_boundary, LegoUnknown100db7f4 *&p_edge, float &p_unk0xe4)
[AI] Switches current path boundary and destination edge, typically called on transitions or respawns...
virtual MxResult VTable0x9c()
[AI] Handles exit transition and next-edge search logic; also used for collision reaction and fallbac...
[AI] Represents a path segment or boundary in the navigation network for actors (vehicles,...
[AI] Represents a Race Car actor in the game, combining advanced pathing, skeleton kick logic,...
Definition: legoracers.h:167
MxBool IsA(const char *p_name) const override
[AI] Determines if this object is of the given class type or derives from it.
Definition: legoracers.h:190
void ParseAction(char *p_extra) override
[AI] Parses an action string to configure or trigger car behaviors (e.g., updates kick animation refe...
Definition: legoracers.cpp:255
const char * ClassName() const override
[AI] Returns the runtime class name ("LegoRaceCar").
Definition: legoracers.h:181
MxResult HitActor(LegoPathActor *p_actor, MxBool p_bool) override
[AI] Handles player/AI actor collision—score, animation, and sound effects, as well as respawn logic ...
Definition: legoracers.cpp:457
static void InitSoundIndices()
[AI] Initializes sound playback array indices for collision sounds to randomized values.
Definition: legoracers.cpp:214
~LegoRaceCar() override
Definition: legoracers.cpp:186
MxU32 VTable0x6c(LegoPathBoundary *p_boundary, Vector3 &p_v1, Vector3 &p_v2, float p_f1, float p_f2, Vector3 &p_v3) override
[AI] Delegates advanced animation calculation to base class; see base for logic.
Definition: legoracers.h:217
MxLong Notify(MxParam &p_param) override
[AI] Processes notifications/events for the LegoRaceCar (see MxCore).
Definition: legoracers.cpp:193
void Animate(float p_time) override
[AI] Main animation tick function; handles skeleton kick special states when user-controlled.
Definition: legoracers.cpp:398
void SetWorldSpeed(MxFloat p_worldSpeed) override
[AI] Sets world speed for the race car, either for user nav or animation context.
Definition: legoracers.cpp:226
virtual MxU32 HandleSkeletonKicks(float p_param1)
[AI] Handles transition between skeleton kick phases based on animation time and current boundary.
Definition: legoracers.cpp:353
virtual void SetMaxLinearVelocity(float p_maxLinearVelocity)
[AI] Sets the maximum linear velocity the car is allowed to attain (and can force 0 for "despawn" eff...
Definition: legoracers.cpp:241
static void FUN_10012de0()
[AI] Resets static sound state variables for the car (last sound time, stopped flag,...
Definition: legoracers.cpp:204
MxResult VTable0x9c() override
[AI] Finalizes animation phase/post-kick state machine.
Definition: legoracers.cpp:534
virtual void FUN_10012ff0(float p_param)
[AI] Handles skeleton kick transition logic for given time; switches state as needed.
Definition: legoracers.cpp:299
void SwitchBoundary(LegoPathBoundary *&p_boundary, LegoUnknown100db7f4 *&p_edge, float &p_unk0xe4) override
[AI] Delegates boundary/edge switch operation to base race car logic.
Definition: legoracers.h:243
[AI] Represents the world-space to screen-space mapping and rendering handler for the interactive rac...
Definition: legoracemap.h:29
[AI] Represents a 3D point with floating-point precision, inheriting from Vector3.
Definition: mxgeometry3d.h:14
[AI] MxParam serves as a polymorphic base class for parameter passing in event and notification syste...
Definition: mxparam.h:7
[AI] 3D vector class, providing vector and cross-product operations in 3D space.
Definition: vector.h:249
#define override
Definition: compat.h:21
unsigned char undefined
Definition: decomp.h:26
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
MxLong MxResult
[AI]
Definition: mxtypes.h:106
int MxLong
[AI]
Definition: mxtypes.h:83
float MxFloat
[AI]
Definition: mxtypes.h:68
unsigned char MxU8
[AI]
Definition: mxtypes.h:8
unsigned int MxU32
[AI]
Definition: mxtypes.h:32
[AI] Associates a named edge (string) to a LegoPathBoundary, used within skeleton kick phases to assi...
Definition: legoracers.h:38
LegoPathBoundary * m_b
[AI] Boundary pointer; set to NULL until mapped by ParseAction or similar initialization.
Definition: legoracers.h:40
const char * m_name
[AI] Name of the edge to be resolved to an actual boundary in the current world instance.
Definition: legoracers.h:39
[AI] Holds per-animation instance data for a LegoAnimActor.
Definition: legoanimactor.h:13
[AI] Represents an advanced edge in the LEGO Island geometry system, with direction,...
[AI] Represents a phase of the skeleton kick animation/action, delimiting animation intervals along a...
Definition: legoracers.h:48
MxU8 m_userState
[AI] State to switch to if currently within this phase. LEGORACECAR_KICK1 or LEGORACECAR_KICK2.
Definition: legoracers.h:52
float m_lower
[AI] Lower normalized bound of animation phase where this skeleton kick is applicable....
Definition: legoracers.h:50
float m_upper
[AI] Upper normalized bound of animation phase where this skeleton kick is applicable....
Definition: legoracers.h:51
EdgeReference * m_edgeRef
[AI] Pointer to the EdgeReference describing which boundary this phase is associated with.
Definition: legoracers.h:49