CommonLibVR
TESGlobal.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSString.h"
4 #include "RE/F/FormTypes.h"
5 #include "RE/T/TESForm.h"
6 
7 namespace RE
8 {
9  class TESGlobal : public TESForm
10  {
11  public:
12  inline static constexpr auto RTTI = RTTI_TESGlobal;
13  inline static constexpr auto VTABLE = VTABLE_TESGlobal;
14  inline static constexpr auto FORMTYPE = FormType::Global;
15 
16  enum class Type
17  {
18  kFloat = 'f',
19  kLong = 'l',
20  kShort = 's'
21  };
22 
23  struct RecordFlags
24  {
25  enum RecordFlag : std::uint32_t
26  {
27  kDeleted = 1 << 5,
28  kConstant = 1 << 6,
29  kIgnored = 1 << 12
30  };
31  };
32 
33  ~TESGlobal() override; // 00
34 
35  // override (TESform)
36  bool Load(TESFile* a_mod) override; // 06
37  const char* GetFormEditorID() const override; // 32 - { return formEditorID.c_str(); }
38  bool SetFormEditorID(const char* a_str) override; // 33 - { formEditorID = a_str; return true; }
39 
40  // members
41  BSString formEditorID; // 20 - EDID
43  std::uint8_t pad31; // 31
44  std::uint16_t pad32; // 32
45  float value; // 34 - FLTV
46  private:
47  KEEP_FOR_RE()
48  };
49  static_assert(sizeof(TESGlobal) == 0x38);
50 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: TESFile.h:17
Definition: TESForm.h:40
Definition: TESGlobal.h:10
static constexpr auto RTTI
Definition: TESGlobal.h:12
static constexpr auto FORMTYPE
Definition: TESGlobal.h:14
stl::enumeration< Type, std::uint8_t > type
Definition: TESGlobal.h:42
bool Load(TESFile *a_mod) override
BSString formEditorID
Definition: TESGlobal.h:41
bool SetFormEditorID(const char *a_str) override
static constexpr auto VTABLE
Definition: TESGlobal.h:13
const char * GetFormEditorID() const override
std::uint8_t pad31
Definition: TESGlobal.h:43
std::uint16_t pad32
Definition: TESGlobal.h:44
float value
Definition: TESGlobal.h:45
Type
Definition: TESGlobal.h:17
~TESGlobal() override
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_TESGlobal(static_cast< std::uint64_t >(513882))
constexpr std::array< REL::ID, 1 > VTABLE_TESGlobal
Definition: Offsets_VTABLE.h:12831
Definition: TESGlobal.h:24
RecordFlag
Definition: TESGlobal.h:26
@ kDeleted
Definition: TESGlobal.h:27
@ kConstant
Definition: TESGlobal.h:28
@ kIgnored
Definition: TESGlobal.h:29