diff --git a/CLAUDE.md b/CLAUDE.md index 2dc8f45..2e8df1d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -159,6 +159,24 @@ these, ideally all four: atlases, shader patterns. Most useful for "how do I do this GL thing with Silk.NET on net10 idiomatically?" Less useful for protocol or character appearance (dat editor, not game client). +- **`references/WorldBuilder-ACME-Edition/`** — **Fork of WorldBuilder + with decompiled AC client source code.** THE most authoritative + reference for any terrain/rendering algorithm. Key files: + - `WorldBuilder.Tests/ClientReference.cs` — faithful C# port of + decompiled `CLandBlockStruct.cpp` with exact offsets. Ground truth + for split direction, palCode, vertex height, vertex position. + **Check this BEFORE implementing any terrain algorithm.** + - `WorldBuilder.Tests/TerrainConformanceTests.cs` — exhaustive + sweeps (4M+ cells) proving ACME matches the retail client. + - `StaticObjectManager.cs` — complete GfxObj+Setup rendering with + CreaturePalette assembly (the ObjDesc pipeline). + - `EnvCellManager.cs` — dungeon cell rendering with portal + visibility traversal and collision mesh caching. + - `TerrainGeometryGenerator.cs` — `GetHeight()` and `GetNormal()` + that match the mesh index buffer exactly. + Already proved its value: solved the triangle-boundary Z bug that + resisted 5 other fix attempts. Use as the oracle for ALL dat + interpretation algorithms. - **`references/Chorizite.ACProtocol/`** — clean-room C# protocol library generated from a protocol XML description. Useful sanity check on field order, packed-dword conventions, type-prefix handling. The