wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
Loading...
Searching...
No Matches
roundtrip_adt.cpp File Reference

The ADT round-trip driver: the write -> parse -> write-again stability compare of one terrain tile (ADT is not byte-perfect — alpha maps are re-encoded and the MHDR/MCIN/MCNK offset tables re-derived), modeled on tests/integration/test_adt_roundtrip.cpp with the reflection diff replaced by the write-stability byte compare and returned outcomes in place of Catch2 assertions. More...

#include <array>
#include <cstdint>
#include <format>
#include <string>
#include <string_view>
#include <wowlib/audit/detail.hpp>
#include <wowlib/core/client_builds.hpp>
#include <wowlib/formats/adt/adt.hpp>
#include <wowlib/formats/wdt/wdt.hpp>
Include dependency graph for roundtrip_adt.cpp:

Go to the source code of this file.

Namespaces

namespace  wowlib
namespace  wowlib::audit
namespace  wowlib::audit::detail

Detailed Description

The ADT round-trip driver: the write -> parse -> write-again stability compare of one terrain tile (ADT is not byte-perfect — alpha maps are re-encoded and the MHDR/MCIN/MCNK offset tables re-derived), modeled on tests/integration/test_adt_roundtrip.cpp with the reflection diff replaced by the write-stability byte compare and returned outcomes in place of Catch2 assertions.

The on-disk alpha-map bit depth is a per-MAP property (the WDT MPHD big-alpha flags) that wowlib does not resolve itself; every call re-derives it by reading the map's own WDT next to the tile ("<dir>/<map>.wdt" from the tile's parent directory). Nothing is cached — calls stay independent, and the sweep feeds tiles map by map anyway.

Definition in file roundtrip_adt.cpp.