diff --git a/Makefile b/Makefile index 36e77e4..0f95cba 100644 --- a/Makefile +++ b/Makefile @@ -11,5 +11,5 @@ dist-no-7z: all @cp -r dist/* out/ dist: dist-no-7z - @cd out && 7zz a -t7z ../dist.7z . + @cd out && 7z a -t7z ../dist.7z . @rm -rf out diff --git a/meson.build b/meson.build index 35b6104..93aa265 100644 --- a/meson.build +++ b/meson.build @@ -55,6 +55,7 @@ library( zlib_proj.get_variable('zlib_lib'), libtomcrypt.get_variable('tomcryptlib'), ], + link_args : '-Wl,--allow-multiple-definition', include_directories: [ 'src', minhook.get_variable('minhook_inc'), diff --git a/src/constants.h b/src/constants.h index 33222f1..78063c3 100644 --- a/src/constants.h +++ b/src/constants.h @@ -1,6 +1,8 @@ #pragma once #include +#define crcPOLY 0x82f63b78 + enum class GameVersion : XXH64_hash_t { UNKNOWN = 0, JPN00 = 0x4C07355966D815FB, diff --git a/src/dllmain.cpp b/src/dllmain.cpp index 39e7d61..98985ec 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -5,7 +5,6 @@ #include "poll.h" #include #include -#define POLY 0x82f63b78 GameVersion gameVersion = GameVersion::UNKNOWN; std::vector plugins; @@ -38,7 +37,7 @@ uint32_t crc32c(uint32_t crc, const unsigned char *buf, size_t len) while (len--) { crc ^= *buf++; for (k = 0; k < 8; k++) - crc = (crc >> 1) ^ (POLY & (0 - (crc & 1))); + crc = (crc >> 1) ^ (crcPOLY & (0 - (crc & 1))); } return ~crc; }