From 8a7a4391af4788f173ca3e6214b5fe4e24af82b2 Mon Sep 17 00:00:00 2001 From: Matt Thorson Date: Sun, 14 Jun 2020 15:37:04 -0700 Subject: [PATCH] Draw Sprite fix --- src/Static/Draw.bf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Static/Draw.bf b/src/Static/Draw.bf index 4d0e644..6756a6e 100644 --- a/src/Static/Draw.bf +++ b/src/Static/Draw.bf @@ -70,7 +70,7 @@ namespace Strawberry { SDL.Point cnt = origin; SDL.Rect src = Strawberry.Rect(0, 0, sprite.Width, sprite.Height); - SDL.Rect dst = Strawberry.Rect(position.X - Camera.X, position.Y - Camera.Y, sprite.Width, sprite.Height); + SDL.Rect dst = Strawberry.Rect(position.X - origin.X - Camera.X, position.Y - origin.Y - Camera.Y, sprite.Width, sprite.Height); SDL.RenderCopyEx(Game.Renderer, sprite[frame].Texture, &src, &dst, rotation, &cnt, .None); } }