CommonLibSSE (powerof3)
TESObjectSTAT.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/F/FormTypes.h"
4 #include "RE/T/TESBoundObject.h"
6 
7 namespace RE
8 {
9  struct TESObjectSTATData // DNAM
10  {
11  public:
12  enum class Flag
13  {
14  kNone = 0
15  };
16 
17  // members
18  float materialThresholdAngle; // 00 - (30 - 120)
19  std::uint32_t pad04; // 04
22  std::uint32_t pad14; // 14
23  };
24  static_assert(sizeof(TESObjectSTATData) == 0x18);
25 
26  class TESObjectSTAT :
27  public TESBoundObject, // 00
28  public TESModelTextureSwap // 30
29  {
30  public:
31  inline static constexpr auto RTTI = RTTI_TESObjectSTAT;
32  inline static constexpr auto FORMTYPE = FormType::Static;
33 
34  struct RecordFlags
35  {
36  enum RecordFlag : std::uint32_t
37  {
38  kNeverFades = 1 << 2,
39  kDeleted = 1 << 5,
40  kHasTreeLOD = 1 << 6,
41  kAddOnLODObject = 1 << 7,
43  kHasDistantLOD = 1 << 15,
44  kUsesHDLODTexture = 1 << 17,
45  kHasCurrents = 1 << 19,
46  kIsMarker = 1 << 23,
47  kObstacle = 1 << 25,
50  kShowInWorldMap = 1 << 28,
52  };
53  };
54 
55  ~TESObjectSTAT() override; // 00
56 
57  // override (TESBoundObject)
58  void ClearData() override; // 05
59  bool Load(TESFile* a_mod) override; // 06
60  void InitItemImpl() override; // 13
61  bool GetPlayable() const override; // 19 - { return true; }
62  [[nodiscard]] bool IsHeadingMarker() const override; // 1A - { return (flags >> 2) & 1; }
63 
64  [[nodiscard]] bool HasTreeLOD() const;
65 
66  // members
67  TESObjectSTATData data; // 68 - DNAM
68  };
69  static_assert(sizeof(TESObjectSTAT) == 0x80);
70 }
Definition: BGSMaterialObject.h:16
Definition: TESBoundObject.h:24
Definition: TESFile.h:14
Definition: TESModelTextureSwap.h:10
Definition: TESObjectSTAT.h:29
bool IsHeadingMarker() const override
void InitItemImpl() override
static constexpr auto RTTI
Definition: TESObjectSTAT.h:31
static constexpr auto FORMTYPE
Definition: TESObjectSTAT.h:32
TESObjectSTATData data
Definition: TESObjectSTAT.h:67
bool HasTreeLOD() const
bool Load(TESFile *a_mod) override
bool GetPlayable() const override
~TESObjectSTAT() override
void ClearData() override
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_TESObjectSTAT
Definition: Offsets_RTTI.h:6043
Definition: TESObjectSTAT.h:10
std::uint32_t pad14
Definition: TESObjectSTAT.h:22
Flag
Definition: TESObjectSTAT.h:13
stl::enumeration< Flag, std::uint32_t > flags
Definition: TESObjectSTAT.h:21
float materialThresholdAngle
Definition: TESObjectSTAT.h:18
std::uint32_t pad04
Definition: TESObjectSTAT.h:19
BGSMaterialObject * materialObj
Definition: TESObjectSTAT.h:20
Definition: TESObjectSTAT.h:35
RecordFlag
Definition: TESObjectSTAT.h:37
@ kShowInWorldMap
Definition: TESObjectSTAT.h:50
@ kUsesHDLODTexture
Definition: TESObjectSTAT.h:44
@ kNeverFades
Definition: TESObjectSTAT.h:38
@ kHasCurrents
Definition: TESObjectSTAT.h:45
@ kObstacle
Definition: TESObjectSTAT.h:47
@ kHasTreeLOD
Definition: TESObjectSTAT.h:40
@ kIsMarker
Definition: TESObjectSTAT.h:46
@ kHasDistantLOD
Definition: TESObjectSTAT.h:43
@ kAddOnLODObject
Definition: TESObjectSTAT.h:41
@ kNavMeshGeneration_Ground
Definition: TESObjectSTAT.h:51
@ kNavMeshGeneration_BoundingBox
Definition: TESObjectSTAT.h:49
@ kHiddenFromLocalMap
Definition: TESObjectSTAT.h:42
@ kDeleted
Definition: TESObjectSTAT.h:39
@ kNavMeshGeneration_Filter
Definition: TESObjectSTAT.h:48