Skip to content

Commit db7bd70

Browse files
committed
feat: merge upstream
2 parents 2200d52 + 11fe3a2 commit db7bd70

52 files changed

Lines changed: 745 additions & 535 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

include/RE/B/BGSDecalManager.h

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
#pragma once
22

33
#include "RE/B/BSTArray.h"
4+
#include "RE/B/BSTempEffectSimpleDecal.h"
45
#include "RE/N/NiSmartPointer.h"
56

67
namespace RE
78
{
8-
class BGSDecalEmitter;
9-
class BGSDecalNode;
109
class BSShaderAccumulator;
11-
class BSTempEffect;
1210
class NiCamera;
1311

1412
class BGSDecalManager
@@ -21,21 +19,21 @@ namespace RE
2119
}
2220

2321
// members
24-
std::uint32_t unk00; // 00
25-
std::uint32_t decalCountCurrentFrame; // 04
26-
std::uint32_t skinDecalCountCurrentFrame; // 08
27-
std::uint32_t decalCount; // 0C
28-
std::uint32_t skinDecalCount; // 10
29-
bool unk14; // 14
30-
std::uint8_t pad15; // 15
31-
std::uint16_t pad16; // 16
32-
BSTArray<NiPointer<BSTempEffect>> decals; // 18
33-
BSTArray<NiPointer<BGSDecalEmitter>> decalEmitters; // 30
34-
BSTArray<NiPointer<BGSDecalNode>> decalNodes; // 48
35-
BSTArray<NiPointer<BSTempEffect>> unk60; // 60
36-
NiPointer<NiCamera> camera; // 78
37-
NiPointer<BSShaderAccumulator> shaderAccumulator; // 80
38-
std::uint32_t unk88; // 88
22+
std::uint32_t unk00; // 00
23+
std::uint32_t decalCountCurrentFrame; // 04
24+
std::uint32_t skinDecalCountCurrentFrame; // 08
25+
std::uint32_t decalCount; // 0C
26+
std::uint32_t skinDecalCount; // 10
27+
bool unk14; // 14
28+
std::uint8_t pad15; // 15
29+
std::uint16_t pad16; // 16
30+
BSTArray<NiPointer<BSTempEffect>> decals; // 18
31+
BSTArray<NiPointer<BGSDecalEmitter>> decalEmitters; // 30
32+
BSTArray<NiPointer<BGSDecalNode>> decalNodes; // 48
33+
BSTArray<NiPointer<BSTempEffectSimpleDecal>> simpleDecals; // 60
34+
NiPointer<NiCamera> camera; // 78
35+
NiPointer<BSShaderAccumulator> shaderAccumulator; // 80
36+
std::uint32_t unk88; // 88
3937
};
4038
static_assert(sizeof(BGSDecalManager) == 0x90);
4139
};

include/RE/B/BGSGrassManager.h

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@
22

33
#include "RE/B/BSAtomic.h"
44
#include "RE/B/BSTArray.h"
5+
#include "RE/B/BSTHashMap.h"
56
#include "RE/B/BSTSingleton.h"
67
#include "RE/N/NiSmartPointer.h"
78

89
namespace RE
910
{
1011
class NiNode;
1112

13+
struct GrassType
14+
{
15+
BSMultiStreamInstanceTriShape* typeShape; // 00
16+
ModelDBHandle typeModelHandle; // 08
17+
};
18+
static_assert(sizeof(GrassType) == 0x10);
19+
1220
class BGSGrassManager : public BSTSingletonSDM<BGSGrassManager>
1321
{
1422
public:
@@ -19,29 +27,25 @@ namespace RE
1927
}
2028

2129
// members
22-
bool generateGrassDataFiles; // 01
23-
std::uint8_t unk02; // 02
24-
std::uint16_t unk04; // 04
25-
std::uint32_t unk08; // 08
26-
std::uint32_t unk0C; // 0C
27-
std::uint64_t unk10; // 10 - BSTHashMap<std::uint64_t, GrassType*> ?
28-
std::uint64_t unk18; // 18
29-
std::uint64_t unk20; // 20
30-
std::uint64_t unk28; // 28
31-
std::uint64_t unk30; // 30
32-
mutable BSReadWriteLock lock; // 38
33-
std::uint32_t unk40; // 40
34-
std::uint32_t pad44; // 44
35-
BSTArray<void*> unk48; // 48
36-
float totalGrassRange; // 60
37-
std::uint32_t pad64; // 64
38-
NiPointer<NiNode> grassNode; // 68
39-
std::uint32_t grassEvalSize; // 70
40-
std::uint32_t grassEvalSizeSquared; // 74
41-
std::uint32_t grassPatchSize; // 78
42-
std::uint32_t unk7C; // 7C
43-
std::uint16_t* instanceData; // 80
44-
bool enableGrass; // 88
30+
bool generateGrassDataFiles; // 01
31+
std::uint8_t unk02; // 02
32+
std::uint16_t unk04; // 04
33+
std::uint32_t unk08; // 08
34+
std::uint32_t unk0C; // 0C
35+
BSTFixedHashMap<uint64_t, GrassType*> unk10; // 10
36+
mutable BSReadWriteLock lock; // 38
37+
volatile mutable std::uint32_t grassShapeLock; // 40
38+
std::uint32_t pad44; // 44
39+
BSTArray<BSMultiStreamInstanceTriShape*> grassShapes; // 48
40+
float totalGrassRange; // 60
41+
std::uint32_t pad64; // 64
42+
NiPointer<NiNode> grassNode; // 68
43+
std::uint32_t grassEvalSize; // 70
44+
std::uint32_t grassEvalSizeSquared; // 74
45+
std::uint32_t grassPatchSize; // 78
46+
std::uint32_t unk7C; // 7C
47+
std::uint16_t* instanceData; // 80
48+
bool enableGrass; // 88
4549
};
4650
static_assert(sizeof(BGSGrassManager) == 0x90);
4751
}

include/RE/B/BSAudioManager.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,11 @@ namespace RE
4343
void ClearCache();
4444
void ComposeMessage(SOUND_MSG a_message, std::uint32_t a_id = 0, std::int32_t a_iData = 0, void* a_pData = nullptr, NiPointer<NiAVObject> a_spData = nullptr, const NiPoint3& a_vector3 = {});
4545
bool GetSoundHandle(BSSoundHandle& a_soundHandle, BSISoundDescriptor* a_descriptor, std::uint32_t a_flags = 0x1A);
46+
void GetSoundHandleByFile(BSSoundHandle& a_soundHandle, const BSResource::ID& a_file, std::uint32_t a_flags, std::uint32_t a_priority);
47+
void GetSoundHandleByName(BSSoundHandle& a_soundHandle, const char* a_editorID, std::uint32_t a_flags);
4648
void KillAll(bool a_waitForCompletion = false, std::uint32_t a_waitTicks = 1000);
4749
bool Play(FormID a_soundFormID);
4850
bool Play(BSISoundDescriptor* a_descriptor);
49-
bool BuildSoundDataFromDescriptor(BSSoundHandle& a_soundHandle, BSISoundDescriptor* a_descriptor, std::uint32_t a_flags = 0x1A);
50-
void BuildSoundDataFromEditorID(BSSoundHandle& a_soundHandle, const char* a_editorID, std::uint32_t a_flags);
51-
void BuildSoundDataFromFile(BSSoundHandle& a_soundHandle, const BSResource::ID& a_file, std::uint32_t a_flags, std::uint32_t a_priority);
5251
void PrecacheDescriptor(const BSISoundDescriptor* a_descriptor, std::uint32_t a_flags);
5352
void SetCacheEnabled(bool a_enabled);
5453

include/RE/B/BSBatchRenderer.h

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#pragma once
22

3+
#include "RE/B/BSSimpleList.h"
34
#include "RE/B/BSTArray.h"
45
#include "RE/B/BSTHashMap.h"
56

@@ -41,21 +42,23 @@ namespace RE
4142
virtual ~BSBatchRenderer(); // 00
4243

4344
// add
44-
virtual void Unk_01(void); // 01
45-
virtual void Unk_02(void); // 02
46-
virtual void Unk_03(void); // 03
45+
virtual void RegisterPassSorted(BSRenderPass* renderPass, std::uint32_t techniqueID); // 01
46+
virtual void RegisterPass(BSRenderPass* renderPass, std::uint32_t techniqueID); // 02
47+
virtual void RenderActivePassRange(std::uint32_t firstPass, std::uint32_t lastPass, std::uint32_t renderFlags); // 03
4748

4849
// members
49-
BSTArray<void*> unk008; // 008
50-
BSTHashMap<UnkKey, UnkValue> unk020; // 020
51-
std::uint64_t unk050; // 050
52-
std::uint64_t unk058; // 058
53-
std::uint64_t unk060; // 060
54-
std::uint64_t unk068; // 068
55-
GeometryGroup* geometryGroups[16]; // 070
56-
GeometryGroup* alphaGroup; // 0F0
57-
void* unk0F8; // 0F8
58-
void* unk100; // 100
50+
BSTArray<PassGroup*> renderPass; // 008
51+
BSTFixedHashMap<uint32_t, uint32_t> renderPassMap; // 020 Technique ID -> Index in renderPass
52+
std::uint64_t unk48; // 048
53+
std::uint32_t currentFirstPass; // 050
54+
std::uint32_t currentLastPass; // 054
55+
BSSimpleList<uint32_t> activePassIndexList; // 060
56+
std::uint32_t groupingAlphasCount; // 064
57+
bool autoClearPasses; // 068
58+
GeometryGroup* geometryGroups[16]; // 070
59+
GeometryGroup* alphaGroup; // 0F0
60+
void* unk0F8; // 0F8
61+
void* unk100; // 100
5962
};
6063
static_assert(sizeof(BSBatchRenderer) == 0x108);
6164
}

include/RE/B/BSCubeMapCamera.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#pragma once
2+
3+
#include "RE/N/NiCamera.h"
4+
#include "RE/N/NiRTTI.h"
5+
6+
namespace RE
7+
{
8+
class BSCubeMapCamera : public NiCamera
9+
{
10+
public:
11+
inline static constexpr auto RTTI = RTTI_BSCubeMapCamera;
12+
inline static constexpr auto Ni_RTTI = NiRTTI_BSCubeMapCamera;
13+
inline static constexpr auto VTABLE = VTABLE_BSCubeMapCamera;
14+
15+
virtual ~BSCubeMapCamera() override { Dtor(); }; // 00
16+
17+
// override (NiCamera)
18+
const NiRTTI* GetRTTI() const override; // 02
19+
20+
private:
21+
void Dtor();
22+
};
23+
}

include/RE/B/BSCullingProcess.h

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,14 @@ namespace RE
4444
struct AlphaGroup
4545
{
4646
public:
47-
std::int8_t unk00[0x30]; // 00
48-
std::uint32_t count; // 30
49-
std::uint32_t pad34; // 34
47+
void* unk00; // 00 - struct of size 0x108
48+
AlphaGroup* unk08; // 08
49+
void* unk10; // 10
50+
void* unk18; // 18
51+
void* unk20; // 20 - all ptr to same struct
52+
std::uint64_t unk28; // 28
53+
std::uint32_t count; // 30
54+
std::uint32_t pad34; // 34
5055
};
5156
static_assert(sizeof(AlphaGroup) == 0x38);
5257

@@ -67,20 +72,20 @@ namespace RE
6772

6873
bool AddShared(NiAVObject* a_object);
6974

70-
BSTArray<NiPointer<NiAVObject>> objectArray; // 00128
71-
BSTLocklessQueue::ObjMultiProdCons<Data, 4096, 0> cullQueue; // 00140
72-
BSTHashMap<NiAVObject*, bool> roomSharedMap; // 30160
73-
BSPortalGraphEntry* portalGraphEntry; // 30190
74-
REX::TEnum<BSCPCullingType> cullMode; // 30198
75-
BSCompoundFrustum* compoundFrustum; // 301A0
76-
REX::TEnum<BSCPCullingType> cullModeStack[10]; // 301A8
77-
std::uint32_t cullModeStackIndex; // 301D0
78-
bool recurseToGeometry; // 301D4
79-
bool isGroupingAlphas; // 301D5
80-
std::uint16_t unk301D6; // 301D6
81-
BSTArray<AlphaGroup*> alphaGroups; // 301D8
82-
std::int32_t alphaGroupIndex; // 301F0
83-
std::uint32_t unk301F4; // 301F4
75+
BSTArray<NiPointer<NiAVObject>> objectArray; // 00128
76+
BSTLocklessQueue::ObjMultiProdCons<Data, 4096, 0> cullQueue; // 00140
77+
BSTHashMap<NiAVObject*, bool> roomSharedMap; // 30160
78+
BSPortalGraphEntry* portalGraphEntry; // 30190
79+
REX::TEnum<BSCPCullingType> cullMode; // 30198
80+
BSCompoundFrustum* compoundFrustum; // 301A0
81+
REX::TEnum<BSCPCullingType> cullModeStack[10]; // 301A8
82+
std::uint32_t cullModeStackIndex; // 301D0
83+
bool recurseToGeometry; // 301D4
84+
bool isGroupingAlphas; // 301D5
85+
std::uint16_t unk301D6; // 301D6
86+
BSTArray<AlphaGroup*> alphaGroups; // 301D8
87+
std::int32_t alphaGroupIndex; // 301F0
88+
std::uint32_t alphaGroupStopIndex; // 301F4
8489
};
8590
static_assert(sizeof(BSCullingProcess) == 0x301F8);
8691
}

include/RE/B/BSDistantTreeShaderProperty.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ namespace RE
1414
~BSDistantTreeShaderProperty() override; // 00
1515

1616
// override (BSShaderProperty)
17-
const NiRTTI* GetRTTI() const override; // 02
18-
RenderPassArray* GetRenderPasses(BSGeometry* a_geometry, std::uint32_t a_arg2, BSShaderAccumulator* a_accumulator) override; // 2A
19-
void Unk_2B(void) override; // 2B
20-
void Unk_2F(void) override; // 2F
21-
std::int32_t ForEachTexture(ForEachVisitor& a_visitor) override; // 33
22-
[[nodiscard]] NiSourceTexture* GetBaseTexture() override; // 37
17+
const NiRTTI* GetRTTI() const override; // 02
18+
RenderPassArray* GetRenderPasses(BSGeometry* a_geometry, std::uint32_t a_arg2, BSShaderAccumulator* a_accumulator) override; // 2A
19+
RenderPassArray* GetRenderPasses_ShadowMapOrMask(BSGeometry* a_geometry, std::uint32_t a_renderMode, BSShaderAccumulator* a_accumulator) override; // 2B
20+
BSRenderPass* GetRenderDepthPass(BSGeometry* a_geometry) override; // 2F
21+
std::int32_t ForEachTexture(ForEachVisitor& a_visitor) override; // 33
22+
[[nodiscard]] NiSourceTexture* GetBaseTexture() override; // 37
2323

2424
// members
2525
std::uint64_t unk88; // 88

0 commit comments

Comments
 (0)