Struct lad::Wad

source ·
pub struct Wad {
    pub header: Header,
    pub directory: Vec<DirEntry>,
    pub data_offset: usize,
    pub data: Vec<u8>,
}
Expand description

The actual WAD itself. Contains the WAD header, all directory entries and all the data stored in the WAD.

Fields

header: Headerdirectory: Vec<DirEntry>data_offset: usizedata: Vec<u8>

Implementations

Parses a Header from a WAD file and returns it.

Parses all of the DirEntries in the WAD file and returns them.

Loads a WAD file

source

pub fn get_entry(&self, name: &[u8; 8]) -> Result<Vec<Vec<u8>>, WadError>

Indexes a WAD file for an entry.

source

pub unsafe fn get_entry_as<T>(&self, name: &[u8; 8]) -> Result<Vec<&T>, WadError>

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.