Isle
Loading...
Searching...
No Matches
legoracespecial.cpp
Go to the documentation of this file.
1#include "legoracespecial.h"
2
4#include "legonavcontroller.h"
5#include "legopathboundary.h"
7#include "misc.h"
8#include "mxmisc.h"
9#include "mxvariabletable.h"
10
11#include <vec.h>
12
13// File name verified by BETA10 0x100cedf7
14
17
18// GLOBAL: LEGO1 0x100f0c68
19// STRING: LEGO1 0x100f0c5c
20// GLOBAL: BETA10 0x101f5b04
21// STRING: BETA10 0x101f5b14
22const char* g_raceState = "RACE_STATE";
23
24// GLOBAL: LEGO1 0x100f7af0
25// STRING: LEGO1 0x100f7ae4
26const char* g_fuel = "FUEL";
27
28// GLOBAL: LEGO1 0x100f0c6c
29// STRING: LEGO1 0x100f0c54
30// GLOBAL: BETA10 0x101f5b08
31// STRING: BETA10 0x101f5b20
32const char* g_racing = "RACING";
33
34// GLOBAL: LEGO1 0x100f7aec
35MxFloat LegoCarRaceActor::g_unk0x100f7aec = 8.0f;
36
37// GLOBAL: LEGO1 0x100da044
38// GLOBAL: BETA10 0x101be9fc
40
41// FUNCTION: LEGO1 0x10080350
42// FUNCTION: BETA10 0x100cd6b0
44{
45 m_unk0x08 = 1.0f;
46 m_unk0x70 = 0.0f;
47 m_unk0x0c = 0;
48 m_maxLinearVel = 0.0f;
49 m_frequencyFactor = 1.0f;
50 m_unk0x1c = 0;
51 m_unk0x10 = 0.65f;
52 m_unk0x14 = 0.03f;
53 m_unk0x18 = 0.6f;
54 m_unk0x140 = 0.1f;
55 m_unk0x150 = -5.0f;
56 m_unk0x148 = 1;
58}
59
60// FUNCTION: LEGO1 0x10080590
61// FUNCTION: BETA10 0x100cd8cf
63{
64 MxFloat maxSpeed = m_maxLinearVel;
65 Mx3DPointFloat destEdgeUnknownVector;
67
68 m_destEdge->FUN_1002ddc0(*m_boundary, destEdgeUnknownVector);
69
70 if (abs(destEdgeUnknownVector.Dot(destEdgeUnknownVector.GetData(), worldDirection.GetData())) > 0.5) {
71 maxSpeed *= m_unk0x10;
72 }
73
74 MxS32 deltaUnk0x70;
75 LegoPathActor* userActor = UserActor();
76
77 if (userActor) {
78 // All known implementations of LegoPathActor->VTable0x5c() return LegoPathActor::m_unk0x70
79 deltaUnk0x70 = m_unk0x70 - userActor->VTable0x5c();
80 }
81 else {
82 deltaUnk0x70 = 0;
83 }
84
85 if (deltaUnk0x70 > 1) {
86 if (deltaUnk0x70 > 3) {
87 deltaUnk0x70 = 3;
88 }
89
90 maxSpeed *= (m_unk0x18 * (--deltaUnk0x70) * -0.25f + 1.0f);
91 }
92 else if (deltaUnk0x70 < -1) {
93 maxSpeed *= 1.3;
94 }
95
96 MxFloat deltaSpeed = maxSpeed - m_worldSpeed;
97 MxFloat changeInSpeed = (p_time - m_unk0x1c) * m_unk0x14;
98 m_unk0x1c = p_time;
99
100 if (deltaSpeed < 0.0f) {
101 changeInSpeed = -changeInSpeed;
102 }
103
104 MxFloat newWorldSpeed = changeInSpeed + m_worldSpeed;
105
106 if (newWorldSpeed > maxSpeed) {
107 newWorldSpeed = maxSpeed;
108 }
109
110 SetWorldSpeed(newWorldSpeed);
111}
112
113// FUNCTION: LEGO1 0x10080740
114// FUNCTION: BETA10 0x100cece0
116{
117 Mx3DPointFloat pointUnknown;
118 Mx3DPointFloat destEdgeUnknownVector;
119 Mx3DPointFloat crossProduct;
120
121 if (m_actorState == c_one) {
123
124 // Not sure where the upper bound of 11 comes from, the underlying array has a size of 16
125 for (MxS32 i = 0; i < 11; i += 2) {
128 break;
129 }
130 }
131
132 assert(m_boundary);
133
135 m_unk0x7c = 0;
136
137 if (m_userNavFlag) {
139 return 0;
140 }
141 else {
142 return 1;
143 }
144 }
145 else {
146 for (MxS32 i = 0; i < 11; i += 2) {
147 if (LegoPathController::GetControlEdgeA(i) == p_edge) {
149
152 }
153
156 break;
157 }
158 }
159
160 if (m_actorState == c_one) {
161 if (m_userNavFlag) {
162 m_unk0xe4 = 0.5f;
163 }
164
165 // variable names verified by BETA10
168 assert(v1 && v2);
169
170 LERP3(pointUnknown, *v1, *v2, m_unk0xe4);
171
172 m_destEdge->FUN_1002ddc0(*m_boundary, destEdgeUnknownVector);
173
174 crossProduct.EqualsCross(*m_boundary->GetUnknown0x14(), destEdgeUnknownVector);
175 crossProduct.Unitize();
176
177 Mx3DPointFloat worldDirection(Vector3(m_roi->GetWorldDirection()));
178
179 if (!m_userNavFlag) {
180 worldDirection *= -1.0f;
181 }
182
183 worldDirection *= 5.0f;
184 crossProduct *= 5.0f;
185
186 MxResult callResult =
187 VTable0x80(Vector3(m_roi->GetWorldPosition()), worldDirection, pointUnknown, crossProduct);
188
189 if (callResult) {
190 m_unk0x7c = 0;
191 return 0;
192 }
193 else {
194 m_unk0x7c = 0;
195 assert(0);
196 return 0; // BETA10 returns -1 here
197 }
198 }
199 else {
200 // This `for` loop does not exist in BETA10
201 for (MxS32 i = 0; i < 10; i++) {
202 if (LegoPathController::GetControlEdgeB(i) == p_edge &&
204 return 0;
205 }
206 }
207
208 return 1;
209 }
210 }
211}
212
213// FUNCTION: LEGO1 0x10080b40
214// FUNCTION: BETA10 0x100cdb3c
215void LegoCarRaceActor::SwitchBoundary(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4)
216{
218}
219
220// FUNCTION: LEGO1 0x10080b70
221// FUNCTION: BETA10 0x100cdbae
223{
224 // m_unk0x0c is not an MxBool, there are places where it is set to 2 or higher
225 if (m_unk0x0c == 0) {
226 const char* value = VariableTable()->GetVariable(g_raceState);
227
228 if (strcmpi(value, g_racing) == 0) {
229 m_unk0x0c = 1;
230 m_lastTime = p_time - 1.0f;
231 m_unk0x1c = p_time;
232 }
233 }
234
235 if (m_unk0x0c == 1) {
237 }
238}
239
240// FUNCTION: LEGO1 0x10080be0
241// FUNCTION: BETA10 0x100cdc54
243{
245
248
250 assert(m_boundary && m_destEdge);
251
252 // variable names verified by BETA10
255 assert(v1 && v2);
256
257 Mx3DPointFloat point1;
258 LERP3(point1, *v1, *v2, m_unk0xe4);
259
260 Mx3DPointFloat point2;
261 Mx3DPointFloat point3;
262 Mx3DPointFloat point4;
263 Mx3DPointFloat point5;
264
265 d->FUN_1002ddc0(*b, point2);
267
268 point4.EqualsCross(point2, *m_boundary->GetUnknown0x14());
269 point5.EqualsCross(*m_boundary->GetUnknown0x14(), point3);
270
271 point4.Unitize();
272 point5.Unitize();
273
274 point4 *= 5.0f;
275 point5 *= 5.0f;
276
277 MxResult res = VTable0x80(m_roi->GetWorldPosition(), point4, point1, point5);
278
279#ifdef BETA10
280 if (res) {
281 assert(0);
282 return -1;
283 }
284#endif
285
286 m_unk0x7c = 0;
287 }
288
289 return SUCCESS;
290}
291
292// FUNCTION: LEGO1 0x10080ef0
293// FUNCTION: BETA10 0x100a8990
295{
296 m_unk0x10 = 0.95f;
297 m_unk0x14 = 0.04f;
298 m_unk0x18 = 0.5f;
299 m_unk0x150 = 1.5f;
300}
301
302// FUNCTION: LEGO1 0x10081120
303// FUNCTION: BETA10 0x100ce19f
305{
306 // These are almost certainly not the correct names, but they produce the correct BETA10 stack
308 Mx3DPointFloat bbb;
310
311 // These names are verified by an assertion below
312 Vector3* v1 = NULL;
313 Vector3* v2 = NULL;
314
315 if (m_actorState == c_one) {
318 }
321 }
322
324 m_unk0x7c = 0;
325
326 if (m_userNavFlag) {
328 return 0;
329 }
330 else {
331 return 1;
332 }
333 }
334 else {
335 if (p_edge == LegoPathController::GetControlEdgeA(12)) {
337
340 }
341
344 }
345 else if (p_edge == LegoPathController::GetControlEdgeA(14)) {
347
350 }
351
354 }
355
356 if (m_actorState == c_one) {
357 if (m_userNavFlag) {
358 m_unk0xe4 = 0.5f;
359 }
360
363 assert(v1 && v2);
364
365 LERP3(a, *v1, *v2, m_unk0xe4);
366
369 c.Unitize();
370
371 Mx3DPointFloat worldDirection(m_roi->GetWorldDirection());
372
373 if (!m_userNavFlag) {
374 worldDirection *= -1.0f;
375 }
376
377 if (VTable0x80(m_roi->GetWorldPosition(), worldDirection, a, c)) {
378#ifndef BETA10
379 m_unk0x7c = 0;
380 return 0;
381#else
382 assert(0);
383 return -1;
384#endif
385 }
386
387 m_unk0x7c = 0;
388 return 0;
389 }
390 else {
391 return 1;
392 }
393 }
394}
395
396// FUNCTION: LEGO1 0x10081550
398{
399 if (m_unk0x0c == 0) {
400 const LegoChar* raceState = VariableTable()->GetVariable(g_raceState);
401 if (!stricmp(raceState, g_racing)) {
402 m_unk0x0c = 1;
403 m_lastTime = p_time - 1.0f;
404 m_unk0x1c = p_time;
405 }
406 else if (!m_userNavFlag) {
408 }
409 }
410
411 if (m_unk0x0c == 1) {
413 }
414}
415
416// FUNCTION: LEGO1 0x10081840
417// FUNCTION: BETA10 0x100cf680
419 LegoPathBoundary* p_boundary,
420 Vector3& p_v1,
421 Vector3& p_v2,
422 float p_f1,
423 float p_f2,
424 Vector3& p_v3
425)
426{
427 // STRING: LEGO1 0x100f7af4
428 const char* str_rcdor = "rcdor";
429
430 LegoAnimPresenterSet& presenters = p_boundary->GetPresenters();
431
432 for (LegoAnimPresenterSet::iterator itap = presenters.begin(); itap != presenters.end(); itap++) {
433 if ((*itap)->VTable0x94(p_v1, p_v2, p_f1, p_f2, p_v3)) {
434 return 1;
435 }
436 }
437
438 LegoPathActorSet& plpas = p_boundary->GetActors();
439 LegoPathActorSet lpas(plpas);
440
441 for (LegoPathActorSet::iterator itpa = lpas.begin(); itpa != lpas.end(); itpa++) {
442 if (plpas.end() != plpas.find(*itpa)) {
443 LegoPathActor* actor = *itpa;
444
445 if (actor != this) {
446 LegoROI* roi = actor->GetROI();
447
448 if (roi != NULL && (roi->GetVisibility() || actor->GetCameraFlag())) {
449 if (strncmp(roi->GetName(), str_rcdor, 5) == 0) {
450 const CompoundObject* co = roi->GetComp(); // name verified by BETA10 0x100cf8ba
451
452 if (co) {
453 assert(co->size() == 2);
454
455 LegoROI* firstROI = (LegoROI*) co->front();
456
457 if (firstROI->FUN_100a9410(
458 p_v1,
459 p_v2,
460 p_f1,
461 p_f2,
462 p_v3,
463 m_collideBox && actor->GetCollideBox()
464 )) {
465 HitActor(actor, TRUE);
466
467 if (actor->HitActor(this, FALSE) < 0) {
468 return 0;
469 }
470 else {
471 return 2;
472 }
473 }
474
475 LegoROI* lastROI = (LegoROI*) co->back();
476
477 if (lastROI->FUN_100a9410(
478 p_v1,
479 p_v2,
480 p_f1,
481 p_f2,
482 p_v3,
483 m_collideBox && actor->GetCollideBox()
484 )) {
485 HitActor(actor, TRUE);
486
487 if (actor->HitActor(this, FALSE) < 0) {
488 return 0;
489 }
490 else {
491 return 2;
492 }
493 }
494 }
495 }
496 else {
497 if (roi->FUN_100a9410(p_v1, p_v2, p_f1, p_f2, p_v3, m_collideBox && actor->GetCollideBox())) {
498 HitActor(actor, TRUE);
499
500 if (actor->HitActor(this, FALSE) < 0) {
501 return 0;
502 }
503 else {
504 return 2;
505 }
506 }
507 }
508 }
509 }
510 }
511 }
512
513 return 0;
514}
515
516// FUNCTION: LEGO1 0x10081fd0
518 LegoPathBoundary* p_boundary,
519 Vector3& p_v1,
520 Vector3& p_v2,
521 float p_f1,
522 float p_f2,
523 Vector3& p_v3
524)
525{
526 LegoAnimPresenterSet& presenters = p_boundary->GetPresenters();
527
528 for (LegoAnimPresenterSet::iterator itap = presenters.begin(); itap != presenters.end(); itap++) {
529 if ((*itap)->VTable0x94(p_v1, p_v2, p_f1, p_f2, p_v3)) {
530 return 1;
531 }
532 }
533
534 LegoPathActorSet& plpas = p_boundary->GetActors();
535 LegoPathActorSet lpas(plpas);
536
537 for (LegoPathActorSet::iterator itpa = lpas.begin(); itpa != lpas.end(); itpa++) {
538 if (plpas.find(*itpa) != plpas.end()) {
539 LegoPathActor* actor = *itpa;
540
541 if (this != actor) {
542 LegoROI* roi = actor->GetROI();
543
544 if (roi != NULL && (roi->GetVisibility() || actor->GetCameraFlag())) {
545 if (roi->FUN_100a9410(p_v1, p_v2, p_f1, p_f2, p_v3, m_collideBox && actor->GetCollideBox())) {
546 HitActor(actor, TRUE);
547
548 if (actor->HitActor(this, FALSE) < 0) {
549 return 0;
550 }
551 else {
552 return 2;
553 }
554 }
555 }
556 }
557 }
558 }
559
560 return 0;
561}
MxFloat m_unk0x70
[AI] Unknown float property, likely used for advanced audio/animation control. [AI_SUGGESTED_NAME: m_...
Definition: legoactor.h:96
virtual MxFloat VTable0x5c()
[AI] Gets the unknown floating point property set by VTable0x58. [AI] [AI_SUGGESTED_NAME: GetVoicePit...
Definition: legoactor.h:74
void SetWorldSpeed(MxFloat p_worldSpeed) override
[AI] Sets the current world speed and chooses which animation (from the animation map list) should be...
void Animate(float p_time) override
[AI] Performs per-frame update; applies the appropriate animation to mesh ROIs based on speed and sta...
[AI] Specialized actor class for car-based racing in LEGO Island racing sequences....
MxResult VTable0x9c() override
[AI] Handles the transition at key animation logic points, such as the end/start of edges and boundar...
MxFloat m_unk0x14
[AI] Could represent car acceleration or change-in-speed envelope. [AI_SUGGESTED_NAME: m_acceleration...
virtual void FUN_10080590(float p_time)
[AI] Adjusts the target and acceleration for the car based on path, player position,...
virtual MxS32 VTable0x1c(LegoPathBoundary *p_boundary, LegoEdge *p_edge)
[AI] Handles logic for state transitions at control edges, updating actor state if needed based on pa...
MxU8 m_unk0x0c
[AI] State variable/fsm controlling the actor's current animation/logic state. [AI]
MxFloat m_unk0x1c
[AI] Used for storing timestamps for time-based actor movement updates. [AI_SUGGESTED_NAME: m_lastUpd...
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...
MxFloat m_unk0x18
[AI] General movement/velocity adjustment parameter, possibly for handling or group speed adjustment....
void Animate(float p_time) override
[AI] Main per-frame update for the car racer, controls activation of animation and state switching ba...
static MxFloat g_unk0x100f7aec
[AI] Static value used as a global reference for minimum or target speed under specific circumstances...
MxFloat m_unk0x10
[AI] Likely a multiplier for maximum speed when on a straight portion of the track....
LegoROI * GetROI()
[AI] Gets the ROI (Realtime Object Instance) associated with this entity. [AI]
Definition: legoentity.h:161
MxFloat m_worldSpeed
[AI] World-relative speed (can affect animation/movement logic). [AI]
Definition: legoentity.h:212
LegoROI * m_roi
[AI] Pointer to this entity's currently assigned ROI (3D instance in the world). [AI]
Definition: legoentity.h:215
MxBool GetCameraFlag()
[AI] Returns whether this entity is flagged as camera (affects world/camera synchronization)....
Definition: legoentity.h:167
[AI] A racing actor subclass representing jetski (water-based) vehicles. Modifies car parameters and ...
LegoJetskiRaceActor()
[AI] Constructor initializing jetski movement and acceleration parameters. [AI]
MxS32 VTable0x1c(LegoPathBoundary *p_boundary, LegoEdge *p_edge) override
[AI] Handles state transitions for jetski racing at control edges or waterway turns.
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.
void Animate(float p_time) override
[AI] Per-frame logic and animation for jetski racing - enables racing state and syncs with variables....
void SetLinearVel(MxFloat p_linearVel)
[AI] Sets the current linear velocity for user navigation.
[AI] An actor that moves along a predefined path, supporting boundary transitions,...
Definition: legopathactor.h:32
virtual MxResult VTable0x80(const Vector3 &p_point1, Vector3 &p_point2, Vector3 &p_point3, Vector3 &p_point4)
[AI] Calculates path interpolation for a set of points, updates state for path animation,...
MxBool GetCollideBox()
[AI] Gets the actor's collision box flag (if TRUE, actor uses a precise collision shape).
MxFloat m_maxLinearVel
[AI] Maximum speed of actor while moving along path. [AI]
LegoUnknown100db7f4 * m_destEdge
[AI] Current or target edge for path traversal. [AI]
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...
LegoPathBoundary * m_boundary
[AI] Current boundary the actor is navigating on. [AI]
MxU32 m_actorState
[AI] State and flags bitfield for path following logic. [AI]
MxFloat m_unk0x7c
[AI] Interpolator/progress state along curve segment. [AI]
MxFloat m_unk0xe4
[AI] Position scalar on destination edge (0-1 across the edge). [AI]
@ c_initial
[AI] Default state upon creation or reset. [AI]
Definition: legopathactor.h:37
MxBool m_userNavFlag
[AI] TRUE if this actor is currently user/player controlled. [AI]
MxFloat m_unk0x150
[AI] Scalar factor for camera turn velocity logic. [AI]
MxBool m_collideBox
[AI] Use bounding-box for more accurate collision. [AI]
virtual MxResult HitActor(LegoPathActor *, MxBool)
[AI] Handles logic when this actor hits (collides with) another path actor; can be overridden for cus...
MxFloat m_lastTime
[AI] Time of last update (used for delta calculations). [AI]
[AI] Represents a path segment or boundary in the navigation network for actors (vehicles,...
LegoAnimPresenterSet & GetPresenters()
[AI] Direct access to the animation presenter set for this boundary.
LegoPathActorSet & GetActors()
[AI] Direct access to the actor set for this boundary.
static LegoPathBoundary * GetControlBoundaryA(MxS32 p_index)
[AI] Provides static access to the boundary at given index in g_ctrlBoundariesA.
static LegoPathBoundary * GetControlBoundaryB(MxS32 p_index)
[AI] Provides static access to the boundary at given index in g_ctrlBoundariesB.
static LegoUnknown100db7f4 * GetControlEdgeB(MxS32 p_index)
[AI] Provides static access to the edge at a given index in g_ctrlEdgesB.
static LegoUnknown100db7f4 * GetControlEdgeA(MxS32 p_index)
[AI] Provides static access to the edge at a given index in g_ctrlEdgesA.
[AI] Represents a Real-time Object Instance enriched with LEGO-specific functionality.
Definition: legoroi.h:43
LegoU32 FUN_100a9410(Vector3 &p_v1, Vector3 &p_v2, float p_f1, float p_f2, Vector3 &p_v3, LegoBool p_collideBox)
[AI] Tests for collision along or within sphere/box, and computes intersection point as needed.
Definition: legoroi.cpp:594
const LegoChar * GetName() const
[AI] Gets this ROI's name.
Definition: legoroi.h:287
MxResult HitActor(LegoPathActor *p_actor, MxBool p_bool) override
[AI] Handles logic when this actor is hit by another actor (e.g., collision interaction).
Mx4DPointFloat * GetUnknown0x14()
[AI] Returns a pointer to the cached 4D normal or reference plane for the edge.
Definition: legowegedge.h:70
[AI] Represents a 3D point with floating-point precision, inheriting from Vector3.
Definition: mxgeometry3d.h:14
const char * GetVariable(const char *p_key)
Returns the value for the variable with a given key, or an empty string if not found.
void SetVariable(const char *p_key, const char *p_value)
Sets a variable by key and value, replacing or updating if it exists.
const float * GetWorldPosition() const
Returns a pointer to the world position from the transformation matrix (translation row).
const float * GetWorldDirection() const
Returns a pointer to the world direction vector (forward axis) from the transformation matrix.
unsigned char GetVisibility()
[AI] Returns the visibility flag; true if visible, false if hidden.
Definition: roi.h:228
const CompoundObject * GetComp() const
[AI] Returns the pointer to the compound object structure, or NULL if not present.
Definition: roi.h:222
virtual float Dot(const float *p_a, const float *p_b) const
[AI] Compute the dot product of the two float arrays interpreted as vectors of 2 elements.
virtual float * GetData()
[AI] Retrieves the mutable in-memory data pointer for this vector.
virtual int Unitize()
[AI] Scales the vector so its norm is 1 (unit vector).
[AI] 3D vector class, providing vector and cross-product operations in 3D space.
Definition: vector.h:249
virtual void EqualsCross(const Vector3 &p_a, const Vector3 &p_b)
[AI] Sets this vector to be the cross product of p_a and p_b.
#define TRUE
Definition: d3drmdef.h:28
#define FALSE
Definition: d3drmdef.h:27
#define DECOMP_SIZE_ASSERT(T, S)
Definition: decomp.h:19
set< LegoAnimPresenter *, LegoAnimPresenterSetCompare > LegoAnimPresenterSet
[AI] Defines a set of LegoAnimPresenter pointers, ordered by pointer value using LegoAnimPresenterSet...
set< LegoPathActor *, LegoPathActorSetCompare > LegoPathActorSet
[AI] Defines a set of LegoPathActor pointers, ordered by pointer value using LegoPathActorSetCompare.
const char * g_raceState
[AI] Global variable storing the name of the race state variable (used for checking or setting state ...
const char * g_fuel
[AI] Global variable storing the name of the fuel variable (used for managing the actor's fuel in gam...
const char * g_racing
[AI] Global variable storing the name of the racing state (used to check if the race is currently ong...
MxFloat g_unk0x100da044
const char * g_raceState
[AI] Global variable storing the name of the race state variable (used for checking or setting state ...
const char * g_racing
[AI] Global variable storing the name of the racing state (used to check if the race is currently ong...
#define NULL
[AI] Null pointer value (C/C++ semantics).
Definition: legotypes.h:26
char LegoChar
[AI] Alias for char, for use in character/byte data and string handling.
Definition: legotypes.h:83
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.
Definition: legotypes.h:30
LegoNavController * NavController()
[AI] Accessor for the navigation controller, managing player/camera navigation. [AI]
Definition: misc.cpp:77
LegoPathActor * UserActor()
[AI] Accessor for the user (player-controllable) LegoPathActor. [AI]
Definition: misc.cpp:85
MxVariableTable * VariableTable()
[AI] Returns the variable table used for script variables and global key/value state.
Definition: mxmisc.cpp:73
MxLong MxResult
[AI]
Definition: mxtypes.h:106
float MxFloat
[AI]
Definition: mxtypes.h:68
signed int MxS32
[AI]
Definition: mxtypes.h:38
unsigned int MxU32
[AI]
Definition: mxtypes.h:32
list< ROI * > CompoundObject
Definition: roi.h:135
[AI] Represents an edge in the LEGO world geometry graph.
Definition: legoedge.h:16
Vector3 * CWVertex(LegoWEEdge &p_face)
[AI] Returns the "clockwise" endpoint of this edge with respect to a given face.
Definition: legoedge.cpp:56
Vector3 * CCWVertex(LegoWEEdge &p_face)
[AI] Returns the "counterclockwise" endpoint of this edge with respect to a given face.
Definition: legoedge.cpp:69
[AI] Represents an advanced edge in the LEGO Island geometry system, with direction,...
LegoWEEdge * OtherFace(LegoWEEdge *p_other)
[AI] Returns the opposite face pointer to the one passed in.
LegoResult FUN_1002ddc0(LegoWEEdge &p_f, Vector3 &p_point) const
[AI] Calculates the edge normal for use from the given face, negating it if called from faceA.
#define LERP3(to, v0, v1, t)
Definition: vec.h:462