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
//! # War3Parser
//!
//! `war3parser` is a library for parsing and extracting Warcraft III map files.
//!
//! ## Features
//!
//! - Extract files from MPQ archives. _(As long as the file name is known and the file exists in the MPQ)_
//! - Parse file formats into Rust structs
//!
//! ### Supported parse targets
//!
//! - W3X: [`War3MapW3x`]
//! - W3I: [`War3MapW3i`]
//! - WTS: [`War3MapWts`]
//! - BLP: [`BlpImage`]
//! - TGA: [`TgaImage`]
//!
//! And a helper struct to include all supported metadata of a map file: [`War3MapMetadata`]
//!
//! ### Implementation
//!
//! Most of the struct implemented [`BinaryReadable`] trait, which provides a `load` function to load the struct from a binary reader.
//!
//! We use the trait implementation chain to load the struct from a file.
/// Parsers to do the actual parsing
/// Helper struct that includes all supported metadata of a map file