Skip to content

Commit

Permalink
move assets
Browse files Browse the repository at this point in the history
  • Loading branch information
RGGH committed Nov 14, 2024
1 parent cb0816a commit 153ca6e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 3 deletions.
Binary file removed src/background.png
Binary file not shown.
Binary file removed src/background_mouse.png
Binary file not shown.
1 change: 0 additions & 1 deletion src/image_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ pub fn draw_raindrop(buffer: &mut Vec<u32>, width: u32, height: u32, raindrop: &
}
}


// Helper function to check collision between two rectangles
pub fn is_collision(rect1: (u32, u32, u32, u32), rect2: (u32, u32, u32, u32)) -> bool {
let (x1, y1, w1, h1) = rect1;
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ fn main() {
let mut _current_background = Background::Mono(&[]); // Start with mono background

// Load both the mono and original backgrounds
let image_data = include_bytes!("background.png");
let image_data = include_bytes!("../assets/background.png");
let original_background =
image::load_from_memory(image_data).expect("Failed to load original image");
let mono_background = convert_to_mono(image_data);

// Load custom background (e.g., when score reaches 15)
let custom_image_data = include_bytes!("background_mouse.png");
let custom_image_data = include_bytes!("../assets/background_mouse.png");
let custom_background = image::load_from_memory(custom_image_data).expect("Failed to load custom image");

// Convert custom background to u32 pixel values
Expand Down

0 comments on commit 153ca6e

Please sign in to comment.