Minor cleanup
parent
7e2673f852
commit
b2e9f64c91
|
@ -7,8 +7,8 @@ mod vertexbuffer;
|
||||||
pub use gpustate::GPUState;
|
pub use gpustate::GPUState;
|
||||||
|
|
||||||
/// A handle to a sprite texture
|
/// A handle to a sprite texture
|
||||||
#[derive(Debug, Clone, Copy)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct SpriteTexture(pub &'static str);
|
pub struct SpriteTexture(pub String);
|
||||||
|
|
||||||
// API correction matrix.
|
// API correction matrix.
|
||||||
// cgmath uses OpenGL's matrix format, which
|
// cgmath uses OpenGL's matrix format, which
|
||||||
|
|
|
@ -21,7 +21,7 @@ impl TextureArray {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_sprite_texture(&self, sprite: SpriteTexture) -> Texture {
|
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 {
|
fn get_texture(&self, name: &str) -> Texture {
|
||||||
|
|
|
@ -12,7 +12,7 @@ impl ShipKind {
|
||||||
Self::Gypsum => "ship::gypsum",
|
Self::Gypsum => "ship::gypsum",
|
||||||
};
|
};
|
||||||
|
|
||||||
return SpriteTexture(name);
|
return SpriteTexture(name.to_owned());
|
||||||
}
|
}
|
||||||
|
|
||||||
fn height(&self) -> Pfloat {
|
fn height(&self) -> Pfloat {
|
||||||
|
|
Loading…
Reference in New Issue