From 671f9ba246c76b13465aabe635d445da1bc6ee58 Mon Sep 17 00:00:00 2001 From: mkrsym1 Date: Thu, 17 Aug 2023 22:51:43 +0300 Subject: [PATCH] Add temporary workaround for 3rd 6.9.0 --- game_payload/blob/core.o | Bin 7981 -> 7981 bytes game_payload/src/hi3.c | 16 ++++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/game_payload/blob/core.o b/game_payload/blob/core.o index 992474813f908b40844ccbf4f83ad1ffb9d8b744..423231208049f5f667321cfffb4369d9051aacd6 100644 GIT binary patch delta 394 zcmZ2$x7Kb$9TQ{E|)G z|NqY~-vCs?;L&`5(Z})zf9vDF|Np<_{P+Jq$e9Kny}TeJ-3xgL61A{V{6$WIffLSR( zmIRnp0A%TcS+jsF0WfPmkfjG^?SPBz1+w(PVwd4!H{j}6Ss54%z_R>6mLUVfW_!_h FoB-AnadZFx delta 394 zcmZ2$x7Kb$9TQ{Ab% z-)2^j{L09{kk(koUJ}pW`VzwCOv&eOy*pWi#e^|vvM0-8!yQ~8{hAl}x9@RT0AhB# zsCaz8o~CRQaGcSjH$}yx^VTs(77qUH|2-IAdvKngtjwCm_;zv^Yr5X*-~a#f%ew$I zH6LK~vAn_G`ugwx|1Smq{r?Ygo`FX%FVI8=uoGXVO;%)6GCcYRA!h-Xn+X&(Jo!=& zsN3+{%Pl}EjbFY6q?ciH4qFH>?fms{iVq1YMeX!VRxYz}_I#yN&1_Q7xKagbzbc(&`J5B&a Cx^9O6 diff --git a/game_payload/src/hi3.c b/game_payload/src/hi3.c index f3e2c65..bcd43c3 100644 --- a/game_payload/src/hi3.c +++ b/game_payload/src/hi3.c @@ -3,16 +3,28 @@ #include +const char *HI3_TXS_SECTION_NAME_OLD = ".bh3"; +const char *HI3_TXS_SECTION_NAME_NEW = ".ace"; + const char *HI3_BASE_MODULE_NAME = "BH3Base.dll"; const char *HI3_ASSEMBLY_PATH = "BH3_Data\\Native\\UserAssembly.dll"; -const char *HI3_TXS_SECTION_NAME = ".bh3"; const char *HI3_TVM_SECTION_NAME = ".tvm0"; void hi3_fill_data(struct game_data *buf) { + // !!! 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; + } + buf->base_module_name = HI3_BASE_MODULE_NAME; buf->assembly_path = HI3_ASSEMBLY_PATH; - buf->txs_section_name = HI3_TXS_SECTION_NAME; buf->tvm_section_name = HI3_TVM_SECTION_NAME; buf->unityplayer_callback = NULL;