AVA2 client Windows parity passes (gr2 BitKnit2/64-bit, GamePhase handlers, python modules)

- gr2: BitKnit2 decompression, 64-bit LE files, compressed curves
- net: remaining GamePhase handlers, generated GC packet table
- python: event/chat/chr/minimap/guild/quest/messenger/shop-search and
  other native modules ported against the AVA2 Windows client
- render: D3D8 fixed-function lighting in Gr2ModelRenderer, terrain
  without baked shade; cape/NPC equipment attachment
- tests + audits updated; docs/PORT-PLAN.md and WINDOWS-PARITY.md

Batch 4 (render pipeline: background.*, app.RenderGame/UpdateGame,
camera bindings, main.cpp fake-content removal) is still in progress.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-10-08 10:43:01 +09:00
co-authored by Claude Opus 5.5
parent 9f748eb05a
commit 9077aa389a
145 changed files with 22692 additions and 6584 deletions
+6 -6
View File
@@ -88,12 +88,12 @@ bool File::Impl::extract_mesh(Ref mesh_obj, Ref mesh_type,
const auto& vdms = parse_type(mVD->ref_type);
const TypeMember* mVerts = find_member(vdms, "Vertices");
if (!mVerts) { MDBG("no Vertices member (vdms=%zu)\n", vdms.size()); return false; }
// ReferenceToVariantArray on-disk (32-bit): {def* Type; int32 Count; void* Ptr}
// (granny_data_type_definition.cpp: Ptr32 + int32 + Ptr32)
// ReferenceToVariantArray on-disk: {def* Type; int32 Count; void* Ptr}, packed
// (granny_data_type_definition.cpp: Ptr + int32 + Ptr; ptr = 4 or 8 bytes)
Ref vslot = member_slot(vd, *mVerts);
Ref vtype = follow({vslot.section, vslot.offset + 0});
int32_t vcount = rd_i32({vslot.section, vslot.offset + 4});
Ref vdata = follow({vslot.section, vslot.offset + 8});
int32_t vcount = rd_i32({vslot.section, vslot.offset + ptr});
Ref vdata = follow({vslot.section, vslot.offset + ptr + 4});
MDBG("Vertices count=%d vtype=(%d,%u) vdata=(%d,%u)\n",
vcount, vtype.section, vtype.offset, vdata.section, vdata.offset);
if (vcount <= 0 || vcount > (1 << 24) || !vtype.valid() || !vdata.valid()) return false;
@@ -365,10 +365,10 @@ int32_t File::Impl::intern_material(Ref mat_obj, Ref mat_type, int depth) {
return idx;
}
// VariantRef 在 32 位文件里 = {ptr Type; ptr Object}。
// VariantRef = {ptr Type; ptr Object}(ptr = 4 或 8 字节)。
bool File::Impl::extended_i32(Ref slot, const char* name, int32_t& out) {
Ref type = follow(slot);
Ref obj = follow({slot.section, slot.offset + 4});
Ref obj = follow({slot.section, slot.offset + ptr});
if (!type.valid() || !obj.valid()) return false;
const TypeMember* m = find_member(parse_type(type), name);
if (!m || (m->type != detail::MT_Int32 && m->type != detail::MT_UInt32)) return false;