phase(N.4) Tasks 6+7: skip dat-reader bridge; wire WbMeshAdapter into GameWindow

Task 6 (dat-reader bridge) obsoleted: WB ships DefaultDatReaderWriter
which takes a dat-directory path and constructs all four databases
(Portal/HighRes/Language + CellRegions) internally. We can use it
directly instead of bridging our DatCollection. Adjustment 1 noted
in the plan; full bring-up deferred to Task 9.

Task 7: GameWindow constructs WbMeshAdapter when
ACDREAM_USE_WB_FOUNDATION=1 is set; pairs with Dispose. Field is
null when flag is off, so no behavioral effect on default-off path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-05-08 13:21:47 +02:00
parent 1030c69b3c
commit 502c3a87e4
2 changed files with 36 additions and 1 deletions

View file

@ -800,7 +800,24 @@ EOF
---
### Task 6: `WbDatReaderAdapter` — bridge our `DatCollection` to WB's `IDatReaderWriter`
### Task 6: ~~WbDatReaderAdapter~~ — OBSOLETED 2026-05-08
**Adjustment 1 (2026-05-08):** discovered during pre-Task-6 grep that
WB ships `WorldBuilder.Shared.Services.DefaultDatReaderWriter`, a
concrete `IDatReaderWriter` implementation that takes a dat-directory
path and constructs all four databases (Portal / HighRes / Language +
CellRegions) internally. We can instantiate it directly with the same
`%USERPROFILE%\Documents\Asheron's Call` path acdream's `DatCollection`
uses; both will open the same dat files with separate handles. Memory
cost: ~50-100 MB of duplicate index caches, acceptable for foundation
work. Task 9 incorporates the construction step directly.
If memory pressure surfaces during week 2 stress testing, revisit by
writing a real bridge that shares index caches with our `DatCollection`.
**No work for this task — skip and proceed to Task 7.**
### Task 6 (original — kept for history)
**Files:**
- Create: `src/AcDream.App/Rendering/Wb/WbDatReaderAdapter.cs`