Artifact
f47d5864a86de33c09a3f8ca9de12e06f679f711:
- File
sdl2/render-functions.ss
— part of check-in
[e0fdb312bb]
at
2016-12-14 16:32:00
on branch trunk
— upgraded SDL2.0 API to 2.0.5, added README for SDL2 ffi
(user:
aldo
size: 7369)
0000: 28 64 65 66 69 6e 65 2d 73 64 6c 2d 66 75 6e 63 (define-sdl-func
0010: 20 69 6e 74 20 73 64 6c 2d 67 65 74 2d 6e 75 6d int sdl-get-num
0020: 2d 72 65 6e 64 65 72 2d 64 72 69 76 65 72 73 20 -render-drivers
0030: 28 29 20 22 53 44 4c 5f 47 65 74 4e 75 6d 52 65 () "SDL_GetNumRe
0040: 6e 64 65 72 44 72 69 76 65 72 73 22 29 0a 28 64 nderDrivers").(d
0050: 65 66 69 6e 65 2d 73 64 6c 2d 66 75 6e 63 20 69 efine-sdl-func i
0060: 6e 74 20 73 64 6c 2d 67 65 74 2d 72 65 6e 64 65 nt sdl-get-rende
0070: 72 2d 64 72 69 76 65 72 2d 69 6e 66 6f 20 28 28 r-driver-info ((
0080: 69 6e 64 65 78 20 69 6e 74 29 20 28 69 6e 66 6f index int) (info
0090: 20 28 2a 20 73 64 6c 2d 72 65 6e 64 65 72 65 72 (* sdl-renderer
00a0: 2d 69 6e 66 6f 2d 74 29 29 29 20 22 53 44 4c 5f -info-t))) "SDL_
00b0: 47 65 74 52 65 6e 64 65 72 44 72 69 76 65 72 49 GetRenderDriverI
00c0: 6e 66 6f 22 29 0a 28 64 65 66 69 6e 65 2d 73 64 nfo").(define-sd
00d0: 6c 2d 66 75 6e 63 20 69 6e 74 20 73 64 6c 2d 63 l-func int sdl-c
00e0: 72 65 61 74 65 2d 77 69 6e 64 6f 77 2d 61 6e 64 reate-window-and
00f0: 2d 72 65 6e 64 65 72 65 72 20 28 28 77 69 64 74 -renderer ((widt
0100: 68 20 69 6e 74 29 20 28 68 65 69 67 68 74 20 69 h int) (height i
0110: 6e 74 29 20 28 77 69 6e 64 6f 77 5f 66 6c 61 67 nt) (window_flag
0120: 73 20 75 69 6e 74 33 32 29 20 28 77 69 6e 64 6f s uint32) (windo
0130: 77 20 28 2a 20 73 64 6c 2d 77 69 6e 64 6f 77 2d w (* sdl-window-
0140: 74 29 29 20 28 72 65 6e 64 65 72 65 72 20 28 2a t)) (renderer (*
0150: 20 73 64 6c 2d 72 65 6e 64 65 72 65 72 2d 74 29 sdl-renderer-t)
0160: 29 29 20 22 53 44 4c 5f 43 72 65 61 74 65 57 69 )) "SDL_CreateWi
0170: 6e 64 6f 77 41 6e 64 52 65 6e 64 65 72 65 72 22 ndowAndRenderer"
0180: 29 0a 28 64 65 66 69 6e 65 2d 73 64 6c 2d 66 75 ).(define-sdl-fu
0190: 6e 63 20 28 2a 20 73 64 6c 2d 72 65 6e 64 65 72 nc (* sdl-render
01a0: 65 72 2d 74 29 20 73 64 6c 2d 63 72 65 61 74 65 er-t) sdl-create
01b0: 2d 72 65 6e 64 65 72 65 72 20 28 28 77 69 6e 64 -renderer ((wind
01c0: 6f 77 20 28 2a 20 73 64 6c 2d 77 69 6e 64 6f 77 ow (* sdl-window
01d0: 2d 74 29 29 20 28 69 6e 64 65 78 20 69 6e 74 29 -t)) (index int)
01e0: 20 28 66 6c 61 67 73 20 75 69 6e 74 33 32 29 29 (flags uint32))
01f0: 20 22 53 44 4c 5f 43 72 65 61 74 65 52 65 6e 64 "SDL_CreateRend
0200: 65 72 65 72 22 29 0a 28 64 65 66 69 6e 65 2d 73 erer").(define-s
0210: 64 6c 2d 66 75 6e 63 20 28 2a 20 73 64 6c 2d 72 dl-func (* sdl-r
0220: 65 6e 64 65 72 65 72 2d 74 29 20 73 64 6c 2d 63 enderer-t) sdl-c
0230: 72 65 61 74 65 2d 73 6f 66 74 77 61 72 65 2d 72 reate-software-r
0240: 65 6e 64 65 72 65 72 20 28 28 73 75 72 66 61 63 enderer ((surfac
0250: 65 20 28 2a 20 73 64 6c 2d 73 75 72 66 61 63 65 e (* sdl-surface
0260: 2d 74 29 29 29 20 22 53 44 4c 5f 43 72 65 61 74 -t))) "SDL_Creat
0270: 65 53 6f 66 74 77 61 72 65 52 65 6e 64 65 72 65 eSoftwareRendere
0280: 72 22 29 0a 28 64 65 66 69 6e 65 2d 73 64 6c 2d r").(define-sdl-
0290: 66 75 6e 63 20 28 2a 20 73 64 6c 2d 72 65 6e 64 func (* sdl-rend
02a0: 65 72 65 72 2d 74 29 20 73 64 6c 2d 67 65 74 2d erer-t) sdl-get-
02b0: 72 65 6e 64 65 72 65 72 20 28 28 77 69 6e 64 6f renderer ((windo
02c0: 77 20 28 2a 20 73 64 6c 2d 77 69 6e 64 6f 77 2d w (* sdl-window-
02d0: 74 29 29 29 20 22 53 44 4c 5f 47 65 74 52 65 6e t))) "SDL_GetRen
02e0: 64 65 72 65 72 22 29 0a 28 64 65 66 69 6e 65 2d derer").(define-
02f0: 73 64 6c 2d 66 75 6e 63 20 69 6e 74 20 73 64 6c sdl-func int sdl
0300: 2d 67 65 74 2d 72 65 6e 64 65 72 65 72 2d 69 6e -get-renderer-in
0310: 66 6f 20 28 28 72 65 6e 64 65 72 65 72 20 28 2a fo ((renderer (*
0320: 20 73 64 6c 2d 72 65 6e 64 65 72 65 72 2d 74 29 sdl-renderer-t)
0330: 29 20 28 69 6e 66 6f 20 28 2a 20 73 64 6c 2d 72 ) (info (* sdl-r
0340: 65 6e 64 65 72 65 72 2d 69 6e 66 6f 2d 74 29 29 enderer-info-t))
0350: 29 20 22 53 44 4c 5f 47 65 74 52 65 6e 64 65 72 ) "SDL_GetRender
0360: 65 72 49 6e 66 6f 22 29 0a 28 64 65 66 69 6e 65 erInfo").(define
0370: 2d 73 64 6c 2d 66 75 6e 63 20 69 6e 74 20 73 64 -sdl-func int sd
0380: 6c 2d 67 65 74 2d 72 65 6e 64 65 72 65 72 2d 6f l-get-renderer-o
0390: 75 74 70 75 74 2d 73 69 7a 65 20 28 28 72 65 6e utput-size ((ren
03a0: 64 65 72 65 72 20 28 2a 20 73 64 6c 2d 72 65 6e derer (* sdl-ren
03b0: 64 65 72 65 72 2d 74 29 29 20 28 77 20 28 2a 20 derer-t)) (w (*
03c0: 69 6e 74 29 29 20 28 68 20 28 2a 20 69 6e 74 29 int)) (h (* int)
03d0: 29 29 20 22 53 44 4c 5f 47 65 74 52 65 6e 64 65 )) "SDL_GetRende
03e0: 72 65 72 4f 75 74 70 75 74 53 69 7a 65 22 29 0a rerOutputSize").
03f0: 28 64 65 66 69 6e 65 2d 73 64 6c 2d 66 75 6e 63 (define-sdl-func
0400: 20 28 2a 20 73 64 6c 2d 74 65 78 74 75 72 65 2d (* sdl-texture-
0410: 74 29 20 73 64 6c 2d 63 72 65 61 74 65 2d 74 65 t) sdl-create-te
0420: 78 74 75 72 65 20 28 28 72 65 6e 64 65 72 65 72 xture ((renderer
0430: 20 28 2a 20 73 64 6c 2d 72 65 6e 64 65 72 65 72 (* sdl-renderer
0440: 2d 74 29 29 20 28 66 6f 72 6d 61 74 20 75 69 6e -t)) (format uin
0450: 74 33 32 29 20 28 61 63 63 65 73 73 20 69 6e 74 t32) (access int
0460: 29 20 28 77 20 69 6e 74 29 20 28 68 20 69 6e 74 ) (w int) (h int
0470: 29 29 20 22 53 44 4c 5f 43 72 65 61 74 65 54 65 )) "SDL_CreateTe
0480: 78 74 75 72 65 22 29 0a 28 64 65 66 69 6e 65 2d xture").(define-
0490: 73 64 6c 2d 66 75 6e 63 20 28 2a 20 73 64 6c 2d sdl-func (* sdl-
04a0: 74 65 78 74 75 72 65 2d 74 29 20 73 64 6c 2d 63 texture-t) sdl-c
04b0: 72 65 61 74 65 2d 74 65 78 74 75 72 65 2d 66 72 reate-texture-fr
04c0: 6f 6d 2d 73 75 72 66 61 63 65 20 28 28 72 65 6e om-surface ((ren
04d0: 64 65 72 65 72 20 28 2a 20 73 64 6c 2d 72 65 6e derer (* sdl-ren
04e0: 64 65 72 65 72 2d 74 29 29 20 28 73 75 72 66 61 derer-t)) (surfa
04f0: 63 65 20 28 2a 20 73 64 6c 2d 73 75 72 66 61 63 ce (* sdl-surfac
0500: 65 2d 74 29 29 29 20 22 53 44 4c 5f 43 72 65 61 e-t))) "SDL_Crea
0510: 74 65 54 65 78 74 75 72 65 46 72 6f 6d 53 75 72 teTextureFromSur
0520: 66 61 63 65 22 29 0a 28 64 65 66 69 6e 65 2d 73 face").(define-s
0530: 64 6c 2d 66 75 6e 63 20 69 6e 74 20 73 64 6c 2d dl-func int sdl-
0540: 71 75 65 72 79 2d 74 65 78 74 75 72 65 20 28 28 query-texture ((
0550: 74 65 78 74 75 72 65 20 28 2a 20 73 64 6c 2d 74 texture (* sdl-t
0560: 65 78 74 75 72 65 2d 74 29 29 20 28 66 6f 72 6d exture-t)) (form
0570: 61 74 20 28 2a 20 75 69 6e 74 33 32 29 29 20 28 at (* uint32)) (
0580: 61 63 63 65 73 73 20 28 2a 20 69 6e 74 29 29 20 access (* int))
0590: 28 77 20 28 2a 20 69 6e 74 29 29 20 28 68 20 28 (w (* int)) (h (
05a0: 2a 20 69 6e 74 29 29 29 20 22 53 44 4c 5f 51 75 * int))) "SDL_Qu
05b0: 65 72 79 54 65 78 74 75 72 65 22 29 0a 28 64 65 eryTexture").(de
05c0: 66 69 6e 65 2d 73 64 6c 2d 66 75 6e 63 20 69 6e fine-sdl-func in
05d0: 74 20 73 64 6c 2d 73 65 74 2d 74 65 78 74 75 72 t sdl-set-textur
05e0: 65 2d 63 6f 6c 6f 72 2d 6d 6f 64 20 28 28 74 65 e-color-mod ((te
05f0: 78 74 75 72 65 20 28 2a 20 73 64 6c 2d 74 65 78 xture (* sdl-tex
0600: 74 75 72 65 2d 74 29 29 20 28 72 20 75 69 6e 74 ture-t)) (r uint
0610: 38 29 20 28 67 20 75 69 6e 74 38 29 20 28 62 20 8) (g uint8) (b
0620: 75 69 6e 74 38 29 29 20 22 53 44 4c 5f 53 65 74 uint8)) "SDL_Set
0630: 54 65 78 74 75 72 65 43 6f 6c 6f 72 4d 6f 64 22 TextureColorMod"
0640: 29 0a 28 64 65 66 69 6e 65 2d 73 64 6c 2d 66 75 ).(define-sdl-fu
0650: 6e 63 20 69 6e 74 20 73 64 6c 2d 67 65 74 2d 74 nc int sdl-get-t
0660: 65 78 74 75 72 65 2d 63 6f 6c 6f 72 2d 6d 6f 64 exture-color-mod
0670: 20 28 28 74 65 78 74 75 72 65 20 28 2a 20 73 64 ((texture (* sd
0680: 6c 2d 74 65 78 74 75 72 65 2d 74 29 29 20 28 72 l-texture-t)) (r
0690: 20 28 2a 20 75 69 6e 74 38 29 29 20 28 67 20 28 (* uint8)) (g (
06a0: 2a 20 75 69 6e 74 38 29 29 20 28 62 20 28 2a 20 * uint8)) (b (*
06b0: 75 69 6e 74 38 29 29 29 20 22 53 44 4c 5f 47 65 uint8))) "SDL_Ge
06c0: 74 54 65 78 74 75 72 65 43 6f 6c 6f 72 4d 6f 64 tTextureColorMod
06d0: 22 29 0a 28 64 65 66 69 6e 65 2d 73 64 6c 2d 66 ").(define-sdl-f
06e0: 75 6e 63 20 69 6e 74 20 73 64 6c 2d 73 65 74 2d unc int sdl-set-
06f0: 74 65 78 74 75 72 65 2d 61 6c 70 68 61 2d 6d 6f texture-alpha-mo
0700: 64 20 28 28 74 65 78 74 75 72 65 20 28 2a 20 73 d ((texture (* s
0710: 64 6c 2d 74 65 78 74 75 72 65 2d 74 29 29 20 28 dl-texture-t)) (
0720: 61 6c 70 68 61 20 75 69 6e 74 38 29 29 20 22 53 alpha uint8)) "S
0730: 44 4c 5f 53 65 74 54 65 78 74 75 72 65 41 6c 70 DL_SetTextureAlp
0740: 68 61 4d 6f 64 22 29 0a 28 64 65 66 69 6e 65 2d haMod").(define-
0750: 73 64 6c 2d 66 75 6e 63 20 69 6e 74 20 73 64 6c sdl-func int sdl
0760: 2d 67 65 74 2d 74 65 78 74 75 72 65 2d 61 6c 70 -get-texture-alp
0770: 68 61 2d 6d 6f 64 20 28 28 74 65 78 74 75 72 65 ha-mod ((texture
0780: 20 28 2a 20 73 64 6c 2d 74 65 78 74 75 72 65 2d (* sdl-texture-
0790: 74 29 29 20 28 61 6c 70 68 61 20 28 2a 20 75 69 t)) (alpha (* ui
07a0: 6e 74 38 29 29 29 20 22 53 44 4c 5f 47 65 74 54 nt8))) "SDL_GetT
07b0: 65 78 74 75 72 65 41 6c 70 68 61 4d 6f 64 22 29 extureAlphaMod")
07c0: 0a 28 64 65 66 69 6e 65 2d 73 64 6c 2d 66 75 6e .(define-sdl-fun
07d0: 63 20 69 6e 74 20 73 64 6c 2d 73 65 74 2d 74 65 c int sdl-set-te
07e0: 78 74 75 72 65 2d 62 6c 65 6e 64 2d 6d 6f 64 65 xture-blend-mode
07f0: 20 28 28 74 65 78 74 75 72 65 20 28 2a 20 73 64 ((texture (* sd
0800: 6c 2d 74 65 78 74 75 72 65 2d 74 29 29 20 28 62 l-texture-t)) (b
0810: 6c 65 6e 64 4d 6f 64 65 20 73 64 6c 2d 62 6c 65 lendMode sdl-ble
0820: 6e 64 2d 6d 6f 64 65 2d 74 29 29 20 22 53 44 4c nd-mode-t)) "SDL
0830: 5f 53 65 74 54 65 78 74 75 72 65 42 6c 65 6e 64 _SetTextureBlend
0840: 4d 6f 64 65 22 29 0a 28 64 65 66 69 6e 65 2d 73 Mode").(define-s
0850: 64 6c 2d 66 75 6e 63 20 69 6e 74 20 73 64 6c 2d dl-func int sdl-
0860: 67 65 74 2d 74 65 78 74 75 72 65 2d 62 6c 65 6e get-texture-blen
0870: 64 2d 6d 6f 64 65 20 28 28 74 65 78 74 75 72 65 d-mode ((texture
0880: 20 28 2a 20 73 64 6c 2d 74 65 78 74 75 72 65 2d (* sdl-texture-
0890: 74 29 29 20 28 62 6c 65 6e 64 4d 6f 64 65 20 28 t)) (blendMode (
08a0: 2a 20 73 64 6c 2d 62 6c 65 6e 64 2d 6d 6f 64 65 * sdl-blend-mode
08b0: 2d 74 29 29 29 20 22 53 44 4c 5f 47 65 74 54 65 -t))) "SDL_GetTe
08c0: 78 74 75 72 65 42 6c 65 6e 64 4d 6f 64 65 22 29 xtureBlendMode")
08d0: 0a 28 64 65 66 69 6e 65 2d 73 64 6c 2d 66 75 6e .(define-sdl-fun
08e0: 63 20 69 6e 74 20 73 64 6c 2d 75 70 64 61 74 65 c int sdl-update
08f0: 2d 74 65 78 74 75 72 65 20 28 28 74 65 78 74 75 -texture ((textu
0900: 72 65 20 28 2a 20 73 64 6c 2d 74 65 78 74 75 72 re (* sdl-textur
0910: 65 2d 74 29 29 20 28 72 65 63 74 20 28 2a 20 73 e-t)) (rect (* s
0920: 64 6c 2d 72 65 63 74 2d 74 29 29 20 28 70 69 78 dl-rect-t)) (pix
0930: 65 6c 73 20 76 6f 69 64 2a 29 20 28 70 69 74 63 els void*) (pitc
0940: 68 20 69 6e 74 29 29 20 22 53 44 4c 5f 55 70 64 h int)) "SDL_Upd
0950: 61 74 65 54 65 78 74 75 72 65 22 29 0a 28 64 65 ateTexture").(de
0960: 66 69 6e 65 2d 73 64 6c 2d 66 75 6e 63 20 69 6e fine-sdl-func in
0970: 74 20 73 64 6c 2d 75 70 64 61 74 65 2d 79 75 76 t sdl-update-yuv
0980: 2d 74 65 78 74 75 72 65 20 28 28 74 65 78 74 75 -texture ((textu
0990: 72 65 20 28 2a 20 73 64 6c 2d 74 65 78 74 75 72 re (* sdl-textur
09a0: 65 2d 74 29 29 20 28 72 65 63 74 20 28 2a 20 73 e-t)) (rect (* s
09b0: 64 6c 2d 72 65 63 74 2d 74 29 29 20 28 59 70 6c dl-rect-t)) (Ypl
09c0: 61 6e 65 20 28 2a 20 75 69 6e 74 38 29 29 20 28 ane (* uint8)) (
09d0: 59 70 69 74 63 68 20 69 6e 74 29 20 28 55 70 6c Ypitch int) (Upl
09e0: 61 6e 65 20 28 2a 20 75 69 6e 74 38 29 29 20 28 ane (* uint8)) (
09f0: 55 70 69 74 63 68 20 69 6e 74 29 20 28 56 70 6c Upitch int) (Vpl
0a00: 61 6e 65 20 28 2a 20 75 69 6e 74 38 29 29 20 28 ane (* uint8)) (
0a10: 56 70 69 74 63 68 20 69 6e 74 29 29 20 22 53 44 Vpitch int)) "SD
0a20: 4c 5f 55 70 64 61 74 65 59 55 56 54 65 78 74 75 L_UpdateYUVTextu
0a30: 72 65 22 29 0a 28 64 65 66 69 6e 65 2d 73 64 6c re").(define-sdl
0a40: 2d 66 75 6e 63 20 69 6e 74 20 73 64 6c 2d 6c 6f -func int sdl-lo
0a50: 63 6b 2d 74 65 78 74 75 72 65 20 28 28 74 65 78 ck-texture ((tex
0a60: 74 75 72 65 20 28 2a 20 73 64 6c 2d 74 65 78 74 ture (* sdl-text
0a70: 75 72 65 2d 74 29 29 20 28 72 65 63 74 20 28 2a ure-t)) (rect (*
0a80: 20 73 64 6c 2d 72 65 63 74 2d 74 29 29 20 28 70 sdl-rect-t)) (p
0a90: 69 78 65 6c 73 20 28 2a 20 76 6f 69 64 2a 29 29 ixels (* void*))
0aa0: 20 28 70 69 74 63 68 20 28 2a 20 69 6e 74 29 29 (pitch (* int))
0ab0: 29 20 22 53 44 4c 5f 4c 6f 63 6b 54 65 78 74 75 ) "SDL_LockTextu
0ac0: 72 65 22 29 0a 28 64 65 66 69 6e 65 2d 73 64 6c re").(define-sdl
0ad0: 2d 66 75 6e 63 20 76 6f 69 64 20 73 64 6c 2d 75 -func void sdl-u
0ae0: 6e 6c 6f 63 6b 2d 74 65 78 74 75 72 65 20 28 28 nlock-texture ((
0af0: 74 65 78 74 75 72 65 20 28 2a 20 73 64 6c 2d 74 texture (* sdl-t
0b00: 65 78 74 75 72 65 2d 74 29 29 29 20 22 53 44 4c exture-t))) "SDL
0b10: 5f 55 6e 6c 6f 63 6b 54 65 78 74 75 72 65 22 29 _UnlockTexture")
0b20: 0a 28 64 65 66 69 6e 65 2d 73 64 6c 2d 66 75 6e .(define-sdl-fun
0b30: 63 20 73 64 6c 2d 62 6f 6f 6c 2d 74 20 73 64 6c c sdl-bool-t sdl
0b40: 2d 72 65 6e 64 65 72 2d 74 61 72 67 65 74 2d 73 -render-target-s
0b50: 75 70 70 6f 72 74 65 64 20 28 28 72 65 6e 64 65 upported ((rende
0b60: 72 65 72 20 28 2a 20 73 64 6c 2d 72 65 6e 64 65 rer (* sdl-rende
0b70: 72 65 72 2d 74 29 29 29 20 22 53 44 4c 5f 52 65 rer-t))) "SDL_Re
0b80: 6e 64 65 72 54 61 72 67 65 74 53 75 70 70 6f 72 nderTargetSuppor
0b90: 74 65 64 22 29 0a 28 64 65 66 69 6e 65 2d 73 64 ted").(define-sd
0ba0: 6c 2d 66 75 6e 63 20 69 6e 74 20 73 64 6c 2d 73 l-func int sdl-s
0bb0: 65 74 2d 72 65 6e 64 65 72 2d 74 61 72 67 65 74 et-render-target
0bc0: 20 28 28 72 65 6e 64 65 72 65 72 20 28 2a 20 73 ((renderer (* s
0bd0: 64 6c 2d 72 65 6e 64 65 72 65 72 2d 74 29 29 20 dl-renderer-t))
0be0: 28 74 65 78 74 75 72 65 20 28 2a 20 73 64 6c 2d (texture (* sdl-
0bf0: 74 65 78 74 75 72 65 2d 74 29 29 29 20 22 53 44 texture-t))) "SD
0c00: 4c 5f 53 65 74 52 65 6e 64 65 72 54 61 72 67 65 L_SetRenderTarge
0c10: 74 22 29 0a 28 64 65 66 69 6e 65 2d 73 64 6c 2d t").(define-sdl-
0c20: 66 75 6e 63 20 28 2a 20 73 64 6c 2d 74 65 78 74 func (* sdl-text
0c30: 75 72 65 2d 74 29 20 73 64 6c 2d 67 65 74 2d 72 ure-t) sdl-get-r
0c40: 65 6e 64 65 72 2d 74 61 72 67 65 74 20 28 28 72 ender-target ((r
0c50: 65 6e 64 65 72 65 72 20 28 2a 20 73 64 6c 2d 72 enderer (* sdl-r
0c60: 65 6e 64 65 72 65 72 2d 74 29 29 29 20 22 53 44 enderer-t))) "SD
0c70: 4c 5f 47 65 74 52 65 6e 64 65 72 54 61 72 67 65 L_GetRenderTarge
0c80: 74 22 29 0a 28 64 65 66 69 6e 65 2d 73 64 6c 2d t").(define-sdl-
0c90: 66 75 6e 63 20 69 6e 74 20 73 64 6c 2d 72 65 6e func int sdl-ren
0ca0: 64 65 72 2d 73 65 74 2d 6c 6f 67 69 63 61 6c 2d der-set-logical-
0cb0: 73 69 7a 65 20 28 28 72 65 6e 64 65 72 65 72 20 size ((renderer
0cc0: 28 2a 20 73 64 6c 2d 72 65 6e 64 65 72 65 72 2d (* sdl-renderer-
0cd0: 74 29 29 20 28 77 20 69 6e 74 29 20 28 68 20 69 t)) (w int) (h i
0ce0: 6e 74 29 29 20 22 53 44 4c 5f 52 65 6e 64 65 72 nt)) "SDL_Render
0cf0: 53 65 74 4c 6f 67 69 63 61 6c 53 69 7a 65 22 29 SetLogicalSize")
0d00: 0a 28 64 65 66 69 6e 65 2d 73 64 6c 2d 66 75 6e .(define-sdl-fun
0d10: 63 20 76 6f 69 64 20 73 64 6c 2d 72 65 6e 64 65 c void sdl-rende
0d20: 72 2d 67 65 74 2d 6c 6f 67 69 63 61 6c 2d 73 69 r-get-logical-si
0d30: 7a 65 20 28 28 72 65 6e 64 65 72 65 72 20 28 2a ze ((renderer (*
0d40: 20 73 64 6c 2d 72 65 6e 64 65 72 65 72 2d 74 29 sdl-renderer-t)
0d50: 29 20 28 77 20 28 2a 20 69 6e 74 29 29 20 28 68 ) (w (* int)) (h
0d60: 20 28 2a 20 69 6e 74 29 29 29 20 22 53 44 4c 5f (* int))) "SDL_
0d70: 52 65 6e 64 65 72 47 65 74 4c 6f 67 69 63 61 6c RenderGetLogical
0d80: 53 69 7a 65 22 29 0a 28 64 65 66 69 6e 65 2d 73 Size").(define-s
0d90: 64 6c 2d 66 75 6e 63 20 69 6e 74 20 73 64 6c 2d dl-func int sdl-
0da0: 72 65 6e 64 65 72 2d 73 65 74 2d 69 6e 74 65 67 render-set-integ
0db0: 65 72 2d 73 63 61 6c 65 20 28 28 72 65 6e 64 65 er-scale ((rende
0dc0: 72 65 72 20 28 2a 20 73 64 6c 2d 72 65 6e 64 65 rer (* sdl-rende
0dd0: 72 65 72 2d 74 29 29 20 28 65 6e 61 62 6c 65 20 rer-t)) (enable
0de0: 73 64 6c 2d 62 6f 6f 6c 2d 74 29 29 20 22 53 44 sdl-bool-t)) "SD
0df0: 4c 5f 52 65 6e 64 65 72 53 65 74 49 6e 74 65 67 L_RenderSetInteg
0e00: 65 72 53 63 61 6c 65 22 29 0a 28 64 65 66 69 6e erScale").(defin
0e10: 65 2d 73 64 6c 2d 66 75 6e 63 20 73 64 6c 2d 62 e-sdl-func sdl-b
0e20: 6f 6f 6c 2d 74 20 73 64 6c 2d 72 65 6e 64 65 72 ool-t sdl-render
0e30: 2d 67 65 74 2d 69 6e 74 65 67 65 72 2d 73 63 61 -get-integer-sca
0e40: 6c 65 20 28 28 72 65 6e 64 65 72 65 72 20 28 2a le ((renderer (*
0e50: 20 73 64 6c 2d 72 65 6e 64 65 72 65 72 2d 74 29 sdl-renderer-t)
0e60: 29 29 20 22 53 44 4c 5f 52 65 6e 64 65 72 47 65 )) "SDL_RenderGe
0e70: 74 49 6e 74 65 67 65 72 53 63 61 6c 65 22 29 0a tIntegerScale").
0e80: 28 64 65 66 69 6e 65 2d 73 64 6c 2d 66 75 6e 63 (define-sdl-func
0e90: 20 69 6e 74 20 73 64 6c 2d 72 65 6e 64 65 72 2d int sdl-render-
0ea0: 73 65 74 2d 76 69 65 77 70 6f 72 74 20 28 28 72 set-viewport ((r
0eb0: 65 6e 64 65 72 65 72 20 28 2a 20 73 64 6c 2d 72 enderer (* sdl-r
0ec0: 65 6e 64 65 72 65 72 2d 74 29 29 20 28 72 65 63 enderer-t)) (rec
0ed0: 74 20 28 2a 20 73 64 6c 2d 72 65 63 74 2d 74 29 t (* sdl-rect-t)
0ee0: 29 29 20 22 53 44 4c 5f 52 65 6e 64 65 72 53 65 )) "SDL_RenderSe
0ef0: 74 56 69 65 77 70 6f 72 74 22 29 0a 28 64 65 66 tViewport").(def
0f00: 69 6e 65 2d 73 64 6c 2d 66 75 6e 63 20 76 6f 69 ine-sdl-func voi
0f10: 64 20 73 64 6c 2d 72 65 6e 64 65 72 2d 67 65 74 d sdl-render-get
0f20: 2d 76 69 65 77 70 6f 72 74 20 28 28 72 65 6e 64 -viewport ((rend
0f30: 65 72 65 72 20 28 2a 20 73 64 6c 2d 72 65 6e 64 erer (* sdl-rend
0f40: 65 72 65 72 2d 74 29 29 20 28 72 65 63 74 20 28 erer-t)) (rect (
0f50: 2a 20 73 64 6c 2d 72 65 63 74 2d 74 29 29 29 20 * sdl-rect-t)))
0f60: 22 53 44 4c 5f 52 65 6e 64 65 72 47 65 74 56 69 "SDL_RenderGetVi
0f70: 65 77 70 6f 72 74 22 29 0a 28 64 65 66 69 6e 65 ewport").(define
0f80: 2d 73 64 6c 2d 66 75 6e 63 20 69 6e 74 20 73 64 -sdl-func int sd
0f90: 6c 2d 72 65 6e 64 65 72 2d 73 65 74 2d 63 6c 69 l-render-set-cli
0fa0: 70 2d 72 65 63 74 20 28 28 72 65 6e 64 65 72 65 p-rect ((rendere
0fb0: 72 20 28 2a 20 73 64 6c 2d 72 65 6e 64 65 72 65 r (* sdl-rendere
0fc0: 72 2d 74 29 29 20 28 72 65 63 74 20 28 2a 20 73 r-t)) (rect (* s
0fd0: 64 6c 2d 72 65 63 74 2d 74 29 29 29 20 22 53 44 dl-rect-t))) "SD
0fe0: 4c 5f 52 65 6e 64 65 72 53 65 74 43 6c 69 70 52 L_RenderSetClipR
0ff0: 65 63 74 22 29 0a 28 64 65 66 69 6e 65 2d 73 64 ect").(define-sd
1000: 6c 2d 66 75 6e 63 20 76 6f 69 64 20 73 64 6c 2d l-func void sdl-
1010: 72 65 6e 64 65 72 2d 67 65 74 2d 63 6c 69 70 2d render-get-clip-
1020: 72 65 63 74 20 28 28 72 65 6e 64 65 72 65 72 20 rect ((renderer
1030: 28 2a 20 73 64 6c 2d 72 65 6e 64 65 72 65 72 2d (* sdl-renderer-
1040: 74 29 29 20 28 72 65 63 74 20 28 2a 20 73 64 6c t)) (rect (* sdl
1050: 2d 72 65 63 74 2d 74 29 29 29 20 22 53 44 4c 5f -rect-t))) "SDL_
1060: 52 65 6e 64 65 72 47 65 74 43 6c 69 70 52 65 63 RenderGetClipRec
1070: 74 22 29 0a 28 64 65 66 69 6e 65 2d 73 64 6c 2d t").(define-sdl-
1080: 66 75 6e 63 20 73 64 6c 2d 62 6f 6f 6c 2d 74 20 func sdl-bool-t
1090: 73 64 6c 2d 72 65 6e 64 65 72 2d 69 73 2d 63 6c sdl-render-is-cl
10a0: 69 70 2d 65 6e 61 62 6c 65 64 20 28 28 72 65 6e ip-enabled ((ren
10b0: 64 65 72 65 72 20 28 2a 20 73 64 6c 2d 72 65 6e derer (* sdl-ren
10c0: 64 65 72 65 72 2d 74 29 29 29 20 22 53 44 4c 5f derer-t))) "SDL_
10d0: 52 65 6e 64 65 72 49 73 43 6c 69 70 45 6e 61 62 RenderIsClipEnab
10e0: 6c 65 64 22 29 0a 28 64 65 66 69 6e 65 2d 73 64 led").(define-sd
10f0: 6c 2d 66 75 6e 63 20 69 6e 74 20 73 64 6c 2d 72 l-func int sdl-r
1100: 65 6e 64 65 72 2d 73 65 74 2d 73 63 61 6c 65 20 ender-set-scale
1110: 28 28 72 65 6e 64 65 72 65 72 20 28 2a 20 73 64 ((renderer (* sd
1120: 6c 2d 72 65 6e 64 65 72 65 72 2d 74 29 29 20 28 l-renderer-t)) (
1130: 73 63 61 6c 65 58 20 66 6c 6f 61 74 29 20 28 73 scaleX float) (s
1140: 63 61 6c 65 59 20 66 6c 6f 61 74 29 29 20 22 53 caleY float)) "S
1150: 44 4c 5f 52 65 6e 64 65 72 53 65 74 53 63 61 6c DL_RenderSetScal
1160: 65 22 29 0a 28 64 65 66 69 6e 65 2d 73 64 6c 2d e").(define-sdl-
1170: 66 75 6e 63 20 76 6f 69 64 20 73 64 6c 2d 72 65 func void sdl-re
1180: 6e 64 65 72 2d 67 65 74 2d 73 63 61 6c 65 20 28 nder-get-scale (
1190: 28 72 65 6e 64 65 72 65 72 20 28 2a 20 73 64 6c (renderer (* sdl
11a0: 2d 72 65 6e 64 65 72 65 72 2d 74 29 29 20 28 73 -renderer-t)) (s
11b0: 63 61 6c 65 58 20 28 2a 20 66 6c 6f 61 74 29 29 caleX (* float))
11c0: 20 28 73 63 61 6c 65 59 20 28 2a 20 66 6c 6f 61 (scaleY (* floa
11d0: 74 29 29 29 20 22 53 44 4c 5f 52 65 6e 64 65 72 t))) "SDL_Render
11e0: 47 65 74 53 63 61 6c 65 22 29 0a 28 64 65 66 69 GetScale").(defi
11f0: 6e 65 2d 73 64 6c 2d 66 75 6e 63 20 69 6e 74 20 ne-sdl-func int
1200: 73 64 6c 2d 73 65 74 2d 72 65 6e 64 65 72 2d 64 sdl-set-render-d
1210: 72 61 77 2d 63 6f 6c 6f 72 20 28 28 72 65 6e 64 raw-color ((rend
1220: 65 72 65 72 20 28 2a 20 73 64 6c 2d 72 65 6e 64 erer (* sdl-rend
1230: 65 72 65 72 2d 74 29 29 20 28 72 20 75 69 6e 74 erer-t)) (r uint
1240: 38 29 20 28 67 20 75 69 6e 74 38 29 20 28 62 20 8) (g uint8) (b
1250: 75 69 6e 74 38 29 20 28 61 20 75 69 6e 74 38 29 uint8) (a uint8)
1260: 29 20 22 53 44 4c 5f 53 65 74 52 65 6e 64 65 72 ) "SDL_SetRender
1270: 44 72 61 77 43 6f 6c 6f 72 22 29 0a 28 64 65 66 DrawColor").(def
1280: 69 6e 65 2d 73 64 6c 2d 66 75 6e 63 20 69 6e 74 ine-sdl-func int
1290: 20 73 64 6c 2d 67 65 74 2d 72 65 6e 64 65 72 2d sdl-get-render-
12a0: 64 72 61 77 2d 63 6f 6c 6f 72 20 28 28 72 65 6e draw-color ((ren
12b0: 64 65 72 65 72 20 28 2a 20 73 64 6c 2d 72 65 6e derer (* sdl-ren
12c0: 64 65 72 65 72 2d 74 29 29 20 28 72 20 28 2a 20 derer-t)) (r (*
12d0: 75 69 6e 74 38 29 29 20 28 67 20 28 2a 20 75 69 uint8)) (g (* ui
12e0: 6e 74 38 29 29 20 28 62 20 28 2a 20 75 69 6e 74 nt8)) (b (* uint
12f0: 38 29 29 20 28 61 20 28 2a 20 75 69 6e 74 38 29 8)) (a (* uint8)
1300: 29 29 20 22 53 44 4c 5f 47 65 74 52 65 6e 64 65 )) "SDL_GetRende
1310: 72 44 72 61 77 43 6f 6c 6f 72 22 29 0a 28 64 65 rDrawColor").(de
1320: 66 69 6e 65 2d 73 64 6c 2d 66 75 6e 63 20 69 6e fine-sdl-func in
1330: 74 20 73 64 6c 2d 73 65 74 2d 72 65 6e 64 65 72 t sdl-set-render
1340: 2d 64 72 61 77 2d 62 6c 65 6e 64 2d 6d 6f 64 65 -draw-blend-mode
1350: 20 28 28 72 65 6e 64 65 72 65 72 20 28 2a 20 73 ((renderer (* s
1360: 64 6c 2d 72 65 6e 64 65 72 65 72 2d 74 29 29 20 dl-renderer-t))
1370: 28 62 6c 65 6e 64 4d 6f 64 65 20 73 64 6c 2d 62 (blendMode sdl-b
1380: 6c 65 6e 64 2d 6d 6f 64 65 2d 74 29 29 20 22 53 lend-mode-t)) "S
1390: 44 4c 5f 53 65 74 52 65 6e 64 65 72 44 72 61 77 DL_SetRenderDraw
13a0: 42 6c 65 6e 64 4d 6f 64 65 22 29 0a 28 64 65 66 BlendMode").(def
13b0: 69 6e 65 2d 73 64 6c 2d 66 75 6e 63 20 69 6e 74 ine-sdl-func int
13c0: 20 73 64 6c 2d 67 65 74 2d 72 65 6e 64 65 72 2d sdl-get-render-
13d0: 64 72 61 77 2d 62 6c 65 6e 64 2d 6d 6f 64 65 20 draw-blend-mode
13e0: 28 28 72 65 6e 64 65 72 65 72 20 28 2a 20 73 64 ((renderer (* sd
13f0: 6c 2d 72 65 6e 64 65 72 65 72 2d 74 29 29 20 28 l-renderer-t)) (
1400: 62 6c 65 6e 64 4d 6f 64 65 20 28 2a 20 73 64 6c blendMode (* sdl
1410: 2d 62 6c 65 6e 64 2d 6d 6f 64 65 2d 74 29 29 29 -blend-mode-t)))
1420: 20 22 53 44 4c 5f 47 65 74 52 65 6e 64 65 72 44 "SDL_GetRenderD
1430: 72 61 77 42 6c 65 6e 64 4d 6f 64 65 22 29 0a 28 rawBlendMode").(
1440: 64 65 66 69 6e 65 2d 73 64 6c 2d 66 75 6e 63 20 define-sdl-func
1450: 69 6e 74 20 73 64 6c 2d 72 65 6e 64 65 72 2d 63 int sdl-render-c
1460: 6c 65 61 72 20 28 28 72 65 6e 64 65 72 65 72 20 lear ((renderer
1470: 28 2a 20 73 64 6c 2d 72 65 6e 64 65 72 65 72 2d (* sdl-renderer-
1480: 74 29 29 29 20 22 53 44 4c 5f 52 65 6e 64 65 72 t))) "SDL_Render
1490: 43 6c 65 61 72 22 29 0a 28 64 65 66 69 6e 65 2d Clear").(define-
14a0: 73 64 6c 2d 66 75 6e 63 20 69 6e 74 20 73 64 6c sdl-func int sdl
14b0: 2d 72 65 6e 64 65 72 2d 64 72 61 77 2d 70 6f 69 -render-draw-poi
14c0: 6e 74 20 28 28 72 65 6e 64 65 72 65 72 20 28 2a nt ((renderer (*
14d0: 20 73 64 6c 2d 72 65 6e 64 65 72 65 72 2d 74 29 sdl-renderer-t)
14e0: 29 20 28 78 20 69 6e 74 29 20 28 79 20 69 6e 74 ) (x int) (y int
14f0: 29 29 20 22 53 44 4c 5f 52 65 6e 64 65 72 44 72 )) "SDL_RenderDr
1500: 61 77 50 6f 69 6e 74 22 29 0a 28 64 65 66 69 6e awPoint").(defin
1510: 65 2d 73 64 6c 2d 66 75 6e 63 20 69 6e 74 20 73 e-sdl-func int s
1520: 64 6c 2d 72 65 6e 64 65 72 2d 64 72 61 77 2d 70 dl-render-draw-p
1530: 6f 69 6e 74 73 20 28 28 72 65 6e 64 65 72 65 72 oints ((renderer
1540: 20 28 2a 20 73 64 6c 2d 72 65 6e 64 65 72 65 72 (* sdl-renderer
1550: 2d 74 29 29 20 28 70 6f 69 6e 74 73 20 28 2a 20 -t)) (points (*
1560: 73 64 6c 2d 70 6f 69 6e 74 2d 74 29 29 20 28 63 sdl-point-t)) (c
1570: 6f 75 6e 74 20 69 6e 74 29 29 20 22 53 44 4c 5f ount int)) "SDL_
1580: 52 65 6e 64 65 72 44 72 61 77 50 6f 69 6e 74 73 RenderDrawPoints
1590: 22 29 0a 28 64 65 66 69 6e 65 2d 73 64 6c 2d 66 ").(define-sdl-f
15a0: 75 6e 63 20 69 6e 74 20 73 64 6c 2d 72 65 6e 64 unc int sdl-rend
15b0: 65 72 2d 64 72 61 77 2d 6c 69 6e 65 20 28 28 72 er-draw-line ((r
15c0: 65 6e 64 65 72 65 72 20 28 2a 20 73 64 6c 2d 72 enderer (* sdl-r
15d0: 65 6e 64 65 72 65 72 2d 74 29 29 20 28 78 31 20 enderer-t)) (x1
15e0: 69 6e 74 29 20 28 79 31 20 69 6e 74 29 20 28 78 int) (y1 int) (x
15f0: 32 20 69 6e 74 29 20 28 79 32 20 69 6e 74 29 29 2 int) (y2 int))
1600: 20 22 53 44 4c 5f 52 65 6e 64 65 72 44 72 61 77 "SDL_RenderDraw
1610: 4c 69 6e 65 22 29 0a 28 64 65 66 69 6e 65 2d 73 Line").(define-s
1620: 64 6c 2d 66 75 6e 63 20 69 6e 74 20 73 64 6c 2d dl-func int sdl-
1630: 72 65 6e 64 65 72 2d 64 72 61 77 2d 6c 69 6e 65 render-draw-line
1640: 73 20 28 28 72 65 6e 64 65 72 65 72 20 28 2a 20 s ((renderer (*
1650: 73 64 6c 2d 72 65 6e 64 65 72 65 72 2d 74 29 29 sdl-renderer-t))
1660: 20 28 70 6f 69 6e 74 73 20 28 2a 20 73 64 6c 2d (points (* sdl-
1670: 70 6f 69 6e 74 2d 74 29 29 20 28 63 6f 75 6e 74 point-t)) (count
1680: 20 69 6e 74 29 29 20 22 53 44 4c 5f 52 65 6e 64 int)) "SDL_Rend
1690: 65 72 44 72 61 77 4c 69 6e 65 73 22 29 0a 28 64 erDrawLines").(d
16a0: 65 66 69 6e 65 2d 73 64 6c 2d 66 75 6e 63 20 69 efine-sdl-func i
16b0: 6e 74 20 73 64 6c 2d 72 65 6e 64 65 72 2d 64 72 nt sdl-render-dr
16c0: 61 77 2d 72 65 63 74 20 28 28 72 65 6e 64 65 72 aw-rect ((render
16d0: 65 72 20 28 2a 20 73 64 6c 2d 72 65 6e 64 65 72 er (* sdl-render
16e0: 65 72 2d 74 29 29 20 28 72 65 63 74 20 28 2a 20 er-t)) (rect (*
16f0: 73 64 6c 2d 72 65 63 74 2d 74 29 29 29 20 22 53 sdl-rect-t))) "S
1700: 44 4c 5f 52 65 6e 64 65 72 44 72 61 77 52 65 63 DL_RenderDrawRec
1710: 74 22 29 0a 28 64 65 66 69 6e 65 2d 73 64 6c 2d t").(define-sdl-
1720: 66 75 6e 63 20 69 6e 74 20 73 64 6c 2d 72 65 6e func int sdl-ren
1730: 64 65 72 2d 64 72 61 77 2d 72 65 63 74 73 20 28 der-draw-rects (
1740: 28 72 65 6e 64 65 72 65 72 20 28 2a 20 73 64 6c (renderer (* sdl
1750: 2d 72 65 6e 64 65 72 65 72 2d 74 29 29 20 28 72 -renderer-t)) (r
1760: 65 63 74 73 20 28 2a 20 73 64 6c 2d 72 65 63 74 ects (* sdl-rect
1770: 2d 74 29 29 20 28 63 6f 75 6e 74 20 69 6e 74 29 -t)) (count int)
1780: 29 20 22 53 44 4c 5f 52 65 6e 64 65 72 44 72 61 ) "SDL_RenderDra
1790: 77 52 65 63 74 73 22 29 0a 28 64 65 66 69 6e 65 wRects").(define
17a0: 2d 73 64 6c 2d 66 75 6e 63 20 69 6e 74 20 73 64 -sdl-func int sd
17b0: 6c 2d 72 65 6e 64 65 72 2d 66 69 6c 6c 2d 72 65 l-render-fill-re
17c0: 63 74 20 28 28 72 65 6e 64 65 72 65 72 20 28 2a ct ((renderer (*
17d0: 20 73 64 6c 2d 72 65 6e 64 65 72 65 72 2d 74 29 sdl-renderer-t)
17e0: 29 20 28 72 65 63 74 20 28 2a 20 73 64 6c 2d 72 ) (rect (* sdl-r
17f0: 65 63 74 2d 74 29 29 29 20 22 53 44 4c 5f 52 65 ect-t))) "SDL_Re
1800: 6e 64 65 72 46 69 6c 6c 52 65 63 74 22 29 0a 28 nderFillRect").(
1810: 64 65 66 69 6e 65 2d 73 64 6c 2d 66 75 6e 63 20 define-sdl-func
1820: 69 6e 74 20 73 64 6c 2d 72 65 6e 64 65 72 2d 66 int sdl-render-f
1830: 69 6c 6c 2d 72 65 63 74 73 20 28 28 72 65 6e 64 ill-rects ((rend
1840: 65 72 65 72 20 28 2a 20 73 64 6c 2d 72 65 6e 64 erer (* sdl-rend
1850: 65 72 65 72 2d 74 29 29 20 28 72 65 63 74 73 20 erer-t)) (rects
1860: 28 2a 20 73 64 6c 2d 72 65 63 74 2d 74 29 29 20 (* sdl-rect-t))
1870: 28 63 6f 75 6e 74 20 69 6e 74 29 29 20 22 53 44 (count int)) "SD
1880: 4c 5f 52 65 6e 64 65 72 46 69 6c 6c 52 65 63 74 L_RenderFillRect
1890: 73 22 29 0a 28 64 65 66 69 6e 65 2d 73 64 6c 2d s").(define-sdl-
18a0: 66 75 6e 63 20 69 6e 74 20 73 64 6c 2d 72 65 6e func int sdl-ren
18b0: 64 65 72 2d 63 6f 70 79 20 28 28 72 65 6e 64 65 der-copy ((rende
18c0: 72 65 72 20 28 2a 20 73 64 6c 2d 72 65 6e 64 65 rer (* sdl-rende
18d0: 72 65 72 2d 74 29 29 20 28 74 65 78 74 75 72 65 rer-t)) (texture
18e0: 20 28 2a 20 73 64 6c 2d 74 65 78 74 75 72 65 2d (* sdl-texture-
18f0: 74 29 29 20 28 73 72 63 72 65 63 74 20 28 2a 20 t)) (srcrect (*
1900: 73 64 6c 2d 72 65 63 74 2d 74 29 29 20 28 64 73 sdl-rect-t)) (ds
1910: 74 72 65 63 74 20 28 2a 20 73 64 6c 2d 72 65 63 trect (* sdl-rec
1920: 74 2d 74 29 29 29 20 22 53 44 4c 5f 52 65 6e 64 t-t))) "SDL_Rend
1930: 65 72 43 6f 70 79 22 29 0a 28 64 65 66 69 6e 65 erCopy").(define
1940: 2d 73 64 6c 2d 66 75 6e 63 20 69 6e 74 20 73 64 -sdl-func int sd
1950: 6c 2d 72 65 6e 64 65 72 2d 63 6f 70 79 2d 65 78 l-render-copy-ex
1960: 20 28 28 72 65 6e 64 65 72 65 72 20 28 2a 20 73 ((renderer (* s
1970: 64 6c 2d 72 65 6e 64 65 72 65 72 2d 74 29 29 20 dl-renderer-t))
1980: 28 74 65 78 74 75 72 65 20 28 2a 20 73 64 6c 2d (texture (* sdl-
1990: 74 65 78 74 75 72 65 2d 74 29 29 20 28 73 72 63 texture-t)) (src
19a0: 72 65 63 74 20 28 2a 20 73 64 6c 2d 72 65 63 74 rect (* sdl-rect
19b0: 2d 74 29 29 20 28 64 73 74 72 65 63 74 20 28 2a -t)) (dstrect (*
19c0: 20 73 64 6c 2d 72 65 63 74 2d 74 29 29 20 28 61 sdl-rect-t)) (a
19d0: 6e 67 6c 65 20 64 6f 75 62 6c 65 29 20 28 63 65 ngle double) (ce
19e0: 6e 74 65 72 20 28 2a 20 73 64 6c 2d 70 6f 69 6e nter (* sdl-poin
19f0: 74 2d 74 29 29 20 28 66 6c 69 70 20 73 64 6c 2d t-t)) (flip sdl-
1a00: 72 65 6e 64 65 72 65 72 2d 66 6c 69 70 2d 74 29 renderer-flip-t)
1a10: 29 20 22 53 44 4c 5f 52 65 6e 64 65 72 43 6f 70 ) "SDL_RenderCop
1a20: 79 45 78 22 29 0a 28 64 65 66 69 6e 65 2d 73 64 yEx").(define-sd
1a30: 6c 2d 66 75 6e 63 20 69 6e 74 20 73 64 6c 2d 72 l-func int sdl-r
1a40: 65 6e 64 65 72 2d 72 65 61 64 2d 70 69 78 65 6c ender-read-pixel
1a50: 73 20 28 28 72 65 6e 64 65 72 65 72 20 28 2a 20 s ((renderer (*
1a60: 73 64 6c 2d 72 65 6e 64 65 72 65 72 2d 74 29 29 sdl-renderer-t))
1a70: 20 28 72 65 63 74 20 28 2a 20 73 64 6c 2d 72 65 (rect (* sdl-re
1a80: 63 74 2d 74 29 29 20 28 66 6f 72 6d 61 74 20 75 ct-t)) (format u
1a90: 69 6e 74 33 32 29 20 28 70 69 78 65 6c 73 20 76 int32) (pixels v
1aa0: 6f 69 64 2a 29 20 28 70 69 74 63 68 20 69 6e 74 oid*) (pitch int
1ab0: 29 29 20 22 53 44 4c 5f 52 65 6e 64 65 72 52 65 )) "SDL_RenderRe
1ac0: 61 64 50 69 78 65 6c 73 22 29 0a 28 64 65 66 69 adPixels").(defi
1ad0: 6e 65 2d 73 64 6c 2d 66 75 6e 63 20 76 6f 69 64 ne-sdl-func void
1ae0: 20 73 64 6c 2d 72 65 6e 64 65 72 2d 70 72 65 73 sdl-render-pres
1af0: 65 6e 74 20 28 28 72 65 6e 64 65 72 65 72 20 28 ent ((renderer (
1b00: 2a 20 73 64 6c 2d 72 65 6e 64 65 72 65 72 2d 74 * sdl-renderer-t
1b10: 29 29 29 20 22 53 44 4c 5f 52 65 6e 64 65 72 50 ))) "SDL_RenderP
1b20: 72 65 73 65 6e 74 22 29 0a 28 64 65 66 69 6e 65 resent").(define
1b30: 2d 73 64 6c 2d 66 75 6e 63 20 76 6f 69 64 20 73 -sdl-func void s
1b40: 64 6c 2d 64 65 73 74 72 6f 79 2d 74 65 78 74 75 dl-destroy-textu
1b50: 72 65 20 28 28 74 65 78 74 75 72 65 20 28 2a 20 re ((texture (*
1b60: 73 64 6c 2d 74 65 78 74 75 72 65 2d 74 29 29 29 sdl-texture-t)))
1b70: 20 22 53 44 4c 5f 44 65 73 74 72 6f 79 54 65 78 "SDL_DestroyTex
1b80: 74 75 72 65 22 29 0a 28 64 65 66 69 6e 65 2d 73 ture").(define-s
1b90: 64 6c 2d 66 75 6e 63 20 76 6f 69 64 20 73 64 6c dl-func void sdl
1ba0: 2d 64 65 73 74 72 6f 79 2d 72 65 6e 64 65 72 65 -destroy-rendere
1bb0: 72 20 28 28 72 65 6e 64 65 72 65 72 20 28 2a 20 r ((renderer (*
1bc0: 73 64 6c 2d 72 65 6e 64 65 72 65 72 2d 74 29 29 sdl-renderer-t))
1bd0: 29 20 22 53 44 4c 5f 44 65 73 74 72 6f 79 52 65 ) "SDL_DestroyRe
1be0: 6e 64 65 72 65 72 22 29 0a 28 64 65 66 69 6e 65 nderer").(define
1bf0: 2d 73 64 6c 2d 66 75 6e 63 20 69 6e 74 20 73 64 -sdl-func int sd
1c00: 6c 2d 67 6c 2d 62 69 6e 64 2d 74 65 78 74 75 72 l-gl-bind-textur
1c10: 65 20 28 28 74 65 78 74 75 72 65 20 28 2a 20 73 e ((texture (* s
1c20: 64 6c 2d 74 65 78 74 75 72 65 2d 74 29 29 20 28 dl-texture-t)) (
1c30: 74 65 78 77 20 28 2a 20 66 6c 6f 61 74 29 29 20 texw (* float))
1c40: 28 74 65 78 68 20 28 2a 20 66 6c 6f 61 74 29 29 (texh (* float))
1c50: 29 20 22 53 44 4c 5f 47 4c 5f 42 69 6e 64 54 65 ) "SDL_GL_BindTe
1c60: 78 74 75 72 65 22 29 0a 28 64 65 66 69 6e 65 2d xture").(define-
1c70: 73 64 6c 2d 66 75 6e 63 20 69 6e 74 20 73 64 6c sdl-func int sdl
1c80: 2d 67 6c 2d 75 6e 62 69 6e 64 2d 74 65 78 74 75 -gl-unbind-textu
1c90: 72 65 20 28 28 74 65 78 74 75 72 65 20 28 2a 20 re ((texture (*
1ca0: 73 64 6c 2d 74 65 78 74 75 72 65 2d 74 29 29 29 sdl-texture-t)))
1cb0: 20 22 53 44 4c 5f 47 4c 5f 55 6e 62 69 6e 64 54 "SDL_GL_UnbindT
1cc0: 65 78 74 75 72 65 22 29 0a exture").