CommonLibSSE (Parapets fork)
Loading...
Searching...
No Matches
BGSReverbParameters.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
7namespace 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 FORMTYPE = FormType::ReverbParam;
16
18 {
19 enum RecordFlag : std::uint32_t
20 {
21 kDeleted = 1 << 5,
22 kIgnored = 1 << 12
23 };
24 };
25
26 struct ReverbParams // DATA
27 {
28 std::uint16_t decayTime; // 00 - in ms
29 std::uint16_t hfReference; // 02 - in Hz
30 std::int8_t roomFilter; // 04
31 std::int8_t roomHFFilter; // 05
32 std::int8_t reflections; // 06
33 std::int8_t reverb; // 07
34 std::int8_t decayHFRatio; // 08
35 std::int8_t reflectionDelay; // 09 - in ms
36 std::int8_t reverbDelay; // 0A - in ms
37 std::int8_t diffusionPct; // 0B
38 std::int8_t densityPct; // 0C
39 std::uint8_t pad0D; // 0D
40 };
41 static_assert(sizeof(ReverbParams) == 0xE);
42
43 ~BGSReverbParameters() override; // 00
44
45 // override (TESForm)
46 void InitializeData() override; // 04
47 bool Load(TESFile* a_mod) override; // 06
48
49 // override (BSIReverbType)
50 std::int32_t DoGetRoomLevel() const override; // 00 - { return data.roomFilter * 100; }
51 std::int32_t DoGetRoomHFLevel() const override; // 01 - { return data.roomHFFilter * 100; }
52 float DoGetDecayTime() const override; // 02 - { return data.decayTime * 0.001; }
53 float DoGetDecayHFRatio() const override; // 03 - { return data.decayHFRatio * 0.0099999998; }
54 std::int32_t DoGetReflectionLevel() const override; // 04 - { return data.reflections * 100; }
55 float DoGetReflectionDelay() const override; // 05 - { return data.reflectDelay * 0.0012000001; }
56 std::int32_t DoGetReverbLevel() const override; // 06 - { return data.reverb * 100; }
57 float DoGetReverbDelay() const override; // 07 - { return data.reverbDelay * 0.001; }
58 float DoGetDiffusion() const override; // 08 - { return data.diffusionPct; }
59 float DoGetDensity() const override; // 09 - { return data.densityPct; }
60 [[nodiscard]] float DoGetHFReference() const override; // 0A - { return data.hfReference; }
61
62 // members
63 ReverbParams data; // 28 - DATA
64 std::uint16_t pad36; // 36
65 };
66 static_assert(sizeof(BGSReverbParameters) == 0x38);
67}
Definition: BGSReverbParameters.h:12
float DoGetDecayTime() const override
std::uint16_t pad36
Definition: BGSReverbParameters.h:64
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:63
std::int32_t DoGetRoomHFLevel() const override
bool Load(TESFile *a_mod) override
static constexpr auto FORMTYPE
Definition: BGSReverbParameters.h:15
std::int32_t DoGetReverbLevel() const override
float DoGetReverbDelay() const override
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:14
Definition: TESForm.h:34
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_BGSReverbParameters
Definition: Offsets_RTTI.h:1524
Definition: BGSReverbParameters.h:18
RecordFlag
Definition: BGSReverbParameters.h:20
@ kIgnored
Definition: BGSReverbParameters.h:22
@ kDeleted
Definition: BGSReverbParameters.h:21
Definition: BGSReverbParameters.h:27
std::int8_t reverb
Definition: BGSReverbParameters.h:33
std::int8_t reflectionDelay
Definition: BGSReverbParameters.h:35
std::int8_t reverbDelay
Definition: BGSReverbParameters.h:36
std::int8_t reflections
Definition: BGSReverbParameters.h:32
std::int8_t diffusionPct
Definition: BGSReverbParameters.h:37
std::uint16_t decayTime
Definition: BGSReverbParameters.h:28
std::int8_t densityPct
Definition: BGSReverbParameters.h:38
std::int8_t decayHFRatio
Definition: BGSReverbParameters.h:34
std::uint8_t pad0D
Definition: BGSReverbParameters.h:39
std::int8_t roomHFFilter
Definition: BGSReverbParameters.h:31
std::int8_t roomFilter
Definition: BGSReverbParameters.h:30
std::uint16_t hfReference
Definition: BGSReverbParameters.h:29