diff --git a/src/dusk/randomizer/game/randomizer_context.cpp b/src/dusk/randomizer/game/randomizer_context.cpp index 18f8d67f84..200ce68aa0 100644 --- a/src/dusk/randomizer/game/randomizer_context.cpp +++ b/src/dusk/randomizer/game/randomizer_context.cpp @@ -8,13 +8,12 @@ #include "dusk/randomizer/game/tools.h" #include "dusk/randomizer/game/stages.h" #include "dusk/randomizer/game/verify_item_functions.h" +#include "dusk/randomizer/generator/utility/crc32.hpp" #include "dusk/randomizer/generator/utility/endian.hpp" #include "dusk/randomizer/generator/utility/yaml.hpp" #include "dusk/randomizer/generator/randomizer.hpp" #include "dusk/randomizer/generator/utility/text.hpp" -#include - #include #include "d/actor/d_a_alink.h" @@ -885,7 +884,7 @@ u32 getActorPatchesCurrentStageKey(u8 roomNo) { } u32 getStageObjCRC32(u8* data, size_t size) { - return crc32(0, (data), size); + return randomizer::utility::crc32(data, size); } stage_tgsc_data_class parseObjData(const YAML::Node& objectNode) { diff --git a/src/dusk/randomizer/generator/seedgen/config.cpp b/src/dusk/randomizer/generator/seedgen/config.cpp index 2818d13627..f467bbebee 100644 --- a/src/dusk/randomizer/generator/seedgen/config.cpp +++ b/src/dusk/randomizer/generator/seedgen/config.cpp @@ -2,11 +2,11 @@ #include "seed.hpp" +#include "../utility/crc32.hpp" #include "../utility/log.hpp" #include "../utility/platform.hpp" #include "../utility/random.hpp" #include "../utility/yaml.hpp" -#include #include @@ -454,7 +454,7 @@ namespace randomizer::seedgen::config hashStr += "Spoiler Log: True"; } - const size_t integerSeed = crc32(0L, reinterpret_cast(hashStr.data()), hashStr.length()); + const size_t integerSeed = utility::crc32(hashStr.data(), hashStr.length()); utility::random::RandomInit(integerSeed); return 0; diff --git a/src/dusk/randomizer/randomizer.cmake b/src/dusk/randomizer/randomizer.cmake index 1c30ca59f2..a6296edece 100644 --- a/src/dusk/randomizer/randomizer.cmake +++ b/src/dusk/randomizer/randomizer.cmake @@ -56,7 +56,7 @@ FetchContent_MakeAvailable(yaml-cpp base64pp battery-embed) string(LENGTH "${CMAKE_SOURCE_DIR}/" SOURCE_PATH_SIZE) set(GAME_COMPILE_DEFS ${GAME_COMPILE_DEFS} SOURCE_PATH_SIZE=${SOURCE_PATH_SIZE}) -set(GAME_LIBS ${GAME_LIBS} yaml-cpp::yaml-cpp ZLIB::ZLIB base64pp) +set(GAME_LIBS ${GAME_LIBS} yaml-cpp::yaml-cpp base64pp) file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/randomizer") # Put data files together for easier manipulation