CommonLibSSE NG
Loading...
Searching...
No Matches
TESObjectLIGH.h
Go to the documentation of this file.
1#pragma once
2
4#include "RE/B/BGSEquipType.h"
6#include "RE/C/Color.h"
7#include "RE/F/FormTypes.h"
8#include "RE/N/NiColor.h"
10#include "RE/T/TESFullName.h"
11#include "RE/T/TESIcon.h"
13#include "RE/T/TESValueForm.h"
14#include "RE/T/TESWeightForm.h"
15
16namespace RE
17{
18 enum class TES_LIGHT_FLAGS
19 {
20 kNone = 0,
21 kDynamic = 1 << 0,
22 kCanCarry = 1 << 1,
23 kNegative = 1 << 2,
24 kFlicker = 1 << 3,
25 kDeepCopy = 1 << 4,
26 kOffByDefault = 1 << 5,
27 kFlickerSlow = 1 << 6,
28 kPulse = 1 << 7,
29 kPulseSlow = 1 << 8,
30 kSpotlight = 1 << 9,
31 kSpotShadow = 1 << 10,
32 kHemiShadow = 1 << 11,
33 kOmniShadow = 1 << 12,
34 kPortalStrict = 1 << 13,
35
37 };
38
39 struct OBJ_LIGH // DATA
40 {
41 public:
42 // members
43 std::int32_t time; // 00
44 std::uint32_t radius; // 04
45 Color color; // 08
47 float fallofExponent; // 10
48 float fov; // 14
49 float nearDistance; // 18
50 float flickerPeriodRecip; // 1C - CK value * 100
53 };
54 static_assert(sizeof(OBJ_LIGH) == 0x28);
55
57 public TESBoundAnimObject, // 000
58 public TESFullName, // 030
59 public TESModelTextureSwap, // 040
60 public TESIcon, // 078
61 public BGSMessageIcon, // 088
62 public TESWeightForm, // 0A0
63 public TESValueForm, // 0B0
64 public BGSDestructibleObjectForm, // 0C0
65 public BGSEquipType // 0D0
66 {
67 public:
68 inline static constexpr auto RTTI = RTTI_TESObjectLIGH;
69 inline static constexpr auto VTABLE = VTABLE_TESObjectLIGH;
70 inline static constexpr auto FORMTYPE = FormType::Light;
71
73 {
74 enum RecordFlag : std::uint32_t
75 {
76 kDeleted = 1 << 5,
77 kIgnored = 1 << 12,
79 kPortalStrict = 1 << 17,
80 kObstacle = 1 << 25
81 };
82 };
83
84 ~TESObjectLIGH() override; // 00
85
86 // override (TESBoundAnimObject)
87 void InitializeData() override; // 04
88 bool Load(TESFile* a_mod) override; // 06
89 void SaveGame(BGSSaveFormBuffer* a_buf) override; // 0E
90 void LoadGame(BGSLoadFormBuffer* a_buf) override; // 0F
91 void InitItemImpl() override; // 13
92 bool Activate(TESObjectREFR* a_targetRef, TESObjectREFR* a_activatorRef, std::uint8_t a_arg3, TESBoundObject* a_object, std::int32_t a_targetCount) override; // 37
93 void UnClone3D(TESObjectREFR* a_ref) override; // 41
94 NiAVObject* LoadGraphics(TESObjectREFR* a_ref) override; // 47
95 NiAVObject* Clone3D(TESObjectREFR* a_ref) override; // 4A
96
97 // override (BGSEquipType)
98 BGSEquipSlot* GetEquipSlot() const override; // 04
99 void SetEquipSlot(BGSEquipSlot* a_slot) override; // 05 - { return; }
100
101 [[nodiscard]] constexpr bool CanBeCarried() const noexcept { return data.flags.all(TES_LIGHT_FLAGS::kCanCarry); }
102
103 // members
104 OBJ_LIGH data; // 0E0 - DATA
105 float fade; // 108 - FNAM
106 std::uint32_t pad10C; // 10C
109 std::uint32_t pad124; // 124
111 };
112 static_assert(sizeof(TESObjectLIGH) == 0x130);
113}
Definition BGSDestructibleObjectForm.h:61
Definition BGSEquipSlot.h:10
Definition BGSEquipType.h:9
Definition BGSLensFlare.h:12
Definition BGSLoadFormBuffer.h:11
Definition BGSMessageIcon.h:9
Definition BGSSoundDescriptorForm.h:14
Definition NiAVObject.h:50
Definition NiColor.h:11
Definition TESBoundAnimObject.h:8
Definition TESBoundObject.h:24
Definition TESFile.h:15
Definition TESFullName.h:9
Definition TESIcon.h:8
Definition TESModelTextureSwap.h:10
Definition TESObjectLIGH.h:66
float fade
Definition TESObjectLIGH.h:105
OBJ_LIGH data
Definition TESObjectLIGH.h:104
BGSSoundDescriptorForm * sound
Definition TESObjectLIGH.h:107
void SetEquipSlot(BGSEquipSlot *a_slot) override
bool Activate(TESObjectREFR *a_targetRef, TESObjectREFR *a_activatorRef, std::uint8_t a_arg3, TESBoundObject *a_object, std::int32_t a_targetCount) override
static constexpr auto VTABLE
Definition TESObjectLIGH.h:69
void LoadGame(BGSLoadFormBuffer *a_buf) override
void InitializeData() override
static constexpr auto FORMTYPE
Definition TESObjectLIGH.h:70
void UnClone3D(TESObjectREFR *a_ref) override
std::uint32_t pad10C
Definition TESObjectLIGH.h:106
std::uint32_t pad124
Definition TESObjectLIGH.h:109
NiAVObject * LoadGraphics(TESObjectREFR *a_ref) override
void SaveGame(BGSSaveFormBuffer *a_buf) override
bool Load(TESFile *a_mod) override
static constexpr auto RTTI
Definition TESObjectLIGH.h:68
BGSLensFlare * lensFlare
Definition TESObjectLIGH.h:110
constexpr bool CanBeCarried() const noexcept
Definition TESObjectLIGH.h:101
~TESObjectLIGH() override
BGSEquipSlot * GetEquipSlot() const override
NiAVObject * Clone3D(TESObjectREFR *a_ref) override
void InitItemImpl() override
NiColor emittanceColor
Definition TESObjectLIGH.h:108
Definition TESObjectREFR.h:112
Definition TESValueForm.h:8
Definition TESWeightForm.h:8
Definition PCH.h:223
constexpr bool all(Args... a_args) const noexcept
Definition PCH.h:296
Definition AbsorbEffect.h:6
constexpr REL::VariantID RTTI_TESObjectLIGH(513874, 392259, 0x1ed7590)
TES_LIGHT_FLAGS
Definition TESObjectLIGH.h:19
constexpr std::array< REL::VariantID, 9 > VTABLE_TESObjectLIGH
Definition Offsets_VTABLE.h:517
Definition Color.h:8
Definition TESObjectLIGH.h:40
float fov
Definition TESObjectLIGH.h:48
std::int32_t time
Definition TESObjectLIGH.h:43
float flickerMovementAmplitude
Definition TESObjectLIGH.h:52
Color color
Definition TESObjectLIGH.h:45
stl::enumeration< TES_LIGHT_FLAGS, std::uint32_t > flags
Definition TESObjectLIGH.h:46
float flickerIntensityAmplitude
Definition TESObjectLIGH.h:51
float flickerPeriodRecip
Definition TESObjectLIGH.h:50
float fallofExponent
Definition TESObjectLIGH.h:47
std::uint32_t radius
Definition TESObjectLIGH.h:44
float nearDistance
Definition TESObjectLIGH.h:49
Definition TESObjectLIGH.h:73
RecordFlag
Definition TESObjectLIGH.h:75
@ kObstacle
Definition TESObjectLIGH.h:80
@ kRandomAnimStart
Definition TESObjectLIGH.h:78
@ kPortalStrict
Definition TESObjectLIGH.h:79
@ kDeleted
Definition TESObjectLIGH.h:76
@ kIgnored
Definition TESObjectLIGH.h:77