Seg Reader

Added the ability to read Seg lumps from the WAD file.
This commit is contained in:
2025-04-08 19:47:15 -04:00
parent 81fd194938
commit 2e2c500155
8 changed files with 110 additions and 2 deletions

19
src/lumps/seg.rs Normal file
View File

@@ -0,0 +1,19 @@
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()
}
}