Starting to do physics
This commit is contained in:
@@ -57,12 +57,13 @@ macro_rules! make_textures {
|
||||
}
|
||||
|
||||
make_textures!(
|
||||
Mario, mario, make_mario_texture, "../../../assets/textures/mario.png",
|
||||
);
|
||||
|
||||
impl TextureManager {
|
||||
/// Creates a textures from an array of bytes.
|
||||
fn make_texture_from_bytes(bytes: Vec<u8>) -> SfTexture {
|
||||
SfTexture::from_memory(&bytes, &IntRect::new(0, 0, 500, 500))
|
||||
SfTexture::from_memory(&bytes, &IntRect::new(0, 0, 256, 256))
|
||||
.expect("Failed to create texture")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user