Files
wad-reader/src/lumps/seg.rs
Wesley Irvin 2e2c500155 Seg Reader
Added the ability to read Seg lumps from the WAD file.
2025-04-08 19:47:15 -04:00

20 lines
328 B
Rust

use crate::types::Seg;
pub struct SegLump {
pub segs: Vec<Seg>,
}
impl SegLump {
pub fn get_num_segs(&self) -> usize {
self.segs.len()
}
pub fn get_all_segs(&self) -> Vec<Seg> {
self.segs.to_vec()
}
pub fn get_seg(&self, pos: usize) -> Seg {
self.segs[pos].to_owned()
}
}