From 08e2d086352ec8fee8c727d24a0fee60776779eb Mon Sep 17 00:00:00 2001 From: powerof3 <32599957+powerof3@users.noreply.github.com> Date: Sun, 5 Nov 2023 06:27:48 +0530 Subject: [PATCH] feat!: add `BGSAudio::WwiseGUID`, rename `BGSSoundReference` to `BGSAudio::WwiseSoundHook` (#216) --- .../include/RE/B/BGSCraftingUseSound.h | 4 ++-- .../include/RE/B/BGSPickupPutdownSounds.h | 6 ++--- CommonLibSF/include/RE/B/BGSSoundReference.h | 20 ---------------- CommonLibSF/include/RE/Starfield.h | 3 ++- CommonLibSF/include/RE/T/TESRace.h | 6 ++--- CommonLibSF/include/RE/W/WwiseGUID.h | 13 +++++++++++ CommonLibSF/include/RE/W/WwiseSoundHook.h | 23 +++++++++++++++++++ 7 files changed, 46 insertions(+), 29 deletions(-) delete mode 100644 CommonLibSF/include/RE/B/BGSSoundReference.h create mode 100644 CommonLibSF/include/RE/W/WwiseGUID.h create mode 100644 CommonLibSF/include/RE/W/WwiseSoundHook.h diff --git a/CommonLibSF/include/RE/B/BGSCraftingUseSound.h b/CommonLibSF/include/RE/B/BGSCraftingUseSound.h index bd44554b..87ac5bc5 100644 --- a/CommonLibSF/include/RE/B/BGSCraftingUseSound.h +++ b/CommonLibSF/include/RE/B/BGSCraftingUseSound.h @@ -1,7 +1,7 @@ #pragma once -#include "RE/B/BGSSoundReference.h" #include "RE/B/BaseFormComponent.h" +#include "RE/W/WWiseSoundHook.h" namespace RE { @@ -17,7 +17,7 @@ namespace RE void InitializeDataComponent() override; // 02 - { return; } // members - BGSSoundReference craftingUseSound; // 08 + BGSAudio::WwiseSoundHook craftingUseSound; // 08 }; static_assert(sizeof(BGSCraftingUseSound) == 0x38); } diff --git a/CommonLibSF/include/RE/B/BGSPickupPutdownSounds.h b/CommonLibSF/include/RE/B/BGSPickupPutdownSounds.h index 94cd8965..d2695db6 100644 --- a/CommonLibSF/include/RE/B/BGSPickupPutdownSounds.h +++ b/CommonLibSF/include/RE/B/BGSPickupPutdownSounds.h @@ -1,7 +1,7 @@ #pragma once -#include "RE/B/BGSSoundReference.h" #include "RE/B/BaseFormComponent.h" +#include "RE/W/WWiseSoundHook.h" namespace RE { @@ -17,8 +17,8 @@ namespace RE void InitializeDataComponent() override; // 02 - { return; } // members - BGSSoundReference pickupSound; // 08 - BGSSoundReference putdownSound; // 38 + BGSAudio::WwiseSoundHook pickupSound; // 08 + BGSAudio::WwiseSoundHook putdownSound; // 38 }; static_assert(sizeof(BGSPickupPutdownSounds) == 0x68); } diff --git a/CommonLibSF/include/RE/B/BGSSoundReference.h b/CommonLibSF/include/RE/B/BGSSoundReference.h deleted file mode 100644 index a077c0dd..00000000 --- a/CommonLibSF/include/RE/B/BGSSoundReference.h +++ /dev/null @@ -1,20 +0,0 @@ -#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/Starfield.h b/CommonLibSF/include/RE/Starfield.h index 41820e04..6c464ef5 100644 --- a/CommonLibSF/include/RE/Starfield.h +++ b/CommonLibSF/include/RE/Starfield.h @@ -55,7 +55,6 @@ #include "RE/B/BGSScene.h" #include "RE/B/BGSSkinForm.h" #include "RE/B/BGSSnapTemplateComponent.h" -#include "RE/B/BGSSoundReference.h" #include "RE/B/BGSTerminal.h" #include "RE/B/BGSTerminalMenu.h" #include "RE/B/BGSTextureModel.h" @@ -215,3 +214,5 @@ #include "RE/T/TypeInfo.h" #include "RE/U/UI.h" #include "RE/V/Variable.h" +#include "RE/W/WWiseSoundHook.h" +#include "RE/W/WwiseGUID.h" diff --git a/CommonLibSF/include/RE/T/TESRace.h b/CommonLibSF/include/RE/T/TESRace.h index 00960295..a1603e9d 100644 --- a/CommonLibSF/include/RE/T/TESRace.h +++ b/CommonLibSF/include/RE/T/TESRace.h @@ -10,13 +10,13 @@ #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" #include "RE/T/TESForm.h" #include "RE/T/TESFullName.h" #include "RE/T/TESSpellList.h" +#include "RE/W/WWiseSoundHook.h" namespace RE { @@ -126,8 +126,8 @@ namespace RE // members BGSEditorID formEditorID; // 0F0 BGSMaterialType* bloodImpactMaterial; // 100 - BGSSoundReference corpseOpenSound; // 108 - BGSSoundReference corpseCloseSound; // 138 + BGSAudio::WwiseSoundHook corpseOpenSound; // 108 + BGSAudio::WwiseSoundHook corpseCloseSound; // 138 BSFixedString bipedObjectNames[64]; // 168 ActorValueInfo* bipedObjectConditions[64]; // 368 std::uint64_t unk568; // 568 diff --git a/CommonLibSF/include/RE/W/WwiseGUID.h b/CommonLibSF/include/RE/W/WwiseGUID.h new file mode 100644 index 00000000..a2bc6517 --- /dev/null +++ b/CommonLibSF/include/RE/W/WwiseGUID.h @@ -0,0 +1,13 @@ +#pragma once + +namespace RE::BGSAudio +{ + class WwiseGUID + { + public: + // members + std::uint64_t highGUID; // 00 + std::uint64_t lowGUID; // 08 + }; + static_assert(sizeof(WwiseGUID) == 0x10); +} diff --git a/CommonLibSF/include/RE/W/WwiseSoundHook.h b/CommonLibSF/include/RE/W/WwiseSoundHook.h new file mode 100644 index 00000000..8fe423e2 --- /dev/null +++ b/CommonLibSF/include/RE/W/WwiseSoundHook.h @@ -0,0 +1,23 @@ +#pragma once + +#include "RE/W/WwiseGUID.h" + +namespace RE +{ + class BGSConditionForm; + class BGSWwiseEventForm; + + namespace BGSAudio + { + class WwiseSoundHook + { + public: + // members + WwiseGUID startEvent; // 00 + WwiseGUID stopEvent; // 10 + BGSConditionForm* conditions; // 20 + BGSWwiseEventForm* eventData; // 28 + }; + static_assert(sizeof(WwiseSoundHook) == 0x30); + } +}