From eb54822c966b04245c5c401b19eb8242091a39f9 Mon Sep 17 00:00:00 2001 From: Qiuzhizhe <2660974080@qq.com> Date: Sun, 24 Apr 2022 15:36:33 +0800 Subject: [PATCH 1/2] Support 1.18.30.04 --- api/block/BlockSource.cpp | 2 +- api/entity/Actor.cpp | 2 +- api/lib/SymHook.h | Bin 30044 -> 14185 bytes changelog.md | 4 ++++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/api/block/BlockSource.cpp b/api/block/BlockSource.cpp index 3d396f8..c8c7b77 100644 --- a/api/block/BlockSource.cpp +++ b/api/block/BlockSource.cpp @@ -26,7 +26,7 @@ namespace trapdoor { void BlockSource::setBlock(BlockPos *blockPos, Block *block) { SYM_CALL(void (*)(void *, int, int, int, Block *, int), - BlockSource_setBlock_71ce9a25, this, blockPos->x, blockPos->y, + BlockSource_setBlock_30b3a288, this, blockPos->x, blockPos->y, blockPos->z, block, 3); } diff --git a/api/entity/Actor.cpp b/api/entity/Actor.cpp index b244ac1..0750ece 100644 --- a/api/entity/Actor.cpp +++ b/api/entity/Actor.cpp @@ -36,7 +36,7 @@ namespace trapdoor { } Vec3 *Actor::getPos() { - return SYM_CALL(Vec3 * (*)(void *), SymHook::Actor_getPos_cecb628b, + return SYM_CALL(Vec3 * (*)(void *), SymHook::Actor_getPosition_8f5a9c5f, this); } diff --git a/api/lib/SymHook.h b/api/lib/SymHook.h index b5d250003df5ba97afa7b98cc3f028015c92e6e3..118694dd6bd191a72c20d3751e4879f40603aa04 100644 GIT binary patch literal 14185 zcmds8>u=n~5&!PL;(!{392f}SucQ|5X&H?b#j<2Kg|Xm~ONsF5cp-U;)uR7cG z<>PdBwoks_2&33uU;$Rf7qOu%4ddTRz5h0tZa4h&UPH4Ou;h{m$VfM!Zh`lqod@wBkhZ(xt`&g+7Hi!dW}z~ z1oZy<`m!pvakVYz+k6>bvR^1Da109k2>-gCtn&EtWxg$9%6^^jA1?9||L^K7Dv~%) zXo5Sl_071TQTP+Rr>p7hcKw;}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bzr|L=>) zl&7{n0Por3#~A1c?@bW{+NoNj(tqyptEY4AN`CsVcO;RI!(;!P_I$PTbd%&*k(+k$FN0+)TZB$PI zQP54lk3oGsN9gki^*j~yrQJZo#*cnAlOAiKkDJ0uu;Met_tm5Zz-W^H|Euid7*~qq z&mixw5h-rqi3^e~s!Zi63-K`i5x+T5N`T<5bj@Y)m!v7fNKqTPFzKD$=?U*q|dD;|G2D*b7hE~@ Date: Sun, 24 Apr 2022 15:39:48 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8A=8A=E8=AF=AD=E8=A8=80=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=B7=BB=E5=8A=A0=E8=BF=9B=E6=89=93=E5=8C=85=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 12 ++++++------ tools/package/npack.py | 18 ++++++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 31fc89c..8fbd9d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,14 +3,14 @@ project(mod) set(CMAKE_CXX_STANDARD 17) #因为ABI原因这个项目只能msvc编译 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") - add_compile_options(/wd4828 /wd4819 /Zi /EHsc /utf-8 /MP) - #set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ") - #set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF") + add_compile_options(/wd4828 /wd4819 /EHsc /utf-8) + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi") + set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF") else () message(this project don't support GNU gcc, please use MSVC instead) endif () -#set(CMAKE_BUILD_TYPE release) +set(CMAKE_BUILD_TYPE release) set(MOD_API_NAME trapdoor) @@ -62,8 +62,8 @@ target_include_directories(${MOD_API_NAME} target_link_libraries(${MOD_API_NAME} ${PROJECT_SOURCE_DIR}/api/lib/detours.lib) ####################这里是具体功能########################## -set(TRAPDOOR_VERSION 0.10.2) -set(MCBE_VERSION 1.18.12.01) +set(TRAPDOOR_VERSION 0.10.3) +set(MCBE_VERSION 1.18.30.04) set(BETA OFF) set(TEST_NUMBER 1) add_definitions(-DTD_VERSION="${TRAPDOOR_VERSION}") diff --git a/tools/package/npack.py b/tools/package/npack.py index 0cfb50e..321ccbb 100644 --- a/tools/package/npack.py +++ b/tools/package/npack.py @@ -1,11 +1,13 @@ import os import zipfile -project_root_dir = 'C:/Users/xhy/dev/TrapDoor/' -build_dir = 'build/' -other_files = ['changelog.md', - 'trapdoor-disclaimer.md', - 'LICENSE' +# project_root_dir = 'C:/Users/xhy/dev/TrapDoor/' +project_root_dir = os.path.abspath('../..') +build_dir = '/build/' +lang_dir = '/tools/package/lang/' +other_files = ['/changelog.md', + '/trapdoor-disclaimer.md', + '/LICENSE' ] @@ -47,10 +49,14 @@ def pack(dll_file): version + '.dll', arcname=version+'.dll') release_zip_file.write(project_root_dir + build_dir + version + '.pdb', arcname=version+'.pdb') + release_zip_file.write(project_root_dir + lang_dir + + 'zh_cn.json', arcname= 'trapdoor/lang/zh_cn.json') + release_zip_file.write(project_root_dir + lang_dir + + 'en_us.json', arcname= 'trapdoor/lang/en_us.json') for other_file in other_files: print('pack: ' + other_file) release_zip_file.write(project_root_dir+other_file, - arcname='others/'+other_file) + arcname='trapdoor/others/'+other_file) release_zip_file.close() input('success pack release:' + version+'.zip\n')