CommonLibSSE NG
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  kConsideredSnow = 1 << 0
16  };
17 
18  // members
19  float materialThresholdAngle; // 00 - (30 - 120)
20  std::uint32_t pad04; // 04
23  std::uint32_t pad14; // 14
24  };
25  static_assert(sizeof(TESObjectSTATData) == 0x18);
26 
27  class TESObjectSTAT :
28  public TESBoundObject, // 00
29  public TESModelTextureSwap // 30
30  {
31  public:
32  inline static constexpr auto RTTI = RTTI_TESObjectSTAT;
33  inline static constexpr auto VTABLE = VTABLE_TESObjectSTAT;
34  inline static constexpr auto FORMTYPE = FormType::Static;
35 
36  struct RecordFlags
37  {
38  enum RecordFlag : std::uint32_t
39  {
40  kNeverFades = 1 << 2,
41  kDeleted = 1 << 5,
43  kHasTreeLOD = 1 << 6,
44  kAddOnLODObject = 1 << 7,
46  kHasDistantLOD = 1 << 15,
47  kUsesHDLODTexture = 1 << 17,
48  kHasCurrents = 1 << 19,
49  kIsMarker = 1 << 23,
50  kObstacle = 1 << 25,
53  kShowInWorldMap = 1 << 28,
55  };
56  };
57 
58  ~TESObjectSTAT() override; // 00
59 
60  // override (TESBoundObject)
61  void ClearData() override; // 05
62  bool Load(TESFile* a_mod) override; // 06
63  void InitItemImpl() override; // 13
64  bool GetPlayable() const override; // 19 - { return true; }
65  [[nodiscard]] bool IsHeadingMarker() const override; // 1A - { return (flags >> 2) & 1; }
66 
67  [[nodiscard]] bool HasTreeLOD() const;
68  [[nodiscard]] bool IsSkyObject() const;
69  [[nodiscard]] bool IsSnowObject() const;
70 
71  // members
72  TESObjectSTATData data; // 68 - DNAM
73  };
74  static_assert(sizeof(TESObjectSTAT) == 0x80);
75 }
Definition: BGSMaterialObject.h:16
Definition: TESBoundObject.h:24
Definition: TESFile.h:17
Definition: TESModelTextureSwap.h:10
Definition: TESObjectSTAT.h:30
bool IsHeadingMarker() const override
bool IsSnowObject() const
void InitItemImpl() override
static constexpr auto RTTI
Definition: TESObjectSTAT.h:32
bool IsSkyObject() const
static constexpr auto FORMTYPE
Definition: TESObjectSTAT.h:34
TESObjectSTATData data
Definition: TESObjectSTAT.h:72
bool HasTreeLOD() const
static constexpr auto VTABLE
Definition: TESObjectSTAT.h:33
bool Load(TESFile *a_mod) override
bool GetPlayable() const override
~TESObjectSTAT() override
void ClearData() override
Definition: AbsorbEffect.h:6
constexpr REL::VariantID RTTI_TESObjectSTAT(513920, 392543, 0x1edab10)
constexpr std::array< REL::VariantID, 2 > VTABLE_TESObjectSTAT
Definition: Offsets_VTABLE.h:551
Definition: TESObjectSTAT.h:10
std::uint32_t pad14
Definition: TESObjectSTAT.h:23
Flag
Definition: TESObjectSTAT.h:13
stl::enumeration< Flag, std::uint32_t > flags
Definition: TESObjectSTAT.h:22
float materialThresholdAngle
Definition: TESObjectSTAT.h:19
std::uint32_t pad04
Definition: TESObjectSTAT.h:20
BGSMaterialObject * materialObj
Definition: TESObjectSTAT.h:21
Definition: TESObjectSTAT.h:37
RecordFlag
Definition: TESObjectSTAT.h:39
@ kShowInWorldMap
Definition: TESObjectSTAT.h:53
@ kUsesHDLODTexture
Definition: TESObjectSTAT.h:47
@ kNeverFades
Definition: TESObjectSTAT.h:40
@ kIsSkyObject
Definition: TESObjectSTAT.h:42
@ kHasCurrents
Definition: TESObjectSTAT.h:48
@ kObstacle
Definition: TESObjectSTAT.h:50
@ kHasTreeLOD
Definition: TESObjectSTAT.h:43
@ kIsMarker
Definition: TESObjectSTAT.h:49
@ kHasDistantLOD
Definition: TESObjectSTAT.h:46
@ kAddOnLODObject
Definition: TESObjectSTAT.h:44
@ kNavMeshGeneration_Ground
Definition: TESObjectSTAT.h:54
@ kNavMeshGeneration_BoundingBox
Definition: TESObjectSTAT.h:52
@ kHiddenFromLocalMap
Definition: TESObjectSTAT.h:45
@ kDeleted
Definition: TESObjectSTAT.h:41
@ kNavMeshGeneration_Filter
Definition: TESObjectSTAT.h:51