Skip to content

Commit f49fac6

Browse files
Refactor resources/
1 parent 5181a74 commit f49fac6

File tree

12 files changed

+13
-11
lines changed

12 files changed

+13
-11
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/dead.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ pub struct Death {
1212
impl Death {
1313
pub fn spawn(ctx: &mut Context) -> Self {
1414
Self {
15-
consolas: graphics::Font::new(ctx, "/Consolas.ttf").unwrap(),
16-
ferris_planet: graphics::Image::new(ctx, "/ferris_planet.png").unwrap(),
15+
consolas: graphics::Font::new(ctx, "/fonts/Consolas.ttf").unwrap(),
16+
ferris_planet: graphics::Image::new(ctx, "/images/ferris_planet.png").unwrap(),
1717
}
1818
}
1919

src/game.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,26 +71,26 @@ impl Game {
7171
if apple_type_num % 2 == 0 {
7272
food_vector.push((
7373
AppleType::Referenced,
74-
graphics::Image::new(ctx, "/apple_reference.png").unwrap(),
74+
graphics::Image::new(ctx, "/images/apple_reference.png").unwrap(),
7575
pos_x as f32,
7676
pos_y as f32,
7777
));
7878
} else {
7979
food_vector.push((
8080
AppleType::Dereferenced,
81-
graphics::Image::new(ctx, "/apple_dereference.png").unwrap(),
81+
graphics::Image::new(ctx, "/images/apple_dereference.png").unwrap(),
8282
pos_x as f32,
8383
pos_y as f32,
8484
));
8585
}
8686
}
8787

8888
Mutex::new(Self {
89-
ferris_death_audio: Source::new(ctx, "/dead.mp3").unwrap(),
90-
ferris_pacman: graphics::Image::new(ctx, "/ferris_pacman_1.png").unwrap(),
89+
ferris_death_audio: Source::new(ctx, "/audio/dead.mp3").unwrap(),
90+
ferris_pacman: graphics::Image::new(ctx, "/images/ferris_pacman_1.png").unwrap(),
9191
ferris_pacman_collection: vec![
92-
graphics::Image::new(ctx, "/ferris_pacman_1.png").unwrap(),
93-
graphics::Image::new(ctx, "/ferris_pacman_2.png").unwrap(),
92+
graphics::Image::new(ctx, "/images/ferris_pacman_1.png").unwrap(),
93+
graphics::Image::new(ctx, "/images/ferris_pacman_2.png").unwrap(),
9494
],
9595

9696
ferris_pos: (20.0, 20.0),

0 commit comments

Comments
 (0)