port 2D step 5b: PackInitialize + pack:// asset_io backend over the ported EterPackManager
Platform UserInterface PackInitialize/PackSingletons (40250 bootstrap, on-disk dbname resolution), EterBase/FileLoader.cpp mirror, mtpack40250 backend behind asset_io's pack:// scheme and a Metin2Pack node. port_eterpack_test now registers through PackInitialize. Nothing reads pack:// at runtime yet; port-map stays TODO. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,9 @@
|
||||
// - user:// (extracted cache)
|
||||
// - absolute OS paths (dev: AssetRoot points at mtgodot-poc/assets/)
|
||||
// godot::FileAccess handles all three transparently.
|
||||
// - pack://<40250 path> (e.g. pack://locale/en/item_proto, pack://d:/ymir work/pc/...): the 40250 packs,
|
||||
// read through the ported CEterPackManager once Metin2Pack.initialize(<Client dir>) has run
|
||||
// (platform/PackBackend.h). The path after pack:// is passed as UTF-8.
|
||||
#pragma once
|
||||
|
||||
#include <godot_cpp/variant/packed_byte_array.hpp>
|
||||
@@ -20,6 +23,8 @@
|
||||
|
||||
namespace mtgodot {
|
||||
|
||||
inline constexpr const char *PACK_SCHEME = "pack://";
|
||||
|
||||
// Whole-file read. Empty PackedByteArray on failure (path missing / unreadable).
|
||||
godot::PackedByteArray read_file(const godot::String &path);
|
||||
bool file_exists(const godot::String &path); // FileAccess::file_exists wrapper
|
||||
|
||||
Reference in New Issue
Block a user