diff --git a/dCommon/CMakeLists.txt b/dCommon/CMakeLists.txt index 5743ab8a..959a71b3 100644 --- a/dCommon/CMakeLists.txt +++ b/dCommon/CMakeLists.txt @@ -47,6 +47,7 @@ elseif (WIN32) set(WITH_GTEST OFF CACHE BOOL "" FORCE) set(ZLIB_ENABLE_TESTS OFF CACHE BOOL "" FORCE) + set(ZLIB_COMPAT ON CACHE BOOL "Enable ZLIB compatibility mode" FORCE) # TODO Keep an eye on the zlib repository for an update to disable testing. Don't forget to update CMakePresets FetchContent_Declare( diff --git a/dCommon/ZCompression.cpp b/dCommon/ZCompression.cpp index f5a09c71..447f4650 100644 --- a/dCommon/ZCompression.cpp +++ b/dCommon/ZCompression.cpp @@ -1,24 +1,6 @@ #include "ZCompression.h" -#ifdef DARKFLAME_PLATFORM_WIN32 -#include "zlib-ng.h" - -// Yes, I know there is a "zlib compat mode", it doesn't work, it's really fucking dumb - -#define z_stream zng_stream - -#define z_deflateInit zng_deflateInit -#define z_deflate zng_deflate -#define z_deflateEnd zng_deflateEnd - -#define z_inflateInit zng_inflateInit -#define z_inflate zng_inflate -#define z_inflateEnd zng_inflateEnd - - -#else #include "zlib.h" -#endif namespace ZCompression { int32_t GetMaxCompressedLength(int32_t nLenSrc) { @@ -35,14 +17,14 @@ namespace ZCompression { zInfo.next_out = abDst; int nErr, nRet = -1; - nErr = z_deflateInit(&zInfo, Z_DEFAULT_COMPRESSION); // zlib function + nErr = deflateInit(&zInfo, Z_DEFAULT_COMPRESSION); // zlib function if (nErr == Z_OK) { - nErr = z_deflate(&zInfo, Z_FINISH); // zlib function + nErr = deflate(&zInfo, Z_FINISH); // zlib function if (nErr == Z_STREAM_END) { nRet = zInfo.total_out; } } - z_deflateEnd(&zInfo); // zlib function + deflateEnd(&zInfo); // zlib function return(nRet); } @@ -55,14 +37,14 @@ namespace ZCompression { zInfo.next_out = abDst; int nRet = -1; - nErr = z_inflateInit(&zInfo); // zlib function + nErr = inflateInit(&zInfo); // zlib function if (nErr == Z_OK) { - nErr = z_inflate(&zInfo, Z_FINISH); // zlib function + nErr = inflate(&zInfo, Z_FINISH); // zlib function if (nErr == Z_STREAM_END) { nRet = zInfo.total_out; } } - z_inflateEnd(&zInfo); // zlib function + inflateEnd(&zInfo); // zlib function return(nRet); } } diff --git a/dGame/dPropertyBehaviors/ControlBehaviorMessages/MoveToInventoryMessage.h b/dGame/dPropertyBehaviors/ControlBehaviorMessages/MoveToInventoryMessage.h index c7888b90..30d62eff 100644 --- a/dGame/dPropertyBehaviors/ControlBehaviorMessages/MoveToInventoryMessage.h +++ b/dGame/dPropertyBehaviors/ControlBehaviorMessages/MoveToInventoryMessage.h @@ -8,7 +8,7 @@ class AMFArrayValue; /** * @brief Sent when a player moves a Behavior A at position B to their inventory. */ -#pragma message("This Control Behavior Message does not have a test yet. Non-developers can ignore this warning.") +#pragma message("MoveToInventory.h This Control Behavior Message does not have a test yet. Non-developers can ignore this warning.") class MoveToInventoryMessage : public BehaviorMessageBase { public: MoveToInventoryMessage(const AMFArrayValue& arguments);