|
wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
|
A whole WDT (map description) for one client version: the main file and its era's satellite files unified as one entity. More...
#include <wowlib/formats/wdt/wdt.hpp>
Public Member Functions | |
| Result< void > | read (fs::FileSystem &fs, const FileKey &key) |
| Load the WDT and every satellite file present from a client filesystem, replacing this entity's contents. | |
| Result< void > | write (fs::FileSystem &fs, const FileKey &key) const |
| Serialize and store the WDT (main file and every engaged satellite) through the filesystem's project overlay; satellite file names are derived from the main key, which must resolve to a path. | |
| ValidationReport | validate () const |
| Result< void > | ensureValid () const |
| Validate and raise on the first error instead of returning a report — the assert-style face of validate(). | |
Public Attributes | |
| WDTRoot< V > | root {} |
| The main file contents. | |
Static Public Attributes | |
| static constexpr ClientVersion | Version = V |
A whole WDT (map description) for one client version: the main file and its era's satellite files unified as one entity.
Instantiate through the canonicalizing wdt::WDT alias, never directly.
The main file (WDTRoot) says which terrain tiles exist or which global WMO an object-only map shows; the satellites carry the map-wide occlusion heightmaps, placed lights, volumetric fogs and particulate volumes of the eras that have them. Satellites locate by the "{map}_occ.wdt" naming convention up to 8.1 and by the MPHD FileDataIDs after; a missing satellite stays default-empty and is not written back.
| V | the client version this assembly targets. |
|
nodiscard |
Validate and raise on the first error instead of returning a report — the assert-style face of validate().
Definition at line 248 of file wdt.hpp.
References validate().
| Result< void > wowlib::formats::wdt::detail::WDT< V >::read | ( | fs::FileSystem & | fs, |
| const FileKey & | key ) |
Load the WDT and every satellite file present from a client filesystem, replacing this entity's contents.
| fs | the filesystem gateway |
| key | the main file identity (path and/or FileDataID) |
Definition at line 163 of file wdt.hpp.
References wowlib::FormatVersionMismatch, wowlib::makeError(), wowlib::FileKey::path, wowlib::PathNotResolvable, root, and wowlib::formats::wdt::WdtVersion18.
| ValidationReport wowlib::formats::wdt::detail::WDT< V >::validate | ( | ) | const |
Definition at line 226 of file wdt.hpp.
References root, and wowlib::formats::detail::validateEntity().
Referenced by ensureValid().
| Result< void > wowlib::formats::wdt::detail::WDT< V >::write | ( | fs::FileSystem & | fs, |
| const FileKey & | key ) const |
Serialize and store the WDT (main file and every engaged satellite) through the filesystem's project overlay; satellite file names are derived from the main key, which must resolve to a path.
| fs | the filesystem gateway |
| key | the main file identity; must resolve to a path |
Definition at line 253 of file wdt.hpp.
References wowlib::formats::detail::entityEngaged(), wowlib::makeError(), wowlib::FileKey::path, wowlib::PathNotResolvable, and root.
| WDTRoot<V> wowlib::formats::wdt::detail::WDT< V >::root {} |
The main file contents.
Definition at line 106 of file wdt.hpp.
Referenced by read(), validate(), and write().
|
staticconstexpr |