port 2D step 2: 40250 item_proto/mob_proto through CLZO and pack://locale/<lang>/
proto.cpp reads the 40250 MIPX/MMPT tables with the ported CLZO/TEA (156-byte TItemTable, 255-byte SMobTable), replacing the m2dev XChaCha20 236/335 reader. Names follow CItemData::GetName / GetMonsterName (szLocaleName, cp1252). GDScript callers load AssetRoot.locale_file() = pack://locale/en/<name>, which makes the EterPack chain runtime-reachable; port-map entries for the functions a coverage run hit move to PORTED/ADAPTED. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -50,10 +50,10 @@ target_include_directories(mtpack PUBLIC src/pack)
|
||||
target_link_libraries(mtpack PUBLIC mt3p::sodium mt3p::zstd xrender::formats)
|
||||
target_compile_features(mtpack PUBLIC cxx_std_20)
|
||||
|
||||
# --- mtproto: item_proto / mob_proto reader (libsodium + LZO) ---
|
||||
# --- mtproto: item_proto / mob_proto reader, 40250 format (CLZO/TEA from port_platform) ---
|
||||
add_library(mtproto STATIC src/proto/proto.cpp)
|
||||
target_include_directories(mtproto PUBLIC src/proto)
|
||||
target_link_libraries(mtproto PUBLIC mt3p::sodium mt3p::minilzo)
|
||||
target_link_libraries(mtproto PUBLIC port_platform)
|
||||
target_compile_features(mtproto PUBLIC cxx_std_20)
|
||||
|
||||
# --- port_logic + port_platform: 40250 mirror (extension/src/port) and its platform layer
|
||||
@@ -146,10 +146,10 @@ if(BUILD_TESTING AND MT_HOST_BUILD)
|
||||
|
||||
add_executable(proto_test tests/proto_test.cpp)
|
||||
target_link_libraries(proto_test PRIVATE mtproto)
|
||||
add_test(NAME proto.item_mob COMMAND $<TARGET_FILE:proto_test>)
|
||||
if(DEFINED ENV{M2_ASSETS})
|
||||
set_tests_properties(proto.item_mob PROPERTIES ENVIRONMENT "M2_ASSETS=$ENV{M2_ASSETS}")
|
||||
endif()
|
||||
# MT_40250_CLIENT comes from src/port/CMakeLists.txt; skipped (77) without the client, failed under
|
||||
# MT_ASSETS_STRICT=1.
|
||||
add_test(NAME proto.item_mob COMMAND $<TARGET_FILE:proto_test> ${MT_40250_CLIENT})
|
||||
set_tests_properties(proto.item_mob PROPERTIES SKIP_RETURN_CODE 77)
|
||||
|
||||
add_executable(proto_item_layout_test tests/proto_item_layout_test.cpp)
|
||||
target_link_libraries(proto_item_layout_test PRIVATE mtproto)
|
||||
|
||||
Reference in New Issue
Block a user