pub struct Resources {
pub dir: PathBuf,
pub blood: Rff,
pub sounds: Option<Rff>,
pub tiles: TileSet,
pub palettes: Vec<Palette>,
pub plu: Vec<Option<Vec<u8>>>,
pub trans: Vec<u8>,
pub surface: Vec<u8>,
pub voxel_ids: Vec<i16>,
pub ini: BloodIni,
pub voxels: Vec<Option<Voxel>>,
}Fields§
§dir: PathBuf§blood: Rff§sounds: Option<Rff>§tiles: TileSet§palettes: Vec<Palette>§plu: Vec<Option<Vec<u8>>>Raw 8-bit palookups (64 * 256), by palookup number.
trans: Vec<u8>§surface: Vec<u8>§voxel_ids: Vec<i16>§ini: BloodIni§voxels: Vec<Option<Voxel>>Voxel models from BLOOD.RFF, indexed by KVX id.
Implementations§
Source§impl Resources
impl Resources
pub fn load(dir: impl AsRef<Path>) -> Result<Self>
Sourcepub fn build_luts(&self, base_pal: usize) -> ShadeLuts
pub fn build_luts(&self, base_pal: usize) -> ShadeLuts
Builds true-colour shade tables for the given base palette.
Sourcepub fn voxel_for_tile(&self, pic: i32) -> Option<u32>
pub fn voxel_for_tile(&self, pic: i32) -> Option<u32>
Voxel model id for a tile, if the tile is drawn as a voxel.
pub fn surface_of(&self, pic: i32) -> u8
Auto Trait Implementations§
impl Freeze for Resources
impl RefUnwindSafe for Resources
impl Send for Resources
impl Sync for Resources
impl Unpin for Resources
impl UnsafeUnpin for Resources
impl UnwindSafe for Resources
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more