Skip to content

Commit a4b5323

Browse files
committed
include textures in binary
1 parent 4fae04f commit a4b5323

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/main.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ fn window_conf() -> Conf {
2929
#[macroquad::main(window_conf)]
3030
async fn main() {
3131
rand::srand(macroquad::miniquad::date::now() as _);
32-
let pause = load_texture("assets/pause.png").await.unwrap();
33-
let play = load_texture("assets/play.png").await.unwrap();
34-
let fast = load_texture("assets/fast.png").await.unwrap();
35-
let slow = load_texture("assets/slow.png").await.unwrap();
36-
let restart = load_texture("assets/restart.png").await.unwrap();
32+
33+
let pause = Texture2D::from_file_with_format(include_bytes!("../assets/pause.png"), None);
34+
let play = Texture2D::from_file_with_format(include_bytes!("../assets/play.png"), None);
35+
let fast = Texture2D::from_file_with_format(include_bytes!("../assets/fast.png"), None);
36+
let slow = Texture2D::from_file_with_format(include_bytes!("../assets/slow.png"), None);
37+
let restart = Texture2D::from_file_with_format(include_bytes!("../assets/restart.png"), None);
3738
let th = (screen_height() - HEIGHT) * 0.5;
3839

3940
let gamecam = Camera2D {

0 commit comments

Comments
 (0)