Isle
Loading...
Searching...
No Matches
raceskel.cpp
Go to the documentation of this file.
1#include "raceskel.h"
2
3#include "carrace.h"
4#include "legoworld.h"
5#include "misc.h"
6
7#include <assert.h>
8
10
11// FUNCTION: LEGO1 0x100719b0
12// FUNCTION: BETA10 0x100f1240
14{
15 m_animPosition = 0.0f;
16}
17
18// FUNCTION: LEGO1 0x10071ad0
20{
21}
22
23// FUNCTION: LEGO1 0x10071b50
24// FUNCTION: BETA10 0x100f13cf
25MxResult RaceSkel::FUN_1001c360(float p_und, Matrix4& p_transform)
26{
27 p_transform[3][0] = -630.0f;
28 p_transform[3][1] = -4.688f;
29 p_transform[3][2] = 323.0f;
30
31 m_animPosition = p_und;
32
33 return LegoAnimActor::FUN_1001c360(p_und, p_transform);
34}
35
36// FUNCTION: LEGO1 0x10071b90
37// FUNCTION: BETA10 0x100f1444
38void RaceSkel::ParseAction(char* p_extra)
39{
41
42 // name verified by BETA10 0x100f147d
44 assert(w);
45 w->SetSkeleton(this);
46
47 assert(m_roi);
49 sphere.Radius() *= 100.0f;
50 m_roi->SetBoundingSphere(sphere);
51}
52
53// FUNCTION: LEGO1 0x10071c80
54// FUNCTION: BETA10 0x100f1531
56{
57 p_vec[0] = -630.0f;
58 p_vec[1] = -4.688f;
59 p_vec[2] = 323.0f;
60}
61
62// FUNCTION: LEGO1 0x10071cb0
63// FUNCTION: BETA10 0x100f158b
64void RaceSkel::GetCurrentAnimData(float* p_outCurAnimPosition, float* p_outCurAnimDuration)
65{
66 *p_outCurAnimPosition = m_animPosition;
67
68 assert(m_curAnim >= 0);
69 *p_outCurAnimDuration = m_animMaps[m_curAnim]->GetDuration();
70}
[AI] Represents a bounding sphere in 3D space with center and radius.
Definition: roi.h:56
const float & Radius() const
[AI] Const accessor for the sphere radius.
Definition: roi.h:72
Implements the LEGO Island car race game mode.
Definition: carrace.h:53
void SetSkeleton(RaceSkel *p_skeleton)
Sets the current RaceSkel instance for this car race.
Definition: carrace.h:144
void ParseAction(char *p_extra) override
[AI] Handles extra action strings, looks for animation assignments and delegates to presenters (overr...
vector< LegoAnimActorStruct * > m_animMaps
[AI] List of animation structures, each representing a valid animation for different speed/phase rang...
virtual MxResult FUN_1001c360(float p_und, Matrix4 &p_transform)
[AI] Applies the animation transform for the current animation at the given phase,...
MxS16 m_curAnim
[AI] Index of currently selected animation map (-1 if none active). [AI]
LegoROI * m_roi
[AI] Pointer to this entity's currently assigned ROI (3D instance in the world). [AI]
Definition: legoentity.h:215
void SetBoundingSphere(const BoundingSphere &p_sphere)
[AI] Sets the local and world bounding spheres.
Definition: legoroi.h:317
BoundingSphere & GetBoundingSphere()
[AI] Accesses the local bounding sphere object.
Definition: legoroi.h:299
4x4 Matrix class with virtual interface for manipulation and transformation.
Definition: matrix.h:24
[AI] Specialized skeleton animation actor for LEGO Island car racing sequences.
Definition: raceskel.h:24
virtual void FUN_10071c80(Vector3 &p_vec)
[AI] Assigns the skeleton's position in 3D space for the car race sequence.
Definition: raceskel.cpp:55
MxResult FUN_1001c360(float p_und, Matrix4 &p_transform) override
[AI] Apply race-specific position/orientation adjustment and updates animation position.
Definition: raceskel.cpp:25
~RaceSkel() override
[AI] Destructor for RaceSkel, cleans up resources.
Definition: raceskel.cpp:19
void GetCurrentAnimData(float *p_outCurAnimPosition, float *p_outCurAnimDuration)
[AI] Retrieves the current animation position and its duration.
Definition: raceskel.cpp:64
void ParseAction(char *p_extra) override
[AI] Parses a string command to setup the skeleton for the car race, and modifies ROI bounding sphere...
Definition: raceskel.cpp:38
[AI] 3D vector class, providing vector and cross-product operations in 3D space.
Definition: vector.h:249
#define DECOMP_SIZE_ASSERT(T, S)
Definition: decomp.h:19
LegoWorld * CurrentWorld()
[AI] Accessor for the currently active LegoWorld instance. [AI]
Definition: misc.cpp:93
MxLong MxResult
[AI]
Definition: mxtypes.h:106