pub struct WadData {
pub(crate) lumps: Vec<Lump>,
}
Expand description
“Where’s All (the) Data”: contains the WAD in memory, plus an array of directories telling us where each data lump starts
Fields§
§lumps: Vec<Lump>
Implementations§
source§impl WadData
impl WadData
pub fn new(file_path: PathBuf) -> WadData
pub fn add_file(&mut self, file_path: PathBuf)
fn read_header(file: &[u8]) -> WadHeader
fn read_dir_data(ofs: usize, file: &[u8]) -> Lump
fn cache_lumps(&mut self, file: &[u8])
sourcepub(crate) fn find_lump_or_panic(&self, name: &str) -> &Lump
pub(crate) fn find_lump_or_panic(&self, name: &str) -> &Lump
Find a general lump by name
sourcepub(crate) fn find_lump_for_map_or_panic(
&self,
map_name: &str,
lump: MapLump
) -> &Lump
pub(crate) fn find_lump_for_map_or_panic( &self, map_name: &str, lump: MapLump ) -> &Lump
Find the map name and adds the desired lump offset
pub fn lump_exists(&self, lump_name: &str) -> bool
source§impl WadData
impl WadData
pub fn flats_iter( &self ) -> LumpIter<'_, WadFlat, impl Fn(&Lump) -> WadFlat + '_> ⓘ
pub fn sprites_iter( &self ) -> LumpIter<'_, WadPatch, impl Fn(&Lump) -> WadPatch + '_> ⓘ
pub fn playpal_iter( &self ) -> OffsetIter<WadPalette, impl Fn(usize) -> WadPalette + '_> ⓘ
pub fn colourmap_iter(&self) -> OffsetIter<u8, impl Fn(usize) -> u8 + '_> ⓘ
pub fn pnames_iter(&self) -> OffsetIter<String, impl Fn(usize) -> String + '_> ⓘ
sourcepub fn patches_iter(&self) -> PatchIter<'_> ⓘ
pub fn patches_iter(&self) -> PatchIter<'_> ⓘ
Iterate over patches in order determined by PNAME lump
sourcepub fn texture_iter(
&self,
name: &str
) -> OffsetIter<WadTexture, impl Fn(usize) -> WadTexture + '_> ⓘ
pub fn texture_iter( &self, name: &str ) -> OffsetIter<WadTexture, impl Fn(usize) -> WadTexture + '_> ⓘ
Producer for the base texture data. This returns WadTexture
which includes data
on how the patches are put together to form a texture.
pub fn thing_iter( &self, map_name: &str ) -> OffsetIter<WadThing, impl Fn(usize) -> WadThing + '_> ⓘ
pub fn vertex_iter( &self, map_name: &str ) -> OffsetIter<WadVertex, impl Fn(usize) -> WadVertex + '_> ⓘ
pub fn sector_iter( &self, map_name: &str ) -> OffsetIter<WadSector, impl Fn(usize) -> WadSector + '_> ⓘ
pub fn sidedef_iter( &self, map_name: &str ) -> OffsetIter<WadSideDef, impl Fn(usize) -> WadSideDef + '_> ⓘ
pub fn linedef_iter( &self, map_name: &str ) -> OffsetIter<WadLineDef, impl Fn(usize) -> WadLineDef + '_> ⓘ
pub fn segment_iter( &self, map_name: &str ) -> OffsetIter<WadSegment, impl Fn(usize) -> WadSegment + '_> ⓘ
pub fn subsector_iter( &self, map_name: &str ) -> OffsetIter<WadSubSector, impl Fn(usize) -> WadSubSector + '_> ⓘ
pub fn node_iter( &self, map_name: &str ) -> OffsetIter<WadNode, impl Fn(usize) -> WadNode + '_> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for WadData
impl Send for WadData
impl Sync for WadData
impl Unpin for WadData
impl UnwindSafe for WadData
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more