Minor cleanup
parent
3b41739b0f
commit
7e2673f852
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -12,7 +12,7 @@ impl ShipKind {
|
|||
Self::Gypsum => "ship::gypsum",
|
||||
};
|
||||
|
||||
return SpriteTexture { name };
|
||||
return SpriteTexture(name);
|
||||
}
|
||||
|
||||
fn height(&self) -> Pfloat {
|
||||
|
|
Loading…
Reference in New Issue