mirror of
https://github.com/MaddyThorson/StrawberryBF.git
synced 2025-12-15 13:27:06 +08:00
Aseprite loading fix. Draw.Sprite overload
This commit is contained in:
@ -65,5 +65,13 @@ namespace Strawberry
|
||||
SDL.Rect dst = Strawberry.Rect(position.X - Camera.X, position.Y - Camera.Y, sprite.Width, sprite.Height);
|
||||
SDL.RenderCopy(Game.Renderer, sprite[frame].Texture, &src, &dst);
|
||||
}
|
||||
|
||||
static public void Sprite(Sprite sprite, int frame, Point position, Point origin, float rotation)
|
||||
{
|
||||
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.RenderCopyEx(Game.Renderer, sprite[frame].Texture, &src, &dst, rotation, &cnt, .None);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user