Crate cdragon_wad

Crate cdragon_wad 

Source
Expand description

Support of Riot WAD archive files

§Example: list files in wad

use cdragon_wad::{WadFile, WadHashMapper};
let wad = WadFile::open("Global.wad.client").expect("failed to open WAD file");
let hmapper = WadHashMapper::from_path("hashes.game.txt").expect("failed to load hashes");
for entry in wad.iter_entries() {
    let entry = entry.expect("failed to read entry");
    println!("{}", hmapper.get(entry.path.hash).unwrap_or("?"));
}

cdragon_hashes::HashKind can be used to use the appropriate hash file (assuming CDragon’s files are used).

if let Some(kind) = HashKind::from_wad_path("Global.wad.client") {
  let mapper = WadHashMapper::from_path(kind.mapping_path());
}

Structs§

Wad
Riot WAD archive file
WadEntry
Information on a single file in a WAD
WadEntryHash
Hash used by WAD entries
WadReader
Read WAD archive files and their entries

Enums§

WadDataFormat
Type of a WAD entry
WadError
Error in a WAD file

Type Aliases§

WadFile
Read WAD from a file
WadHashMapper
Mapper for WAD hashes