Isle
Loading...
Searching...
No Matches
carrace.h
Go to the documentation of this file.
1#ifndef CARRACE_H
2#define CARRACE_H
3
4#include "decomp.h"
5#include "legorace.h"
6
7class RaceSkel;
8
9// VTABLE: LEGO1 0x100d4b70
10// VTABLE: BETA10 0x101bd5f0
11// SIZE 0x2c
16class CarRaceState : public RaceState {
17public:
23 const char* ClassName() const override // vtable+0x0c
24 {
25 // STRING: LEGO1 0x100f009c
26 return "CarRaceState";
27 }
28
35 MxBool IsA(const char* p_name) const override // vtable+0x10
36 {
37 return !strcmp(p_name, CarRaceState::ClassName()) || RaceState::IsA(p_name);
38 }
39
40 // SYNTHETIC: LEGO1 0x1000f740
41 // CarRaceState::`scalar deleting destructor'
42};
43
44// VTABLE: LEGO1 0x100d5e50
45// VTABLE: BETA10 0x101be290
46// SIZE 0x154
53class CarRace : public LegoRace {
54public:
58 CarRace();
59
65 const char* ClassName() const override // vtable+0x0c
66 {
67 // STRING: LEGO1 0x100f0528
68 return "CarRace";
69 }
70
77 MxBool IsA(const char* p_name) const override // vtable+0x10
78 {
79 return !strcmp(p_name, CarRace::ClassName()) || LegoRace::IsA(p_name);
80 }
81
87 MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
88
93 void ReadyWorld() override; // vtable+0x50
94
100 MxBool Escape() override; // vtable+0x64
101
108 MxLong HandleClick(LegoEventNotificationParam&) override; // vtable+0x6c
109
117
124 MxLong HandleEndAction(MxEndActionNotificationParam&) override; // vtable+0x74
125
132 MxLong HandleType0Notification(MxNotificationParam&) override; // vtable+0x78
133
138 RaceSkel* GetSkeleton() { return m_skeleton; }
139
144 void SetSkeleton(RaceSkel* p_skeleton) { m_skeleton = p_skeleton; }
145
152 void FUN_10017820(MxS32 p_param1, MxS16 p_param2);
153
154 // SYNTHETIC: LEGO1 0x10016c70
155 // CarRace::`scalar deleting destructor'
156
157private:
162 static MxS32 g_unk0x100d5d10[];
163
168 static MxS32 g_unk0x100d5d30[];
169
173 static MxS32 g_unk0x100d5d40[];
174
178 static MxS32 g_unk0x100d5d50[];
179
183 static MxS32 g_unk0x100d5d60[];
184
189 MxS32 m_unk0x144; // 0x144
190
194 MxS32 m_unk0x148; // 0x148
195
199 MxS32 m_unk0x14c; // 0x14c
200
205 RaceSkel* m_skeleton; // 0x150
206};
207
208#endif // CARRACE_H
The state object used for the car race mini-game.
Definition: carrace.h:16
MxBool IsA(const char *p_name) const override
Checks if this object is the specified class or inherits from it.
Definition: carrace.h:35
const char * ClassName() const override
Returns the class name for runtime type identification ("CarRaceState").
Definition: carrace.h:23
Implements the LEGO Island car race game mode.
Definition: carrace.h:53
MxLong HandleClick(LegoEventNotificationParam &) override
Handles click input in the context of the car race UI (such as quit buttons).
Definition: carrace.cpp:336
const char * ClassName() const override
Returns the class name for runtime type identification ("CarRace").
Definition: carrace.h:65
MxLong HandlePathStruct(LegoPathStructNotificationParam &) override
Handles race progress triggers from path segments.
Definition: carrace.cpp:178
MxLong HandleType0Notification(MxNotificationParam &) override
Handles notifications of an unclassified ("type 0") game event in this game mode.
Definition: carrace.cpp:375
MxResult Create(MxDSAction &p_dsAction) override
Initializes the car racing game mode and underlying state based on the supplied DSAction.
Definition: carrace.cpp:79
MxLong HandleEndAction(MxEndActionNotificationParam &) override
Handles the ending of scripted race actions.
Definition: carrace.cpp:144
void SetSkeleton(RaceSkel *p_skeleton)
Sets the current RaceSkel instance for this car race.
Definition: carrace.h:144
RaceSkel * GetSkeleton()
Provides access to the RaceSkel (race skeleton) object managing actor animations or kinematics.
Definition: carrace.h:138
CarRace()
Constructs a CarRace instance and initializes member variables.
Definition: carrace.cpp:71
MxBool IsA(const char *p_name) const override
Checks if this object is the specified class or inherits from it.
Definition: carrace.h:77
void FUN_10017820(MxS32 p_param1, MxS16 p_param2)
Updates the location of still presenters for UI progress based on race advancement.
Definition: carrace.cpp:386
void ReadyWorld() override
Prepares the car race world and all interactive actors, UI, and animations.
Definition: carrace.cpp:115
MxBool Escape() override
Handles the user-initiated escape/action to quit or exit the car race mini-game.
Definition: carrace.cpp:412
Notification parameter class for LEGO event notifications such as mouse events and modifier keys.
[AI] Specialized notification parameter used for path structure related events in LEGO Island.
[AI] Base class for all race-type LegoWorlds.
Definition: legorace.h:149
MxBool IsA(const char *p_name) const override
[AI] Runtime type check for this class (or parent LegoWorld).
Definition: legorace.h:226
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
Definition: mxdsaction.h:17
[AI] Notification parameter marking the end of an action, specialization of MxActionNotificationParam...
[AI] Parameter object representing a single notification or event, carrying an identifier and sender ...
[AI] Specialized skeleton animation actor for LEGO Island car racing sequences.
Definition: raceskel.h:24
[AI] Maintains persistent information about race progress, results, and high scores for up to five ra...
Definition: legorace.h:28
MxBool IsA(const char *p_name) const override
[AI] Checks if the object is exactly a RaceState or derived thereof, using class name string comparis...
Definition: legorace.h:110
#define override
Definition: compat.h:21
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
MxLong MxResult
[AI]
Definition: mxtypes.h:106
int MxLong
[AI]
Definition: mxtypes.h:83
signed short MxS16
[AI]
Definition: mxtypes.h:26
signed int MxS32
[AI]
Definition: mxtypes.h:38