aboutsummaryrefslogtreecommitdiff
path: root/pixel-client/src/render/misc.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-07-16 23:38:46 +0200
committermetamuffin <metamuffin@disroot.org>2024-07-16 23:38:46 +0200
commit775b0148cec4329a6abb19d03220dc1d8a8b68c3 (patch)
tree9e715df1db4f23a9c3f1e9c07cf7e93e376b512f /pixel-client/src/render/misc.rs
parent3a358c6dd39aa78319549658adf1028cea61f643 (diff)
downloadhurrycurry-775b0148cec4329a6abb19d03220dc1d8a8b68c3.tar
hurrycurry-775b0148cec4329a6abb19d03220dc1d8a8b68c3.tar.bz2
hurrycurry-775b0148cec4329a6abb19d03220dc1d8a8b68c3.tar.zst
rename pixel client
Diffstat (limited to 'pixel-client/src/render/misc.rs')
-rw-r--r--pixel-client/src/render/misc.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/pixel-client/src/render/misc.rs b/pixel-client/src/render/misc.rs
new file mode 100644
index 00000000..9f866568
--- /dev/null
+++ b/pixel-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(),
+ }
+ }
+}