From 0ce6279d355d3d0311b7a3f5fbcb22a305bb0278 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 16 Jul 2024 19:59:50 +0200 Subject: tinted sprites --- light-client/src/render/misc.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 light-client/src/render/misc.rs (limited to 'light-client/src/render/misc.rs') diff --git a/light-client/src/render/misc.rs b/light-client/src/render/misc.rs new file mode 100644 index 00000000..9f866568 --- /dev/null +++ b/light-client/src/render/misc.rs @@ -0,0 +1,17 @@ +use super::{sprite::Sprite, AtlasLayout}; +use hurrycurry_protocol::glam::Vec2; +use sdl2::rect::Rect; + +pub struct MiscTextures { + pub player: Sprite, + pub solid: Rect, +} + +impl MiscTextures { + pub fn init(layout: &AtlasLayout) -> Self { + MiscTextures { + player: Sprite::new(*layout.get("player+a").unwrap(), Vec2::Y * 0.3, 0.5 + 0.3), + solid: *layout.get("solid+a").unwrap(), + } + } +} -- cgit v1.2.3-70-g09d2