Minor cleanup

master
Mark 2023-12-25 08:33:31 -08:00
parent 3b41739b0f
commit 7e2673f852
Signed by: Mark
GPG Key ID: C6D63995FE72FD80
3 changed files with 3 additions and 5 deletions

View File

@ -8,9 +8,7 @@ pub use gpustate::GPUState;
/// A handle to a sprite texture
#[derive(Debug, Clone, Copy)]
pub struct SpriteTexture {
pub name: &'static str,
}
pub struct SpriteTexture(pub &'static str);
// API correction matrix.
// cgmath uses OpenGL's matrix format, which

View File

@ -21,7 +21,7 @@ impl TextureArray {
}
pub fn get_sprite_texture(&self, sprite: SpriteTexture) -> Texture {
return self.get_texture(sprite.name);
return self.get_texture(sprite.0);
}
fn get_texture(&self, name: &str) -> Texture {

View File

@ -12,7 +12,7 @@ impl ShipKind {
Self::Gypsum => "ship::gypsum",
};
return SpriteTexture { name };
return SpriteTexture(name);
}
fn height(&self) -> Pfloat {