Module wad

Module wad 

Source
Expand description

Quake WAD parsing

§Example


if let Ok((mut parser, _warnings)) = wad::Parser::new(&mut src) {
    for (entry_name, entry) in parser.directory() {
        let kind = parser.parse_inferred(&entry).map(
            |lump| lump.kind().to_string(),
        ).unwrap_or(
            "<error>".to_string()
        );

        println!("Entry {entry_name} has lump type {kind}");
    }
} else {
    eprintln!("Error loading WAD");
}

Structs§

Entry
Provides the location of a lump within a WAD archive, length of the lump, name (16 bytes, null-terminated), and lump kind
Parser
WAD parser. Wraps a mutable reference to a Read + Seek cursor to provide random read access.