Skip to content

Commit

Permalink
Update NiTPointerList members
Browse files Browse the repository at this point in the history
  • Loading branch information
powerof3 committed Dec 28, 2024
1 parent b9a2c66 commit f1ffe13
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 68 deletions.
80 changes: 36 additions & 44 deletions include/RE/B/BSLight.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "RE/N/NiPoint3.h"
#include "RE/N/NiRefObject.h"
#include "RE/N/NiSmartPointer.h"
#include "RE/N/NiTPointerList.h"

namespace RE
{
Expand All @@ -23,22 +24,13 @@ namespace RE
inline static constexpr auto RTTI = RTTI_BSLight;
inline static constexpr auto VTABLE = VTABLE_BSLight;

struct ShapeData
template <class T>
class FadeNodeListT : public NiTPointerList<T>
{
std::uint64_t unk00; // 00
std::uint64_t unk08; // 08
NiPointer<BSTriShape> fenceShape; // 10
public:
NiTListItem<NiPointer<BSFadeNode>>* fence; // 18
};
static_assert(sizeof(ShapeData) == 0x18);

struct Data
{
std::uint64_t unk00; // 00
std::uint64_t unk08; // 08
std::uint32_t unk10; // 10
ShapeData* data; // 18
};
static_assert(sizeof(Data) == 0x20);
static_assert(sizeof(FadeNodeListT<void*>) == 0x20);

~BSLight() override; // 00

Expand All @@ -47,36 +39,36 @@ namespace RE
virtual bool IsShadowLight(); // 03

// members
float luminance; // 010
float lodDimmer; // 014
Data unk018; // 018
std::uint64_t unk038; // 038
std::uint32_t unk040; // 040
bool pointLight; // 044
bool ambientLight; // 045
bool dynamic; // 046
bool portalStrict; // 047
NiPointer<NiLight> light; // 048
NiPoint3 worldTranslate; // 050
std::uint32_t frustrumCull; // 05C
std::uint8_t unk060; // 060
bool affectLand; // 061
bool affectWater; // 062
bool neverFades; // 063
std::uint32_t unk064; // 064
std::uint64_t unk068; // 068
std::uint8_t unk070[96]; // 070
std::uint8_t unk0D0; // 0D0
std::uint8_t pad0D1; // 0D1
std::uint16_t pad0D2; // 0D2
std::uint32_t pad0D4; // 0D4
BSTArray<BSMultiBoundRoom*> rooms; // 0D8
BSTArray<BSPortal*> portals; // 0F0
BSTArray<BSPortalSharedNode*> portalSharedNodes; // 108
BSPortalGraph* portalGraph; // 120
BSCullingProcess* cullingProcess; // 128
NiPointer<NiAVObject> objectNode; // 130
BSLensFlareRenderData* lensFlareData; // 138
float luminance; // 010
float lodDimmer; // 014
FadeNodeListT<NiPointer<BSTriShape>> geomListFence; // 018
std::uint64_t unk038; // 038
std::uint32_t unk040; // 040
bool pointLight; // 044
bool ambientLight; // 045
bool dynamic; // 046
bool portalStrict; // 047
NiPointer<NiLight> light; // 048
NiPoint3 worldTranslate; // 050
std::uint32_t frustrumCull; // 05C
std::uint8_t unk060; // 060
bool affectLand; // 061
bool affectWater; // 062
bool neverFades; // 063
std::uint32_t unk064; // 064
NiTListItem<NiPointer<BSTriShape>>* fenceShape; // 068
std::uint8_t unk070[96]; // 070
std::uint8_t unk0D0; // 0D0
std::uint8_t pad0D1; // 0D1
std::uint16_t pad0D2; // 0D2
std::uint32_t pad0D4; // 0D4
BSTArray<BSMultiBoundRoom*> rooms; // 0D8
BSTArray<BSPortal*> portals; // 0F0
BSTArray<BSPortalSharedNode*> portalSharedNodes; // 108
BSPortalGraph* portalGraph; // 120
BSCullingProcess* cullingProcess; // 128
NiPointer<NiAVObject> objectNode; // 130
BSLensFlareRenderData* lensFlareData; // 138
};
static_assert(sizeof(BSLight) == 0x140);
}
23 changes: 3 additions & 20 deletions include/RE/B/BSPortalGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "RE/B/BSTArray.h"
#include "RE/N/NiRefObject.h"
#include "RE/N/NiSmartPointer.h"
#include "RE/N/NiTPointerList.h"

namespace RE
{
Expand All @@ -19,29 +20,11 @@ namespace RE
inline static constexpr auto RTTI = RTTI_BSPortalGraph;
inline static constexpr auto VTABLE = VTABLE_BSPortalGraph;

template <typename T>
struct ListEntry
{
ListEntry<T>* next; // 00
ListEntry<T>* prev; // 08
T* value; // 10
};
static_assert(sizeof(ListEntry<BSPortal>) == 0x18);

template <typename T>
struct List
{
ListEntry<T>* first; // 00
ListEntry<T>* last; // 08
uint32_t count; // 10
};
static_assert(sizeof(List<BSPortal>) == 0x18);

~BSPortalGraph() override; // 00

// members
List<BSOcclusionShape> occlusionShapes; // 10
List<BSPortal> portals; // 28
NiTPointerList<BSOcclusionShape> occlusionShapes; // 10
NiTPointerList<BSPortal> portals; // 28
BSTArray<NiPointer<BSMultiBoundRoom>> rooms; // 40
BSTArray<NiPointer<NiAVObject>> unk58; // 58
NiPointer<BSPortalSharedNode> portalSharedNode; // 70
Expand Down
8 changes: 4 additions & 4 deletions include/RE/B/BSShaderPropertyLightData.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ namespace RE
{
public:
// members
BSTArray<BSLight*> lights; // 00
std::int32_t unk18; // 18
std::uint32_t unk1C; // 1C
std::uint8_t unk20; // 20
BSTArray<BSLight*> lights; // 00
std::int32_t lightListFence; // 18
std::uint32_t unk1C; // 1C
bool lightListChanged; // 20
};
static_assert(sizeof(BSShaderPropertyLightData) == 0x28);
}

0 comments on commit f1ffe13

Please sign in to comment.