Isle
Loading...
Searching...
No Matches
racecar.cpp
Go to the documentation of this file.
1#include "racecar.h"
2
3#include "isle.h"
4#include "isle_actions.h"
6#include "legoutils.h"
7#include "legoworld.h"
8#include "misc.h"
10
12
13// FUNCTION: LEGO1 0x10028200
15{
16 m_maxLinearVel = 40.0;
17}
18
19// FUNCTION: LEGO1 0x10028420
21{
23 Exit();
24}
25
26// FUNCTION: LEGO1 0x10028490
28{
29 MxResult result = IslePathActor::Create(p_dsAction);
31
32 if (m_world) {
33 m_world->Add(this);
34 }
35
36 ControlManager()->Register(this);
37 return result;
38}
39
40// FUNCTION: LEGO1 0x100284d0
42{
43 if (!FUN_1003ef60()) {
44 return 1;
45 }
46
50 return 1;
51}
MxResult Create(MxDSAction &p_dsAction) override
[AI] Initialize this actor from a DSAction.
virtual void Exit()
[AI] Called when the actor is deactivated or moved out of player control, restoring previous actor if...
LegoWorld * m_world
[AI] Pointer to the current world instance actor is existing in. [AI]
[AI] Represents the main overworld (LEGO Island) in the game, acting as the central hub and state mac...
Definition: isle.h:179
void SetDestLocation(LegoGameState::Area p_destLocation)
[AI] Sets destination location for world transitions (are used after certain cutscenes/buttons).
Definition: isle.h:234
void Register(MxCore *p_listener)
[AI] Adds a listener to be notified of control events.
void Unregister(MxCore *p_listener)
[AI] Removes a listener so it no longer receives control events.
@ e_carrace
Car race (track, main). [AI].
virtual void Add(MxCore *p_object)
Adds an object (entity, presenter, ROI, etc.) to the appropriate world-managed list or set.
Definition: legoworld.cpp:418
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
Definition: mxdsaction.h:17
MxResult StartTransition(TransitionType p_animationType, MxS32 p_speed, MxBool p_doCopy, MxBool p_playMusicInAnim)
[AI] Begins a new transition animation of type p_animationType at the specified speed,...
@ e_mosaic
[AI] Complex mosaic block-out effect.
[AI] Represents the drivable race car entity in the LEGO Island world.
Definition: racecar.h:24
MxLong HandleClick() override
[AI] Handles click interaction with the RaceCar.
Definition: racecar.cpp:41
MxResult Create(MxDSAction &p_dsAction) override
[AI] Initializes the RaceCar from an MxDSAction.
Definition: racecar.cpp:27
~RaceCar() override
[AI] Destructor which unregisters the RaceCar from the control manager and performs cleanup.
Definition: racecar.cpp:20
#define FALSE
Definition: d3drmdef.h:27
#define DECOMP_SIZE_ASSERT(T, S)
Definition: decomp.h:19
MxBool FUN_1003ef60()
[AI] Determines if the current actor can exit their area, based on state/zone/vehicle.
Definition: legoutils.cpp:572
MxAtomId * g_isleScript
[AI] Node used in hierarchical scene graphs and animation trees. [AI]
Definition: scripts.cpp:32
MxTransitionManager * TransitionManager()
[AI] Accessor for the MxTransitionManager, handling level transitions, fades, and world changes....
Definition: misc.cpp:208
LegoWorld * FindWorld(const MxAtomId &p_atom, MxS32 p_entityid)
[AI] Searches for or retrieves a LegoWorld instance based on an atom id and entity id.
Definition: misc.cpp:188
LegoControlManager * ControlManager()
[AI] Accessor for the control manager through the input manager; manages higher-level user/game contr...
Definition: misc.cpp:53
LegoWorld * CurrentWorld()
[AI] Accessor for the currently active LegoWorld instance. [AI]
Definition: misc.cpp:93
MxLong MxResult
[AI]
Definition: mxtypes.h:106
int MxLong
[AI]
Definition: mxtypes.h:83