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

Enums

Type Aliases