Draw Sprite fix

This commit is contained in:
Matt Thorson 2020-06-14 15:37:04 -07:00
parent 8917d7f873
commit 8a7a4391af

View File

@ -70,7 +70,7 @@ namespace Strawberry
{ {
SDL.Point cnt = origin; SDL.Point cnt = origin;
SDL.Rect src = Strawberry.Rect(0, 0, sprite.Width, sprite.Height); 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); SDL.RenderCopyEx(Game.Renderer, sprite[frame].Texture, &src, &dst, rotation, &cnt, .None);
} }
} }