diff --git a/units/sdlrenderer.inc b/units/sdlrenderer.inc index 32b7487..afc8e20 100644 --- a/units/sdlrenderer.inc +++ b/units/sdlrenderer.inc @@ -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_RenderFlip = ^PSDL_RenderFlip; + PSDL_RenderFlip = ^TSDL_RenderFlip; + TSDL_RenderFlip = type cint; + const - SDL_FLIP_NONE = $0; {**< Do not flip *} - SDL_FLIP_HORIZONTAL = $1; {**< flip horizontally *} - SDL_FLIP_VERTICAL = $2; {**< flip vertically *} + SDL_FLIP_NONE = TSDL_RenderFlip($0); {**< Do not flip *} + SDL_FLIP_HORIZONTAL = TSDL_RenderFlip($1); {**< flip horizontally *} + SDL_FLIP_VERTICAL = TSDL_RenderFlip($2); {**< flip vertically *} type {** @@ -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_RenderFlip): 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 @@ -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_RenderFlip): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderCopyExF' {$ENDIF} {$ENDIF}; {**