Networked client on the existing Godot 4.7 + libgr2 renderer:
- net: m2dev wire protocol (libsodium KX + XChaCha20), auth/select/game
phases, EntityStore world model, ~all GC/CG headers. char create/delete,
private shop / mall / cube, SHOP_GC_START_EX, guild, party (+ CG_PARTY_SET_STATE),
quests, dragon soul, refine, safebox, exchange.
- UI: in-game windows migrated 1:1 from the reference uiscript/root .py —
char status (/stat), inventory+equipment, select-item ([SELECT_ITEM] quest
token), system-option + game-option + ESC system menu, private-shop 39-grid,
party info board, shop tabs, atlas, minimap, quickbar, chat, …
- EterGrnLib polish: GR2 material blend/two-sided, LOD crossfade, motion-event
dispatch, contact shadow, ray-AABB picking, weapon grip pre-transform.
Portable asset IO (A1) — all extension/libgr2/formats/mtproto reads routed
through godot::FileAccess (res:// PCK works on iOS/Android); standalone-lib
*_path() kept for the non-Godot CTests. AssetResolver + PropertyRegistry
switched to a baked index (bake_asset_index.gd) instead of std::filesystem.
Mobile builds: build-{android,ios}.sh, export-android.sh, pack-assets.sh,
gen-debug-keystore.sh. Assets ship as a zip mounted at runtime by
project/asset_pack.gd (adb push now; HTTP download is a drop-in later).
ctest 10/10, 34 GDScript suites, macOS/iOS/Android all build.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013EJxkHiNKS4kybHS3XKyAJ
32 lines
1.5 KiB
C++
32 lines
1.5 KiB
C++
// .spt —— SpeedTree RT 私有格式(IDV Inc.)。
|
||
//
|
||
// W4 调研结论(2026-08-29):**几何无法读**。`.spt` 的解析在闭源 `CSpeedTreeRT::LoadTree()`
|
||
// 里(`m2dev-client-src-main/extern/library/SpeedTree/speedtree_static.lib`,实测 COFF x86-64,
|
||
// IDV 专有,不能链进 macOS/移动端、不可随意分发);`SpeedTreeLib/` 是渲染 wrapper,不含 parser。
|
||
// → 运行时使用读取真实 bark/composite atlas 的 proxy;真几何走经授权的 Windows x64 离线 exporter。
|
||
//
|
||
// 这里只做「嗅探」:读文件头 magic + version,抽取内嵌贴图和 composite atlas token。
|
||
// 不解析枝干/叶片几何。无 godot 依赖。
|
||
#pragma once
|
||
#include <string>
|
||
#include <vector>
|
||
|
||
namespace fmt {
|
||
|
||
struct SptInfo {
|
||
bool ok = false;
|
||
std::string magic; // "__IdvSpt_02_" 等
|
||
uint32_t header_dword = 0; // magic 前的第一个 u32(版本/大小,未定)
|
||
std::vector<std::string> texture_refs; // 内嵌的 *.tga / *.dds 路径(原样)
|
||
// SpeedTree 2 把这两个 atlas 名写成不一定以 NUL 结尾的 token(例如
|
||
// "CompositeMapB1#N"),普通 printable-string 扫描会漏掉。统一转成 .dds,
|
||
// 供无几何 reader 的 proxy 渲染使用。
|
||
std::string composite_texture;
|
||
std::string self_shadow_texture;
|
||
};
|
||
|
||
bool sniff_spt(const std::string& bytes, SptInfo& out);
|
||
bool sniff_spt_file(const std::string& path, SptInfo& out);
|
||
|
||
} // namespace fmt
|