diff --git a/Minecraft.Client/Assets/Tutorial/Tutorial.mcs b/Minecraft.Client/Assets/Tutorial/Tutorial.mcs index 63db73e4..99f9f5ca 100644 Binary files a/Minecraft.Client/Assets/Tutorial/Tutorial.mcs and b/Minecraft.Client/Assets/Tutorial/Tutorial.mcs differ diff --git a/Minecraft.Client/Assets/Tutorial/Tutorial.pck b/Minecraft.Client/Assets/Tutorial/Tutorial.pck index cc173709..f05788b3 100644 Binary files a/Minecraft.Client/Assets/Tutorial/Tutorial.pck and b/Minecraft.Client/Assets/Tutorial/Tutorial.pck differ diff --git a/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp b/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp index ee09bc2f..de52b41a 100644 --- a/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp +++ b/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp @@ -37,7 +37,7 @@ void ConsoleSchematicFile::save(DataOutputStream *dos) dos->writeInt(m_zSize); byteArray ba(new BYTE[ m_data.length ], m_data.length); - Compression::getCompression()->CompressZSTDRLE( ba.data, &ba.length, + Compression::getCompression()->CompressLZXRLE( ba.data, &ba.length, m_data.data, m_data.length); dos->writeInt(ba.length); @@ -95,12 +95,12 @@ void ConsoleSchematicFile::load(DataInputStream *dis) Compression::getCompression()->DecompressRLE( m_data.data, &m_data.length, compressedBuffer.data, compressedSize); break; case APPROPRIATE_COMPRESSION_TYPE: - Compression::getCompression()->DecompressZSTDRLE( m_data.data, &m_data.length, compressedBuffer.data, compressedSize); + Compression::getCompression()->DecompressLZXRLE( m_data.data, &m_data.length, compressedBuffer.data, compressedSize); break; default: app.DebugPrintf("Unrecognized compression type for Schematic file (%d)\n", (int)compressionType); Compression::getCompression()->SetDecompressionType( (Compression::ECompressionTypes)compressionType ); - Compression::getCompression()->DecompressZSTDRLE( m_data.data, &m_data.length, compressedBuffer.data, compressedSize); + Compression::getCompression()->DecompressLZXRLE( m_data.data, &m_data.length, compressedBuffer.data, compressedSize); Compression::getCompression()->SetDecompressionType( APPROPRIATE_COMPRESSION_TYPE ); }; @@ -645,7 +645,7 @@ void ConsoleSchematicFile::generateSchematicFile(DataOutputStream *dos, Level *l switch(compressionType) { case Compression::eCompressionType_LZXRLE: - Compression::getCompression()->CompressZSTDRLE( ucTemp, &inputSize, result.data, (unsigned int) result.length ); + Compression::getCompression()->CompressLZXRLE( ucTemp, &inputSize, result.data, (unsigned int) result.length ); break; case Compression::eCompressionType_RLE: Compression::getCompression()->CompressRLE( ucTemp, &inputSize, result.data, (unsigned int) result.length ); diff --git a/Minecraft.Client/Common/GameRules/GameRuleManager.cpp b/Minecraft.Client/Common/GameRules/GameRuleManager.cpp index 9cd1debf..16cd50c2 100644 --- a/Minecraft.Client/Common/GameRules/GameRuleManager.cpp +++ b/Minecraft.Client/Common/GameRules/GameRuleManager.cpp @@ -182,7 +182,7 @@ void GameRuleManager::loadGameRules(LevelGenerationOptions *lgo, BYTE *dIn, UINT dis.read(compr_content); Compression::getCompression()->SetDecompressionType( static_cast(compression_type) ); - Compression::getCompression()->DecompressZSTDRLE( content.data, &content.length, + Compression::getCompression()->DecompressLZXRLE( content.data, &content.length, compr_content.data, compr_content.length); Compression::getCompression()->SetDecompressionType( SAVE_FILE_PLATFORM_LOCAL ); @@ -301,7 +301,7 @@ void GameRuleManager::saveGameRules(BYTE **dOut, UINT *dSize) // Compress compr_dos and write to dos. byteArray compr_ba(new BYTE[ compr_baos.buf.length ], compr_baos.buf.length); - Compression::getCompression()->CompressZSTDRLE( compr_ba.data, &compr_ba.length, + Compression::getCompression()->CompressLZXRLE( compr_ba.data, &compr_ba.length, compr_baos.buf.data, compr_baos.buf.length ); app.DebugPrintf("\tcompr_ba.length=%d.\n\tcompr_baos.buf.length=%d.\n", @@ -434,8 +434,8 @@ bool GameRuleManager::readRuleFile(LevelGenerationOptions *lgo, BYTE *dIn, UINT #ifndef _CONTENT_PACKAGE assert( compressionType == APPROPRIATE_COMPRESSION_TYPE ); #endif - // 4J-JEV: DecompressZSTDRLE uses the correct platform specific compression type. (need to assert that the data is compressed with it though). - Compression::getCompression()->DecompressZSTDRLE(decompressedBuffer.data, &decompressedBuffer.length, compressedBuffer.data, compressedSize); + // 4J-JEV: DecompressLZXRLE uses the correct platform specific compression type. (need to assert that the data is compressed with it though). + Compression::getCompression()->DecompressLZXRLE(decompressedBuffer.data, &decompressedBuffer.length, compressedBuffer.data, compressedSize); break; /* 4J-JEV: Each platform has only 1 method of compression, 'compression.h' file deals with it. diff --git a/Minecraft.World/BlockRegionUpdatePacket.cpp b/Minecraft.World/BlockRegionUpdatePacket.cpp index 0c658ab9..7e5c4165 100644 --- a/Minecraft.World/BlockRegionUpdatePacket.cpp +++ b/Minecraft.World/BlockRegionUpdatePacket.cpp @@ -75,7 +75,7 @@ BlockRegionUpdatePacket::BlockRegionUpdatePacket(int x, int y, int z, int xs, in unsigned char *ucTemp = new unsigned char[(256 * 16 * 16 * 5)/2]; unsigned int inputSize = (256 * 16 * 16 * 5)/2; - Compression::getCompression()->CompressZSTDRLE(ucTemp, &inputSize, rawBuffer.data, (unsigned int) rawBuffer.length); + Compression::getCompression()->CompressLZXRLE(ucTemp, &inputSize, rawBuffer.data, (unsigned int) rawBuffer.length); //app.DebugPrintf("Chunk (%d,%d) compressed from %d to size %d\n", x>>4, z>>4, rawBuffer.length, inputSize); unsigned char *ucTemp2 = new unsigned char[inputSize]; memcpy(ucTemp2,ucTemp,inputSize); @@ -131,7 +131,7 @@ void BlockRegionUpdatePacket::read(DataInputStream *dis) //throws IOException if( success ) { - Compression::getCompression()->DecompressZSTDRLE( buffer.data, &outputSize, compressedBuffer.data, size); + Compression::getCompression()->DecompressLZXRLE( buffer.data, &outputSize, compressedBuffer.data, size); } else { diff --git a/Minecraft.World/ConsoleSaveFileOriginal.cpp b/Minecraft.World/ConsoleSaveFileOriginal.cpp index 5524f6c7..8e0edd29 100644 --- a/Minecraft.World/ConsoleSaveFileOriginal.cpp +++ b/Minecraft.World/ConsoleSaveFileOriginal.cpp @@ -217,11 +217,17 @@ ConsoleSaveFileOriginal::ConsoleSaveFileOriginal(const wstring &fileName, LPVOID } header.ReadHeader( pvSaveMem, plat ); + + if (bLevelGenBaseSave) + { + header.AddFile(L"region_format_16"); + } } else { // Clear the first 8 bytes that reference the header header.WriteHeader( pvSaveMem ); + header.AddFile(L"region_format_16"); } } diff --git a/Minecraft.World/FileHeader.h b/Minecraft.World/FileHeader.h index bd5e2e0c..bfc6ff01 100644 --- a/Minecraft.World/FileHeader.h +++ b/Minecraft.World/FileHeader.h @@ -56,7 +56,7 @@ enum ESavePlatform SAVE_FILE_PLATFORM_PS3 = MAKE_FOURCC('P', 'S', '3', '_') , SAVE_FILE_PLATFORM_PS4 = MAKE_FOURCC('P', 'S', '4', '_') , SAVE_FILE_PLATFORM_PSVITA = MAKE_FOURCC('P', 'S', 'V', '_') , - SAVE_FILE_PLATFORM_WIN64 = MAKE_FOURCC('W', '6', '4', '_') , + SAVE_FILE_PLATFORM_WIN64 = MAKE_FOURCC('W', 'I', 'N', '_') , #if defined _XBOX SAVE_FILE_PLATFORM_LOCAL = SAVE_FILE_PLATFORM_X360 diff --git a/Minecraft.World/RegionFile.cpp b/Minecraft.World/RegionFile.cpp index a9ea9a44..c7af561e 100644 --- a/Minecraft.World/RegionFile.cpp +++ b/Minecraft.World/RegionFile.cpp @@ -244,7 +244,7 @@ DataInputStream *RegionFile::getChunkDataInputStream(int x, int z) // TODO - was if( useRLE ) { - Compression::getCompression()->DecompressZSTDRLE(decomp, &readDecompLength, data, length ); + Compression::getCompression()->DecompressLZXRLE(decomp, &readDecompLength, data, length ); } else { @@ -277,7 +277,7 @@ void RegionFile::write(int x, int z, BYTE *data, int length) // TODO - was sync // 4J Stu - Do the compression here so that we know how much space we need to store the compressed data BYTE *compData = new BYTE[length + 2048]; // presuming compression is going to make this smaller... UPDATE - for some really small things this isn't the case. Added 2K on here to cover those. unsigned int compLength = length; - Compression::getCompression()->CompressZSTDRLE(compData,&compLength,data,length); + Compression::getCompression()->CompressLZXRLE(compData,&compLength,data,length); int sectorsNeeded = (compLength + CHUNK_HEADER_SIZE) / SECTOR_BYTES + 1; diff --git a/Minecraft.World/RegionFileCache.cpp b/Minecraft.World/RegionFileCache.cpp index bf42e31b..a936a6f9 100644 --- a/Minecraft.World/RegionFileCache.cpp +++ b/Minecraft.World/RegionFileCache.cpp @@ -29,10 +29,18 @@ RegionFile *RegionFileCache::_getRegionFile(ConsoleSaveFile *saveFile, const wst MemSect(31); File file; if(useSplitSaves(saveFile->getSavePlatform())) - file = File(prefix + wstring(L"r.") + std::to_wstring(chunkX >> 4) + L"." + std::to_wstring(chunkZ >> 4) + L".mcr"); - else - file = File( prefix + wstring(L"r.") + std::to_wstring(chunkX>>5) + L"." + std::to_wstring(chunkZ>>5) + L".mcr" ); + { + bool isNew = saveFile->doesFileExist(ConsoleSavePath(L"region_format_16")); + if (isNew) + file = File(prefix + wstring(L"r.") + std::to_wstring(chunkX >> 4) + L"." + std::to_wstring(chunkZ >> 4) + L".mcr"); + else + file = File(prefix + wstring(L"r.") + std::to_wstring(chunkX >> 5) + L"." + std::to_wstring(chunkZ >> 5) + L".mcr"); + } + else + { + file = File( prefix + wstring(L"r.") + std::to_wstring(chunkX>>5) + L"." + std::to_wstring(chunkZ>>5) + L".mcr" ); + } MemSect(0); RegionFile *ref = nullptr; @@ -49,15 +57,19 @@ RegionFile *RegionFileCache::_getRegionFile(ConsoleSaveFile *saveFile, const wst // 4J Stu - Remove for new save files /* if (!regionDir.exists()) + { regionDir.mkdirs(); + } */ - if (cache.size() >= MAX_CACHE_SIZE) + { _clear(); + } RegionFile *reg = new RegionFile(saveFile, &file); cache[file] = reg; // 4J - this was originally a softReferenc return reg; + } void RegionFileCache::_clear() // 4J - TODO was synchronized @@ -66,8 +78,9 @@ void RegionFileCache::_clear() // 4J - TODO was synchronized { RegionFile *regionFile = it.second; if (regionFile != nullptr) + { regionFile->close(); - + } delete regionFile; } cache.clear(); @@ -82,21 +95,34 @@ int RegionFileCache::_getSizeDelta(ConsoleSaveFile *saveFile, const wstring &pre DataInputStream *RegionFileCache::_getChunkDataInputStream(ConsoleSaveFile *saveFile, const wstring &prefix, int chunkX, int chunkZ) { RegionFile* r = _getRegionFile(saveFile, prefix, chunkX, chunkZ); - if (useSplitSaves(saveFile->getSavePlatform())) + bool isNew = saveFile->doesFileExist(ConsoleSavePath(L"region_format_16")); + if (useSplitSaves(saveFile->getSavePlatform()) && isNew) + { return r->getChunkDataInputStream(chunkX & 15, chunkZ & 15); + } else + { + return r->getChunkDataInputStream(chunkX & 31, chunkZ & 31); + } } DataOutputStream *RegionFileCache::_getChunkDataOutputStream(ConsoleSaveFile *saveFile, const wstring &prefix, int chunkX, int chunkZ) { RegionFile* r = _getRegionFile(saveFile, prefix, chunkX, chunkZ); - if (useSplitSaves(saveFile->getSavePlatform())) + bool isNew = saveFile->doesFileExist(ConsoleSavePath(L"region_format_16")); + if (useSplitSaves(saveFile->getSavePlatform()) && isNew) + { return r->getChunkDataOutputStream(chunkX & 15, chunkZ & 15); + } else + { + return r->getChunkDataOutputStream(chunkX & 31, chunkZ & 31); + } } + RegionFileCache::~RegionFileCache() { _clear(); diff --git a/Minecraft.World/compression.cpp b/Minecraft.World/compression.cpp index 3be9251b..7e1298b5 100644 --- a/Minecraft.World/compression.cpp +++ b/Minecraft.World/compression.cpp @@ -1,6 +1,16 @@ #include "compression.h" +#if defined __ORBIS__ || defined __PS3__ || defined _DURANGO || defined _WINDOWS64 #include "..\Minecraft.Client\Common\Libs\zlib\inc\zlib.h" +#endif +#ifdef _WINDOWS64 #include "..\Minecraft.Client\Windows64\Libs\zstd\inc\zstd.h" +#endif +#if defined __PSVITA__ +#include "..\Minecraft.Client\PSVita\PSVitaExtras\zlib.h" +#elif defined __PS3__ +#include "..\Minecraft.Client\PS3\PS3Extras\EdgeZLib.h" +#endif //__PS3__ + DWORD Compression::tlsIdx = 0; Compression::ThreadStorage *Compression::tlsDefault = nullptr; @@ -45,7 +55,7 @@ Compression *Compression::getCompression() return tls->compression; } -HRESULT Compression::CompressZSTDRLE(void *pDestination, unsigned int *pDestSize, void *pSource, unsigned int SrcSize) +HRESULT Compression::CompressLZXRLE(void *pDestination, unsigned int *pDestSize, void *pSource, unsigned int SrcSize) { EnterCriticalSection(&rleCompressLock); //static unsigned char rleBuf[1024*100]; @@ -114,7 +124,7 @@ HRESULT Compression::CompressZSTDRLE(void *pDestination, unsigned int *pDestSize PIXEndNamedEvent(); PIXBeginNamedEvent(0,"Secondary compression"); - Compression::Compress(pDestination, pDestSize, rleBuf, rleSize); + Compress(pDestination, pDestSize, rleBuf, rleSize); PIXEndNamedEvent(); if(dynamicRleBuf != nullptr) delete [] dynamicRleBuf; @@ -211,7 +221,7 @@ HRESULT Compression::CompressRLE(void *pDestination, unsigned int *pDestSize, vo return S_OK; } -HRESULT Compression::DecompressZSTDRLE(void *pDestination, unsigned int *pDestSize, void *pSource, unsigned int SrcSize) +HRESULT Compression::DecompressLZXRLE(void *pDestination, unsigned int *pDestSize, void *pSource, unsigned int SrcSize) { EnterCriticalSection(&rleDecompressLock); // 4J Stu - Fix for #13676 - Crash: Crash while attempting to load a world after updating TU @@ -242,18 +252,18 @@ HRESULT Compression::DecompressZSTDRLE(void *pDestination, unsigned int *pDestSi { rleSize = safeRleSize; dynamicRleBuf = new unsigned char[rleSize]; - decompressResult = Compression::Decompress(dynamicRleBuf, &rleSize, pSource, SrcSize); + decompressResult = Decompress(dynamicRleBuf, &rleSize, pSource, SrcSize); pucIn = (unsigned char *)dynamicRleBuf; } else { - decompressResult = Compression::Decompress(rleDecompressBuf, &rleSize, pSource, SrcSize); + decompressResult = Decompress(rleDecompressBuf, &rleSize, pSource, SrcSize); pucIn = static_cast(rleDecompressBuf); } if(decompressResult != S_OK) { - app.DebugPrintf("*** DecompressZSTDRLE: Decompress FAILED hr=0x%08X srcSize=%u expectedDest=%u rleSize=%u\n", + app.DebugPrintf("*** DecompressLZXRLE: zlib Decompress FAILED hr=0x%08X srcSize=%u expectedDest=%u rleSize=%u\n", decompressResult, SrcSize, *pDestSize, rleSize); if(dynamicRleBuf != nullptr) delete [] dynamicRleBuf; *pDestSize = 0; @@ -379,9 +389,11 @@ HRESULT Compression::DecompressRLE(void *pDestination, unsigned int *pDestSize, HRESULT Compression::Compress(void *pDestination, unsigned int *pDestSize, void *pSource, unsigned int SrcSize) { - // ZSTD for Windows +/* + // Use zstd for Windows +#ifdef _WINDOWS64 size_t destSize = static_cast(*pDestSize); - const size_t res = ZSTD_compress(pDestination, destSize, pSource, SrcSize, 6); + const size_t res = ZSTD_compress(pDestination, destSize, pSource, SrcSize, 3); if (ZSTD_isError(res)) return -1; @@ -389,65 +401,65 @@ HRESULT Compression::Compress(void *pDestination, unsigned int *pDestSize, void *pDestSize = static_cast(res); return S_OK; -/* - // ZLIB +*/ + // Using zlib for x64 compression - 360 is using native 360 compression and PS3 a stubbed non-compressing version of this +#if defined __ORBIS__ || defined _DURANGO || defined __PSVITA__ || defined _WINDOWS64 SIZE_T destSize = (SIZE_T)(*pDestSize); const int res = ::compress(static_cast(pDestination), (uLongf *)&destSize, static_cast(pSource), SrcSize); *pDestSize = static_cast(destSize); return ( ( res == Z_OK ) ? S_OK : -1 ); - - // PS3 a stubbed non-compressing version of ZLIB +#elif defined __PS3__ uint32_t destSize = (uint32_t)(*pDestSize); bool res = EdgeZLib::Compress(pDestination, &destSize, pSource, SrcSize); *pDestSize = (unsigned int)destSize; return ( ( res ) ? S_OK : -1 ); - - // 360 is using native 360 compression +#else SIZE_T destSize = (SIZE_T)(*pDestSize); HRESULT res = XMemCompress(compressionContext, pDestination, &destSize, pSource, SrcSize); *pDestSize = (unsigned int)destSize; return res; -*/ +#endif } HRESULT Compression::Decompress(void *pDestination, unsigned int *pDestSize, void *pSource, unsigned int SrcSize) { + if(m_decompressType != m_localDecompressType) // check if we're decompressing data from a different platform { // only used for loading a save from a different platform (Sony cloud storage cross play) return DecompressWithType(pDestination, pDestSize, pSource, SrcSize); } - // ZSTD for Windows +/* + // Use zstd for Windows +#ifdef _WINDOWS64 size_t destSize = static_cast(*pDestSize); const size_t res = ZSTD_decompress(pDestination, destSize, pSource, SrcSize); if (ZSTD_isError(res)) - return -1; + return -1; *pDestSize = static_cast(res); return S_OK; -/* - // ZLIB +*/ + // Using zlib for x64 compression - 360 is using native 360 compression and PS3 a stubbed non-compressing version of this +#if defined __ORBIS__ || defined _DURANGO || defined __PSVITA__ || defined _WINDOWS64 SIZE_T destSize = (SIZE_T)(*pDestSize); const int res = ::uncompress(static_cast(pDestination), (uLongf *)&destSize, static_cast(pSource), SrcSize); *pDestSize = static_cast(destSize); return ( ( res == Z_OK ) ? S_OK : -1 ); -*/ -/* - // PS3 a stubbed non-compressing version of ZLIB +#elif defined __PS3__ uint32_t destSize = (uint32_t)(*pDestSize); bool res = EdgeZLib::Decompress(pDestination, &destSize, pSource, SrcSize); *pDestSize = (unsigned int)destSize; return ( ( res ) ? S_OK : -1 ); - - // 360 is using native 360 compression +#else SIZE_T destSize = (SIZE_T)(*pDestSize); HRESULT res = XMemDecompress(decompressionContext, pDestination, (SIZE_T *)&destSize, pSource, SrcSize); *pDestSize = (unsigned int)destSize; return res; -*/ +#endif } // MGH - same as VirtualDecompress in PSVitaStubs, but for use on other platforms (so no virtual mem stuff) @@ -498,19 +510,27 @@ HRESULT Compression::DecompressWithType(void *pDestination, unsigned int *pDestS return S_OK; case eCompressionType_LZXRLE: { +#if (defined _XBOX || defined _DURANGO || defined _WINDOWS64) SIZE_T destSize = (SIZE_T)(*pDestSize); const HRESULT res = XMemDecompress(decompressionContext, pDestination, (SIZE_T *)&destSize, pSource, SrcSize); *pDestSize = static_cast(destSize); return res; +#else + assert(0); +#endif } break; case eCompressionType_ZLIBRLE: +#if (defined __ORBIS__ || defined __PS3__ || defined _DURANGO || defined _WINDOWS64) if (pDestination != nullptr) return ::uncompress(static_cast(pDestination), (unsigned long *) pDestSize, static_cast(pSource), SrcSize); // Decompress - else - break; // Cannot decompress when destination is nullptr - + else break; // Cannot decompress when destination is nullptr +#else + assert(0); + break; +#endif case eCompressionType_PS3ZLIB: +#if (defined __ORBIS__ || defined __PSVITA__ || defined _DURANGO || defined _WINDOWS64) // Note that we're missing the normal zlib header and footer so we'll use inflate to // decompress the payload and skip all the CRC checking, etc if (pDestination != nullptr) @@ -562,20 +582,27 @@ HRESULT Compression::DecompressWithType(void *pDestination, unsigned int *pDestS delete uncompr.data; return S_OK; } - else - break; // Cannot decompress when destination is nullptr - + else break; // Cannot decompress when destination is nullptr +#else + assert(0); +#endif case eCompressionType_ZSTDRLE: +#ifdef _WINDOWS64 if (pDestination != nullptr) return ZSTD_decompress(static_cast(pDestination), (SIZE_T)pDestSize, static_cast(pSource), SrcSize); - else - break; // Cannot decompress when destination is nullptr + else break; // Cannot decompress when destination is nullptr +#else + assert(0); + break; +#endif } assert(false); return -1; } + + Compression::Compression() { // Using zlib for x64 compression - 360 is using native 360 compression and PS3 a stubbed non-compressing version of this @@ -591,10 +618,15 @@ Compression::Compression() XMemCreateDecompressionContext(XMEMCODEC_LZX,¶ms,0,&decompressionContext); #endif - //X360: eCompressionType_LZXRLE. PS3: eCompressionType_PS3ZLIB. - //Other Consoles: eCompressionType_ZLIBRLE. - m_localDecompressType = eCompressionType_ZSTDRLE; - +#if defined _XBOX + m_localDecompressType = eCompressionType_LZXRLE; +#elif defined __PS3__ + m_localDecompressType = eCompressionType_PS3ZLIB; +//#elif defined _WINDOWS64 +// m_localDecompressType = eCompressionType_ZSTDRLE; +#else + m_localDecompressType = eCompressionType_ZLIBRLE; +#endif m_decompressType = m_localDecompressType; InitializeCriticalSection(&rleCompressLock); @@ -612,6 +644,8 @@ Compression::~Compression() DeleteCriticalSection(&rleDecompressLock); } + + void Compression::SetDecompressionType(ESavePlatform platform) { switch(platform) @@ -625,10 +659,11 @@ void Compression::SetDecompressionType(ESavePlatform platform) case SAVE_FILE_PLATFORM_XBONE: case SAVE_FILE_PLATFORM_PS4: case SAVE_FILE_PLATFORM_PSVITA: + case SAVE_FILE_PLATFORM_WIN64: Compression::getCompression()->SetDecompressionType(Compression::eCompressionType_ZLIBRLE); break; - case SAVE_FILE_PLATFORM_WIN64: - Compression::getCompression()->SetDecompressionType(Compression::eCompressionType_ZSTDRLE); +// case SAVE_FILE_PLATFORM_WIN64: +// Compression::getCompression()->SetDecompressionType(Compression::eCompressionType_ZSTDRLE); break; default: assert(0); @@ -636,4 +671,6 @@ void Compression::SetDecompressionType(ESavePlatform platform) } } -/*Compression gCompression;*/ \ No newline at end of file +/*Compression gCompression;*/ + + diff --git a/Minecraft.World/compression.h b/Minecraft.World/compression.h index fc52df17..9b361542 100644 --- a/Minecraft.World/compression.h +++ b/Minecraft.World/compression.h @@ -42,8 +42,8 @@ public: public: HRESULT Compress(void *pDestination, unsigned int *pDestSize, void *pSource, unsigned int SrcSize); HRESULT Decompress(void *pDestination, unsigned int *pDestSize, void *pSource, unsigned int SrcSize); - HRESULT CompressZSTDRLE(void *pDestination, unsigned int *pDestSize, void *pSource, unsigned int SrcSize); - HRESULT DecompressZSTDRLE(void *pDestination, unsigned int *pDestSize, void *pSource, unsigned int SrcSize); + HRESULT CompressLZXRLE(void *pDestination, unsigned int *pDestSize, void *pSource, unsigned int SrcSize); + HRESULT DecompressLZXRLE(void *pDestination, unsigned int *pDestSize, void *pSource, unsigned int SrcSize); HRESULT CompressRLE(void *pDestination, unsigned int *pDestSize, void *pSource, unsigned int SrcSize); HRESULT DecompressRLE(void *pDestination, unsigned int *pDestSize, void *pSource, unsigned int SrcSize); #ifndef _XBOX diff --git a/NOTES.md b/NOTES.md index f0316649..1db69688 100644 --- a/NOTES.md +++ b/NOTES.md @@ -2,9 +2,6 @@ ## Additional Resources You can find the DLCs here: [GitHub Repository](https://github.com/GabsPuNs/Project-Zenith-DLCs/tree/TU24) -## Note -DLCs or Old Save Files from other forks will not work! - ## System Requirements * **OS:** Windows 8.1 or higher. * **GPU:** DirectX 11 compatible graphics card