diff --git a/src/main.rs b/src/main.rs index 73372d8..565514f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,5 @@ use crate::constants::{WINDOW_HEIGHT, WINDOW_WIDTH}; use crate::game::Game; -use crate::textures::TextureManager; use sdl2::event::{Event}; use sdl2::keyboard::Keycode; use sdl2::pixels::Color; @@ -14,7 +13,6 @@ mod constants; mod direction; mod game; mod pacman; -mod textures; mod entity; mod animation; diff --git a/src/textures.rs b/src/textures.rs deleted file mode 100644 index 9479bc1..0000000 --- a/src/textures.rs +++ /dev/null @@ -1,29 +0,0 @@ - -use sdl2::{ - image::LoadTexture, - render::{Texture, TextureCreator}, - video::WindowContext, -}; - -pub struct TextureManager<'a> { - pub map: Texture<'a>, - pub pacman: Texture<'a>, -} - -impl<'a> TextureManager<'a> { - pub fn new(texture_creator: &'a TextureCreator) -> Self { - let map_texture = texture_creator - .load_texture("assets/map.png") - .expect("Could not load pacman texture"); - - let pacman_atlas = texture_creator - .load_texture("assets/pacman.png") - .expect("Could not load pacman texture"); - - - TextureManager { - map: map_texture, - pacman: pacman_atlas, - } - } -} \ No newline at end of file