pub struct StaticLocationReader<T: Read + Seek> { /* private fields */ }Expand description
A struct to help read out Static locations for a map
The methods on this struct optionally take a StaticLocationDiffReader, to make it easier to apply patches to a map
Implementations§
Source§impl StaticLocationReader<File>
impl StaticLocationReader<File>
Sourcepub fn new(
index_path: &Path,
mul_path: &Path,
width_blocks: u32,
height_blocks: u32,
) -> MulReaderResult<StaticLocationReader<File>>
pub fn new( index_path: &Path, mul_path: &Path, width_blocks: u32, height_blocks: u32, ) -> MulReaderResult<StaticLocationReader<File>>
Create a new StaticLocationReader from an index and mul path
Source§impl<T: Read + Seek> StaticLocationReader<T>
impl<T: Read + Seek> StaticLocationReader<T>
Sourcepub fn from_mul(
mul_reader: MulReader<T>,
width_blocks: u32,
height_blocks: u32,
) -> StaticLocationReader<T>
pub fn from_mul( mul_reader: MulReader<T>, width_blocks: u32, height_blocks: u32, ) -> StaticLocationReader<T>
Create an ArtReader from an existing mul reader
Sourcepub fn read_block(
&mut self,
id: u32,
patch: Option<&mut StaticLocationDiffReader<T>>,
) -> MulReaderResult<Vec<StaticLocation>>
pub fn read_block( &mut self, id: u32, patch: Option<&mut StaticLocationDiffReader<T>>, ) -> MulReaderResult<Vec<StaticLocation>>
Read all statics for a block from the map by its id Blocks are stored in columns, from top of the map to to bottom
Sourcepub fn read_block_from_coordinates(
&mut self,
x: u32,
y: u32,
patch: Option<&mut StaticLocationDiffReader<T>>,
) -> MulReaderResult<Vec<StaticLocation>>
pub fn read_block_from_coordinates( &mut self, x: u32, y: u32, patch: Option<&mut StaticLocationDiffReader<T>>, ) -> MulReaderResult<Vec<StaticLocation>>
Read all statics block from the map by its absolute coordinates
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for StaticLocationReader<T>where
T: Freeze,
impl<T> RefUnwindSafe for StaticLocationReader<T>where
T: RefUnwindSafe,
impl<T> Send for StaticLocationReader<T>where
T: Send,
impl<T> Sync for StaticLocationReader<T>where
T: Sync,
impl<T> Unpin for StaticLocationReader<T>where
T: Unpin,
impl<T> UnsafeUnpin for StaticLocationReader<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for StaticLocationReader<T>where
T: UnwindSafe,
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