Implement CarRace (#1165)

* Implement `CarRace`

* Improve `CarRace::Create`

* Fix arrays

* Clean up array

* Fix CI errors

* Implement `LegoRaceCar::FUN_10012e00()`

* Implement `Doors::VTable0xcc`

* Address review comments, part 1

* Address review comments, part 2

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
This commit is contained in:
jonschz
2024-11-23 20:33:15 +01:00
committed by GitHub
parent e56ac9ab55
commit 0aa5e010ae
21 changed files with 533 additions and 61 deletions

View File

@@ -66,12 +66,22 @@ public:
// FUNCTION: BETA10 0x100f16f0
void SetSkeleton(RaceSkel* p_skeleton) { m_skeleton = p_skeleton; }
void FUN_10017820(MxS32 p_param1, MxS16 p_param2);
// SYNTHETIC: LEGO1 0x10016c70
// CarRace::`scalar deleting destructor'
private:
undefined m_unk0x144[12]; // 0x144
RaceSkel* m_skeleton; // 0x150
static MxS32 g_unk0x100d5d10[];
static MxS32 g_unk0x100d5d30[];
static MxS32 g_unk0x100d5d40[];
static MxS32 g_unk0x100d5d50[];
static MxS32 g_unk0x100d5d60[];
MxS32 m_unk0x144; // 0x144
MxS32 m_unk0x148; // 0x148
MxS32 m_unk0x14c; // 0x14c
RaceSkel* m_skeleton; // 0x150
};
#endif // CARRACE_H

View File

@@ -27,7 +27,7 @@ public:
void ParseAction(char* p_extra) override; // vtable+0x20
void VTable0x70(float p_float) override; // vtable+0x70
MxResult VTable0x94(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94
virtual double VTable0xcc(float p_float); // vtable+0xcc
virtual MxFloat VTable0xcc(float p_float); // vtable+0xcc
// SYNTHETIC: LEGO1 0x1000e580
// Doors::`scalar deleting destructor'

View File

@@ -65,8 +65,6 @@ public:
void FUN_10016930(MxS32 p_param1, MxS16 p_param2);
private:
inline MxS32 PossiblyGetPlaceOfPlayer();
static MxS32 g_unk0x100f0c78;
};

View File

@@ -10,6 +10,7 @@ class MxDSAction;
class Vector3;
// VTABLE: LEGO1 0x100d4858
// VTABLE: BETA10 0x101b9388
// SIZE 0x68
class LegoEntity : public MxEntity {
public:
@@ -38,6 +39,7 @@ public:
MxLong Notify(MxParam& p_param) override; // vtable+0x04
// FUNCTION: LEGO1 0x1000c2f0
// FUNCTION: BETA10 0x10012730
const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f0064
@@ -116,8 +118,11 @@ protected:
// For tokens from the extra string that look like this:
// "Action:openram;\lego\scripts\Race\CarRaceR;0"
Extra::ActionType m_actionType; // 0x5c
char* m_filename; // 0x60
MxS32 m_targetEntityId; // 0x64
// variable name verified by BETA10 0x1007eddf
char* m_siFile; // 0x60
MxS32 m_targetEntityId; // 0x64
};
// SYNTHETIC: LEGO1 0x1000c3b0

View File

@@ -82,6 +82,12 @@ public:
// FUNCTION: BETA10 0x100b0f40
void SetLinearVel(MxFloat p_linearVel) { m_linearVel = p_linearVel; }
// FUNCTION: BETA10 0x100c99e0
void SetDeadZone(MxS32 p_deadZone) { m_deadZone = p_deadZone; }
// FUNCTION: BETA10 0x100c7880
void SetTrackDefault(MxS32 p_trackDefault) { m_trackDefault = p_trackDefault; }
MxFloat GetLinearVel() { return m_linearVel; }
MxFloat GetRotationalVel() { return m_rotationalVel; }
MxFloat GetMaxLinearVel() { return m_maxLinearVel; }
@@ -91,6 +97,9 @@ public:
m_trackDefault = 0;
}
// FUNCTION: BETA10 0x100c9a10
int GetDefaultDeadZone() { return g_defdeadZone; }
// SYNTHETIC: LEGO1 0x10054c10
// LegoNavController::`scalar deleting destructor'

View File

@@ -15,6 +15,7 @@ struct LegoUnknown100db7f4;
class LegoWEEdge;
extern MxLong g_unk0x100f3308;
extern const char* g_strHIT_WALL_SOUND;
// VTABLE: LEGO1 0x100d6e28
// SIZE 0x154

View File

@@ -77,6 +77,7 @@ public:
virtual MxU32 HandleSkeletonKicks(float p_param1);
static void FUN_10012de0();
static void FUN_10012e00();
static void FUN_10013670();
// SYNTHETIC: LEGO1 0x10014240