mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-11 07:18:11 -05:00
ZoneLoading: Simulate the vanilla edge case that the chunk size is in the end of the loadbuffer and cannot quite fit into it so the space is padded and the chunk size is loaded from the beginning of the buffer
This commit is contained in:
@ -28,6 +28,7 @@ const int ZoneLoaderFactoryT6::VERSION = 147;
|
||||
|
||||
const int ZoneLoaderFactoryT6::STREAM_COUNT = 4;
|
||||
const int ZoneLoaderFactoryT6::XCHUNK_SIZE = 0x8000;
|
||||
const int ZoneLoaderFactoryT6::VANILLA_BUFFER_SIZE = 0x80000;
|
||||
const int ZoneLoaderFactoryT6::OFFSET_BLOCK_BIT_COUNT = 3;
|
||||
const block_t ZoneLoaderFactoryT6::INSERT_BLOCK = T6::XFILE_BLOCK_VIRTUAL;
|
||||
|
||||
@ -259,7 +260,7 @@ class ZoneLoaderFactoryT6::ZoneLoaderFactoryT6Impl
|
||||
static ISignatureDataProvider* AddXChunkProcessor(bool isEncrypted, ZoneLoader* zoneLoader, std::string& fileName)
|
||||
{
|
||||
ISignatureDataProvider* result = nullptr;
|
||||
auto* xChunkProcessor = new ProcessorXChunks(STREAM_COUNT, XCHUNK_SIZE);
|
||||
auto* xChunkProcessor = new ProcessorXChunks(STREAM_COUNT, XCHUNK_SIZE, VANILLA_BUFFER_SIZE);
|
||||
|
||||
if(isEncrypted)
|
||||
{
|
||||
|
@ -13,6 +13,7 @@ class ZoneLoaderFactoryT6 final : public IZoneLoaderFactory
|
||||
|
||||
static const int STREAM_COUNT;
|
||||
static const int XCHUNK_SIZE;
|
||||
static const int VANILLA_BUFFER_SIZE;
|
||||
static const int OFFSET_BLOCK_BIT_COUNT;
|
||||
static const block_t INSERT_BLOCK;
|
||||
|
||||
|
Reference in New Issue
Block a user