Minor cleanup

master
Mark 2023-12-25 08:35:34 -08:00
parent 7e2673f852
commit b2e9f64c91
Signed by: Mark
GPG Key ID: C6D63995FE72FD80
3 changed files with 4 additions and 4 deletions

View File

@ -7,8 +7,8 @@ mod vertexbuffer;
pub use gpustate::GPUState;
/// A handle to a sprite texture
#[derive(Debug, Clone, Copy)]
pub struct SpriteTexture(pub &'static str);
#[derive(Debug, Clone)]
pub struct SpriteTexture(pub String);
// 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.0);
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.to_owned());
}
fn height(&self) -> Pfloat {