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

The MD20 body entity (namespace wowlib::formats::m2::root): M2Root — the client's own name for the offset-addressed model payload. More...

#include <array>
#include <cstddef>
#include <cstdint>
#include <format>
#include <string>
#include <string_view>
#include <vector>
#include <welder/vocabulary.hpp>
#include <wowlib/core/client_version.hpp>
#include <wowlib/core/lang.hpp>
#include <wowlib/formats/common/annotations.hpp>
#include <wowlib/formats/common/types.hpp>
#include <wowlib/formats/common/version_slot.hpp>
#include <wowlib/formats/m2/boundaries.hpp>
#include <wowlib/formats/m2/offset_block.hpp>
#include <wowlib/formats/m2/root/record/bone.hpp>
#include <wowlib/formats/m2/root/record/effects.hpp>
#include <wowlib/formats/m2/root/record/material.hpp>
#include <wowlib/formats/m2/root/record/scene.hpp>
#include <wowlib/formats/m2/root/record/sequence.hpp>
#include <wowlib/formats/m2/skin/records.hpp>
#include <wowlib/formats/m2/root/record/track.hpp>
Include dependency graph for root.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  wowlib::formats::m2::root::M2RootBase
 The version-agnostic base of every M2Root<V> (welded as "M2Root"). More...
struct  wowlib::formats::m2::root::detail::DataPreWotlk< V >
 Pre-WotLK members: the embedded skin profiles and the vanilla/TBC-only lookup blocks. More...
struct  wowlib::formats::m2::root::detail::DataWotlk
 WotLK+ members: the external-skin count replacing the embedded profiles. More...
struct  wowlib::formats::m2::root::detail::DataTbc
 TBC+ members: the flag-gated combiner-combo tail. More...
struct  wowlib::formats::m2::root::M2Root< V >
 The MD20 model body for one client version: header scalars plus every offset-addressed block, decoded into vectors. More...

Namespaces

namespace  wowlib
namespace  wowlib::formats
namespace  wowlib::formats::m2
namespace  wowlib::formats::m2::root
 The MD20 model body (M2Root) with its per-version classes.
namespace  wowlib::formats::m2::root::detail

Typedefs

template<ClientVersion V>
using wowlib::formats::m2::M2Root = root::M2Root<canonicalVersion(V, M2DataPivots, M2Versions)>
 The MD20 body — the canonicalizing face of root::M2Root: every client version maps to its range's first grid version (M2DataPivots), so one instantiation serves e.g.

Enumerations

enum class  wowlib::formats::m2::root::GlobalFlags : std::uint32_t {
  wowlib::formats::m2::root::TiltX = 0x1 , wowlib::formats::m2::root::TiltY = 0x2 , wowlib::formats::m2::root::UseTextureCombinerCombos = 0x8 , wowlib::formats::m2::root::LoadPhysData = 0x20 ,
  wowlib::formats::m2::root::Unk0x80 = 0x80 , wowlib::formats::m2::root::CameraRelated = 0x100 , wowlib::formats::m2::root::NewParticleRecord = 0x200 , wowlib::formats::m2::root::TextureTransformsUseBoneSequences = 0x800 ,
  wowlib::formats::m2::root::ChunkedAnimFiles = 0x2000
}
 M2Root::globalFlags bits. More...

Variables

constexpr std::uint32_t wowlib::formats::m2::root::Md20Magic = 0x3032444D
 The MD20 leading magic, as memcpy'd from disk.

Detailed Description

The MD20 body entity (namespace wowlib::formats::m2::root): M2Root — the client's own name for the offset-addressed model payload.

Pre-Legion this IS the .m2 file; Legion+ it is the MD21 chunk's content (offsets stay relative to the image either way, which is exactly what M2OffsetBlock serializes against).

Version-gated members live in conditionally-inherited trait slots (root::detail); each carries =offsetAfter("member") naming the own member it follows, which puts it back at its interleaved layout position. A version's M2Root carries ONLY the members that version defines — setting an absent one is a compile error.

Definition in file root.hpp.