forked from Ryan-rsm-McKenzie/CommonLibSSE
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
104 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#pragma once | ||
|
||
#include "RE/S/Stream.h" | ||
|
||
namespace RE | ||
{ | ||
namespace BSResource | ||
{ | ||
class ArchiveStream : public Stream | ||
{ | ||
public: | ||
inline static constexpr auto RTTI = RTTI_BSResource__ArchiveStream; | ||
inline static constexpr auto VTABLE = VTABLE_BSResource__ArchiveStream; | ||
|
||
~ArchiveStream() override; // 00 | ||
|
||
// override (Stream) | ||
ErrorCode DoOpen() override; // 01 | ||
void DoClose() override; // 02 | ||
[[nodiscard]] std::uint64_t DoGetKey() const override; // 03 | ||
void DoClone(BSTSmartPointer<Stream>& a_out) const override; // 05 | ||
ErrorCode DoRead(void* a_buffer, std::uint64_t a_toRead, std::uint64_t& a_read) const override; // 06 | ||
ErrorCode DoWrite(const void* a_buffer, std::uint64_t a_toWrite, std::uint64_t& a_written) const override; // 07 | ||
ErrorCode DoSeek(std::uint64_t a_toSeek, SeekMode a_mode, std::uint64_t& a_sought) const override; // 08 | ||
bool DoGetName(BSFixedString& a_dst) const override; // 0A | ||
ErrorCode DoCreateAsync(BSTSmartPointer<AsyncStream>& a_streamOut) const override; // 0B | ||
|
||
// add | ||
virtual std::uint32_t DoGetSize() const; // 0C | ||
|
||
// members | ||
BSTSmartPointer<Stream> source; // 10 | ||
std::uint32_t startOffset; // 18 | ||
std::uint32_t currentOffset; // 1C | ||
BSFixedString name; // 20 | ||
}; | ||
#ifdef SKYRIM_SUPPORT_AE | ||
static_assert(sizeof(ArchiveStream) == 0x30); | ||
#else | ||
static_assert(sizeof(ArchiveStream) == 0x28); | ||
#endif | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#pragma once | ||
|
||
#include "RE/A/ArchiveStream.h" | ||
|
||
namespace RE | ||
{ | ||
namespace BSResource | ||
{ | ||
class CompressedArchiveStream : public ArchiveStream | ||
{ | ||
public: | ||
inline static constexpr auto RTTI = RTTI_BSResource__CompressedArchiveStream; | ||
inline static constexpr auto VTABLE = VTABLE_BSResource__CompressedArchiveStream; | ||
|
||
~CompressedArchiveStream() override; // 00 | ||
|
||
// override (ArchiveStream) | ||
ErrorCode DoOpen() override; // 01 | ||
void DoClose() override; // 02 | ||
void DoClone(BSTSmartPointer<Stream>& a_out) const override; // 05 | ||
ErrorCode DoRead(void* a_buffer, std::uint64_t a_toRead, std::uint64_t& a_read) const override; // 06 | ||
ErrorCode DoSeek(std::uint64_t a_toSeek, SeekMode a_mode, std::uint64_t& a_sought) const override; // 08 | ||
ErrorCode DoCreateAsync(BSTSmartPointer<AsyncStream>& a_streamOut) const override; // 0B | ||
std::uint32_t DoGetSize() const override; // 0C | ||
|
||
// members | ||
std::uint64_t unk28; // 28 | ||
std::uint32_t unk30; // 30 | ||
std::uint32_t unk34; // 34 | ||
}; | ||
#ifdef SKYRIM_SUPPORT_AE | ||
static_assert(sizeof(CompressedArchiveStream) == 0x40); | ||
#else | ||
static_assert(sizeof(CompressedArchiveStream) == 0x38); | ||
#endif | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters