Files
jadeite/game_payload/src/hi3.c

32 lines
877 B
C
Raw Normal View History

2023-06-06 00:23:08 +03:00
#include <utils.h>
2023-06-08 21:44:42 +03:00
#include <msg.h>
2023-06-06 00:23:08 +03:00
2023-06-06 21:14:21 +03:00
#include <game.h>
2023-06-06 00:23:08 +03:00
2023-08-17 22:51:43 +03:00
const char *HI3_TXS_SECTION_NAME_OLD = ".bh3";
const char *HI3_TXS_SECTION_NAME_NEW = ".ace";
2023-08-04 00:19:02 +03:00
const char *HI3_BASE_MODULE_NAME = "BH3Base.dll";
2023-08-05 09:28:36 +03:00
const char *HI3_ASSEMBLY_PATH = "BH3_Data\\Native\\UserAssembly.dll";
2023-06-08 18:36:22 +03:00
const char *HI3_TVM_SECTION_NAME = ".tvm0";
2023-06-06 00:23:08 +03:00
void hi3_fill_data(struct game_data *buf) {
2023-08-17 22:51:43 +03:00
// !!! TEMPORARY WORKAROUND FOR HI3 6.8.0 -> 6.9.0
const uint32_t NEW_CHECKSUM = 0x885b4c63;
uint32_t crc = utils_file_crc32c(L"UnityPlayer.dll");
if (crc == NEW_CHECKSUM) {
buf->txs_section_name = HI3_TXS_SECTION_NAME_NEW;
} else {
buf->txs_section_name = HI3_TXS_SECTION_NAME_OLD;
}
2023-08-04 00:19:02 +03:00
buf->base_module_name = HI3_BASE_MODULE_NAME;
2023-08-05 09:28:36 +03:00
buf->assembly_path = HI3_ASSEMBLY_PATH;
2023-06-06 00:23:08 +03:00
buf->tvm_section_name = HI3_TVM_SECTION_NAME;
2023-06-08 20:13:21 +03:00
buf->unityplayer_callback = NULL;
2023-06-06 00:23:08 +03:00
}