Skip to content

Quickfix RemderCopyEx/F #143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions units/sdlrenderer.inc
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,18 @@ const
SDL_TEXTUREMODULATE_COLOR = TSDL_TextureModulate(1); {**< srcC = srcC * color *}
SDL_TEXTUREMODULATE_ALPHA = TSDL_TextureModulate(2); {**< srcA = srcA * alpha *}

type
{**
* Flip constants for SDL_RenderCopyEx
*}
PPSDL_Flip = ^PSDL_Flip;
PSDL_Flip = ^TSDL_Flip;
TSDL_Flip = type cint;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is called SDL_RendererFlip in the C version.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RIght, thanks, fixed.


const
SDL_FLIP_NONE = $0; {**< Do not flip *}
SDL_FLIP_HORIZONTAL = $1; {**< flip horizontally *}
SDL_FLIP_VERTICAL = $2; {**< flip vertically *}
SDL_FLIP_NONE = TSDL_Flip($0); {**< Do not flip *}
SDL_FLIP_HORIZONTAL = TSDL_Flip($1); {**< flip horizontally *}
SDL_FLIP_VERTICAL = TSDL_Flip($2); {**< flip vertically *}

type
{**
Expand Down Expand Up @@ -889,7 +894,7 @@ function SDL_RenderCopyF(renderer: PSDL_Renderer; texture: PSDL_Texture; srcrect
*
* 0 on success, or -1 on error
*}
function SDL_RenderCopyEx(renderer: PSDL_Renderer; texture: PSDL_Texture; const srcrect: PSDL_Rect; dstrect: PSDL_Rect; angle: Double; center: PSDL_Point; flip: cint): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderCopyEx' {$ENDIF} {$ENDIF};
function SDL_RenderCopyEx(renderer: PSDL_Renderer; texture: PSDL_Texture; const srcrect: PSDL_Rect; dstrect: PSDL_Rect; angle: cdouble; center: PSDL_Point; flip: TSDL_Flip): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderCopyEx' {$ENDIF} {$ENDIF};

{**
* Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center
Expand All @@ -904,7 +909,7 @@ function SDL_RenderCopyEx(renderer: PSDL_Renderer; texture: PSDL_Texture; const
*
* 0 on success, or -1 on error
*}
function SDL_RenderCopyExF(renderer: PSDL_Renderer; texture: PSDL_Texture; const srcrect: PSDL_Rect; dstrect: PSDL_FRect; angle: Double; center: PSDL_FPoint; flip: cint): cint32 cdecl;
function SDL_RenderCopyExF(renderer: PSDL_Renderer; texture: PSDL_Texture; const srcrect: PSDL_Rect; dstrect: PSDL_FRect; angle: cdouble; center: PSDL_FPoint; flip: TSDL_Flip): cint32 cdecl;
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderCopyExF' {$ENDIF} {$ENDIF};

{**
Expand Down
Loading