aboutsummaryrefslogtreecommitdiff
path: root/stockton-skeleton/src/texture/image.rs
diff options
context:
space:
mode:
Diffstat (limited to 'stockton-skeleton/src/texture/image.rs')
-rw-r--r--stockton-skeleton/src/texture/image.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/stockton-skeleton/src/texture/image.rs b/stockton-skeleton/src/texture/image.rs
index f984b72..6ccd22a 100644
--- a/stockton-skeleton/src/texture/image.rs
+++ b/stockton-skeleton/src/texture/image.rs
@@ -41,3 +41,11 @@ impl LoadableImage for RgbaImage {
copy_nonoverlapping(row.as_ptr(), ptr, row.len());
}
}
+
+/// An object that can be used to resolve a texture from a BSP File
+pub trait TextureResolver {
+ type Image: LoadableImage;
+
+ /// Get the given texture, or None if it's corrupt/not there.
+ fn resolve(&mut self, texture_id: u32) -> Option<Self::Image>;
+}