1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! # war3parser
//!
//! A library for parsing and extracting Warcraft III map files
//! (`.w3x` / `.w3m`).
//!
//! ## Crate layout
//!
//! - [`archive`] — the map container: optional `HM3W` header + embedded MPQ
//! - [`formats`] — parsers for the member files (`w3i`, `wts`, `imp`, `mmp`)
//! - [`model`] — portable data structures shared by CLI / WASM / library users
//! - [`reader`] — bounds-checked little-endian [`reader::ByteReader`]
//! - [`error`] — the crate-wide [`error::Error`] type
//!
//! The `war3map.w3i` parser supports the full format-version ladder
//! **v8 → v33** (Reign of Chaos betas through WC3 2.0); see
//! [`formats::w3i::FormatVersion`].
//!
//! ## Features
//!
//! | Feature | Default | Purpose |
//! |---------|---------|---------|
//! | `serde` | yes | JSON serialization for dumps and the WASM bridge |
//!
//! ## Example
//!
//! ```ignore
//! use war3parser::prelude::*;
//!
//! let buffer = std::fs::read("path/to/map.w3x")?;
//! let mut metadata = War3MapMetadata::parse(&buffer)?;
//! metadata.resolve_trigger_strings();
//! let snapshot = metadata.snapshot()?;
//! println!("{:?}", snapshot.map_info.map(|i| i.name));
//! ```
/// The most commonly used types in one import.
pub use crate::;