Switch to miniz from zlib
This commit is contained in:
parent
9b3409b28d
commit
ba9ce0e83f
54 changed files with 9285 additions and 24321 deletions
|
|
@ -319,7 +319,7 @@ add_custom_target( revision_check ALL
|
|||
|
||||
# required libraries
|
||||
|
||||
set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} "${ZLIB_LIBRARIES}" "${BZIP2_LIBRARIES}" "${CMAKE_DL_LIBS}" "${DRPC_LIBRARIES}")
|
||||
set( PROJECT_LIBRARIES ${PROJECT_LIBRARIES} miniz "${BZIP2_LIBRARIES}" "${CMAKE_DL_LIBS}" "${DRPC_LIBRARIES}")
|
||||
if (HAVE_VULKAN)
|
||||
list( APPEND PROJECT_LIBRARIES "zvulkan" )
|
||||
endif()
|
||||
|
|
@ -387,7 +387,7 @@ if (TARGET WebP::webp)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
include_directories( SYSTEM "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" "${DRPC_INCLUDE_DIR}")
|
||||
include_directories( SYSTEM "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" "${DRPC_INCLUDE_DIR}")
|
||||
|
||||
if( ${HAVE_VM_JIT} )
|
||||
add_definitions( -DHAVE_VM_JIT )
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
#include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
#include <zlib.h>
|
||||
#include <miniz.h>
|
||||
|
||||
#include <zmusic.h>
|
||||
#include "filesystem.h"
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
#define RAPIDJSON_HAS_CXX11_RANGE_FOR 1
|
||||
#define RAPIDJSON_PARSE_DEFAULT_FLAGS kParseFullPrecisionFlag
|
||||
|
||||
#include <zlib.h>
|
||||
#include <miniz.h>
|
||||
#include "rapidjson/rapidjson.h"
|
||||
#include "rapidjson/writer.h"
|
||||
#include "rapidjson/prettywriter.h"
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
// Caution: LzmaDec also pulls in windows.h!
|
||||
#define NOMINMAX
|
||||
#include "LzmaDec.h"
|
||||
#include <zlib.h>
|
||||
#include <miniz.h>
|
||||
#include <bzlib.h>
|
||||
#include <algorithm>
|
||||
#include <stdexcept>
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
// HEADER FILES ------------------------------------------------------------
|
||||
|
||||
#include <zlib.h>
|
||||
#include <miniz.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
**
|
||||
*/
|
||||
|
||||
#include <zlib.h>
|
||||
#include <miniz.h>
|
||||
#include "resourcefile_internal.h"
|
||||
#include "md5.hpp"
|
||||
#include "fs_stringpool.h"
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
** General model handling code
|
||||
**
|
||||
**/
|
||||
#include <stddef.h> // offsetof() macro.
|
||||
|
||||
#include "filesystem.h"
|
||||
#include "cmdlib.h"
|
||||
|
|
@ -132,17 +133,7 @@ FTextureID LoadSkin(const char * path, const char * fn)
|
|||
|
||||
int ModelFrameHash(FSpriteModelFrame * smf)
|
||||
{
|
||||
const uint32_t *table = GetCRCTable ();
|
||||
uint32_t hash = 0xffffffff;
|
||||
|
||||
const char * s = (const char *)(&smf->type); // this uses type, sprite and frame for hashing
|
||||
const char * se= (const char *)(&smf->hashnext);
|
||||
|
||||
for (; s<se; s++)
|
||||
{
|
||||
hash = CRC1 (hash, *s, table);
|
||||
}
|
||||
return hash ^ 0xffffffff;
|
||||
return crc32(0, (const unsigned char *)(&smf->type), offsetof(FSpriteModelFrame, hashnext) - offsetof(FSpriteModelFrame, type));
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
#include "i_mainwindow.h"
|
||||
|
||||
#include <time.h>
|
||||
#include <zlib.h>
|
||||
#include <miniz.h>
|
||||
|
||||
// MACROS ------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <stdlib.h>
|
||||
#include <zlib.h>
|
||||
#include <miniz.h>
|
||||
#include <stdint.h>
|
||||
#ifdef _MSC_VER
|
||||
#include <malloc.h> // for alloca()
|
||||
|
|
|
|||
5
src/common/thirdparty/m_crc32.h
vendored
5
src/common/thirdparty/m_crc32.h
vendored
|
|
@ -32,12 +32,11 @@
|
|||
**
|
||||
*/
|
||||
#pragma once
|
||||
#include <zlib.h>
|
||||
#include <miniz.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// zlib includes some CRC32 stuff, so just use that
|
||||
// miniz includes some CRC32 stuff, so just use that
|
||||
|
||||
inline const uint32_t *GetCRCTable () { return (const uint32_t *)get_crc_table(); }
|
||||
inline uint32_t CalcCRC32 (const uint8_t *buf, unsigned int len)
|
||||
{
|
||||
return crc32 (0, buf, len);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
#include <stdint.h>
|
||||
#include <zlib.h>
|
||||
#include <miniz.h>
|
||||
#include <new>
|
||||
#include <algorithm>
|
||||
#include <forward_list>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
#include <stdint.h>
|
||||
#include <zlib.h>
|
||||
#include <miniz.h>
|
||||
#include <new>
|
||||
#include <algorithm>
|
||||
#include <sys/stat.h>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
#endif
|
||||
|
||||
#include <zlib.h>
|
||||
#include <miniz.h>
|
||||
|
||||
#include "m_argv.h"
|
||||
#include "c_dispatch.h"
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#define RAPIDJSON_HAS_CXX11_RANGE_FOR 1
|
||||
#define RAPIDJSON_PARSE_DEFAULT_FLAGS kParseFullPrecisionFlag
|
||||
|
||||
#include <zlib.h>
|
||||
#include <miniz.h>
|
||||
#include "rapidjson/rapidjson.h"
|
||||
#include "rapidjson/writer.h"
|
||||
#include "rapidjson/prettywriter.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue