From 6594a03b4918ac53877042ef7b011eaaa49a8721 Mon Sep 17 00:00:00 2001 From: powerof3 <32599957+powerof3@users.noreply.github.com> Date: Sat, 4 Nov 2023 22:56:59 +0530 Subject: [PATCH] feat: RE `BGSSoundReference` (#215) --- .../include/RE/B/BGSCraftingUseSound.h | 8 ++----- .../include/RE/B/BGSPickupPutdownSounds.h | 15 +++---------- CommonLibSF/include/RE/B/BGSSoundReference.h | 20 ++++++++++++++++++ CommonLibSF/include/RE/T/TESRace.h | 21 ++++++------------- 4 files changed, 31 insertions(+), 33 deletions(-) create mode 100644 CommonLibSF/include/RE/B/BGSSoundReference.h diff --git a/CommonLibSF/include/RE/B/BGSCraftingUseSound.h b/CommonLibSF/include/RE/B/BGSCraftingUseSound.h index 8a8b24b7..bd44554b 100644 --- a/CommonLibSF/include/RE/B/BGSCraftingUseSound.h +++ b/CommonLibSF/include/RE/B/BGSCraftingUseSound.h @@ -1,5 +1,6 @@ #pragma once +#include "RE/B/BGSSoundReference.h" #include "RE/B/BaseFormComponent.h" namespace RE @@ -16,12 +17,7 @@ namespace RE void InitializeDataComponent() override; // 02 - { return; } // members - std::uint64_t unk08; // 08 - std::uint64_t unk10; // 10 - std::uint64_t unk18; // 18 - std::uint64_t unk20; // 20 - std::uint64_t unk28; // 28 - std::uint64_t unk30; // 30 + BGSSoundReference craftingUseSound; // 08 }; static_assert(sizeof(BGSCraftingUseSound) == 0x38); } diff --git a/CommonLibSF/include/RE/B/BGSPickupPutdownSounds.h b/CommonLibSF/include/RE/B/BGSPickupPutdownSounds.h index bc0f4d9e..94cd8965 100644 --- a/CommonLibSF/include/RE/B/BGSPickupPutdownSounds.h +++ b/CommonLibSF/include/RE/B/BGSPickupPutdownSounds.h @@ -1,5 +1,6 @@ #pragma once +#include "RE/B/BGSSoundReference.h" #include "RE/B/BaseFormComponent.h" namespace RE @@ -16,18 +17,8 @@ namespace RE void InitializeDataComponent() override; // 02 - { return; } // members - std::uint64_t unk08; // 08 - std::uint64_t unk10; // 10 - std::uint64_t unk18; // 18 - std::uint64_t unk20; // 20 - std::uint64_t unk28; // 28 - std::uint64_t unk30; // 30 - std::uint64_t unk38; // 38 - std::uint64_t unk40; // 40 - std::uint64_t unk48; // 48 - std::uint64_t unk50; // 50 - std::uint64_t unk58; // 58 - std::uint64_t unk60; // 60 + BGSSoundReference pickupSound; // 08 + BGSSoundReference putdownSound; // 38 }; static_assert(sizeof(BGSPickupPutdownSounds) == 0x68); } diff --git a/CommonLibSF/include/RE/B/BGSSoundReference.h b/CommonLibSF/include/RE/B/BGSSoundReference.h new file mode 100644 index 00000000..a077c0dd --- /dev/null +++ b/CommonLibSF/include/RE/B/BGSSoundReference.h @@ -0,0 +1,20 @@ +#pragma once + +namespace RE +{ + class BGSConditionForm; + class BGSWwiseEventForm; + + class BGSSoundReference + { + public: + // members + std::uint64_t unk00; // 00 - WWise GUID 1 + std::uint64_t unk08; // 08 + std::uint64_t unk10; // 10 - WWise GUID 2 + std::uint64_t unk18; // 18 + BGSConditionForm* conditions; // 20 + BGSWwiseEventForm* eventData; // 28 + }; + static_assert(sizeof(BGSSoundReference) == 0x30); +} diff --git a/CommonLibSF/include/RE/T/TESRace.h b/CommonLibSF/include/RE/T/TESRace.h index d834af5c..00960295 100644 --- a/CommonLibSF/include/RE/T/TESRace.h +++ b/CommonLibSF/include/RE/T/TESRace.h @@ -10,6 +10,7 @@ #include "RE/B/BGSPreloadable.h" #include "RE/B/BGSPropertySheet.h" #include "RE/B/BGSSkinForm.h" +#include "RE/B/BGSSoundReference.h" #include "RE/B/BGSTextureModel.h" #include "RE/S/Sexes.h" #include "RE/T/TESDescription.h" @@ -77,9 +78,9 @@ namespace RE std::int32_t unkC4; // C4 std::uint32_t unkC8; // C8 std::uint32_t unkCC; // CC - BGSExplosion* unkD0; // D0 - BGSDebris* unkD8; // D8 - BGSImpactDataSet* unkE0; // E0 + BGSExplosion* explosion; // D0 + BGSDebris* debris; // D8 + BGSImpactDataSet* impactDataSet; // E0 std::uint32_t unkE8; // E8 std::uint32_t unkEC; // EC float unkF0; // F0 @@ -125,18 +126,8 @@ namespace RE // members BGSEditorID formEditorID; // 0F0 BGSMaterialType* bloodImpactMaterial; // 100 - std::uint64_t unk108; // 108 - sound related? - std::uint64_t unk110; // 110 - std::uint64_t unk118; // 118 - std::uint64_t unk120; // 120 - std::uint64_t unk128; // 128 - std::uint64_t unk130; // 130 - std::uint64_t unk138; // 138 - sound related? - std::uint64_t unk140; // 140 - std::uint64_t unk148; // 148 - std::uint64_t unk150; // 150 - std::uint64_t unk158; // 158 - std::uint64_t unk160; // 160 + BGSSoundReference corpseOpenSound; // 108 + BGSSoundReference corpseCloseSound; // 138 BSFixedString bipedObjectNames[64]; // 168 ActorValueInfo* bipedObjectConditions[64]; // 368 std::uint64_t unk568; // 568