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:
shenlei
2026-09-23 01:34:08 +09:00
co-authored by Claude Opus 5
parent 5a26e93f07
commit 232d0461be
28 changed files with 1367 additions and 332 deletions
+2 -2
View File
@@ -46,8 +46,8 @@ func _run() -> void:
if ClassDB.class_exists("Metin2Proto"):
proto = ClassDB.instantiate("Metin2Proto")
get_root().add_child(proto)
var proto_path := assets.path_join("locale/locale/en/item_proto")
if not FileAccess.file_exists(proto_path) or not proto.call("load_item_proto", proto_path):
var proto_path := AssetRoot.locale_file("item_proto")
if proto_path == "" or not proto.call("load_item_proto", proto_path):
proto = null
var effects := EffectRegistry.new()
effects.setup(assets)