mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Rot fix
This commit is contained in:
parent
30ae7eef61
commit
d7de0f19ca
1 changed files with 3 additions and 2 deletions
|
@ -178,11 +178,12 @@ namespace SDL2
|
|||
SDL.RenderCopy(mRenderer, image.mTexture, &srcRect, &destRect);
|
||||
}
|
||||
|
||||
public void Draw(Image image, float x, float y, float rot)
|
||||
public void Draw(Image image, float x, float y, float rot, float centerX, float centerY)
|
||||
{
|
||||
SDL.Rect srcRect = .(0, 0, image.mSurface.w, image.mSurface.h);
|
||||
SDL.Rect destRect = .((int32)x, (int32)y, image.mSurface.w, image.mSurface.h);
|
||||
SDL.RenderCopyEx(mRenderer, image.mTexture, &srcRect, &destRect, 0, null, .None);
|
||||
SDL.Point centerPoint = .((.)centerX, (.)centerY);
|
||||
SDL.RenderCopyEx(mRenderer, image.mTexture, &srcRect, &destRect, rot, ¢erPoint, .None);
|
||||
}
|
||||
|
||||
public void PlaySound(Sound sound, float volume = 1.0f, float pan = 0.5f)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue