CommonLibVR
Loading...
Searching...
No Matches
NiStream.h
Go to the documentation of this file.
1#pragma once
2
4#include "RE/B/BSTArray.h"
6#include "RE/N/NiTArray.h"
8
9#include "REX/W32/BASE.h"
10
11namespace RE
12{
13 class NiBinaryStream;
14 class NiObjectGroup;
15
17 {
18 public:
19 // members
20 std::uint32_t version; // 00
21 char author[64]; // 04
22 char processScript[64]; // 44
23 char exportScript[64]; // 84
24 std::uint32_t padC4; // C4
25 };
26 static_assert(sizeof(BSStreamHeader) == 0xC8);
27
29 {
30 public:
31 inline static constexpr auto RTTI = RTTI_NiStream;
32 inline static constexpr auto VTABLE = VTABLE_NiStream;
33
34 virtual ~NiStream(); // 00
35
36 // add
37 virtual bool Load1(NiBinaryStream* a_stream); // 01
38 virtual bool Load2(char* a_buffer, std::uint64_t a_len); // 02
39 virtual bool Load3(const char* a_path); // 03
40 virtual bool Save1(NiBinaryStream* a_stream); // 04
41 virtual bool Save2(char*& a_path, std::uint64_t& a_len); // 05
42 virtual bool Save3(const char* a_path); // 06
43 virtual void Unk_07(void); // 07 - { return 0; }
44 virtual bool RegisterFixedString(const BSFixedString& a_fixedString); // 08
45 virtual bool RegisterSaveObject(NiObject* a_object); // 09
46 virtual bool ChangeObject(NiObject* a_object); // 0A
47 virtual std::uint32_t GetLinkIDFromObject(const NiObject* a_object); // 0B
48 virtual void SaveLinkID(const NiObject* a_object); // 0C
49 virtual bool LoadHeader(); // 0D
50 virtual void SaveHeader(); // 0E
51 virtual bool LoadStream(); // 0F
52 virtual void SaveStream(); // 10
53 virtual void RegisterObjects(); // 11
54 virtual void LoadTopLevelObjects(); // 12
55 virtual void SaveTopLevelObjects(); // 13
56 virtual bool LoadObject(); // 14
57 virtual std::uint64_t PreSaveObjectSizeTable(); // 15
58 virtual bool SaveObjectSizeTable(std::uint64_t a_size); // 16
59 virtual bool LoadObjectSizeTable(); // 17
60
61 // members
64 std::uint32_t nifMaxVersion; // 100
65 std::uint32_t nifMaxUserDefinedVersion; // 104
67 std::uint16_t unk20C; // 20C
68 std::uint16_t unk20E; // 20E
69 std::uint64_t unk210; // 210
76 std::uint32_t linkIndex; // 2A8
77 std::uint32_t linkBlockIndex; // 2AC
79 std::uint16_t niAVObjectFlags; // 2D0
80 std::uint16_t niTimeControllerFlags; // 2D2
81 std::uint16_t niPropertyFlags; // 2D4
82 std::uint32_t unk2D8; // 2D8
83 bool unk2DC; // 2DC
84 std::uint32_t load; // 2E0
85 std::uint32_t link; // 2E4
86 std::uint32_t postLink; // 2E8
87 std::uint64_t unk2F0; // 2F0
88 std::uint64_t unk2F8; // 2F8
89 std::uint32_t unk300; // 300
90 std::uint32_t unk304; // 304
91 std::int32_t unk308; // 308
93 std::uint32_t lastError; // 410
96 private:
98 };
99 static_assert(sizeof(NiStream) == 0x620);
100}
#define KEEP_FOR_RE()
Definition PCH.h:517
Definition BSTArray.h:378
Definition NiBinaryStream.h:6
Definition NiObject.h:37
Definition NiStream.h:29
NiTLargeObjectArray< NiPointer< NiObject > > topObjects
Definition NiStream.h:72
std::uint32_t unk2D8
Definition NiStream.h:82
virtual bool Save2(char *&a_path, std::uint64_t &a_len)
virtual std::uint64_t PreSaveObjectSizeTable()
virtual bool LoadStream()
NiTLargeObjectArray< NiPointer< NiObject > > objects
Definition NiStream.h:70
virtual bool RegisterSaveObject(NiObject *a_object)
std::uint16_t niTimeControllerFlags
Definition NiStream.h:80
virtual bool Save3(const char *a_path)
NiTLargeObjectArray< BSFixedString > fixedStrings
Definition NiStream.h:73
char inputFilePath[REX::W32::MAX_PATH]
Definition NiStream.h:66
std::uint32_t nifMaxVersion
Definition NiStream.h:64
char lastErrorMessage[REX::W32::MAX_PATH]
Definition NiStream.h:94
std::uint32_t linkIndex
Definition NiStream.h:76
virtual void SaveHeader()
static constexpr auto RTTI
Definition NiStream.h:31
virtual void RegisterObjects()
static constexpr auto VTABLE
Definition NiStream.h:32
std::uint32_t unk300
Definition NiStream.h:89
virtual void SaveLinkID(const NiObject *a_object)
BSTSmallArray< NiObjectGroup > groups
Definition NiStream.h:63
virtual bool ChangeObject(NiObject *a_object)
virtual bool Load3(const char *a_path)
virtual bool LoadObjectSizeTable()
char lastLoadedRTTI[REX::W32::MAX_PATH]
Definition NiStream.h:92
virtual bool Save1(NiBinaryStream *a_stream)
std::uint32_t nifMaxUserDefinedVersion
Definition NiStream.h:65
virtual bool SaveObjectSizeTable(std::uint64_t a_size)
virtual bool LoadObject()
std::int32_t unk308
Definition NiStream.h:91
std::uint32_t load
Definition NiStream.h:84
virtual void SaveStream()
virtual void SaveTopLevelObjects()
std::uint32_t lastError
Definition NiStream.h:93
virtual bool Load1(NiBinaryStream *a_stream)
NiTPointerMap< NiObject const *, std::uint32_t > registerMap
Definition NiStream.h:78
virtual bool LoadHeader()
std::uint32_t link
Definition NiStream.h:85
NiBinaryStream * oStr
Definition NiStream.h:75
std::uint32_t linkBlockIndex
Definition NiStream.h:77
std::uint32_t postLink
Definition NiStream.h:86
std::uint32_t unk304
Definition NiStream.h:90
std::uint16_t niPropertyFlags
Definition NiStream.h:81
char filePath[REX::W32::MAX_PATH]
Definition NiStream.h:95
NiBinaryStream * iStr
Definition NiStream.h:74
virtual bool Load2(char *a_buffer, std::uint64_t a_len)
virtual void Unk_07(void)
virtual ~NiStream()
std::uint16_t niAVObjectFlags
Definition NiStream.h:79
virtual std::uint32_t GetLinkIDFromObject(const NiObject *a_object)
BSStreamHeader header
Definition NiStream.h:62
std::uint64_t unk2F0
Definition NiStream.h:87
std::uint16_t unk20E
Definition NiStream.h:68
virtual void LoadTopLevelObjects()
virtual bool RegisterFixedString(const BSFixedString &a_fixedString)
std::uint64_t unk210
Definition NiStream.h:69
std::uint16_t unk20C
Definition NiStream.h:67
bool unk2DC
Definition NiStream.h:83
std::uint64_t unk2F8
Definition NiStream.h:88
NiTLargePrimitiveArray< std::uint32_t > objectSizes
Definition NiStream.h:71
Definition NiTArray.h:262
Definition NiTArray.h:272
Definition NiTPointerMap.h:10
constexpr auto MAX_PATH
Definition BASE.h:35
Definition AbsorbEffect.h:6
constexpr REL::ID RTTI_NiStream(static_cast< std::uint64_t >(684798))
constexpr std::array< REL::ID, 1 > VTABLE_NiStream
Definition Offsets_VTABLE.h:12327
Definition NiStream.h:17
char exportScript[64]
Definition NiStream.h:23
char processScript[64]
Definition NiStream.h:22
std::uint32_t padC4
Definition NiStream.h:24
std::uint32_t version
Definition NiStream.h:20
char author[64]
Definition NiStream.h:21