port 2D step 5a: EterPack/EterPackManager + EterBase file units against the real 40250 packs
- Mirror copies: EterPack (EterPack, EterPackManager, EterPackCursor, CSHybridCrypt policy, Inline.h) and EterBase logic units tea/lzo/Timer/Stl/Random, with PORT-tagged width fixes (LONG index fields, static_assert(sizeof(TEterPackIndex) == 192), tea_word = Win32 unsigned long). - TEA pack keys are extracted from the reference EterPack.cpp at configure time into build/.../EterPackKeys.generated.h; nothing key-bearing is tracked. - Platform EterBase: FileBase (stdio, case-insensitive fallback), MappedFile (mmap / MapViewOfFile), CRC32, Debug, Utils StringPath/StringLowers. - Win32Crt: CreateDirectory/DeleteFile/_access/MAKEFOURCC; Win32MinMax.h min/max (force-included on MinGW, whose windows.h omits them in C++). - tests/port_eterpack_test: registers pack/Index like PackInitialize and checks 119 registrations / 103 packs + root / 54891 entries / 52609 paths / 2282 overrides with first-registered-wins, and that exactly the 4 short-layout SECURITY files fail to load. - 2R count corrected (136 -> 119 registrations, 103 distinct packs + root). Not runtime-reachable yet (asset_io pack backend is step 5b), so port-map statuses stay TODO. port_gate: macos/android/ios/windows PASS. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+4
-3
@@ -209,7 +209,7 @@ extension/third_party/cpython-2.7.18/ # 静态库(2P 批次
|
||||
(`pack/Index`)→ `CEterPackManager::RegisterPack`(每个包再注册 `<name>_texcache`,最后 `RegisterRootPack("pack/root")`)
|
||||
→ `CEterPack::__BuildIndex`(`.eix` 全部是 `MCOZ`:TEA + LZO 包着 `EPKD` v2,每条 192 字节)→ `Get2`。
|
||||
|
||||
1. **类型统计**(Index 注册的 136 个包,54,891 条,52,609 个不同路径):
|
||||
1. **类型统计**(Index 注册到的 103 个包加 `root`,54,891 条,52,609 个不同路径):
|
||||
|
||||
| 类型 | 文件数 | 存储 | 解码后 |
|
||||
| --- | --- | --- | --- |
|
||||
@@ -225,7 +225,8 @@ extension/third_party/cpython-2.7.18/ # 静态库(2P 批次
|
||||
移植后的 `EterPack.cpp` 需要这两组常量;按"密钥不进仓库",由构建时从参考树生成一个 gitignore 的头文件,不直接写进源码。
|
||||
3. **注册顺序与覆盖**:
|
||||
- `Index` 第 0 行是 `PACK`,后面是 (目录, 名字) 对,共 124 个名字。
|
||||
- 实际存在的包有 136 个:Index 里的包,加上两个 `metin2_patch_dragon_rock*_texcache`,再加 `root`。
|
||||
- 124 对里有 119 次 `RegisterPack` 找到了包(有几个名字重复出现),去重后 103 个包(含两个
|
||||
`metin2_patch_dragon_rock*_texcache`),再加 `root`。2D 用移植后的 `CEterPackManager` 复核过(原先写的 136 有误)。
|
||||
- 缺失的包:106 个 `_texcache`,以及 `locale_{ae,bg,ca,mx,pa,uk,us}`。40250 遇到缺失的包只记日志、继续执行。
|
||||
- 目录里有、但没注册的文件,40250 永远不会读到:`Outdoor`、`Psyco`(0 字节)、`outdoorempirebattle1`、两个 `.rdch`。
|
||||
`.rdch` 在源码里没有任何引用。
|
||||
@@ -333,7 +334,7 @@ extension/third_party/cpython-2.7.18/ # 静态库(2P 批次
|
||||
| `mob_proto` | `proto.cpp` | **读不了**:每条 255 字节 vs 335 字节,加密同上 | 同上 |
|
||||
| `item_list.txt` | `item_list.gd` | 177 行不同(m2dev 有 dummy 条目等);40250 放在 `locale/en/`,m2dev 在 `locale/common/` | 按 40250 路径读取 |
|
||||
| `locale_interface.txt`、`itemdesc.txt`、`skilldesc.txt`、`skilltable.txt` | UI、技能表 | 20 行 / 2 行 / 2 行 / 位置不同 | 按 40250 路径读取 |
|
||||
| 模型、贴图、地图(PC、Monster、Outdoor 等) | 渲染 | 40250 是经典 `.eix/.epk`,136 个包、52,609 个路径,全部可以本地解码(2R) | 移植 `EterPack`/`EterPackManager` 接到 `asset_io`,请求改用 40250 路径(见 2R 第 6 条) |
|
||||
| 模型、贴图、地图(PC、Monster、Outdoor 等) | 渲染 | 40250 是经典 `.eix/.epk`,103 个包加 `root`、52,609 个路径,全部可以本地解码(2R) | 移植 `EterPack`/`EterPackManager` 接到 `asset_io`,请求改用 40250 路径(见 2R 第 6 条) |
|
||||
|
||||
切换步骤(批次 2D):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user