2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-09-24 01:06:40 +00:00

feat: dump t6 xbox fastfile data

This commit is contained in:
Jan Laupetin
2025-08-28 21:14:12 +02:00
parent 763d280805
commit 75d579b5e3
10 changed files with 1074 additions and 14 deletions

View File

@@ -172,8 +172,18 @@ namespace
AddXChunkProcessor(const bool isBigEndian, const bool isEncrypted, const bool isLzxCompressed, ZoneLoader& zoneLoader, std::string& fileName)
{
ICapturedDataProvider* result = nullptr;
auto xChunkProcessor = processor::CreateProcessorXChunks(
ZoneConstants::STREAM_COUNT, ZoneConstants::XCHUNK_SIZE, isBigEndian ? GameEndianness::BE : GameEndianness::LE, ZoneConstants::VANILLA_BUFFER_SIZE);
std::unique_ptr<processor::IProcessorXChunks> xChunkProcessor;
if (isBigEndian)
{
xChunkProcessor = processor::CreateProcessorXChunks(
ZoneConstants::STREAM_COUNT, ZoneConstants::XCHUNK_SIZE, GameEndianness::BE, ZoneConstants::VANILLA_BUFFER_SIZE);
}
else
{
xChunkProcessor = processor::CreateProcessorXChunks(
ZoneConstants::STREAM_COUNT, ZoneConstants::XCHUNK_SIZE, GameEndianness::LE, ZoneConstants::VANILLA_BUFFER_SIZE);
}
const uint8_t (&salsa20Key)[32] = isBigEndian ? ZoneConstants::SALSA20_KEY_TREYARCH_XENON : ZoneConstants::SALSA20_KEY_TREYARCH_PC;
@@ -189,7 +199,7 @@ namespace
if (isLzxCompressed)
{
// Decompress the chunks using lzx
xChunkProcessor->AddChunkProcessor(std::make_unique<XChunkProcessorLzxDecompress>());
xChunkProcessor->AddChunkProcessor(std::make_unique<XChunkProcessorLzxDecompress>(ZoneConstants::STREAM_COUNT));
}
else
{