forked from alterware/s1-mod
chore: update deps
This commit is contained in:
2
deps/GSL
vendored
2
deps/GSL
vendored
Submodule deps/GSL updated: 3325bbd33d...466e4ebaa5
2
deps/asmjit
vendored
2
deps/asmjit
vendored
Submodule deps/asmjit updated: e8c8e2e48a...cecc73f297
2
deps/gsc-tool
vendored
2
deps/gsc-tool
vendored
Submodule deps/gsc-tool updated: 2d9781ce0c...c508e5b10f
2
deps/libtomcrypt
vendored
2
deps/libtomcrypt
vendored
Submodule deps/libtomcrypt updated: a6b9aff7aa...d448df1938
2
deps/minhook
vendored
2
deps/minhook
vendored
Submodule deps/minhook updated: c3fcafdc10...565968b285
@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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
|
||||
|
@ -1471,7 +1471,7 @@ namespace game
|
||||
DB_ZONE_BASEMAP = 0x20,
|
||||
DB_ZONE_TRANSIENT_POOL = 0x40,
|
||||
DB_ZONE_TRANSIENT_MASK = 0x40,
|
||||
DB_ZONE_CUSTOM = 0x80,
|
||||
DB_ZONE_CUSTOM = 0x1000,
|
||||
};
|
||||
|
||||
enum FF_DIR
|
||||
@ -1486,6 +1486,15 @@ namespace game
|
||||
HANDLE handle;
|
||||
};
|
||||
|
||||
enum DB_CompressorType
|
||||
{
|
||||
DB_COMPRESSOR_INVALID = 0x0,
|
||||
DB_COMPRESSOR_ZLIB = 0x1,
|
||||
DB_COMPRESSOR_UNK2 = 0x2,
|
||||
DB_COMPRESSOR_PASSTHROUGH = 0x3,
|
||||
DB_COMPRESSOR_LZX = 0x4,
|
||||
};
|
||||
|
||||
namespace mp
|
||||
{
|
||||
enum
|
||||
|
@ -269,6 +269,7 @@ namespace game
|
||||
WEAK symbol<XAssetEntry> g_assetEntryPool{0x142CC2400, 0x14379F100};
|
||||
WEAK symbol<int> g_poolSize{0x140804140, 0x1409B4B90};
|
||||
WEAK symbol<const char*> g_assetNames{0x140803C90, 0x1409B3180};
|
||||
WEAK symbol<int> g_compressor{0x141598580, 0x141E0B080};
|
||||
|
||||
WEAK symbol<DWORD> threadIds{0x149632EC0, 0x147DCEA30};
|
||||
|
||||
|
Reference in New Issue
Block a user