CommonLibSSE (powerof3)
Loading...
Searching...
No Matches
TESObjectCELL.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/B/BSAtomic.h"
4#include "RE/B/BSBitField.h"
5#include "RE/B/BSContainer.h"
8#include "RE/B/BSTArray.h"
9#include "RE/B/BSTHashMap.h"
10#include "RE/B/BSTList.h"
11#include "RE/C/Color.h"
12#include "RE/E/ExtraDataList.h"
13#include "RE/F/FormTypes.h"
14#include "RE/I/InteriorData.h"
15#include "RE/N/NiSmartPointer.h"
16#include "RE/N/NiTMap.h"
17#include "RE/T/TESForm.h"
18#include "RE/T/TESFullName.h"
19#include "RE/T/TESObjectREFR.h"
20
21namespace RE
22{
23 class TESRegionList;
24
25 namespace BGSWaterCollisionManager
26 {
27 class BGSWaterUpdateI;
28 }
29
31 class bhkWorld;
32 class BSPortalGraph;
33 class NavMesh;
34 class NiNode;
35
37 {
38 public:
39 // members
41 };
42 static_assert(sizeof(BGSTerrainVisibilityData) == 0x8);
43
44 struct EXTERIOR_DATA // XCLC
45 {
46 public:
47 enum class LandHideFlag
48 {
49 kNone = 0,
50 kQuad1 = 1 << 0,
51 kQuad2 = 1 << 1,
52 kQuad3 = 1 << 2,
53 kQuad4 = 1 << 3
54 };
55
56 // members
57 std::int32_t cellX; // 00
58 std::int32_t cellY; // 04
59 char* maxHeightData; // 08
61 float worldX; // 18
62 float worldY; // 1C
64 std::uint8_t pad21; // 21
65 std::uint16_t pad22; // 22
66 std::uint32_t pad24; // 24
67 };
68 static_assert(sizeof(EXTERIOR_DATA) == 0x28);
69
71 {
72 public:
73 // members
75 };
76 static_assert(sizeof(NavMeshArray) == 0x18);
77
110 static_assert(sizeof(LOADED_CELL_DATA) == 0x180);
111
113 public TESForm, // 000
114 public TESFullName // 020
115 {
116 public:
117 inline static constexpr auto RTTI = RTTI_TESObjectCELL;
118 inline static constexpr auto VTABLE = VTABLE_TESObjectCELL;
119 inline static constexpr auto FORMTYPE = FormType::Cell;
120
121 enum class Flag // DATA
122 {
123 kNone = 0,
124 kIsInteriorCell = 1 << 0,
125 kHasWater = 1 << 1,
126 kCanTravelFromHere = 1 << 2,
127 kNoLODWater = 1 << 3,
128 kHasTempData = 1 << 4,
129 kPublicArea = 1 << 5,
130 kHandChanged = 1 << 6,
131 kShowSky = 1 << 7,
132 kUseSkyLighting = 1 << 8,
133 kWarnToLeave = 1 << 9
134 };
135
136 enum class CellState
137 {
138 kAttached = 7
139 };
140
142 {
143 enum ChangeFlag : std::uint32_t
144 {
145 kFlags = 1 << 1,
146 kFullName = 1 << 2,
147 kOwnership = 1 << 3,
148 kExteriorShort = 1 << 28,
149 kExteriorChar = 1 << 29,
150 kDetachTime = 1 << 30,
151 kSeendData = (std::uint32_t)1 << 31
152 };
153 };
154
156 {
157 enum RecordFlag : std::uint32_t
158 {
159 kDeleted = 1 << 5,
160 kPersistent = 1 << 10,
161 kIgnored = 1 << 12,
162 kOffLimits = 1 << 17,
163 kCompressed = 1 << 18,
164 kCantWait = 1 << 19
165 };
166 };
167
169 {
172 };
173 static_assert(sizeof(CellData) == 0x8);
174
175 ~TESObjectCELL() override; // 00
176
177 // override (TESForm)
178 void ClearData() override; // 05
179 bool Load(TESFile* a_mod) override; // 06
180 TESForm* CreateDuplicateForm(bool a_createEditorID, void* a_arg2) override; // 09 - { return 0; }
181 bool FindInFileFast(TESFile* a_mod) override; // 0C
182 void SaveGame(BGSSaveFormBuffer* a_buf) override; // 0E
183 void LoadGame(BGSLoadFormBuffer* a_buf) override; // 0F
184 void Revert(BGSLoadFormBuffer* a_buf) override; // 12
185 void InitItemImpl() override; // 13
186 void GetFormDetailedString(char* a_buf, std::uint32_t a_bufLen) override; // 16
187 void SetAltered(bool a_set) override; // 24
188 bool BelongsInGroup(FORM* a_form, bool a_allowParentGroups, bool a_currentOnly) override; // 30
189 void CreateGroupData(FORM* a_form, FORM_GROUP* a_group) override; // 31
190 const char* GetFormEditorID() const override; // 32
191 bool SetFormEditorID(const char* a_str) override; // 33
192 bool IsParentForm() override; // 34 - { return true; }
193 bool IsFormTypeChild(FormType a_type) override; // 36
194
197 void ForEachReference(std::function<BSContainer::ForEachResult(TESObjectREFR*)> a_callback) const;
198 void ForEachReferenceInRange(const NiPoint3& a_origin, float a_radius, std::function<BSContainer::ForEachResult(TESObjectREFR*)> a_callback) const;
206 TESRegionList* GetRegionList(bool a_createIfMissing);
207 bool GetWaterHeight(const NiPoint3& a_pos, float& a_waterHeight);
208 bool IsAttached() const;
209 bool IsExteriorCell() const;
210 bool IsInteriorCell() const;
211 void SetActorOwner(TESNPC* a_owner);
213 void SetFogColor(Color a_near, Color a_far);
214 void SetFogPlanes(float a_near, float a_far);
215 void SetFogPower(float a_power);
216 void SetHandChanged(bool a_changed);
217 void SetOwner(TESForm* a_owner);
218 void SetPublic(bool a_public);
219 bool UsesSkyLighting() const;
220
221 // members
223 mutable BSSpinLock grassTaskLock; // 038
225 std::uint16_t cellGameFlags; // 042
227 bool autoWaterLoaded; // 045
228 bool cellDetached; // 046
229 std::uint8_t pad047; // 047
231 CellData cellData; // 060 - XCLL if interior, XCLC if exterior
233 float waterHeight; // 070 - XCLW
236 TESForm* unk0B0; // 0B0 - REFR owner of cell?
241 mutable BSSpinLock spinLock; // 118
245 std::uint64_t unk138; // 138
246 };
247#ifndef SKYRIM_SUPPORT_AE
248 static_assert(sizeof(TESObjectCELL) == 0x140);
249#else
250 static_assert(sizeof(TESObjectCELL) == 0x148);
251#endif
252}
Definition EnumSet.h:9
Definition BGSEncounterZone.h:43
Definition BGSLightingTemplate.h:11
Definition BGSLoadFormBuffer.h:11
Definition BGSLocation.h:68
Definition BGSSaveFormBuffer.h:8
Definition TESObjectCELL.h:37
BSBitField * visData
Definition TESObjectCELL.h:40
Definition BSBitField.h:15
Definition BSPortalGraph.h:18
Definition BSTList.h:10
Definition BSAtomic.h:92
Definition BSTArray.h:378
Definition BSTHashMap.h:21
Definition BSTempEffectParticle.h:19
Definition ExtraDataList.h:49
Definition TESObjectCELL.h:71
BSTArray< BSTSmartPointer< NavMesh > > navMeshes
Definition TESObjectCELL.h:74
Definition NavMesh.h:14
Definition NiNode.h:12
Definition NiPoint3.h:6
Definition NiSmartPointer.h:9
Definition NiTMap.h:10
Definition TESFaction.h:120
Definition TESFile.h:17
Definition TESForm.h:36
Definition TESFullName.h:9
Definition TESNPC.h:36
Definition TESObjectCELL.h:115
bool BelongsInGroup(FORM *a_form, bool a_allowParentGroups, bool a_currentOnly) override
BGSLightingTemplate * lightingTemplate
Definition TESObjectCELL.h:244
bool IsExteriorCell() const
bool SetFormEditorID(const char *a_str) override
bool Load(TESFile *a_mod) override
void SetFogColor(Color a_near, Color a_far)
BGSLocation * GetLocation() const
CellData cellData
Definition TESObjectCELL.h:231
void SetOwner(TESForm *a_owner)
TESWorldSpace * worldSpace
Definition TESObjectCELL.h:242
EXTERIOR_DATA * GetCoordinates()
BSSpinLock grassCreateLock
Definition TESObjectCELL.h:222
float GetNorthRotation()
TESForm * unk0B0
Definition TESObjectCELL.h:236
INTERIOR_DATA * GetLighting()
bool cellDetached
Definition TESObjectCELL.h:228
void LoadGame(BGSLoadFormBuffer *a_buf) override
void SetFogPower(float a_power)
void ForEachReferenceInRange(const NiPoint3 &a_origin, float a_radius, std::function< BSContainer::ForEachResult(TESObjectREFR *)> a_callback) const
void SetAltered(bool a_set) override
std::uint8_t pad047
Definition TESObjectCELL.h:229
bool IsFormTypeChild(FormType a_type) override
const char * GetFormEditorID() const override
void SetHandChanged(bool a_changed)
bool IsParentForm() override
bool IsInteriorCell() const
CellState
Definition TESObjectCELL.h:137
void InitItemImpl() override
std::uint64_t unk138
Definition TESObjectCELL.h:245
NavMeshArray * navMeshes
Definition TESObjectCELL.h:234
BSTSet< NiPointer< TESObjectREFR > > references
Definition TESObjectCELL.h:235
BSSpinLock grassTaskLock
Definition TESObjectCELL.h:223
void ClearData() override
float GetExteriorWaterHeight() const
BSSpinLock spinLock
Definition TESObjectCELL.h:241
TESNPC * GetActorOwner()
TESForm * GetOwner()
TESRegionList * GetRegionList(bool a_createIfMissing)
void SetActorOwner(TESNPC *a_owner)
bool GetWaterHeight(const NiPoint3 &a_pos, float &a_waterHeight)
Flag
Definition TESObjectCELL.h:122
LOADED_CELL_DATA * loadedData
Definition TESObjectCELL.h:243
static constexpr auto RTTI
Definition TESObjectCELL.h:117
TESFaction * GetFactionOwner()
BSTArray< void * > unk0D0
Definition TESObjectCELL.h:238
static constexpr auto FORMTYPE
Definition TESObjectCELL.h:119
REX::EnumSet< CellState, std::uint8_t > cellState
Definition TESObjectCELL.h:226
void ForEachReference(std::function< BSContainer::ForEachResult(TESObjectREFR *)> a_callback) const
std::uint16_t cellGameFlags
Definition TESObjectCELL.h:225
bool IsAttached() const
void GetFormDetailedString(char *a_buf, std::uint32_t a_bufLen) override
void CreateGroupData(FORM *a_form, FORM_GROUP *a_group) override
~TESObjectCELL() override
void Revert(BGSLoadFormBuffer *a_buf) override
bhkWorld * GetbhkWorld() const
void SaveGame(BGSSaveFormBuffer *a_buf) override
REX::EnumSet< Flag, std::uint16_t > cellFlags
Definition TESObjectCELL.h:224
void SetFactionOwner(TESFaction *a_owner)
bool autoWaterLoaded
Definition TESObjectCELL.h:227
BSTArray< TESObjectREFR * > objectList
Definition TESObjectCELL.h:237
void SetPublic(bool a_public)
float waterHeight
Definition TESObjectCELL.h:233
bool FindInFileFast(TESFile *a_mod) override
void SetFogPlanes(float a_near, float a_far)
TESObjectLAND * cellLand
Definition TESObjectCELL.h:232
BSTArray< BGSWaterCollisionManager::BGSWaterUpdateI * > waterObjects
Definition TESObjectCELL.h:239
TESForm * CreateDuplicateForm(bool a_createEditorID, void *a_arg2) override
static constexpr auto VTABLE
Definition TESObjectCELL.h:118
bool UsesSkyLighting() const
BSTArray< void * > unk100
Definition TESObjectCELL.h:240
ExtraDataList extraList
Definition TESObjectCELL.h:230
Definition TESObjectLAND.h:46
Definition TESObjectREFR.h:114
Definition TESRegionList.h:10
Definition TESWorldSpace.h:118
Definition bhkWorld.h:14
ForEachResult
Definition BSContainer.h:6
Definition AbsorbEffect.h:6
constexpr REL::ID RTTI_TESObjectCELL(static_cast< std::uint64_t >(513892))
constexpr std::array< REL::ID, 2 > VTABLE_TESObjectCELL
Definition Offsets_VTABLE.h:12861
FormType
Definition FormTypes.h:139
Definition Color.h:8
Definition TESObjectCELL.h:45
std::int32_t cellY
Definition TESObjectCELL.h:58
BGSTerrainVisibilityData * lodVisData
Definition TESObjectCELL.h:60
std::uint32_t pad24
Definition TESObjectCELL.h:66
std::int32_t cellX
Definition TESObjectCELL.h:57
LandHideFlag
Definition TESObjectCELL.h:48
char * maxHeightData
Definition TESObjectCELL.h:59
float worldY
Definition TESObjectCELL.h:62
std::uint16_t pad22
Definition TESObjectCELL.h:65
REX::EnumSet< LandHideFlag, std::uint8_t > landHideFlags
Definition TESObjectCELL.h:63
std::uint8_t pad21
Definition TESObjectCELL.h:64
float worldX
Definition TESObjectCELL.h:61
Definition FORM.h:20
Definition FORM.h:6
Definition InteriorData.h:9
Definition TESObjectCELL.h:79
BSTArray< ObjectRefHandle > unk040
Definition TESObjectCELL.h:90
NiTMap< ObjectRefHandle, NiNode * > emittanceLightRefMap
Definition TESObjectCELL.h:93
volatile std::int32_t queuedDistantRefCount
Definition TESObjectCELL.h:106
NiPointer< NiNode > multiBoundNode
Definition TESObjectCELL.h:86
NiTMap< TESForm *, ObjectRefHandle > emittanceSourceRefMap
Definition TESObjectCELL.h:92
BSTArray< ObjectRefHandle > decalRefs
Definition TESObjectCELL.h:100
NiPointer< NiNode > lightMarkerNode
Definition TESObjectCELL.h:84
std::uint64_t unk028
Definition TESObjectCELL.h:87
std::int32_t unk178
Definition TESObjectCELL.h:107
BSSimpleList< ObjectRefHandle > unk100
Definition TESObjectCELL.h:97
volatile std::int32_t queuedRefCount
Definition TESObjectCELL.h:105
NiTMap< ObjectRefHandle, NiPointer< BSMultiBoundNode > > multiboundRefMap
Definition TESObjectCELL.h:94
volatile std::int32_t criticalQueuedRefCount
Definition TESObjectCELL.h:104
std::uint64_t unk038
Definition TESObjectCELL.h:89
std::uint64_t unk030
Definition TESObjectCELL.h:88
bool refsFullyLoaded
Definition TESObjectCELL.h:108
BSTArray< void * > unk118
Definition TESObjectCELL.h:99
NiTMap< BSMultiBoundNode *, ObjectRefHandle > refMultiboundMap
Definition TESObjectCELL.h:95
NiPointer< BSPortalGraph > portalGraph
Definition TESObjectCELL.h:82
NiPointer< NiNode > cell3D
Definition TESObjectCELL.h:83
BSTArray< ObjectRefHandle > skyActors
Definition TESObjectCELL.h:101
BGSEncounterZone * encounterZone
Definition TESObjectCELL.h:102
NiPointer< NiNode > soundMarkerNode
Definition TESObjectCELL.h:85
BSSimpleList< ObjectRefHandle > activatingRefs
Definition TESObjectCELL.h:96
BSTArray< ObjectRefHandle > flickeringLights
Definition TESObjectCELL.h:91
bool decalsQueued
Definition TESObjectCELL.h:103
std::uint64_t unk110
Definition TESObjectCELL.h:98
Definition TESObjectCELL.h:142
ChangeFlag
Definition TESObjectCELL.h:144
@ kFullName
Definition TESObjectCELL.h:146
@ kExteriorShort
Definition TESObjectCELL.h:148
@ kSeendData
Definition TESObjectCELL.h:151
@ kFlags
Definition TESObjectCELL.h:145
@ kDetachTime
Definition TESObjectCELL.h:150
@ kExteriorChar
Definition TESObjectCELL.h:149
@ kOwnership
Definition TESObjectCELL.h:147
Definition TESObjectCELL.h:156
RecordFlag
Definition TESObjectCELL.h:158
@ kIgnored
Definition TESObjectCELL.h:161
@ kOffLimits
Definition TESObjectCELL.h:162
@ kPersistent
Definition TESObjectCELL.h:160
@ kCompressed
Definition TESObjectCELL.h:163
@ kDeleted
Definition TESObjectCELL.h:159
@ kCantWait
Definition TESObjectCELL.h:164
Definition TESObjectCELL.h:169
EXTERIOR_DATA * exterior
Definition TESObjectCELL.h:170
INTERIOR_DATA * interior
Definition TESObjectCELL.h:171