diff options
Diffstat (limited to 'stockton-render/src/draw/texture/resolver.rs')
-rw-r--r-- | stockton-render/src/draw/texture/resolver.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/stockton-render/src/draw/texture/resolver.rs b/stockton-render/src/draw/texture/resolver.rs index f33f0a1..a0df7d8 100644 --- a/stockton-render/src/draw/texture/resolver.rs +++ b/stockton-render/src/draw/texture/resolver.rs @@ -20,10 +20,10 @@ use crate::draw::texture::image::LoadableImage; use stockton_levels::traits::textures::Texture; -use image::{io::Reader, RgbaImage}; - use std::path::Path; +use image::{io::Reader, RgbaImage}; + /// An object that can be used to resolve a texture from a BSP File pub trait TextureResolver<T: LoadableImage> { /// Get the given texture, or None if it's corrupt/not there. @@ -31,17 +31,17 @@ pub trait TextureResolver<T: LoadableImage> { } /// A basic filesystem resolver which expects no file extension and guesses the image format -pub struct BasicFSResolver<'a> { +pub struct BasicFsResolver<'a> { path: &'a Path, } -impl<'a> BasicFSResolver<'a> { - pub fn new(path: &'a Path) -> BasicFSResolver<'a> { - BasicFSResolver { path } +impl<'a> BasicFsResolver<'a> { + pub fn new(path: &'a Path) -> BasicFsResolver<'a> { + BasicFsResolver { path } } } -impl<'a> TextureResolver<RgbaImage> for BasicFSResolver<'a> { +impl<'a> TextureResolver<RgbaImage> for BasicFsResolver<'a> { fn resolve(&mut self, tex: &Texture) -> Option<RgbaImage> { let path = self.path.join(&tex.name); |