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:
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
// Metin2Pack — GDScript access to the 40250 packs (platform/PackBackend.h).
|
||||
//
|
||||
// Metin2Pack.initialize(AssetRoot.client_path()) # registers <Client>/pack/Index once
|
||||
// var b := Metin2Pack.get_bytes("locale/en/item_proto")
|
||||
//
|
||||
// Every native reader that takes a path accepts "pack://<40250 path>" through asset_io.
|
||||
|
||||
#include <godot_cpp/classes/object.hpp>
|
||||
#include <godot_cpp/variant/packed_byte_array.hpp>
|
||||
#include <godot_cpp/variant/string.hpp>
|
||||
|
||||
namespace mtgodot {
|
||||
|
||||
class Metin2Pack : public godot::Object {
|
||||
GDCLASS(Metin2Pack, godot::Object)
|
||||
|
||||
public:
|
||||
static bool initialize(const godot::String &client_dir);
|
||||
static bool is_ready();
|
||||
static bool exists(const godot::String &name);
|
||||
static godot::PackedByteArray get_bytes(const godot::String &name);
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
};
|
||||
|
||||
} // namespace mtgodot
|
||||
Reference in New Issue
Block a user