pub fn wad_entries<R>(
reader: R,
remap_name_to_lower: bool,
) -> Result<HashMap<CStr16, Entry>>Expand description
Parse all entries from a WAD file.
§Arguments
reader— Any type implementingRead+Seek+Send+'static. Typically a file handle or in-memory buffer containing the WAD data.remap_name_to_lower— Iftrue, forces all entries names to lowercase (useful because WAD entries are case-insensitive in practice).
§Returns
A HashMap mapping lump names (CStr16) to their corresponding wad::Entry.
§Errors
Returns an io::Error if the stream cannot be read or the WAD is invalid.
§Example
use std::fs::File;
let file = File::open("halflife.wad").expect("file open");
let entries = goldsrc_rs::wad_entries(file, true).expect("parsing wad header");