Prompt file imported from akspa0/parp-tools (
.codex/prompts/wow-400-terrain-blend-recovery.md). Copyright stays with the author.
Recover 4.0.0.11927 terrain texturing in gillijimproject_refactor.
Read First
gillijimproject_refactor/memory-bank/activeContext.mdgillijimproject_refactor/memory-bank/progress.mdgillijimproject_refactor/memory-bank/data-paths.mdgillijimproject_refactor/src/MdxViewer/memory-bank/activeContext.mdgillijimproject_refactor/src/MdxViewer/memory-bank/terrain_editing_plan_2026-02-14.mdgillijimproject_refactor/docs/archive/WoW_400_ADT_Analysis.mdgillijimproject_refactor/documentation/wow-400-terrain-blend-wow-exe-guide.mdgillijimproject_refactor/docs/ADT_WDT_Format_Specification.md
Goal
Make concrete progress on the active viewer's 4.0.0 terrain blending so it matches the wow.exe behavior more closely on the fixed development dataset.
Current Reverse-Engineered Model
- 4.0.0 is still pre-split on disk, but runtime terrain texturing is not just local MCAL decoding.
CMapChunk_UnpackAlphaBitshandles local 4-bit / 8-bit / compressed decode.- In 8-bit mode, layers without direct alpha payload can be synthesized as residual coverage from sibling layers.
CMapChunk_UnpackChunkAlphaSetstitches the current chunk with three linked neighbors and matches neighbor layers by texture id.CMapChunk_RefreshBlendTexturesthen creates aTerrainBlendresource from those decoded results.
Non-Negotiable Constraints
- Do not revert back to broad relaxed alpha heuristics.
- Do not claim 4.0 terrain is fixed from build-only validation.
- Do not treat old archive notes that say "4.0 is identical to 3.3.5" as authoritative.
- Keep the active implementation minimal and viewer-compatible before attempting a full
TerrainBlendresource port.
Required Implementation Order
- Confirm whether the current bug is missing local decode, missing residual synthesis, or missing edge stitching.
- Prefer the smallest active-viewer change that maps directly to the wow.exe findings.
- Implement residual-alpha synthesis for 8-bit 4.0 layers before broader renderer surgery.
- Implement texture-id-based neighbor edge stitching as the next step.
- Update documentation and memory-bank files in the same change set so future sessions do not lose the model.
Required Deliverables
Return all items:
- exact behavior implemented
- files changed and why
- documentation and memory-bank files updated
- build status
- automated-test status
- real-data runtime-validation status
- remaining gaps versus the wow.exe model
First Output
Start with:
- the current 4.0 terrain texturing gap in the active viewer
- the minimal next implementation slice worth landing
- what docs and memory-bank files will be updated along with the code
