refactor: split up and move texture-related code into src/texture submodule

This commit is contained in:
2025-07-24 12:41:36 -05:00
parent cfa73c58a8
commit 002da46045
9 changed files with 158 additions and 141 deletions

11
src/texture/mod.rs Normal file
View File

@@ -0,0 +1,11 @@
use sdl2::{render::Canvas, video::Window};
use crate::direction::Direction;
/// Trait for drawable atlas-based textures
pub trait FrameDrawn {
fn render(&self, canvas: &mut Canvas<Window>, position: (i32, i32), direction: Direction, frame: Option<u32>);
}
pub mod animated;
pub mod atlas;