chore: update deps

This commit is contained in:
2025-05-19 10:31:38 +02:00
parent b25aeb38a5
commit 84d7702ba2
10 changed files with 33 additions and 9 deletions

View File

@ -18,6 +18,14 @@ namespace fastfiles
{
utils::hook::detour db_try_load_x_file_internal_hook;
utils::hook::detour db_find_x_asset_header_hook;
utils::hook::detour db_read_stream_file_hook;
int db_read_stream_file_stub(int allow_abort, int finish)
{
// always use lz4 compressor type when reading stream files
*game::g_compressor = game::DB_COMPRESSOR_LZX;
return db_read_stream_file_hook.invoke<int>(allow_abort, finish);
}
void db_try_load_x_file_internal(const char* zone_name, const int flags)
{
@ -145,6 +153,9 @@ namespace fastfiles
}
});
// Allow loading of mixed compressor types
utils::hook::nop(SELECT_VALUE(0x1401536D7, 0x140242DF7), 2);
reallocate_asset_pool<game::ASSET_TYPE_FONT, 48>();
if (!game::environment::is_sp())
@ -155,6 +166,9 @@ namespace fastfiles
utils::hook::inject(0x14026FFAC, xmodel_pool + 8);
utils::hook::inject(0x14027463C, xmodel_pool + 8);
utils::hook::inject(0x140274689, xmodel_pool + 8);
// Fix compressor type on streamed file load
db_read_stream_file_hook.create(0x14027AA70, db_read_stream_file_stub);
}
}
};

View File

@ -362,7 +362,7 @@ namespace gsc
build = static_cast<xsk::gsc::build>(static_cast<unsigned int>(build) | static_cast<unsigned int>(xsk::gsc::build::dev_blocks));
}
gsc_ctx->init(build, []([[maybe_unused]] auto const* ctx, const auto& included_path) -> std::pair<xsk::gsc::buffer, std::vector<std::uint8_t>>
gsc_ctx->init(build, []([[maybe_unused]] const auto* ctx, const auto& included_path) -> std::pair<xsk::gsc::buffer, std::vector<std::uint8_t>>
{
const auto script_name = std::filesystem::path(included_path).replace_extension().string();

View File

@ -16,7 +16,7 @@ namespace mods
{
utils::hook::detour sys_create_file_hook;
void db_build_os_path_from_source(const char* zone_name, game::FF_DIR source, int size, char* filename)
void db_build_os_path_from_source(const char* zone_name, const game::FF_DIR source, const int size, char* filename)
{
char user_map[MAX_PATH]{};
@ -201,7 +201,7 @@ namespace mods
if (!mod_name.empty() && !mod_name.starts_with("mods/"))
{
mod_name = "mods/" + mod_name;
mod_name.insert(0, "mods/");
}
// change fs_game if needed