From d0b413c950a1145acfd5a36d9235ba1c47e60e99 Mon Sep 17 00:00:00 2001 From: jonschz Date: Tue, 5 Nov 2024 21:01:00 +0100 Subject: [PATCH] Address review comments, get 100 % --- LEGO1/lego/legoomni/include/legocarbuild.h | 8 ++++---- LEGO1/lego/legoomni/src/build/legocarbuild.cpp | 17 +++++------------ LEGO1/lego/legoomni/src/common/legoutils.cpp | 1 - 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legocarbuild.h b/LEGO1/lego/legoomni/include/legocarbuild.h index d0ef48b6..6337aafd 100644 --- a/LEGO1/lego/legoomni/include/legocarbuild.h +++ b/LEGO1/lego/legoomni/include/legocarbuild.h @@ -74,14 +74,14 @@ typedef LegoVehicleBuildState LegoJetskiBuildState; class LegoCarBuild : public LegoWorld { public: // SIZE 0x1c - struct LookupTableData { - undefined2 m_unk0x00; // 0x00 + struct LookupTableActions { + undefined4 m_unk0x00; // 0x00 undefined4 m_unk0x04; // 0x04 undefined4 m_unk0x08; // 0x08 undefined4 m_unk0x0c; // 0x0c undefined4 m_unk0x10; // 0x10 undefined4 m_unk0x14; // 0x14 - MxU16 m_unk0x18; // 0x18 + undefined4 m_unk0x18; // 0x18 }; enum Unknown0xf8 { @@ -239,7 +239,7 @@ class LegoCarBuild : public LegoWorld { static MxS16 g_unk0x100f11cc; static MxFloat g_unk0x100d65a4; static MxFloat g_rotationAngleStepYAxis; - static LookupTableData g_unk0x100d65b0[]; + static LookupTableActions g_unk0x100d65b0[]; }; #endif // LEGOCARBUILD_H diff --git a/LEGO1/lego/legoomni/src/build/legocarbuild.cpp b/LEGO1/lego/legoomni/src/build/legocarbuild.cpp index 73edde96..6cc123db 100644 --- a/LEGO1/lego/legoomni/src/build/legocarbuild.cpp +++ b/LEGO1/lego/legoomni/src/build/legocarbuild.cpp @@ -40,13 +40,13 @@ DECOMP_SIZE_ASSERT(LegoCarBuild, 0x34c) 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 // GLOBAL: LEGO1 0x100d65b0 // GLOBAL: BETA10 0x101bb7c0 -LegoCarBuild::LookupTableData LegoCarBuild::g_unk0x100d65b0[] = { +LegoCarBuild::LookupTableActions LegoCarBuild::g_unk0x100d65b0[] = { {DunecarScript::c_igs001d3_RunAnim, DunecarScript::c_igs002d3_RunAnim, DunecarScript::c_igs003d3_RunAnim, @@ -1352,16 +1352,12 @@ inline MxU32 LegoCarBuild::Beta0x10070520() switch (m_carId) { case Helicopter_Actor: return 2; - break; case DuneBugy_Actor: return 0; - break; case Jetski_Actor: return 1; - break; case RaceCar_Actor: return 3; - break; default: assert(0); return 0; @@ -1428,19 +1424,16 @@ void LegoCarBuild::FUN_10025720(undefined4 p_param) FUN_10025d10(g_unk0x100d65b0[Beta0x10070520()].m_unk0x08); break; case 6: - // This part doesn't match to 100 % yet - uVar6 = g_unk0x100d65b0[Beta0x10070520()].m_unk0x18; - m_unk0x10a = uVar6; + m_unk0x10a = g_unk0x100d65b0[Beta0x10070520()].m_unk0x18; + uVar6 = m_unk0x10a; StopActionIn0x344(); - if (uVar6 != -1) { + if (uVar6 != DS_NOT_A_STREAM) { m_unk0x344 = uVar6; BackgroundAudioManager()->LowerVolume(); InvokeAction(Extra::ActionType::e_start, m_atomId, uVar6, NULL); } - FUN_10025d10(uVar6); - break; default: m_numAnimsRun--; diff --git a/LEGO1/lego/legoomni/src/common/legoutils.cpp b/LEGO1/lego/legoomni/src/common/legoutils.cpp index cb4d5383..ba45501f 100644 --- a/LEGO1/lego/legoomni/src/common/legoutils.cpp +++ b/LEGO1/lego/legoomni/src/common/legoutils.cpp @@ -31,7 +31,6 @@ #include #include - // FUNCTION: LEGO1 0x1003dd70 // FUNCTION: BETA10 0x100d3410 LegoROI* PickROI(MxLong p_a, MxLong p_b)