diff options
Diffstat (limited to 'light-client/src')
-rw-r--r-- | light-client/src/game.rs | 9 | ||||
-rw-r--r-- | light-client/src/render/mod.rs | 2 | ||||
-rw-r--r-- | light-client/src/render/sprite.rs | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/light-client/src/game.rs b/light-client/src/game.rs index ac5c3571..2692e6fc 100644 --- a/light-client/src/game.rs +++ b/light-client/src/game.rs @@ -86,10 +86,13 @@ impl Game { Sprite::new( renderer .metadata() - .get(&format!("{name}:a")) + .get(&format!("{name}+a")) .copied() - .unwrap_or(Rect::new(0, 0, 32, 24)), - Vec2::ZERO, + .unwrap_or_else(|| { + warn!("no sprite for item {name:?}"); + Rect::new(0, 0, 32, 24) + }), + Vec2::new(0., 0.0), 0.1, ) }) diff --git a/light-client/src/render/mod.rs b/light-client/src/render/mod.rs index fbf3d7a5..d5fba315 100644 --- a/light-client/src/render/mod.rs +++ b/light-client/src/render/mod.rs @@ -151,7 +151,7 @@ impl MiscTextures { player: Sprite::new( *renderer.metadata().get("player+a").unwrap(), Vec2::Y * 0.3, - 0., + 0.5 + 0.3, ), } } diff --git a/light-client/src/render/sprite.rs b/light-client/src/render/sprite.rs index c19f8392..b45e85b3 100644 --- a/light-client/src/render/sprite.rs +++ b/light-client/src/render/sprite.rs @@ -22,7 +22,7 @@ impl Sprite { } } pub fn new_tile(src: Rect) -> Self { - Self::new(src, Vec2::new(0.5, 1.0), 0.) + Self::new(src, Vec2::new(0.5, 1.0), 0.5) } pub fn at(&self, pos: Vec2) -> SpriteDraw { SpriteDraw { |