CommonLibSSE NG
Loading...
Searching...
No Matches
BGSLocation.h
Go to the documentation of this file.
1#pragma once
2
5#include "RE/B/BSTArray.h"
6#include "RE/B/BSTHashMap.h"
7#include "RE/B/BSTTuple.h"
8#include "RE/F/FormTypes.h"
10#include "RE/T/TESForm.h"
11#include "RE/T/TESFullName.h"
12
13namespace RE
14{
15 class QueuedPromoteLocationReferencesTask;
16
18 {
19 public:
20 union CellKey
21 {
23 std::uint32_t raw;
24 };
25 static_assert(sizeof(CellKey) == 0x4);
26
27 // members
31 };
32 static_assert(sizeof(UnloadedRefData) == 0xC);
33
34 struct SpecialRefData // LCSR
35 {
36 public:
37 // members
40 std::uint32_t pad14; // 14
41 };
42 static_assert(sizeof(SpecialRefData) == 0x18);
43
44 struct UniqueNPCData // LCUN
45 {
46 public:
47 // members
48 Actor* actor; // 00
50 std::uint32_t pad0C; // 0C
52 };
53 static_assert(sizeof(UniqueNPCData) == 0x18);
54
56 {
57 public:
58 // members
61 };
62 static_assert(sizeof(OverrideData) == 0x48);
63
65 public TESForm, // 00
66 public TESFullName, // 20
67 public BGSKeywordForm // 30
68 {
69 public:
70 inline static constexpr auto RTTI = RTTI_BGSLocation;
71 inline static constexpr auto VTABLE = VTABLE_BGSLocation;
72 inline static constexpr auto FORMTYPE = FormType::Location;
73
75 {
76 enum ChangeFlag : std::uint32_t
77 {
78 kKeywordData = 1 << 30,
79 kCleared = (std::uint32_t)1 << 31
80 };
81 };
82
84 {
85 enum RecordFlag : std::uint32_t
86 {
87 kDeleted = 1 << 5,
88 kIgnored = 1 << 12,
89 kCleared = (std::uint32_t)1 << 31
90 };
91 };
92
94 {
95 public:
96 // members
98 float data; // 08
99 std::uint32_t pad0C; // 0C
100 };
101 static_assert(sizeof(KEYWORD_DATA) == 0x10);
102
103 ~BGSLocation() override; // 00
104
105 // override (TESForm)
106 void InitializeData() override; // 04
107 bool Load(TESFile* a_mod) override; // 06
108 bool FindInFileFast(TESFile* a_mod) override; // 0C
109 void SaveGame(BGSSaveFormBuffer* a_buf) override; // 0E
110 void LoadGame(BGSLoadFormBuffer* a_buf) override; // 0F
111 void Revert(BGSLoadFormBuffer* a_buf) override; // 12
112 void InitItemImpl() override; // 13
113
114 [[nodiscard]] bool IsCleared() const;
115 [[nodiscard]] bool IsChild(const BGSLocation* a_possibleChild) const;
116 [[nodiscard]] bool IsParent(const BGSLocation* a_possibleParent) const;
117 [[nodiscard]] bool IsLoaded() const;
118
119 // members
120 BGSLocation* parentLoc; // 48 - PNAM
122 BGSMusicType* musicType; // 58 - NAM1
124 float worldLocRadius; // 64 - RNAM
126 std::uint32_t pad6C; // 6C
132 volatile std::int32_t loadedCount; // C8
133 std::uint32_t fileOffset; // CC
135 std::uint32_t lastChecked; // E8
136 bool cleared; // EC
137 bool everCleared; // ED
138 std::uint16_t padEE; // EE
139 };
140 static_assert(sizeof(BGSLocation) == 0xF0);
141}
Definition Actor.h:131
Definition BGSKeywordForm.h:12
Definition BGSKeyword.h:10
Definition BGSLoadFormBuffer.h:11
Definition BGSLocation.h:68
std::uint32_t pad6C
Definition BGSLocation.h:126
void Revert(BGSLoadFormBuffer *a_buf) override
OverrideData * overrideData
Definition BGSLocation.h:129
float worldLocRadius
Definition BGSLocation.h:124
bool IsParent(const BGSLocation *a_possibleParent) const
bool IsCleared() const
static constexpr auto FORMTYPE
Definition BGSLocation.h:72
NiPointer< QueuedPromoteLocationReferencesTask > promoteRefsTask
Definition BGSLocation.h:130
bool Load(TESFile *a_mod) override
void InitItemImpl() override
BSTArray< SpecialRefData > specialRefs
Definition BGSLocation.h:127
ObjectRefHandle worldLocMarker
Definition BGSLocation.h:123
static constexpr auto RTTI
Definition BGSLocation.h:70
BSTArray< UniqueNPCData > uniqueNPCs
Definition BGSLocation.h:128
bool everCleared
Definition BGSLocation.h:137
bool IsLoaded() const
BGSLocation * parentLoc
Definition BGSLocation.h:120
ObjectRefHandle horseLocMarker
Definition BGSLocation.h:125
std::uint16_t padEE
Definition BGSLocation.h:138
BSTArray< ObjectRefHandle > promotedRefs
Definition BGSLocation.h:131
bool IsChild(const BGSLocation *a_possibleChild) const
BSTArray< KEYWORD_DATA > keywordData
Definition BGSLocation.h:134
void InitializeData() override
bool cleared
Definition BGSLocation.h:136
static constexpr auto VTABLE
Definition BGSLocation.h:71
bool FindInFileFast(TESFile *a_mod) override
TESFaction * unreportedCrimeFaction
Definition BGSLocation.h:121
~BGSLocation() override
volatile std::int32_t loadedCount
Definition BGSLocation.h:132
BGSMusicType * musicType
Definition BGSLocation.h:122
std::uint32_t lastChecked
Definition BGSLocation.h:135
void LoadGame(BGSLoadFormBuffer *a_buf) override
std::uint32_t fileOffset
Definition BGSLocation.h:133
void SaveGame(BGSSaveFormBuffer *a_buf) override
Definition BGSLocationRefType.h:9
Definition BGSMusicType.h:13
Definition BSTArray.h:377
Definition BSTHashMap.h:21
Definition NiSmartPointer.h:9
Definition TESFaction.h:120
Definition TESFile.h:15
Definition TESForm.h:35
Definition TESFullName.h:9
Definition AbsorbEffect.h:6
std::uint32_t FormID
Definition BSCoreTypes.h:5
constexpr std::array< REL::VariantID, 3 > VTABLE_BGSLocation
Definition Offsets_VTABLE.h:570
constexpr REL::VariantID RTTI_BGSLocation(513980, 392856, 0x1edf730)
Definition BGSLocation.h:75
ChangeFlag
Definition BGSLocation.h:77
@ kKeywordData
Definition BGSLocation.h:78
@ kCleared
Definition BGSLocation.h:79
Definition BGSLocation.h:94
std::uint32_t pad0C
Definition BGSLocation.h:99
float data
Definition BGSLocation.h:98
BGSKeyword * keyword
Definition BGSLocation.h:97
Definition BGSLocation.h:84
RecordFlag
Definition BGSLocation.h:86
@ kIgnored
Definition BGSLocation.h:88
@ kCleared
Definition BGSLocation.h:89
@ kDeleted
Definition BGSLocation.h:87
Definition BSTTuple.h:9
Definition BGSLocation.h:56
BSTArray< UnloadedRefData > addedData
Definition BGSLocation.h:59
BSTSet< FormID > removedData
Definition BGSLocation.h:60
Definition BGSLocation.h:35
std::uint32_t pad14
Definition BGSLocation.h:40
UnloadedRefData refData
Definition BGSLocation.h:39
BGSLocationRefType * type
Definition BGSLocation.h:38
Definition BGSLocation.h:45
FormID refID
Definition BGSLocation.h:49
Actor * actor
Definition BGSLocation.h:48
BGSLocation * editorLoc
Definition BGSLocation.h:51
std::uint32_t pad0C
Definition BGSLocation.h:50
Definition BGSLocation.h:18
CellKey cellKey
Definition BGSLocation.h:30
FormID refID
Definition BGSLocation.h:28
FormID parentSpaceID
Definition BGSLocation.h:29
Definition BGSLocation.h:21
BSTTuple< std::int16_t, std::int16_t > xy
Definition BGSLocation.h:22
std::uint32_t raw
Definition BGSLocation.h:23