Implement most of LegoJetski, refactor (#1214)

* Implement most of `LegoJetski`, refactor

* Fix
This commit is contained in:
Christian Semmler 2024-12-12 13:17:25 -07:00 committed by GitHub
parent 894034f9cf
commit 1bfeebd004
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 239 additions and 201 deletions

View file

@ -353,7 +353,6 @@ function(add_lego_libraries NAME)
LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp
LEGO1/lego/legoomni/src/entity/legoentity.cpp LEGO1/lego/legoomni/src/entity/legoentity.cpp
LEGO1/lego/legoomni/src/entity/legoentitypresenter.cpp LEGO1/lego/legoomni/src/entity/legoentitypresenter.cpp
LEGO1/lego/legoomni/src/entity/legojetski.cpp
LEGO1/lego/legoomni/src/entity/legojetskiraceactor.cpp LEGO1/lego/legoomni/src/entity/legojetskiraceactor.cpp
LEGO1/lego/legoomni/src/entity/legolocations.cpp LEGO1/lego/legoomni/src/entity/legolocations.cpp
LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp

View file

@ -1,70 +0,0 @@
#ifndef LEGOJETSKI_H
#define LEGOJETSKI_H
#include "legojetskiraceactor.h"
#include "legoracemap.h"
// VTABLE: LEGO1 0x100d5a08 LegoCarRaceActor
// VTABLE: LEGO1 0x100d5a28 LegoRaceActor
// VTABLE: LEGO1 0x100d5a30 LegoAnimActor
// VTABLE: LEGO1 0x100d5a40 LegoPathActor
// VTABLE: LEGO1 0x100d5b10 LegoRaceMap
// SIZE 0x1dc
class LegoJetski : public LegoJetskiRaceActor, public LegoRaceMap {
public:
LegoJetski();
~LegoJetski() override;
MxLong Notify(MxParam& p_param) override; // vtable+0x04
// FUNCTION: LEGO1 0x10013e90
const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f053c
return "LegoJetski";
}
// FUNCTION: LEGO1 0x10013eb0
MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, LegoJetski::ClassName()) || LegoJetskiRaceActor::IsA(p_name);
}
void ParseAction(char*) override; // vtable+0x20
void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30
MxU32 VTable0x6c(
LegoPathBoundary* p_boundary,
Vector3& p_v1,
Vector3& p_v2,
float p_f1,
float p_f2,
Vector3& p_v3
) override; // vtable+0x6c
void VTable0x70(float p_time) override; // vtable+0x70
MxResult HitActor(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94
void SwitchBoundary(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4)
override; // vtable+0x98
MxResult VTable0x9c() override; // vtable+0x9c
virtual void FUN_100136f0(float p_worldSpeed);
// SYNTHETIC: LEGO1 0x10013e30
// LegoJetski::`scalar deleting destructor'
};
// GLOBAL: LEGO1 0x100d59b8
// LegoJetski::`vbtable'{for `LegoCarRaceActor'}
// GLOBAL: LEGO1 0x100d59c8
// LegoJetski::`vbtable'{for `LegoRaceActor'}
// GLOBAL: LEGO1 0x100d59d8
// LegoJetski::`vbtable'{for `LegoAnimActor'}
// GLOBAL: LEGO1 0x100d59e0
// LegoJetski::`vbtable'
// GLOBAL: LEGO1 0x100d59f0
// LegoJetski::`vbtable'{for `LegoJetskiRaceActor'}
#endif // LEGOJETSKI_H

View file

@ -140,9 +140,9 @@ class LegoRace : public LegoWorld {
// FUNCTION: LEGO1 0x1000dac0 // FUNCTION: LEGO1 0x1000dac0
// FUNCTION: BETA10 0x100a87d0 // FUNCTION: BETA10 0x100a87d0
virtual void VTable0x7c(LegoRaceActor* p_map, MxU32 p_index) // vtable+0x7c virtual void VTable0x7c(LegoRaceMap* p_map, MxU32 p_index) // vtable+0x7c
{ {
m_unk0x110[p_index] = (LegoRaceActor*) p_map; m_maps[p_index] = p_map;
} }
// SYNTHETIC: LEGO1 0x10015cc0 // SYNTHETIC: LEGO1 0x10015cc0
@ -155,7 +155,7 @@ class LegoRace : public LegoWorld {
MxS32 m_unk0x104; // 0x104 MxS32 m_unk0x104; // 0x104
MxS32 m_unk0x108; // 0x108 MxS32 m_unk0x108; // 0x108
MxS32 m_unk0x10c; // 0x10c MxS32 m_unk0x10c; // 0x10c
LegoRaceActor* m_unk0x110[3]; // 0x110 LegoRaceMap* m_maps[3]; // 0x110
LegoGameState::Area m_destLocation; // 0x11c LegoGameState::Area m_destLocation; // 0x11c
LegoPathActor* m_pathActor; // 0x120 LegoPathActor* m_pathActor; // 0x120
Act1State* m_act1State; // 0x124 Act1State* m_act1State; // 0x124

View file

@ -1,6 +1,7 @@
#ifndef LEGORACERS_H #ifndef LEGORACERS_H
#define LEGORACERS_H #define LEGORACERS_H
#include "legojetskiraceactor.h"
#include "legoracemap.h" #include "legoracemap.h"
#include "legoracespecial.h" #include "legoracespecial.h"
@ -101,8 +102,13 @@ class LegoRaceCar : public LegoCarRaceActor, public LegoRaceMap {
// name verified by BETA10 0x100cbee6 // name verified by BETA10 0x100cbee6
static EdgeReference g_skBMap[]; static EdgeReference g_skBMap[];
public:
// TODO: These are shared with LegoJetski, and we should move them outside of this class
// and into the scope of legoracers.cpp
static const SkeletonKickPhase g_skeletonKickPhases[]; static const SkeletonKickPhase g_skeletonKickPhases[];
static const char* g_strSpeed; static const char* g_strSpeed;
static const char* g_strJetSpeed;
static const char* g_srtsl18to29[]; static const char* g_srtsl18to29[];
static const char* g_srtsl6to10[]; static const char* g_srtsl6to10[];
static const char* g_emptySoundKeyList[]; static const char* g_emptySoundKeyList[];
@ -121,7 +127,53 @@ class LegoRaceCar : public LegoCarRaceActor, public LegoRaceMap {
static undefined4 g_unk0x100f0bb0; static undefined4 g_unk0x100f0bb0;
}; };
#endif // LEGORACERS_H // VTABLE: LEGO1 0x100d5a08 LegoCarRaceActor
// VTABLE: LEGO1 0x100d5a28 LegoRaceActor
// VTABLE: LEGO1 0x100d5a30 LegoAnimActor
// VTABLE: LEGO1 0x100d5a40 LegoPathActor
// VTABLE: LEGO1 0x100d5b10 LegoRaceMap
// SIZE 0x1dc
class LegoJetski : public LegoJetskiRaceActor, public LegoRaceMap {
public:
LegoJetski();
~LegoJetski() override;
MxLong Notify(MxParam& p_param) override; // vtable+0x04
// FUNCTION: LEGO1 0x10013e90
const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f053c
return "LegoJetski";
}
// FUNCTION: LEGO1 0x10013eb0
MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, LegoJetski::ClassName()) || LegoJetskiRaceActor::IsA(p_name);
}
void ParseAction(char* p_extra) override; // vtable+0x20
void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30
MxU32 VTable0x6c(
LegoPathBoundary* p_boundary,
Vector3& p_v1,
Vector3& p_v2,
float p_f1,
float p_f2,
Vector3& p_v3
) override; // vtable+0x6c
void VTable0x70(float p_time) override; // vtable+0x70
MxResult HitActor(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94
void SwitchBoundary(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4)
override; // vtable+0x98
MxResult VTable0x9c() override; // vtable+0x9c
virtual void FUN_100136f0(float p_worldSpeed);
// SYNTHETIC: LEGO1 0x10013e30
// LegoJetski::`scalar deleting destructor'
};
// GLOBAL: LEGO1 0x100d5890 // GLOBAL: LEGO1 0x100d5890
// LegoRaceCar::`vbtable'{for `LegoCarRaceActor'} // LegoRaceCar::`vbtable'{for `LegoCarRaceActor'}
@ -134,3 +186,20 @@ class LegoRaceCar : public LegoCarRaceActor, public LegoRaceMap {
// GLOBAL: LEGO1 0x100d5868 // GLOBAL: LEGO1 0x100d5868
// LegoRaceCar::`vbtable'{for `LegoRaceActor'} // LegoRaceCar::`vbtable'{for `LegoRaceActor'}
// GLOBAL: LEGO1 0x100d59b8
// LegoJetski::`vbtable'{for `LegoCarRaceActor'}
// GLOBAL: LEGO1 0x100d59c8
// LegoJetski::`vbtable'{for `LegoRaceActor'}
// GLOBAL: LEGO1 0x100d59d8
// LegoJetski::`vbtable'{for `LegoAnimActor'}
// GLOBAL: LEGO1 0x100d59e0
// LegoJetski::`vbtable'
// GLOBAL: LEGO1 0x100d59f0
// LegoJetski::`vbtable'{for `LegoJetskiRaceActor'}
#endif // LEGORACERS_H

View file

@ -48,25 +48,27 @@ class LegoCarRaceActor : public virtual LegoRaceActor {
override; // vtable+0x98 override; // vtable+0x98
MxResult VTable0x9c() override; // vtable+0x9c MxResult VTable0x9c() override; // vtable+0x9c
virtual void FUN_10080590(float p_time); // LegoCarRaceActor vtable
virtual void FUN_10080590(float p_time); // vtable+0x00
// FUNCTION: LEGO1 0x10012bb0 // FUNCTION: LEGO1 0x10012bb0
virtual void FUN_10012bb0(float p_unk0x14) { m_unk0x14 = p_unk0x14; } virtual void FUN_10012bb0(float p_unk0x14) { m_unk0x14 = p_unk0x14; } // vtable+0x04
// FUNCTION: LEGO1 0x10012bc0 // FUNCTION: LEGO1 0x10012bc0
virtual float FUN_10012bc0() { return m_unk0x14; } virtual float FUN_10012bc0() { return m_unk0x14; } // vtable+0x08
// FUNCTION: LEGO1 0x10012bd0 // FUNCTION: LEGO1 0x10012bd0
virtual void FUN_10012bd0(float p_unk0x10) { m_unk0x10 = p_unk0x10; } virtual void FUN_10012bd0(float p_unk0x10) { m_unk0x10 = p_unk0x10; } // vtable+0x0c
// FUNCTION: LEGO1 0x10012be0 // FUNCTION: LEGO1 0x10012be0
virtual float FUN_10012be0() { return m_unk0x10; } virtual float FUN_10012be0() { return m_unk0x10; } // vtable+0x10
// FUNCTION: LEGO1 0x10012bf0 // FUNCTION: LEGO1 0x10012bf0
virtual void FUN_10012bf0(float p_unk0x18) { m_unk0x18 = p_unk0x18; } virtual void FUN_10012bf0(float p_unk0x18) { m_unk0x18 = p_unk0x18; } // vtable+0x14
// FUNCTION: LEGO1 0x10012c00 // FUNCTION: LEGO1 0x10012c00
virtual float FUN_10012c00() { return m_unk0x18; } virtual float FUN_10012c00() { return m_unk0x18; } // vtable+0x18
virtual MxS32 VTable0x1c(LegoPathBoundary* p_boundary, LegoEdge* p_edge); // vtable+0x1c virtual MxS32 VTable0x1c(LegoPathBoundary* p_boundary, LegoEdge* p_edge); // vtable+0x1c

View file

@ -41,7 +41,6 @@
#include "legoentitypresenter.h" #include "legoentitypresenter.h"
#include "legoflctexturepresenter.h" #include "legoflctexturepresenter.h"
#include "legohideanimpresenter.h" #include "legohideanimpresenter.h"
#include "legojetski.h"
#include "legojetskiraceactor.h" #include "legojetskiraceactor.h"
#include "legoloadcachesoundpresenter.h" #include "legoloadcachesoundpresenter.h"
#include "legolocomotionanimpresenter.h" #include "legolocomotionanimpresenter.h"

View file

@ -1,90 +0,0 @@
#include "legojetski.h"
#include "mxmisc.h"
#include "mxnotificationmanager.h"
DECOMP_SIZE_ASSERT(LegoJetski, 0x1dc)
// STUB: LEGO1 0x100136a0
void LegoJetski::SetWorldSpeed(MxFloat p_worldSpeed)
{
// TODO
}
// FUNCTION: LEGO1 0x100136f0
void LegoJetski::FUN_100136f0(float p_worldSpeed)
{
if (p_worldSpeed < 0) {
LegoCarRaceActor::m_unk0x0c = 2;
m_maxLinearVel = 0;
SetWorldSpeed(0);
}
else {
m_maxLinearVel = p_worldSpeed;
}
}
// STUB: LEGO1 0x10013740
void LegoJetski::VTable0x70(float p_time)
{
// TODO
}
// FUNCTION: LEGO1 0x10013820
LegoJetski::LegoJetski()
{
NotificationManager()->Register(this);
}
// FUNCTION: LEGO1 0x10013aa0
LegoJetski::~LegoJetski()
{
NotificationManager()->Unregister(this);
}
// STUB: LEGO1 0x10013bb0
void LegoJetski::ParseAction(char*)
{
// TODO
}
// STUB: LEGO1 0x10013c30
MxLong LegoJetski::Notify(MxParam& p_param)
{
// TODO
return 0;
}
// STUB: LEGO1 0x10013c40
MxResult LegoJetski::HitActor(LegoPathActor* p_actor, MxBool p_bool)
{
// TODO
return 0;
}
// STUB: LEGO1 0x10014150
MxU32 LegoJetski::VTable0x6c(
LegoPathBoundary* p_boundary,
Vector3& p_v1,
Vector3& p_v2,
float p_f1,
float p_f2,
Vector3& p_v3
)
{
// TODO
return 0;
}
// STUB: LEGO1 0x100141d0
void LegoJetski::SwitchBoundary(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4)
{
// TODO
}
// STUB: LEGO1 0x10014210
MxResult LegoJetski::VTable0x9c()
{
// TODO
return SUCCESS;
}

View file

@ -154,9 +154,9 @@ MxLong CarRace::HandleEndAction(MxEndActionNotificationParam& p_param)
result = 1; result = 1;
} }
else if (objectId == CarraceScript::c_irtx08ra_PlayWav && m_destLocation == LegoGameState::e_undefined) { else if (objectId == CarraceScript::c_irtx08ra_PlayWav && m_destLocation == LegoGameState::e_undefined) {
m_unk0x110[0]->Mute(FALSE); m_maps[0]->Mute(FALSE);
m_unk0x110[1]->Mute(FALSE); m_maps[1]->Mute(FALSE);
m_unk0x110[2]->Mute(FALSE); m_maps[2]->Mute(FALSE);
VariableTable()->SetVariable(g_raceState, g_racing); VariableTable()->SetVariable(g_raceState, g_racing);
result = 1; result = 1;
@ -200,19 +200,19 @@ MxLong CarRace::HandlePathStruct(LegoPathStructNotificationParam& p_param)
if (g_unk0x100f0c7c == m_unk0xf8) { if (g_unk0x100f0c7c == m_unk0xf8) {
VariableTable()->SetVariable(g_raceState, ""); VariableTable()->SetVariable(g_raceState, "");
m_unk0x110[0]->Mute(TRUE); m_maps[0]->Mute(TRUE);
m_unk0x110[1]->Mute(TRUE); m_maps[1]->Mute(TRUE);
m_unk0x110[2]->Mute(TRUE); m_maps[2]->Mute(TRUE);
m_unk0x110[0]->SetMaxLinearVel(-1.0); m_maps[0]->SetMaxLinearVel(-1.0);
m_unk0x110[1]->SetMaxLinearVel(-1.0); m_maps[1]->SetMaxLinearVel(-1.0);
m_unk0x110[2]->SetMaxLinearVel(-1.0); m_maps[2]->SetMaxLinearVel(-1.0);
RemoveActor(m_unk0x110[1]); RemoveActor(m_maps[1]);
m_unk0x110[1]->ClearMaps(); m_maps[1]->ClearMaps();
RemoveActor(m_unk0x110[2]); RemoveActor(m_maps[2]);
m_unk0x110[2]->ClearMaps(); m_maps[2]->ClearMaps();
MxS32 position; MxS32 position;
@ -273,10 +273,10 @@ MxLong CarRace::HandlePathStruct(LegoPathStructNotificationParam& p_param)
m_unk0xfc++; m_unk0xfc++;
if (g_unk0x100f0c7c == m_unk0xfc) { if (g_unk0x100f0c7c == m_unk0xfc) {
m_unk0x110[1]->SetMaxLinearVel(-1.0); m_maps[1]->SetMaxLinearVel(-1.0);
RemoveActor(m_unk0x110[1]); RemoveActor(m_maps[1]);
m_unk0x110[1]->ClearMaps(); m_maps[1]->ClearMaps();
m_unk0x110[1]->GetROI()->SetVisibility(FALSE); m_maps[1]->GetROI()->SetVisibility(FALSE);
LegoROI* roi = FindROI("rcblack"); LegoROI* roi = FindROI("rcblack");
@ -301,10 +301,10 @@ MxLong CarRace::HandlePathStruct(LegoPathStructNotificationParam& p_param)
m_unk0x100++; m_unk0x100++;
if (g_unk0x100f0c7c == m_unk0x100) { if (g_unk0x100f0c7c == m_unk0x100) {
m_unk0x110[2]->SetMaxLinearVel(-1.0); m_maps[2]->SetMaxLinearVel(-1.0);
RemoveActor(m_unk0x110[2]); RemoveActor(m_maps[2]);
m_unk0x110[2]->ClearMaps(); m_maps[2]->ClearMaps();
m_unk0x110[2]->GetROI()->SetVisibility(FALSE); m_maps[2]->GetROI()->SetVisibility(FALSE);
LegoROI* roi = FindROI("rcgreen"); LegoROI* roi = FindROI("rcgreen");

View file

@ -109,9 +109,9 @@ MxLong JetskiRace::HandleEndAction(MxEndActionNotificationParam& p_param)
MxLong result = 0; MxLong result = 0;
if ((p_param.GetAction()) && (p_param.GetAction()->GetObjectId() == JetraceScript::c_AirHorn_PlayWav)) { if ((p_param.GetAction()) && (p_param.GetAction()->GetObjectId() == JetraceScript::c_AirHorn_PlayWav)) {
m_unk0x110[0]->Mute(FALSE); m_maps[0]->Mute(FALSE);
m_unk0x110[1]->Mute(FALSE); m_maps[1]->Mute(FALSE);
m_unk0x110[2]->Mute(FALSE); m_maps[2]->Mute(FALSE);
VariableTable()->SetVariable(g_raceState, g_racing); VariableTable()->SetVariable(g_raceState, g_racing);
result = 1; result = 1;

View file

@ -24,9 +24,9 @@ LegoRace::LegoRace()
m_unk0x108 = 0; m_unk0x108 = 0;
m_unk0x10c = 0; m_unk0x10c = 0;
m_raceState = NULL; m_raceState = NULL;
m_unk0x110[0] = NULL; m_maps[0] = NULL;
m_unk0x110[1] = NULL; m_maps[1] = NULL;
m_unk0x110[2] = NULL; m_maps[2] = NULL;
m_unk0x128 = 0; m_unk0x128 = 0;
m_unk0x12c = 0; m_unk0x12c = 0;
m_pathActor = 0; m_pathActor = 0;

View file

@ -3,10 +3,12 @@
#include "anim/legoanim.h" #include "anim/legoanim.h"
#include "carrace.h" #include "carrace.h"
#include "define.h" #include "define.h"
#include "jetskirace.h"
#include "legocachesoundmanager.h" #include "legocachesoundmanager.h"
#include "legocameracontroller.h" #include "legocameracontroller.h"
#include "legonavcontroller.h" #include "legonavcontroller.h"
#include "legorace.h" #include "legorace.h"
#include "legoracers.h"
#include "legosoundmanager.h" #include "legosoundmanager.h"
#include "misc.h" #include "misc.h"
#include "mxdebug.h" #include "mxdebug.h"
@ -20,6 +22,7 @@
DECOMP_SIZE_ASSERT(EdgeReference, 0x08) DECOMP_SIZE_ASSERT(EdgeReference, 0x08)
DECOMP_SIZE_ASSERT(SkeletonKickPhase, 0x10) DECOMP_SIZE_ASSERT(SkeletonKickPhase, 0x10)
DECOMP_SIZE_ASSERT(LegoRaceCar, 0x200) DECOMP_SIZE_ASSERT(LegoRaceCar, 0x200)
DECOMP_SIZE_ASSERT(LegoJetski, 0x1dc)
// GLOBAL: LEGO1 0x100f0a20 // GLOBAL: LEGO1 0x100f0a20
// GLOBAL: BETA10 0x101f5e34 // GLOBAL: BETA10 0x101f5e34
@ -71,6 +74,9 @@ const SkeletonKickPhase LegoRaceCar::g_skeletonKickPhases[] = {
// GLOBAL: LEGO1 0x100f0b10 // GLOBAL: LEGO1 0x100f0b10
const char* LegoRaceCar::g_strSpeed = "SPEED"; const char* LegoRaceCar::g_strSpeed = "SPEED";
// GLOBAL: LEGO1 0x100f0b14
const char* LegoRaceCar::g_strJetSpeed = "jetSPEED";
// GLOBAL: LEGO1 0x100f0b18 // GLOBAL: LEGO1 0x100f0b18
// GLOBAL: BETA10 0x101f5f28 // GLOBAL: BETA10 0x101f5f28
const char* LegoRaceCar::g_srtsl18to29[] = { const char* LegoRaceCar::g_srtsl18to29[] = {
@ -430,7 +436,7 @@ void LegoRaceCar::VTable0x70(float p_time)
// FUNCTION: BETA10 0x100cbb84 // FUNCTION: BETA10 0x100cbb84
MxResult LegoRaceCar::HitActor(LegoPathActor* p_actor, MxBool p_bool) MxResult LegoRaceCar::HitActor(LegoPathActor* p_actor, MxBool p_bool)
{ {
// Note: Code duplication with LegoRaceActor::VTable0x94 // Note: Code duplication with LegoRaceActor::HitActor
if (!p_actor->GetUserNavFlag()) { if (!p_actor->GetUserNavFlag()) {
if (p_actor->GetState()) { if (p_actor->GetState()) {
return FAILURE; return FAILURE;
@ -550,6 +556,129 @@ void LegoRaceCar::FUN_10013670()
g_unk0x100f0bb0 = uVar1 % 0xc >> 2; g_unk0x100f0bb0 = uVar1 % 0xc >> 2;
} }
// FUNCTION: LEGO1 0x100136a0
// FUNCTION: BETA10 0x100cbf7e
void LegoJetski::SetWorldSpeed(MxFloat p_worldSpeed)
{
if (!m_userNavFlag) {
if (!LegoCarRaceActor::m_unk0x0c) {
m_maxLinearVel = p_worldSpeed;
}
LegoAnimActor::SetWorldSpeed(p_worldSpeed);
}
else {
LegoEntity::SetWorldSpeed(p_worldSpeed);
}
}
// FUNCTION: LEGO1 0x100136f0
// FUNCTION: BETA10 0x100cc01a
void LegoJetski::FUN_100136f0(float p_worldSpeed)
{
if (p_worldSpeed < 0) {
LegoCarRaceActor::m_unk0x0c = 2;
m_maxLinearVel = 0;
SetWorldSpeed(0);
}
else {
m_maxLinearVel = p_worldSpeed;
}
}
// FUNCTION: LEGO1 0x10013740
// FUNCTION: BETA10 0x100cc0ae
void LegoJetski::VTable0x70(float p_time)
{
LegoJetskiRaceActor::VTable0x70(p_time);
if (LegoCarRaceActor::m_unk0x0c == 1) {
FUN_1005d4b0();
if (!m_userNavFlag) {
FUN_10080590(p_time);
return;
}
float absoluteSpeed = abs(m_worldSpeed);
float speedRatio = absoluteSpeed / NavController()->GetMaxLinearVel();
char buffer[200];
sprintf(buffer, "%g", speedRatio);
VariableTable()->SetVariable(LegoRaceCar::g_strJetSpeed, buffer);
if (m_sound) {
m_frequencyFactor = speedRatio * 1.2 + 0.7;
}
}
}
// FUNCTION: LEGO1 0x10013820
LegoJetski::LegoJetski()
{
NotificationManager()->Register(this);
}
// FUNCTION: LEGO1 0x10013aa0
LegoJetski::~LegoJetski()
{
NotificationManager()->Unregister(this);
}
// FUNCTION: LEGO1 0x10013bb0
// FUNCTION: BETA10 0x100cc6df
void LegoJetski::ParseAction(char* p_extra)
{
char buffer[256];
LegoAnimActor::ParseAction(p_extra);
LegoRaceMap::ParseAction(p_extra);
JetskiRace* currentWorld = (JetskiRace*) CurrentWorld();
if (KeyValueStringParse(buffer, g_strCOMP, p_extra) && currentWorld) {
currentWorld->VTable0x7c(this, atoi(buffer));
}
}
// FUNCTION: LEGO1 0x10013c30
// FUNCTION: BETA10 0x100cc76a
MxLong LegoJetski::Notify(MxParam& p_param)
{
return LegoRaceMap::Notify(p_param);
}
// STUB: LEGO1 0x10013c40
MxResult LegoJetski::HitActor(LegoPathActor* p_actor, MxBool p_bool)
{
// very similar to LegoRaceCar::HitActor
return SUCCESS;
}
// FUNCTION: LEGO1 0x10014150
MxU32 LegoJetski::VTable0x6c(
LegoPathBoundary* p_boundary,
Vector3& p_v1,
Vector3& p_v2,
float p_f1,
float p_f2,
Vector3& p_v3
)
{
return LegoJetskiRaceActor::VTable0x6c(p_boundary, p_v1, p_v2, p_f1, p_f2, p_v3);
}
// FUNCTION: LEGO1 0x100141d0
void LegoJetski::SwitchBoundary(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4)
{
LegoJetskiRaceActor::SwitchBoundary(p_boundary, p_edge, p_unk0xe4);
}
// FUNCTION: LEGO1 0x10014210
MxResult LegoJetski::VTable0x9c()
{
return LegoJetskiRaceActor::VTable0x9c();
}
// FUNCTION: LEGO1 0x10014500 // FUNCTION: LEGO1 0x10014500
// FUNCTION: BETA10 0x100cd5e0 // FUNCTION: BETA10 0x100cd5e0
MxU32 LegoRaceCar::VTable0x6c( MxU32 LegoRaceCar::VTable0x6c(