CommonLibSSE (powerof3)
BGSSoundCategory.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include "RE/F/FormTypes.h"
5 #include "RE/T/TESForm.h"
6 #include "RE/T/TESFullName.h"
7 
8 namespace RE
9 {
11  public TESForm, // 00
12  public TESFullName, // 20
13  public BSISoundCategory // 30
14  {
15  public:
16  inline static constexpr auto RTTI = RTTI_BGSSoundCategory;
17  inline static constexpr auto VTABLE = VTABLE_BGSSoundCategory;
18  inline static constexpr auto FORMTYPE = FormType::SoundCategory;
19 
20  enum class Flag // FNAM
21  {
22  kNone = 0,
23  kMuteWhenSubmerged = 1 << 0,
24  kShouldAppearOnMenu = 1 << 1
25  };
26 
27  struct RecordFlags
28  {
29  enum RecordFlag : std::uint32_t
30  {
31  kDeleted = 1 << 5,
32  kIgnored = 1 << 12
33  };
34  };
35 
36  ~BGSSoundCategory() override; // 00
37 
38  // override (TESForm)
39  void InitializeData() override; // 04
40  bool Load(TESFile* a_mod) override; // 06
41  void InitItemImpl() override; // 13
42 
43  // override (BGSSoundCategory)
44  bool Matches(const BSISoundCategory* a_category) const override; // 01
45  float GetCategoryVolume() const override; // 02
46  void SetCategoryVolume(float a_value) override; // 03
47  float GetCategoryFrequency() const override; // 04
48  void SetCategoryFrequency(float a_value) override; // 05
49  std::uint16_t GetCategoryAttenuation() const override; // 06
50  void SetCategoryAttenuation(std::uint16_t a_value) override; // 07
51 
52  [[nodiscard]] float GetDefaultMenuValue() const;
53  [[nodiscard]] float GetStaticVolumeMultiplier() const;
54  [[nodiscard]] bool IsMenuCategory() const;
55  void SetDefaultMenuValue(float a_val);
56  void SetStaticVolumeMultiplier(float a_val);
57 
58  // members
60  std::uint32_t unk3C; // 3C
62  std::uint16_t unk48; // 48
63  std::uint16_t attenuation; // 4A
64  std::uint16_t staticMult; // 4C - VNAM
65  std::uint16_t defaultMenuValue; // 4E - UNAM
66  float volumeMult; // 50
67  float frequencyMult; // 54
68  };
69  static_assert(sizeof(BGSSoundCategory) == 0x58);
70 }
Definition: BGSSoundCategory.h:14
std::uint16_t GetCategoryAttenuation() const override
void SetDefaultMenuValue(float a_val)
bool Load(TESFile *a_mod) override
void SetCategoryFrequency(float a_value) override
float GetDefaultMenuValue() const
float GetStaticVolumeMultiplier() const
bool Matches(const BSISoundCategory *a_category) const override
void SetStaticVolumeMultiplier(float a_val)
~BGSSoundCategory() override
float GetCategoryVolume() const override
std::uint16_t defaultMenuValue
Definition: BGSSoundCategory.h:65
float frequencyMult
Definition: BGSSoundCategory.h:67
std::uint32_t unk3C
Definition: BGSSoundCategory.h:60
void SetCategoryAttenuation(std::uint16_t a_value) override
float GetCategoryFrequency() const override
static constexpr auto FORMTYPE
Definition: BGSSoundCategory.h:18
void InitItemImpl() override
REX::EnumSet< Flag, std::uint32_t > flags
Definition: BGSSoundCategory.h:59
std::uint16_t staticMult
Definition: BGSSoundCategory.h:64
Flag
Definition: BGSSoundCategory.h:21
void SetCategoryVolume(float a_value) override
static constexpr auto VTABLE
Definition: BGSSoundCategory.h:17
BGSSoundCategory * parentCategory
Definition: BGSSoundCategory.h:61
void InitializeData() override
static constexpr auto RTTI
Definition: BGSSoundCategory.h:16
std::uint16_t unk48
Definition: BGSSoundCategory.h:62
float volumeMult
Definition: BGSSoundCategory.h:66
std::uint16_t attenuation
Definition: BGSSoundCategory.h:63
bool IsMenuCategory() const
Definition: BSISoundCategory.h:6
Definition: TESFile.h:17
Definition: TESForm.h:36
Definition: TESFullName.h:9
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 3 > VTABLE_BGSSoundCategory
Definition: Offsets_VTABLE.h:8862
constexpr REL::ID RTTI_BGSSoundCategory(static_cast< std::uint64_t >(513995))
Definition: BGSSoundCategory.h:28
RecordFlag
Definition: BGSSoundCategory.h:30
@ kDeleted
Definition: BGSSoundCategory.h:31
@ kIgnored
Definition: BGSSoundCategory.h:32