SR 1.5.0: updated checksums, patch address

This commit is contained in:
mkrsym1 2023-11-13 22:13:43 +02:00
parent cf34ac6e01
commit ab4615dfe9

View File

@ -9,7 +9,7 @@ const char *HSR_ASSEMBLY_PATH = "GameAssembly.dll";
const char *HSR_TXS_SECTION_NAME = ".ace"; const char *HSR_TXS_SECTION_NAME = ".ace";
const char *HSR_TVM_SECTION_NAME = ".tvm0"; const char *HSR_TVM_SECTION_NAME = ".tvm0";
#define HSR_VERSION "1.4.0" #define HSR_VERSION "1.5.0"
enum hsr_region { enum hsr_region {
HSR_INVALID, HSR_INVALID,
@ -23,15 +23,15 @@ struct crc_region_pair {
}; };
const struct crc_region_pair HSR_REGIONS[] = { const struct crc_region_pair HSR_REGIONS[] = {
{ 0xbae3646f, HSR_OS }, // os v1.4.0 { 0xb90cbc61, HSR_OS }, // os v1.5.0
{ 0x9e5c2f80, HSR_CN } // cn v1.4.0 { 0xee3eebfb, HSR_CN } // cn v1.5.0
}; };
#define JUMP_SIZE (6 + sizeof(void*)) #define JUMP_SIZE (6 + sizeof(void*))
// Temporarily hardcoded offset // Temporarily hardcoded offset
// v1.4.0, same for os and cn // v1.5.0, same for os and cn
#define WTSUD_PATCH_OFFSET 0x16430 #define WTSUD_PATCH_OFFSET 0x1b800 // 0x16550 will also work
char wtsud_original_bytes[JUMP_SIZE]; char wtsud_original_bytes[JUMP_SIZE];
char *wtsud_patch_addr; char *wtsud_patch_addr;
@ -49,12 +49,12 @@ static void _wtsud_stub() {
} }
static void _unityplayer_callback(HMODULE unityModule) { static void _unityplayer_callback(HMODULE unityModule) {
if (utils_env_enabled("SRFIX_DISABLE")) { if (utils_env_enabled("DXPATCH_DISABLE")) {
msg_info_a("Shared resources fix disabled. The game may not work"); msg_info_a("DirectX library verification patch disabled. The game will not work");
return; return;
} }
// Remove dependency on shared resources by patching WriteTextureStatisticUserData // Remove check by patching WriteTextureStatisticUserData
unload_ctr_inc(); unload_ctr_inc();
wtsud_patch_addr = ((char*)unityModule) + WTSUD_PATCH_OFFSET; wtsud_patch_addr = ((char*)unityModule) + WTSUD_PATCH_OFFSET;