aboutsummaryrefslogtreecommitdiff
path: root/pixel-client/src/render
diff options
context:
space:
mode:
Diffstat (limited to 'pixel-client/src/render')
-rw-r--r--pixel-client/src/render/mod.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/pixel-client/src/render/mod.rs b/pixel-client/src/render/mod.rs
index a2aea365..f18d96ad 100644
--- a/pixel-client/src/render/mod.rs
+++ b/pixel-client/src/render/mod.rs
@@ -34,6 +34,8 @@ pub struct SpriteRenderer<'a> {
pub size: Vec2,
texture: Texture<'a>,
+ round: bool,
+
view_scale: Vec2,
view_offset: Vec2,
@@ -103,6 +105,7 @@ impl<'a> SpriteRenderer<'a> {
.collect::<HashMap<_, _>>();
Self {
+ round: true,
texture,
size: Vec2::ONE,
metadata,
@@ -139,10 +142,10 @@ impl<'a> SpriteRenderer<'a> {
z_order: sprite.z_order,
src: sprite.src,
dst: FRect::new(
- ((sprite.dst.x + self.view_offset.x) * self.view_scale.x).round(),
- ((sprite.dst.y + self.view_offset.y) * self.view_scale.y).round(),
- (sprite.dst.w * self.view_scale.x).round(),
- (sprite.dst.h * self.view_scale.y).round(),
+ (sprite.dst.x + self.view_offset.x) * self.view_scale.x,
+ (sprite.dst.y + self.view_offset.y) * self.view_scale.y,
+ sprite.dst.w * self.view_scale.x,
+ sprite.dst.h * self.view_scale.y,
),
})
}