Artifact
631d6ae2f45ef29a6e54e495f18216ca560c0ffd:
- File
sdl2/README
— part of check-in
[6556d2a8a0]
at
2018-01-08 17:10:49
on branch trunk
— Update readme to reflect sdl version in use
(user:
ovenpasta@users.noreply.github.com
size: 994)
0000: 53 44 4c 20 56 65 72 73 69 6f 6e 20 42 69 6e 64 SDL Version Bind
0010: 65 64 20 74 6f 3a 20 32 2e 30 37 0a 0a 43 68 65 ed to: 2.07..Che
0020: 7a 20 53 63 68 65 6d 65 20 53 44 4c 32 20 62 69 z Scheme SDL2 bi
0030: 6e 64 69 6e 67 73 0a 0a 54 68 65 73 65 20 62 69 ndings..These bi
0040: 6e 64 69 6e 67 73 20 61 72 65 20 67 65 6e 65 72 ndings are gener
0050: 61 74 65 64 20 77 69 74 68 20 74 68 65 20 68 65 ated with the he
0060: 6c 70 20 6f 66 20 63 32 66 66 69 0a 0a 59 6f 75 lp of c2ffi..You
0070: 20 63 61 6e 20 66 69 6e 64 20 69 74 20 68 65 72 can find it her
0080: 65 3a 20 68 74 74 70 73 3a 2f 2f 67 69 74 68 75 e: https://githu
0090: 62 2e 63 6f 6d 2f 72 70 61 76 2f 63 32 66 66 69 b.com/rpav/c2ffi
00a0: 20 0a 0a 46 69 72 73 74 20 77 65 20 75 73 65 20 ..First we use
00b0: 63 32 66 66 69 20 74 6f 20 70 61 72 73 65 20 74 c2ffi to parse t
00c0: 68 65 20 68 65 61 64 65 72 73 20 61 6e 64 20 67 he headers and g
00d0: 65 6e 65 72 61 74 65 20 74 68 65 20 6a 73 6f 6e enerate the json
00e0: 20 64 65 73 63 72 69 70 74 69 6f 6e 3a 0a 0a 63 description:..c
00f0: 32 66 66 69 20 2f 75 73 72 2f 69 6e 63 6c 75 64 2ffi /usr/includ
0100: 65 2f 53 44 4c 32 2f 53 44 4c 2e 68 20 3e 20 73 e/SDL2/SDL.h > s
0110: 64 6c 32 2e 6a 73 6f 6e 0a 4f 70 74 69 6f 6e 61 dl2.json.Optiona
0120: 6c 6c 79 20 53 44 4c 32 5f 6e 65 74 20 28 69 6e lly SDL2_net (in
0130: 20 6d 79 20 63 61 73 65 20 74 68 65 72 65 20 77 my case there w
0140: 61 73 20 6e 6f 74 20 61 20 6c 69 6e 75 78 20 70 as not a linux p
0150: 61 63 6b 61 67 65 20 73 6f 20 49 20 69 6e 73 74 ackage so I inst
0160: 61 6c 6c 65 64 20 66 72 6f 6d 20 73 6f 75 72 63 alled from sourc
0170: 65 3a 29 0a 0a 63 32 66 66 69 20 2f 75 73 72 2f e:)..c2ffi /usr/
0180: 6c 6f 63 61 6c 2f 69 6e 63 6c 75 64 65 2f 53 44 local/include/SD
0190: 4c 32 2f 53 44 4c 5f 6e 65 74 2e 68 20 20 3e 20 L2/SDL_net.h >
01a0: 73 64 6c 32 2d 6e 65 74 2e 6a 73 6f 6e 0a 0a 54 sdl2-net.json..T
01b0: 68 65 6e 20 74 68 65 20 73 63 68 65 6d 65 20 62 hen the scheme b
01c0: 69 6e 64 69 6e 67 73 20 61 72 65 20 67 65 6e 65 indings are gene
01d0: 72 61 74 65 64 20 77 69 74 68 20 74 68 65 20 63 rated with the c
01e0: 6f 6d 6d 61 6e 64 3a 0a 73 63 68 65 6d 65 20 2d ommand:.scheme -
01f0: 2d 73 63 72 69 70 74 20 70 61 72 73 65 2d 73 64 -script parse-sd
0200: 6c 2d 6a 73 6f 6e 2e 73 73 0a 0a 6d 61 6e 79 20 l-json.ss..many
0210: 2a 2d 66 75 6e 63 74 69 6f 6e 73 2e 73 73 20 77 *-functions.ss w
0220: 69 6c 6c 20 62 65 20 63 72 65 61 74 65 64 0a 61 ill be created.a
0230: 6c 73 6f 20 73 64 6c 32 2e 73 65 78 70 20 77 69 lso sdl2.sexp wi
0240: 6c 6c 20 62 65 20 67 65 6e 65 72 61 74 65 64 2e ll be generated.
0250: 0a 0a 59 6f 75 20 63 61 6e 20 74 68 65 6e 20 65 ..You can then e
0260: 78 65 63 75 74 65 20 66 6f 73 73 69 6c 20 64 69 xecute fossil di
0270: 66 66 20 2d 2d 74 6b 20 28 6f 72 20 65 71 75 69 ff --tk (or equi
0280: 76 61 6c 65 6e 74 29 20 74 6f 20 73 65 65 20 74 valent) to see t
0290: 68 65 20 6e 65 77 20 66 75 6e 63 74 69 6f 6e 73 he new functions
02a0: 0a 54 68 65 6e 20 79 6f 75 20 73 68 6f 75 6c 64 .Then you should
02b0: 20 75 70 64 61 74 65 20 73 64 6c 32 2e 73 6c 73 update sdl2.sls
02c0: 20 74 6f 20 61 64 64 20 74 68 65 20 6e 65 77 20 to add the new
02d0: 66 75 6e 63 74 69 6f 6e 73 2e 0a 0a 46 6f 72 20 functions...For
02e0: 6e 65 77 20 66 74 79 70 65 73 2c 20 65 6e 75 6d new ftypes, enum
02f0: 73 20 61 6e 64 20 66 6c 61 67 73 20 79 6f 75 27 s and flags you'
0300: 6c 6c 20 6e 65 65 64 20 74 6f 20 66 69 67 75 72 ll need to figur
0310: 65 20 6f 75 74 20 62 79 20 68 61 6e 64 2e 0a 0a e out by hand...
0320: 54 68 69 73 20 74 68 69 6e 67 20 6e 65 65 64 73 This thing needs
0330: 20 74 6f 20 62 65 20 64 6f 6e 65 20 6f 6e 63 65 to be done once
0340: 20 69 6e 20 61 20 77 68 69 6c 65 20 77 68 65 6e in a while when
0350: 20 6e 65 77 20 53 44 4c 20 76 65 72 73 69 6f 6e new SDL version
0360: 73 20 61 64 64 20 6e 65 77 20 66 75 6e 63 74 69 s add new functi
0370: 6f 6e 61 6c 69 74 79 2e 20 55 73 75 61 6c 6c 79 onality. Usually
0380: 20 79 6f 75 20 73 68 6f 75 6c 64 20 6e 6f 74 20 you should not
0390: 63 61 72 65 20 3a 29 0a 0a 46 6f 72 20 61 6e 79 care :)..For any
03a0: 20 71 75 65 73 74 69 6f 6e 73 20 6a 75 73 74 20 questions just
03b0: 63 6f 6e 74 61 63 74 20 6d 65 0a 6f 76 65 6e 70 contact me.ovenp
03c0: 61 73 74 61 40 70 69 7a 7a 61 68 61 63 6b 2e 65 asta@pizzahack.e
03d0: 75 0a 0a 68 61 76 65 20 66 75 6e 21 0a 41 6c 64 u..have fun!.Ald
03e0: 6f 0a o.