Address review comments, get 100 %

This commit is contained in:
jonschz 2024-11-05 21:01:00 +01:00
parent 8c940c1ebd
commit d0b413c950
3 changed files with 9 additions and 17 deletions

View File

@ -74,14 +74,14 @@ typedef LegoVehicleBuildState LegoJetskiBuildState;
class LegoCarBuild : public LegoWorld { class LegoCarBuild : public LegoWorld {
public: public:
// SIZE 0x1c // SIZE 0x1c
struct LookupTableData { struct LookupTableActions {
undefined2 m_unk0x00; // 0x00 undefined4 m_unk0x00; // 0x00
undefined4 m_unk0x04; // 0x04 undefined4 m_unk0x04; // 0x04
undefined4 m_unk0x08; // 0x08 undefined4 m_unk0x08; // 0x08
undefined4 m_unk0x0c; // 0x0c undefined4 m_unk0x0c; // 0x0c
undefined4 m_unk0x10; // 0x10 undefined4 m_unk0x10; // 0x10
undefined4 m_unk0x14; // 0x14 undefined4 m_unk0x14; // 0x14
MxU16 m_unk0x18; // 0x18 undefined4 m_unk0x18; // 0x18
}; };
enum Unknown0xf8 { enum Unknown0xf8 {
@ -239,7 +239,7 @@ class LegoCarBuild : public LegoWorld {
static MxS16 g_unk0x100f11cc; static MxS16 g_unk0x100f11cc;
static MxFloat g_unk0x100d65a4; static MxFloat g_unk0x100d65a4;
static MxFloat g_rotationAngleStepYAxis; static MxFloat g_rotationAngleStepYAxis;
static LookupTableData g_unk0x100d65b0[]; static LookupTableActions g_unk0x100d65b0[];
}; };
#endif // LEGOCARBUILD_H #endif // LEGOCARBUILD_H

View File

@ -40,13 +40,13 @@
DECOMP_SIZE_ASSERT(LegoCarBuild, 0x34c) DECOMP_SIZE_ASSERT(LegoCarBuild, 0x34c)
DECOMP_SIZE_ASSERT(LegoVehicleBuildState, 0x50) DECOMP_SIZE_ASSERT(LegoVehicleBuildState, 0x50)
DECOMP_SIZE_ASSERT(LegoCarBuild::LookupTableData, 0x1c); DECOMP_SIZE_ASSERT(LegoCarBuild::LookupTableActions, 0x1c);
// These four structs can be matched to the vehicle types using BETA10 0x10070520 // These four structs can be matched to the vehicle types using BETA10 0x10070520
// GLOBAL: LEGO1 0x100d65b0 // GLOBAL: LEGO1 0x100d65b0
// GLOBAL: BETA10 0x101bb7c0 // GLOBAL: BETA10 0x101bb7c0
LegoCarBuild::LookupTableData LegoCarBuild::g_unk0x100d65b0[] = { LegoCarBuild::LookupTableActions LegoCarBuild::g_unk0x100d65b0[] = {
{DunecarScript::c_igs001d3_RunAnim, {DunecarScript::c_igs001d3_RunAnim,
DunecarScript::c_igs002d3_RunAnim, DunecarScript::c_igs002d3_RunAnim,
DunecarScript::c_igs003d3_RunAnim, DunecarScript::c_igs003d3_RunAnim,
@ -1352,16 +1352,12 @@ inline MxU32 LegoCarBuild::Beta0x10070520()
switch (m_carId) { switch (m_carId) {
case Helicopter_Actor: case Helicopter_Actor:
return 2; return 2;
break;
case DuneBugy_Actor: case DuneBugy_Actor:
return 0; return 0;
break;
case Jetski_Actor: case Jetski_Actor:
return 1; return 1;
break;
case RaceCar_Actor: case RaceCar_Actor:
return 3; return 3;
break;
default: default:
assert(0); assert(0);
return 0; return 0;
@ -1428,19 +1424,16 @@ void LegoCarBuild::FUN_10025720(undefined4 p_param)
FUN_10025d10(g_unk0x100d65b0[Beta0x10070520()].m_unk0x08); FUN_10025d10(g_unk0x100d65b0[Beta0x10070520()].m_unk0x08);
break; break;
case 6: case 6:
// This part doesn't match to 100 % yet m_unk0x10a = g_unk0x100d65b0[Beta0x10070520()].m_unk0x18;
uVar6 = g_unk0x100d65b0[Beta0x10070520()].m_unk0x18; uVar6 = m_unk0x10a;
m_unk0x10a = uVar6;
StopActionIn0x344(); StopActionIn0x344();
if (uVar6 != -1) { if (uVar6 != DS_NOT_A_STREAM) {
m_unk0x344 = uVar6; m_unk0x344 = uVar6;
BackgroundAudioManager()->LowerVolume(); BackgroundAudioManager()->LowerVolume();
InvokeAction(Extra::ActionType::e_start, m_atomId, uVar6, NULL); InvokeAction(Extra::ActionType::e_start, m_atomId, uVar6, NULL);
} }
FUN_10025d10(uVar6);
break; break;
default: default:
m_numAnimsRun--; m_numAnimsRun--;

View File

@ -31,7 +31,6 @@
#include <string.h> #include <string.h>
#include <vec.h> #include <vec.h>
// FUNCTION: LEGO1 0x1003dd70 // FUNCTION: LEGO1 0x1003dd70
// FUNCTION: BETA10 0x100d3410 // FUNCTION: BETA10 0x100d3410
LegoROI* PickROI(MxLong p_a, MxLong p_b) LegoROI* PickROI(MxLong p_a, MxLong p_b)