CommonLibVR
BGSStandardSoundDef.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include "RE/B/BSTArray.h"
5 #include "RE/F/FormTypes.h"
6 #include "RE/I/ID.h"
7 
8 namespace RE
9 {
10  class TESCondition;
11 
13  {
14  public:
15  inline static constexpr auto RTTI = RTTI_BGSStandardSoundDef;
16  inline static constexpr auto VTABLE = VTABLE_BGSStandardSoundDef;
17 
19  {
20  public:
23 
24  // override (BSIPlaybackCharacteristics)
25  std::uint8_t GetFrequencyShift() override; // 01 - { return frequencyShift; }
26  std::uint8_t GetFrequencyVariance() override; // 02 - { return frequencyVariance; }
27  std::uint8_t GetPriority() override; // 03 - { return priority; }
28  std::uint16_t GetStaticAttenuation() override; // 04 - { return staticAttenuation; }
29  std::uint8_t GetDBVariance() override; // 05 - { return dbVariance; }
30 
31  // members
32  std::uint8_t frequencyShift; // 08
33  std::uint8_t frequencyVariance; // 09
34  std::uint8_t priority; // 0A
35  std::uint8_t dbVariance; // 0B
36  std::uint16_t staticAttenuation; // 0C - CK Value * 100
37  std::uint16_t pad0E; // 0E
38  };
39  static_assert(sizeof(SoundPlaybackCharacteristics) == 0x10);
40 
41  struct LengthCharacteristics // LNAM
42  {
43  enum class Looping
44  {
45  kNone = 0,
46  kLoop = 1 << 3,
47  kEnvelopeFast = 1 << 4,
48  kEnvelopeSlow = 1 << 5
49  };
50 
51  std::uint8_t unk0; // 0
53  std::uint8_t unk2; // 2
54  std::uint8_t rumbleSendValue; // 3
55  };
56  static_assert(sizeof(LengthCharacteristics) == 0x4);
57 
58  ~BGSStandardSoundDef() override; // 00
59 
60  // override (BGSSoundDescriptor)
61  void Unk_01(void) override; // 01
62  void Unk_02(void) override; // 02
63  void InitSound(TESForm* a_src) override; // 03
64  bool LoadSound(TESFile* a_mod) override; // 04
65  std::uint32_t GetType() const override; // 05 - "BGSStandardSoundDef"
66  void Unk_06(void) override; // 06
67 
68  // members
71  TESCondition* conditions; // 40 - CTDA
72  BGSSoundOutput* outputModel; // 48 - ONAM
74  std::int32_t unk54; // 54
75  private:
76  KEEP_FOR_RE()
77  };
78  static_assert(sizeof(BGSStandardSoundDef) == 0x58);
79 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: BGSSoundDescriptor.h:12
Definition: BGSSoundOutput.h:12
Definition: BGSStandardSoundDef.h:13
BSTArray< BSResource::ID > soundFiles
Definition: BGSStandardSoundDef.h:69
void Unk_06(void) override
BGSSoundOutput * outputModel
Definition: BGSStandardSoundDef.h:72
TESCondition * conditions
Definition: BGSStandardSoundDef.h:71
static constexpr auto VTABLE
Definition: BGSStandardSoundDef.h:16
std::int32_t unk54
Definition: BGSStandardSoundDef.h:74
void Unk_02(void) override
SoundPlaybackCharacteristics soundCharacteristics
Definition: BGSStandardSoundDef.h:70
LengthCharacteristics lengthCharacteristics
Definition: BGSStandardSoundDef.h:73
std::uint32_t GetType() const override
bool LoadSound(TESFile *a_mod) override
~BGSStandardSoundDef() override
void InitSound(TESForm *a_src) override
void Unk_01(void) override
static constexpr auto RTTI
Definition: BGSStandardSoundDef.h:15
Definition: BSISoundDescriptor.h:12
Definition: BSTArray.h:378
Definition: TESCondition.h:992
Definition: TESFile.h:17
Definition: TESForm.h:40
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_BGSStandardSoundDef__SoundPlaybackCharacteristics
Definition: Offsets_VTABLE.h:8868
constexpr REL::ID RTTI_BGSStandardSoundDef__SoundPlaybackCharacteristics(static_cast< std::uint64_t >(685297))
constexpr std::array< REL::ID, 1 > VTABLE_BGSStandardSoundDef
Definition: Offsets_VTABLE.h:8867
constexpr REL::ID RTTI_BGSStandardSoundDef(static_cast< std::uint64_t >(685296))
Definition: BGSStandardSoundDef.h:42
Looping
Definition: BGSStandardSoundDef.h:44
stl::enumeration< Looping, std::uint8_t > looping
Definition: BGSStandardSoundDef.h:52
std::uint8_t unk0
Definition: BGSStandardSoundDef.h:51
std::uint8_t rumbleSendValue
Definition: BGSStandardSoundDef.h:54
std::uint8_t unk2
Definition: BGSStandardSoundDef.h:53
Definition: BGSStandardSoundDef.h:19
static constexpr auto VTABLE
Definition: BGSStandardSoundDef.h:22
static constexpr auto RTTI
Definition: BGSStandardSoundDef.h:21
std::uint8_t priority
Definition: BGSStandardSoundDef.h:34
std::uint16_t staticAttenuation
Definition: BGSStandardSoundDef.h:36
std::uint8_t frequencyVariance
Definition: BGSStandardSoundDef.h:33
std::uint8_t dbVariance
Definition: BGSStandardSoundDef.h:35
std::uint8_t frequencyShift
Definition: BGSStandardSoundDef.h:32
std::uint16_t pad0E
Definition: BGSStandardSoundDef.h:37