CommonLibSSE (powerof3)
BGSReverbParameters.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSIReverbType.h"
4 #include "RE/F/FormTypes.h"
5 #include "RE/T/TESForm.h"
6 
7 namespace RE
8 {
10  public TESForm, // 00
11  public BSIReverbType // 20
12  {
13  public:
14  inline static constexpr auto RTTI = RTTI_BGSReverbParameters;
15  inline static constexpr auto VTABLE = VTABLE_BGSReverbParameters;
16  inline static constexpr auto FORMTYPE = FormType::ReverbParam;
17 
18  struct RecordFlags
19  {
20  enum RecordFlag : std::uint32_t
21  {
22  kDeleted = 1 << 5,
23  kIgnored = 1 << 12
24  };
25  };
26 
27  struct ReverbParams // DATA
28  {
29  std::uint16_t decayTime; // 00 - in ms
30  std::uint16_t hfReference; // 02 - in Hz
31  std::int8_t roomFilter; // 04
32  std::int8_t roomHFFilter; // 05
33  std::int8_t reflections; // 06
34  std::int8_t reverb; // 07
35  std::int8_t decayHFRatio; // 08
36  std::int8_t reflectionDelay; // 09 - in ms
37  std::int8_t reverbDelay; // 0A - in ms
38  std::int8_t diffusionPct; // 0B
39  std::int8_t densityPct; // 0C
40  std::uint8_t pad0D; // 0D
41  };
42  static_assert(sizeof(ReverbParams) == 0xE);
43 
44  ~BGSReverbParameters() override; // 00
45 
46  // override (TESForm)
47  void InitializeData() override; // 04
48  bool Load(TESFile* a_mod) override; // 06
49 
50  // override (BSIReverbType)
51  std::int32_t DoGetRoomLevel() const override; // 00 - { return data.roomFilter * 100; }
52  std::int32_t DoGetRoomHFLevel() const override; // 01 - { return data.roomHFFilter * 100; }
53  float DoGetDecayTime() const override; // 02 - { return data.decayTime * 0.001; }
54  float DoGetDecayHFRatio() const override; // 03 - { return data.decayHFRatio * 0.0099999998; }
55  std::int32_t DoGetReflectionLevel() const override; // 04 - { return data.reflections * 100; }
56  float DoGetReflectionDelay() const override; // 05 - { return data.reflectDelay * 0.0012000001; }
57  std::int32_t DoGetReverbLevel() const override; // 06 - { return data.reverb * 100; }
58  float DoGetReverbDelay() const override; // 07 - { return data.reverbDelay * 0.001; }
59  float DoGetDiffusion() const override; // 08 - { return data.diffusionPct; }
60  float DoGetDensity() const override; // 09 - { return data.densityPct; }
61  [[nodiscard]] float DoGetHFReference() const override; // 0A - { return data.hfReference; }
62 
63  // members
64  ReverbParams data; // 28 - DATA
65  std::uint16_t pad36; // 36
66  };
67  static_assert(sizeof(BGSReverbParameters) == 0x38);
68 }
Definition: BGSReverbParameters.h:12
float DoGetDecayTime() const override
std::uint16_t pad36
Definition: BGSReverbParameters.h:65
static constexpr auto RTTI
Definition: BGSReverbParameters.h:14
float DoGetReflectionDelay() const override
void InitializeData() override
std::int32_t DoGetRoomLevel() const override
ReverbParams data
Definition: BGSReverbParameters.h:64
std::int32_t DoGetRoomHFLevel() const override
bool Load(TESFile *a_mod) override
static constexpr auto FORMTYPE
Definition: BGSReverbParameters.h:16
std::int32_t DoGetReverbLevel() const override
float DoGetReverbDelay() const override
static constexpr auto VTABLE
Definition: BGSReverbParameters.h:15
std::int32_t DoGetReflectionLevel() const override
~BGSReverbParameters() override
float DoGetHFReference() const override
float DoGetDecayHFRatio() const override
float DoGetDensity() const override
float DoGetDiffusion() const override
Definition: BSIReverbType.h:6
Definition: TESFile.h:17
Definition: TESForm.h:36
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 2 > VTABLE_BGSReverbParameters
Definition: Offsets_VTABLE.h:8846
constexpr REL::ID RTTI_BGSReverbParameters(static_cast< std::uint64_t >(513989))
Definition: BGSReverbParameters.h:19
RecordFlag
Definition: BGSReverbParameters.h:21
@ kIgnored
Definition: BGSReverbParameters.h:23
@ kDeleted
Definition: BGSReverbParameters.h:22
Definition: BGSReverbParameters.h:28
std::int8_t reverb
Definition: BGSReverbParameters.h:34
std::int8_t reflectionDelay
Definition: BGSReverbParameters.h:36
std::int8_t reverbDelay
Definition: BGSReverbParameters.h:37
std::int8_t reflections
Definition: BGSReverbParameters.h:33
std::int8_t diffusionPct
Definition: BGSReverbParameters.h:38
std::uint16_t decayTime
Definition: BGSReverbParameters.h:29
std::int8_t densityPct
Definition: BGSReverbParameters.h:39
std::int8_t decayHFRatio
Definition: BGSReverbParameters.h:35
std::uint8_t pad0D
Definition: BGSReverbParameters.h:40
std::int8_t roomHFFilter
Definition: BGSReverbParameters.h:32
std::int8_t roomFilter
Definition: BGSReverbParameters.h:31
std::uint16_t hfReference
Definition: BGSReverbParameters.h:30