Hex Artifact Content
Not logged in

Artifact a9ca21afc56487b34947e3399e43b95556899c21:


0000: 3b 3b 0a 3b 3b 20 43 6f 70 79 72 69 67 68 74 20  ;;.;; Copyright 
0010: 32 30 31 36 20 41 6c 64 6f 20 4e 69 63 6f 6c 61  2016 Aldo Nicola
0020: 73 20 42 72 75 6e 6f 0a 3b 3b 0a 3b 3b 20 4c 69  s Bruno.;;.;; Li
0030: 63 65 6e 73 65 64 20 75 6e 64 65 72 20 74 68 65  censed under the
0040: 20 41 70 61 63 68 65 20 4c 69 63 65 6e 73 65 2c   Apache License,
0050: 20 56 65 72 73 69 6f 6e 20 32 2e 30 20 28 74 68   Version 2.0 (th
0060: 65 20 22 4c 69 63 65 6e 73 65 22 29 3b 0a 3b 3b  e "License");.;;
0070: 20 79 6f 75 20 6d 61 79 20 6e 6f 74 20 75 73 65   you may not use
0080: 20 74 68 69 73 20 66 69 6c 65 20 65 78 63 65 70   this file excep
0090: 74 20 69 6e 20 63 6f 6d 70 6c 69 61 6e 63 65 20  t in compliance 
00a0: 77 69 74 68 20 74 68 65 20 4c 69 63 65 6e 73 65  with the License
00b0: 2e 0a 3b 3b 20 59 6f 75 20 6d 61 79 20 6f 62 74  ..;; You may obt
00c0: 61 69 6e 20 61 20 63 6f 70 79 20 6f 66 20 74 68  ain a copy of th
00d0: 65 20 4c 69 63 65 6e 73 65 20 61 74 0a 3b 3b 0a  e License at.;;.
00e0: 3b 3b 20 20 20 20 20 68 74 74 70 3a 2f 2f 77 77  ;;     http://ww
00f0: 77 2e 61 70 61 63 68 65 2e 6f 72 67 2f 6c 69 63  w.apache.org/lic
0100: 65 6e 73 65 73 2f 4c 49 43 45 4e 53 45 2d 32 2e  enses/LICENSE-2.
0110: 30 0a 3b 3b 0a 3b 3b 20 55 6e 6c 65 73 73 20 72  0.;;.;; Unless r
0120: 65 71 75 69 72 65 64 20 62 79 20 61 70 70 6c 69  equired by appli
0130: 63 61 62 6c 65 20 6c 61 77 20 6f 72 20 61 67 72  cable law or agr
0140: 65 65 64 20 74 6f 20 69 6e 20 77 72 69 74 69 6e  eed to in writin
0150: 67 2c 20 73 6f 66 74 77 61 72 65 0a 3b 3b 20 64  g, software.;; d
0160: 69 73 74 72 69 62 75 74 65 64 20 75 6e 64 65 72  istributed under
0170: 20 74 68 65 20 4c 69 63 65 6e 73 65 20 69 73 20   the License is 
0180: 64 69 73 74 72 69 62 75 74 65 64 20 6f 6e 20 61  distributed on a
0190: 6e 20 22 41 53 20 49 53 22 20 42 41 53 49 53 2c  n "AS IS" BASIS,
01a0: 0a 3b 3b 20 57 49 54 48 4f 55 54 20 57 41 52 52  .;; WITHOUT WARR
01b0: 41 4e 54 49 45 53 20 4f 52 20 43 4f 4e 44 49 54  ANTIES OR CONDIT
01c0: 49 4f 4e 53 20 4f 46 20 41 4e 59 20 4b 49 4e 44  IONS OF ANY KIND
01d0: 2c 20 65 69 74 68 65 72 20 65 78 70 72 65 73 73  , either express
01e0: 20 6f 72 20 69 6d 70 6c 69 65 64 2e 0a 3b 3b 20   or implied..;; 
01f0: 53 65 65 20 74 68 65 20 4c 69 63 65 6e 73 65 20  See the License 
0200: 66 6f 72 20 74 68 65 20 73 70 65 63 69 66 69 63  for the specific
0210: 20 6c 61 6e 67 75 61 67 65 20 67 6f 76 65 72 6e   language govern
0220: 69 6e 67 20 70 65 72 6d 69 73 73 69 6f 6e 73 20  ing permissions 
0230: 61 6e 64 0a 3b 3b 20 6c 69 6d 69 74 61 74 69 6f  and.;; limitatio
0240: 6e 73 20 75 6e 64 65 72 20 74 68 65 20 4c 69 63  ns under the Lic
0250: 65 6e 73 65 2e 0a 0a 28 64 65 66 69 6e 65 2d 66  ense...(define-f
0260: 6c 61 67 73 20 73 64 6c 2d 72 65 6e 64 65 72 65  lags sdl-rendere
0270: 72 2d 66 6c 61 67 73 0a 20 20 28 73 6f 66 74 77  r-flags.  (softw
0280: 61 72 65 20 31 29 0a 20 20 28 61 63 63 65 6c 65  are 1).  (accele
0290: 72 61 74 65 64 20 32 29 0a 20 20 28 70 72 65 73  rated 2).  (pres
02a0: 65 6e 74 76 73 79 6e 63 20 34 29 0a 20 20 28 74  entvsync 4).  (t
02b0: 61 72 67 65 74 74 65 78 74 75 72 65 20 38 29 29  argettexture 8))
02c0: 0a 0a 28 64 65 66 69 6e 65 2d 66 74 79 70 65 20  ..(define-ftype 
02d0: 73 64 6c 2d 72 65 6e 64 65 72 65 72 2d 69 6e 66  sdl-renderer-inf
02e0: 6f 2d 74 0a 20 20 28 73 74 72 75 63 74 20 0a 20  o-t.  (struct . 
02f0: 20 20 28 6e 61 6d 65 20 28 2a 20 63 68 61 72 29    (name (* char)
0300: 29 0a 20 20 20 28 66 6c 61 67 73 20 75 69 6e 74  ).   (flags uint
0310: 33 32 29 0a 20 20 20 28 6e 75 6d 2d 74 65 78 74  32).   (num-text
0320: 75 72 65 2d 66 6f 72 6d 61 74 73 20 75 69 6e 74  ure-formats uint
0330: 33 32 29 0a 20 20 20 28 74 65 78 74 75 72 65 5f  32).   (texture_
0340: 66 6f 72 6d 61 74 73 20 28 61 72 72 61 79 20 31  formats (array 1
0350: 36 20 75 69 6e 74 33 32 29 29 0a 20 20 20 28 6d  6 uint32)).   (m
0360: 61 78 2d 74 65 78 74 75 72 65 2d 77 69 64 74 68  ax-texture-width
0370: 20 69 6e 74 29 0a 20 20 20 28 6d 61 78 2d 74 65   int).   (max-te
0380: 78 74 75 72 65 2d 68 65 69 67 68 74 20 69 6e 74  xture-height int
0390: 29 29 29 0a 0a 28 64 65 66 69 6e 65 2d 66 6c 61  )))..(define-fla
03a0: 67 73 20 73 64 6c 2d 74 65 78 74 75 72 65 2d 61  gs sdl-texture-a
03b0: 63 63 65 73 73 20 0a 20 20 28 73 74 61 74 69 63  ccess .  (static
03c0: 20 30 29 0a 20 20 28 73 74 72 65 61 6d 69 6e 67   0).  (streaming
03d0: 20 31 29 0a 20 20 28 74 61 72 67 65 74 20 32 29   1).  (target 2)
03e0: 29 0a 0a 28 64 65 66 69 6e 65 2d 66 6c 61 67 73  )..(define-flags
03f0: 20 73 64 6c 2d 74 65 78 74 75 72 65 2d 6d 6f 64   sdl-texture-mod
0400: 75 6c 61 74 65 20 0a 20 20 28 6e 6f 6e 65 20 30  ulate .  (none 0
0410: 29 0a 20 20 28 63 6f 6c 6f 72 20 31 29 20 0a 20  ).  (color 1) . 
0420: 20 28 61 6c 70 68 61 20 32 29 29 0a 0a 28 64 65   (alpha 2))..(de
0430: 66 69 6e 65 2d 66 6c 61 67 73 20 73 64 6c 2d 72  fine-flags sdl-r
0440: 65 6e 64 65 72 65 72 2d 66 6c 69 70 0a 20 20 28  enderer-flip.  (
0450: 6e 6f 6e 65 20 30 29 0a 20 20 28 68 6f 72 69 7a  none 0).  (horiz
0460: 6f 6e 74 61 6c 20 31 29 0a 20 20 28 76 65 72 74  ontal 1).  (vert
0470: 69 63 61 6c 20 32 29 29 0a 0a 28 64 65 66 69 6e  ical 2))..(defin
0480: 65 2d 66 74 79 70 65 20 73 64 6c 2d 72 65 6e 64  e-ftype sdl-rend
0490: 65 72 65 72 2d 74 20 28 73 74 72 75 63 74 29 29  erer-t (struct))
04a0: 0a 28 64 65 66 69 6e 65 2d 66 74 79 70 65 20 73  .(define-ftype s
04b0: 64 6c 2d 74 65 78 74 75 72 65 2d 74 20 28 73 74  dl-texture-t (st
04c0: 72 75 63 74 29 29 0a                             ruct)).