ruby2d 0.10.0 → 0.11.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (387) hide show
  1. checksums.yaml +4 -4
  2. data/assets/include/SDL2/SDL.h +108 -14
  3. data/assets/include/SDL2/SDL_assert.h +81 -50
  4. data/assets/include/SDL2/SDL_atomic.h +135 -35
  5. data/assets/include/SDL2/SDL_audio.h +960 -355
  6. data/assets/include/SDL2/SDL_bits.h +11 -6
  7. data/assets/include/SDL2/SDL_blendmode.h +91 -14
  8. data/assets/include/SDL2/SDL_clipboard.h +30 -7
  9. data/assets/include/SDL2/SDL_config.h +3 -1
  10. data/assets/include/SDL2/SDL_config_android.h +11 -1
  11. data/assets/include/SDL2/SDL_config_emscripten.h +216 -0
  12. data/assets/include/SDL2/SDL_config_iphoneos.h +9 -1
  13. data/assets/include/SDL2/SDL_config_macosx.h +16 -2
  14. data/assets/include/SDL2/SDL_config_minimal.h +4 -1
  15. data/assets/include/SDL2/SDL_config_os2.h +37 -20
  16. data/assets/include/SDL2/SDL_config_pandora.h +6 -1
  17. data/assets/include/SDL2/SDL_config_psp.h +8 -8
  18. data/assets/include/SDL2/SDL_config_windows.h +39 -22
  19. data/assets/include/SDL2/SDL_config_winrt.h +23 -8
  20. data/assets/include/SDL2/SDL_config_wiz.h +6 -1
  21. data/assets/include/SDL2/SDL_copying.h +1 -1
  22. data/assets/include/SDL2/SDL_cpuinfo.h +331 -71
  23. data/assets/include/SDL2/SDL_egl.h +906 -280
  24. data/assets/include/SDL2/SDL_endian.h +101 -47
  25. data/assets/include/SDL2/SDL_error.h +70 -19
  26. data/assets/include/SDL2/SDL_events.h +387 -79
  27. data/assets/include/SDL2/SDL_filesystem.h +73 -64
  28. data/assets/include/SDL2/SDL_gamecontroller.h +585 -125
  29. data/assets/include/SDL2/SDL_gesture.h +36 -6
  30. data/assets/include/SDL2/SDL_haptic.h +304 -210
  31. data/assets/include/SDL2/SDL_hidapi.h +451 -0
  32. data/assets/include/SDL2/SDL_hints.h +1286 -897
  33. data/assets/include/SDL2/SDL_joystick.h +577 -130
  34. data/assets/include/SDL2/SDL_keyboard.h +162 -63
  35. data/assets/include/SDL2/SDL_keycode.h +7 -5
  36. data/assets/include/SDL2/SDL_loadso.h +42 -8
  37. data/assets/include/SDL2/SDL_locale.h +34 -32
  38. data/assets/include/SDL2/SDL_log.h +212 -19
  39. data/assets/include/SDL2/SDL_main.h +72 -17
  40. data/assets/include/SDL2/SDL_messagebox.h +70 -23
  41. data/assets/include/SDL2/SDL_metal.h +27 -32
  42. data/assets/include/SDL2/SDL_misc.h +19 -15
  43. data/assets/include/SDL2/SDL_mouse.h +262 -110
  44. data/assets/include/SDL2/SDL_mutex.h +286 -66
  45. data/assets/include/SDL2/SDL_name.h +1 -1
  46. data/assets/include/SDL2/SDL_opengl.h +1 -1
  47. data/assets/include/SDL2/SDL_opengles.h +1 -1
  48. data/assets/include/SDL2/SDL_opengles2.h +2 -2
  49. data/assets/include/SDL2/SDL_pixels.h +199 -34
  50. data/assets/include/SDL2/SDL_platform.h +39 -2
  51. data/assets/include/SDL2/SDL_power.h +23 -10
  52. data/assets/include/SDL2/SDL_quit.h +1 -1
  53. data/assets/include/SDL2/SDL_rect.h +78 -28
  54. data/assets/include/SDL2/SDL_render.h +1204 -472
  55. data/assets/include/SDL2/SDL_revision.h +2 -2
  56. data/assets/include/SDL2/SDL_rwops.h +605 -33
  57. data/assets/include/SDL2/SDL_scancode.h +1 -1
  58. data/assets/include/SDL2/SDL_sensor.h +76 -42
  59. data/assets/include/SDL2/SDL_shape.h +38 -27
  60. data/assets/include/SDL2/SDL_stdinc.h +96 -24
  61. data/assets/include/SDL2/SDL_surface.h +571 -139
  62. data/assets/include/SDL2/SDL_system.h +339 -101
  63. data/assets/include/SDL2/SDL_syswm.h +50 -20
  64. data/assets/include/SDL2/SDL_test.h +1 -1
  65. data/assets/include/SDL2/SDL_test_assert.h +2 -2
  66. data/assets/include/SDL2/SDL_test_common.h +23 -6
  67. data/assets/include/SDL2/SDL_test_compare.h +1 -1
  68. data/assets/include/SDL2/SDL_test_crc32.h +1 -1
  69. data/assets/include/SDL2/SDL_test_font.h +3 -3
  70. data/assets/include/SDL2/SDL_test_fuzzer.h +28 -26
  71. data/assets/include/SDL2/SDL_test_harness.h +6 -6
  72. data/assets/include/SDL2/SDL_test_images.h +1 -1
  73. data/assets/include/SDL2/SDL_test_log.h +1 -1
  74. data/assets/include/SDL2/SDL_test_md5.h +1 -1
  75. data/assets/include/SDL2/SDL_test_memory.h +1 -1
  76. data/assets/include/SDL2/SDL_test_random.h +2 -2
  77. data/assets/include/SDL2/SDL_thread.h +226 -128
  78. data/assets/include/SDL2/SDL_timer.h +129 -22
  79. data/assets/include/SDL2/SDL_touch.h +48 -8
  80. data/assets/include/SDL2/SDL_ttf.h +102 -9
  81. data/assets/include/SDL2/SDL_types.h +1 -1
  82. data/assets/include/SDL2/SDL_version.h +72 -46
  83. data/assets/include/SDL2/SDL_video.h +1266 -460
  84. data/assets/include/SDL2/SDL_vulkan.h +100 -161
  85. data/assets/include/SDL2/begin_code.h +22 -1
  86. data/assets/include/SDL2/close_code.h +1 -1
  87. data/assets/include/mrbconf.h +234 -0
  88. data/assets/include/mruby/array.h +317 -0
  89. data/assets/include/mruby/boxing_nan.h +130 -0
  90. data/assets/include/mruby/boxing_no.h +58 -0
  91. data/assets/include/mruby/boxing_word.h +205 -0
  92. data/assets/include/mruby/class.h +108 -0
  93. data/assets/include/mruby/common.h +92 -0
  94. data/assets/include/mruby/compile.h +210 -0
  95. data/assets/include/mruby/data.h +76 -0
  96. data/assets/include/mruby/debug.h +66 -0
  97. data/assets/include/mruby/dump.h +158 -0
  98. data/assets/include/mruby/endian.h +44 -0
  99. data/assets/include/mruby/error.h +137 -0
  100. data/assets/include/mruby/gc.h +92 -0
  101. data/assets/include/mruby/hash.h +242 -0
  102. data/assets/include/mruby/irep.h +147 -0
  103. data/assets/include/mruby/istruct.h +50 -0
  104. data/assets/include/mruby/khash.h +284 -0
  105. data/assets/include/mruby/numeric.h +169 -0
  106. data/assets/include/mruby/object.h +43 -0
  107. data/assets/include/mruby/opcode.h +43 -0
  108. data/assets/include/mruby/ops.h +122 -0
  109. data/assets/include/mruby/presym/disable.h +70 -0
  110. data/assets/include/mruby/presym/enable.h +37 -0
  111. data/assets/include/mruby/presym/scanning.h +73 -0
  112. data/assets/include/mruby/presym.h +40 -0
  113. data/assets/include/mruby/proc.h +209 -0
  114. data/assets/include/mruby/range.h +79 -0
  115. data/assets/include/mruby/re.h +16 -0
  116. data/assets/include/mruby/string.h +469 -0
  117. data/assets/include/mruby/throw.h +66 -0
  118. data/assets/include/mruby/value.h +400 -0
  119. data/assets/include/mruby/variable.h +140 -0
  120. data/assets/include/mruby/version.h +143 -0
  121. data/assets/include/mruby.h +1444 -0
  122. data/assets/macos/universal/bin/mrbc +0 -0
  123. data/assets/macos/universal/lib/libFLAC.a +0 -0
  124. data/assets/macos/universal/lib/libSDL2.a +0 -0
  125. data/assets/macos/universal/lib/libSDL2_image.a +0 -0
  126. data/assets/macos/{lib → universal/lib}/libSDL2_mixer.a +0 -0
  127. data/assets/macos/universal/lib/libSDL2_ttf.a +0 -0
  128. data/assets/macos/universal/lib/libfreetype.a +0 -0
  129. data/assets/macos/universal/lib/libgraphite2.a +0 -0
  130. data/assets/macos/universal/lib/libharfbuzz.a +0 -0
  131. data/assets/macos/universal/lib/libjpeg.a +0 -0
  132. data/assets/macos/universal/lib/libmodplug.a +0 -0
  133. data/assets/macos/{lib → universal/lib}/libmpg123.a +0 -0
  134. data/assets/{mingw/lib/libSDL2.a → macos/universal/lib/libmruby.a} +0 -0
  135. data/assets/macos/{lib → universal/lib}/libogg.a +0 -0
  136. data/assets/macos/universal/lib/libpng16.a +0 -0
  137. data/assets/macos/universal/lib/libtiff.a +0 -0
  138. data/assets/macos/universal/lib/libvorbis.a +0 -0
  139. data/assets/macos/universal/lib/libvorbisfile.a +0 -0
  140. data/assets/macos/universal/lib/libwebp.a +0 -0
  141. data/assets/test_media/README.md +3 -0
  142. data/assets/test_media/bitstream_vera/COPYRIGHT.txt +124 -0
  143. data/assets/test_media/bitstream_vera/vera.ttf +0 -0
  144. data/assets/test_media/boom.png +0 -0
  145. data/assets/test_media/coin.png +0 -0
  146. data/assets/test_media/colors.png +0 -0
  147. data/assets/test_media/controller.png +0 -0
  148. data/assets/test_media/dial.wav +0 -0
  149. data/assets/test_media/hero.png +0 -0
  150. data/assets/test_media/image.bmp +0 -0
  151. data/assets/test_media/image.jpg +0 -0
  152. data/assets/test_media/image.png +0 -0
  153. data/assets/test_media/music.flac +0 -0
  154. data/assets/test_media/music.mp3 +0 -0
  155. data/assets/test_media/music.ogg +0 -0
  156. data/assets/test_media/music.wav +0 -0
  157. data/assets/test_media/originals/boom.pxm +0 -0
  158. data/assets/test_media/originals/coin.pxm +0 -0
  159. data/assets/test_media/originals/controller.sketch +0 -0
  160. data/assets/test_media/originals/hero.pxm +0 -0
  161. data/assets/test_media/originals/image.pxm +0 -0
  162. data/assets/test_media/originals/music.caf +0 -0
  163. data/assets/test_media/originals/texture_atlas.pxm +0 -0
  164. data/assets/test_media/rondo_alla_turka.ogg +0 -0
  165. data/assets/test_media/sound.flac +0 -0
  166. data/assets/test_media/sound.mp3 +0 -0
  167. data/assets/test_media/sound.ogg +0 -0
  168. data/assets/test_media/sound.wav +0 -0
  169. data/assets/test_media/sprite_sheet.png +0 -0
  170. data/assets/test_media/texture_atlas.png +0 -0
  171. data/assets/wasm/build_config.rb +13 -0
  172. data/assets/wasm/libmruby.a +0 -0
  173. data/assets/wasm/template.html +17 -0
  174. data/assets/windows/glew/README.md +10 -0
  175. data/assets/windows/glew/glew.h +23686 -0
  176. data/assets/{mingw/lib → windows/glew}/libglew32.a +0 -0
  177. data/assets/windows/mingw-w64-x86_64/bin/mrbc.exe +0 -0
  178. data/assets/windows/mingw-w64-x86_64/lib/libFLAC.a +0 -0
  179. data/assets/windows/mingw-w64-x86_64/lib/libLerc.a +0 -0
  180. data/assets/windows/mingw-w64-x86_64/lib/libSDL2.a +0 -0
  181. data/assets/windows/mingw-w64-x86_64/lib/libSDL2_image.a +0 -0
  182. data/assets/windows/mingw-w64-x86_64/lib/libSDL2_mixer.a +0 -0
  183. data/assets/windows/mingw-w64-x86_64/lib/libSDL2_ttf.a +0 -0
  184. data/assets/windows/mingw-w64-x86_64/lib/libbrotlicommon.a +0 -0
  185. data/assets/windows/mingw-w64-x86_64/lib/libbrotlidec.a +0 -0
  186. data/assets/windows/mingw-w64-x86_64/lib/libbz2.a +0 -0
  187. data/assets/windows/mingw-w64-x86_64/lib/libdeflate.a +0 -0
  188. data/assets/windows/mingw-w64-x86_64/lib/libfreetype.a +0 -0
  189. data/assets/windows/mingw-w64-x86_64/lib/libglew32.a +0 -0
  190. data/assets/windows/mingw-w64-x86_64/lib/libgraphite2.a +0 -0
  191. data/assets/windows/mingw-w64-x86_64/lib/libharfbuzz.a +0 -0
  192. data/assets/windows/mingw-w64-x86_64/lib/libjbig.a +0 -0
  193. data/assets/windows/mingw-w64-x86_64/lib/libjpeg.a +0 -0
  194. data/assets/windows/mingw-w64-x86_64/lib/liblzma.a +0 -0
  195. data/assets/windows/mingw-w64-x86_64/lib/libmodplug.a +0 -0
  196. data/assets/windows/mingw-w64-x86_64/lib/libmpg123.a +0 -0
  197. data/assets/windows/mingw-w64-x86_64/lib/libmruby.a +0 -0
  198. data/assets/windows/mingw-w64-x86_64/lib/libogg.a +0 -0
  199. data/assets/windows/mingw-w64-x86_64/lib/libopus.a +0 -0
  200. data/assets/windows/mingw-w64-x86_64/lib/libopusfile.a +0 -0
  201. data/assets/windows/mingw-w64-x86_64/lib/libpng16.a +0 -0
  202. data/assets/windows/mingw-w64-x86_64/lib/libsndfile.a +0 -0
  203. data/assets/windows/mingw-w64-x86_64/lib/libssp.a +0 -0
  204. data/assets/windows/mingw-w64-x86_64/lib/libstdc++.a +0 -0
  205. data/assets/windows/mingw-w64-x86_64/lib/libtiff.a +0 -0
  206. data/assets/windows/mingw-w64-x86_64/lib/libvorbis.a +0 -0
  207. data/assets/windows/mingw-w64-x86_64/lib/libvorbisfile.a +0 -0
  208. data/assets/windows/mingw-w64-x86_64/lib/libwebp.a +0 -0
  209. data/assets/windows/mingw-w64-x86_64/lib/libz.a +0 -0
  210. data/assets/windows/mingw-w64-x86_64/lib/libzstd.a +0 -0
  211. data/assets/{ios → xcode/ios}/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -0
  212. data/assets/{ios → xcode/ios}/Assets.xcassets/Contents.json +0 -0
  213. data/assets/{ios → xcode/ios}/Base.lproj/LaunchScreen.storyboard +0 -0
  214. data/assets/{ios → xcode/ios}/Info.plist +0 -0
  215. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mrbconf.h +0 -0
  216. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/array.h +0 -0
  217. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/boxing_nan.h +0 -0
  218. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/boxing_no.h +0 -0
  219. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/boxing_word.h +0 -0
  220. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/class.h +0 -0
  221. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/common.h +0 -0
  222. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/compile.h +0 -0
  223. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/data.h +0 -0
  224. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/debug.h +0 -0
  225. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/dump.h +0 -0
  226. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/error.h +0 -0
  227. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/gc.h +0 -0
  228. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/hash.h +0 -0
  229. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/irep.h +0 -0
  230. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/istruct.h +0 -0
  231. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/khash.h +0 -0
  232. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/numeric.h +0 -0
  233. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/object.h +0 -0
  234. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/opcode.h +0 -0
  235. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/ops.h +0 -0
  236. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/proc.h +0 -0
  237. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/range.h +0 -0
  238. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/re.h +0 -0
  239. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/string.h +0 -0
  240. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/throw.h +0 -0
  241. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/value.h +0 -0
  242. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/variable.h +0 -0
  243. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/version.h +0 -0
  244. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby.h +0 -0
  245. data/assets/{ios → xcode/ios}/MRuby.framework/Info.plist +0 -0
  246. data/assets/{ios → xcode/ios}/MRuby.framework/MRuby +0 -0
  247. data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.pbxproj +0 -0
  248. data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
  249. data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
  250. data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/MyApp.xcscmblueprint +0 -0
  251. data/assets/{ios → xcode/ios}/main.c +0 -0
  252. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json +0 -0
  253. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json +0 -0
  254. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json +0 -0
  255. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json +0 -0
  256. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json +0 -0
  257. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json +0 -0
  258. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json +0 -0
  259. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json +0 -0
  260. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json +0 -0
  261. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json +0 -0
  262. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json +0 -0
  263. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json +0 -0
  264. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json +0 -0
  265. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json +0 -0
  266. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json +0 -0
  267. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json +0 -0
  268. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json +0 -0
  269. data/assets/{tvos → xcode/tvos}/Assets.xcassets/Contents.json +0 -0
  270. data/assets/{tvos → xcode/tvos}/Assets.xcassets/LaunchImage.launchimage/Contents.json +0 -0
  271. data/assets/{tvos → xcode/tvos}/Info.plist +0 -0
  272. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mrbconf.h +0 -0
  273. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/array.h +0 -0
  274. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/boxing_nan.h +0 -0
  275. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/boxing_no.h +0 -0
  276. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/boxing_word.h +0 -0
  277. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/class.h +0 -0
  278. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/common.h +0 -0
  279. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/compile.h +0 -0
  280. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/data.h +0 -0
  281. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/debug.h +0 -0
  282. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/dump.h +0 -0
  283. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/error.h +0 -0
  284. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/gc.h +0 -0
  285. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/hash.h +0 -0
  286. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/irep.h +0 -0
  287. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/istruct.h +0 -0
  288. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/khash.h +0 -0
  289. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/numeric.h +0 -0
  290. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/object.h +0 -0
  291. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/opcode.h +0 -0
  292. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/ops.h +0 -0
  293. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/proc.h +0 -0
  294. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/range.h +0 -0
  295. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/re.h +0 -0
  296. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/string.h +0 -0
  297. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/throw.h +0 -0
  298. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/value.h +0 -0
  299. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/variable.h +0 -0
  300. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/version.h +0 -0
  301. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby.h +0 -0
  302. data/assets/{tvos → xcode/tvos}/MRuby.framework/Info.plist +0 -0
  303. data/assets/{tvos → xcode/tvos}/MRuby.framework/MRuby +0 -0
  304. data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.pbxproj +0 -0
  305. data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
  306. data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
  307. data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/MyApp.xcscmblueprint +0 -0
  308. data/assets/{tvos → xcode/tvos}/main.c +0 -0
  309. data/bin/ruby2d +3 -4
  310. data/ext/ruby2d/extconf.rb +68 -46
  311. data/ext/ruby2d/font.c +35 -0
  312. data/ext/ruby2d/gl.c +9 -58
  313. data/ext/ruby2d/gl2.c +8 -83
  314. data/ext/ruby2d/gl3.c +57 -116
  315. data/ext/ruby2d/gles.c +130 -151
  316. data/ext/ruby2d/image.c +16 -96
  317. data/ext/ruby2d/ruby2d.c +265 -298
  318. data/ext/ruby2d/ruby2d.h +69 -159
  319. data/ext/ruby2d/sound.c +1 -1
  320. data/ext/ruby2d/text.c +20 -114
  321. data/ext/ruby2d/window.c +257 -219
  322. data/lib/ruby2d/circle.rb +3 -1
  323. data/lib/ruby2d/cli/build.rb +239 -59
  324. data/lib/ruby2d/cli/colorize.rb +5 -4
  325. data/lib/ruby2d/cli/platform.rb +17 -0
  326. data/lib/ruby2d/font.rb +26 -1
  327. data/lib/ruby2d/image.rb +22 -17
  328. data/lib/ruby2d/line.rb +3 -1
  329. data/lib/ruby2d/quad.rb +3 -1
  330. data/lib/ruby2d/rectangle.rb +1 -1
  331. data/lib/ruby2d/renderable.rb +0 -12
  332. data/lib/ruby2d/sound.rb +25 -0
  333. data/lib/ruby2d/sprite.rb +44 -89
  334. data/lib/ruby2d/square.rb +1 -1
  335. data/lib/ruby2d/text.rb +40 -20
  336. data/lib/ruby2d/texture.rb +28 -0
  337. data/lib/ruby2d/tileset.rb +47 -28
  338. data/lib/ruby2d/triangle.rb +3 -1
  339. data/lib/ruby2d/version.rb +1 -1
  340. data/lib/ruby2d/vertices.rb +89 -0
  341. data/lib/ruby2d/window.rb +13 -3
  342. data/lib/ruby2d.rb +16 -20
  343. metadata +249 -153
  344. data/assets/README.md +0 -22
  345. data/assets/Rakefile +0 -85
  346. data/assets/macos/lib/libFLAC.a +0 -0
  347. data/assets/macos/lib/libSDL2.a +0 -0
  348. data/assets/macos/lib/libSDL2_image.a +0 -0
  349. data/assets/macos/lib/libSDL2_ttf.a +0 -0
  350. data/assets/macos/lib/libfreetype.a +0 -0
  351. data/assets/macos/lib/libjpeg.a +0 -0
  352. data/assets/macos/lib/libpng16.a +0 -0
  353. data/assets/macos/lib/libtiff.a +0 -0
  354. data/assets/macos/lib/libvorbis.a +0 -0
  355. data/assets/macos/lib/libvorbisfile.a +0 -0
  356. data/assets/macos/lib/libwebp.a +0 -0
  357. data/assets/mingw/bin/SDL2.dll +0 -0
  358. data/assets/mingw/bin/SDL2_image.dll +0 -0
  359. data/assets/mingw/bin/SDL2_mixer.dll +0 -0
  360. data/assets/mingw/bin/SDL2_ttf.dll +0 -0
  361. data/assets/mingw/bin/glew32.dll +0 -0
  362. data/assets/mingw/bin/libFLAC-8.dll +0 -0
  363. data/assets/mingw/bin/libfreetype-6.dll +0 -0
  364. data/assets/mingw/bin/libjpeg-9.dll +0 -0
  365. data/assets/mingw/bin/libmodplug-1.dll +0 -0
  366. data/assets/mingw/bin/libmpg123-0.dll +0 -0
  367. data/assets/mingw/bin/libogg-0.dll +0 -0
  368. data/assets/mingw/bin/libopus-0.dll +0 -0
  369. data/assets/mingw/bin/libopusfile-0.dll +0 -0
  370. data/assets/mingw/bin/libpng16-16.dll +0 -0
  371. data/assets/mingw/bin/libtiff-5.dll +0 -0
  372. data/assets/mingw/bin/libvorbis-0.dll +0 -0
  373. data/assets/mingw/bin/libvorbisfile-3.dll +0 -0
  374. data/assets/mingw/bin/libwebp-7.dll +0 -0
  375. data/assets/mingw/bin/zlib1.dll +0 -0
  376. data/assets/mingw/lib/libSDL2.dll.a +0 -0
  377. data/assets/mingw/lib/libSDL2_image.a +0 -0
  378. data/assets/mingw/lib/libSDL2_image.dll.a +0 -0
  379. data/assets/mingw/lib/libSDL2_mixer.a +0 -0
  380. data/assets/mingw/lib/libSDL2_mixer.dll.a +0 -0
  381. data/assets/mingw/lib/libSDL2_test.a +0 -0
  382. data/assets/mingw/lib/libSDL2_ttf.a +0 -0
  383. data/assets/mingw/lib/libSDL2_ttf.dll.a +0 -0
  384. data/assets/mingw/lib/libSDL2main.a +0 -0
  385. data/assets/mingw/lib/libglew32.dll.a +0 -0
  386. data/ext/ruby2d/sprite.c +0 -147
  387. data/ext/ruby2d/tileset.c +0 -30
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -76,7 +76,7 @@
76
76
  * }
77
77
  *
78
78
  * // Create the effect
79
- * memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default
79
+ * SDL_memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default
80
80
  * effect.type = SDL_HAPTIC_SINE;
81
81
  * effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates
82
82
  * effect.periodic.direction.dir[0] = 18000; // Force comes from south
@@ -820,419 +820,513 @@ typedef union SDL_HapticEffect
820
820
 
821
821
 
822
822
  /* Function prototypes */
823
+
823
824
  /**
824
- * \brief Count the number of haptic devices attached to the system.
825
+ * Count the number of haptic devices attached to the system.
826
+ *
827
+ * \returns the number of haptic devices detected on the system or a negative
828
+ * error code on failure; call SDL_GetError() for more information.
825
829
  *
826
- * \return Number of haptic devices detected on the system.
830
+ * \since This function is available since SDL 2.0.0.
831
+ *
832
+ * \sa SDL_HapticName
827
833
  */
828
834
  extern DECLSPEC int SDLCALL SDL_NumHaptics(void);
829
835
 
830
836
  /**
831
- * \brief Get the implementation dependent name of a haptic device.
837
+ * Get the implementation dependent name of a haptic device.
838
+ *
839
+ * This can be called before any joysticks are opened. If no name can be
840
+ * found, this function returns NULL.
832
841
  *
833
- * This can be called before any joysticks are opened.
834
- * If no name can be found, this function returns NULL.
842
+ * \param device_index index of the device to query.
843
+ * \returns the name of the device or NULL on failure; call SDL_GetError() for
844
+ * more information.
835
845
  *
836
- * \param device_index Index of the device to get its name.
837
- * \return Name of the device or NULL on error.
846
+ * \since This function is available since SDL 2.0.0.
838
847
  *
839
- * \sa SDL_NumHaptics
848
+ * \sa SDL_NumHaptics
840
849
  */
841
850
  extern DECLSPEC const char *SDLCALL SDL_HapticName(int device_index);
842
851
 
843
852
  /**
844
- * \brief Opens a haptic device for use.
853
+ * Open a haptic device for use.
845
854
  *
846
- * The index passed as an argument refers to the N'th haptic device on this
847
- * system.
855
+ * The index passed as an argument refers to the N'th haptic device on this
856
+ * system.
848
857
  *
849
- * When opening a haptic device, its gain will be set to maximum and
850
- * autocenter will be disabled. To modify these values use
851
- * SDL_HapticSetGain() and SDL_HapticSetAutocenter().
858
+ * When opening a haptic device, its gain will be set to maximum and
859
+ * autocenter will be disabled. To modify these values use SDL_HapticSetGain()
860
+ * and SDL_HapticSetAutocenter().
852
861
  *
853
- * \param device_index Index of the device to open.
854
- * \return Device identifier or NULL on error.
862
+ * \param device_index index of the device to open
863
+ * \returns the device identifier or NULL on failure; call SDL_GetError() for
864
+ * more information.
855
865
  *
856
- * \sa SDL_HapticIndex
857
- * \sa SDL_HapticOpenFromMouse
858
- * \sa SDL_HapticOpenFromJoystick
859
- * \sa SDL_HapticClose
860
- * \sa SDL_HapticSetGain
861
- * \sa SDL_HapticSetAutocenter
862
- * \sa SDL_HapticPause
863
- * \sa SDL_HapticStopAll
866
+ * \since This function is available since SDL 2.0.0.
867
+ *
868
+ * \sa SDL_HapticClose
869
+ * \sa SDL_HapticIndex
870
+ * \sa SDL_HapticOpenFromJoystick
871
+ * \sa SDL_HapticOpenFromMouse
872
+ * \sa SDL_HapticPause
873
+ * \sa SDL_HapticSetAutocenter
874
+ * \sa SDL_HapticSetGain
875
+ * \sa SDL_HapticStopAll
864
876
  */
865
877
  extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpen(int device_index);
866
878
 
867
879
  /**
868
- * \brief Checks if the haptic device at index has been opened.
880
+ * Check if the haptic device at the designated index has been opened.
869
881
  *
870
- * \param device_index Index to check to see if it has been opened.
871
- * \return 1 if it has been opened or 0 if it hasn't.
882
+ * \param device_index the index of the device to query
883
+ * \returns 1 if it has been opened, 0 if it hasn't or on failure; call
884
+ * SDL_GetError() for more information.
872
885
  *
873
- * \sa SDL_HapticOpen
874
- * \sa SDL_HapticIndex
886
+ * \since This function is available since SDL 2.0.0.
887
+ *
888
+ * \sa SDL_HapticIndex
889
+ * \sa SDL_HapticOpen
875
890
  */
876
891
  extern DECLSPEC int SDLCALL SDL_HapticOpened(int device_index);
877
892
 
878
893
  /**
879
- * \brief Gets the index of a haptic device.
894
+ * Get the index of a haptic device.
880
895
  *
881
- * \param haptic Haptic device to get the index of.
882
- * \return The index of the haptic device or -1 on error.
896
+ * \param haptic the SDL_Haptic device to query
897
+ * \returns the index of the specified haptic device or a negative error code
898
+ * on failure; call SDL_GetError() for more information.
883
899
  *
884
- * \sa SDL_HapticOpen
885
- * \sa SDL_HapticOpened
900
+ * \since This function is available since SDL 2.0.0.
901
+ *
902
+ * \sa SDL_HapticOpen
903
+ * \sa SDL_HapticOpened
886
904
  */
887
905
  extern DECLSPEC int SDLCALL SDL_HapticIndex(SDL_Haptic * haptic);
888
906
 
889
907
  /**
890
- * \brief Gets whether or not the current mouse has haptic capabilities.
908
+ * Query whether or not the current mouse has haptic capabilities.
891
909
  *
892
- * \return SDL_TRUE if the mouse is haptic, SDL_FALSE if it isn't.
910
+ * \returns SDL_TRUE if the mouse is haptic or SDL_FALSE if it isn't.
893
911
  *
894
- * \sa SDL_HapticOpenFromMouse
912
+ * \since This function is available since SDL 2.0.0.
913
+ *
914
+ * \sa SDL_HapticOpenFromMouse
895
915
  */
896
916
  extern DECLSPEC int SDLCALL SDL_MouseIsHaptic(void);
897
917
 
898
918
  /**
899
- * \brief Tries to open a haptic device from the current mouse.
919
+ * Try to open a haptic device from the current mouse.
900
920
  *
901
- * \return The haptic device identifier or NULL on error.
921
+ * \returns the haptic device identifier or NULL on failure; call
922
+ * SDL_GetError() for more information.
902
923
  *
903
- * \sa SDL_MouseIsHaptic
904
- * \sa SDL_HapticOpen
924
+ * \since This function is available since SDL 2.0.0.
925
+ *
926
+ * \sa SDL_HapticOpen
927
+ * \sa SDL_MouseIsHaptic
905
928
  */
906
929
  extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromMouse(void);
907
930
 
908
931
  /**
909
- * \brief Checks to see if a joystick has haptic features.
932
+ * Query if a joystick has haptic features.
910
933
  *
911
- * \param joystick Joystick to test for haptic capabilities.
912
- * \return SDL_TRUE if the joystick is haptic, SDL_FALSE if it isn't
913
- * or -1 if an error occurred.
934
+ * \param joystick the SDL_Joystick to test for haptic capabilities
935
+ * \returns SDL_TRUE if the joystick is haptic, SDL_FALSE if it isn't, or a
936
+ * negative error code on failure; call SDL_GetError() for more
937
+ * information.
914
938
  *
915
- * \sa SDL_HapticOpenFromJoystick
939
+ * \since This function is available since SDL 2.0.0.
940
+ *
941
+ * \sa SDL_HapticOpenFromJoystick
916
942
  */
917
943
  extern DECLSPEC int SDLCALL SDL_JoystickIsHaptic(SDL_Joystick * joystick);
918
944
 
919
945
  /**
920
- * \brief Opens a haptic device for use from a joystick device.
946
+ * Open a haptic device for use from a joystick device.
921
947
  *
922
- * You must still close the haptic device separately. It will not be closed
923
- * with the joystick.
948
+ * You must still close the haptic device separately. It will not be closed
949
+ * with the joystick.
924
950
  *
925
- * When opening from a joystick you should first close the haptic device before
926
- * closing the joystick device. If not, on some implementations the haptic
927
- * device will also get unallocated and you'll be unable to use force feedback
928
- * on that device.
951
+ * When opened from a joystick you should first close the haptic device before
952
+ * closing the joystick device. If not, on some implementations the haptic
953
+ * device will also get unallocated and you'll be unable to use force feedback
954
+ * on that device.
929
955
  *
930
- * \param joystick Joystick to create a haptic device from.
931
- * \return A valid haptic device identifier on success or NULL on error.
956
+ * \param joystick the SDL_Joystick to create a haptic device from
957
+ * \returns a valid haptic device identifier on success or NULL on failure;
958
+ * call SDL_GetError() for more information.
932
959
  *
933
- * \sa SDL_HapticOpen
934
- * \sa SDL_HapticClose
960
+ * \since This function is available since SDL 2.0.0.
961
+ *
962
+ * \sa SDL_HapticClose
963
+ * \sa SDL_HapticOpen
964
+ * \sa SDL_JoystickIsHaptic
935
965
  */
936
966
  extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromJoystick(SDL_Joystick *
937
967
  joystick);
938
968
 
939
969
  /**
940
- * \brief Closes a haptic device previously opened with SDL_HapticOpen().
970
+ * Close a haptic device previously opened with SDL_HapticOpen().
971
+ *
972
+ * \param haptic the SDL_Haptic device to close
941
973
  *
942
- * \param haptic Haptic device to close.
974
+ * \since This function is available since SDL 2.0.0.
975
+ *
976
+ * \sa SDL_HapticOpen
943
977
  */
944
978
  extern DECLSPEC void SDLCALL SDL_HapticClose(SDL_Haptic * haptic);
945
979
 
946
980
  /**
947
- * \brief Returns the number of effects a haptic device can store.
981
+ * Get the number of effects a haptic device can store.
982
+ *
983
+ * On some platforms this isn't fully supported, and therefore is an
984
+ * approximation. Always check to see if your created effect was actually
985
+ * created and do not rely solely on SDL_HapticNumEffects().
948
986
  *
949
- * On some platforms this isn't fully supported, and therefore is an
950
- * approximation. Always check to see if your created effect was actually
951
- * created and do not rely solely on SDL_HapticNumEffects().
987
+ * \param haptic the SDL_Haptic device to query
988
+ * \returns the number of effects the haptic device can store or a negative
989
+ * error code on failure; call SDL_GetError() for more information.
952
990
  *
953
- * \param haptic The haptic device to query effect max.
954
- * \return The number of effects the haptic device can store or
955
- * -1 on error.
991
+ * \since This function is available since SDL 2.0.0.
956
992
  *
957
- * \sa SDL_HapticNumEffectsPlaying
958
- * \sa SDL_HapticQuery
993
+ * \sa SDL_HapticNumEffectsPlaying
994
+ * \sa SDL_HapticQuery
959
995
  */
960
996
  extern DECLSPEC int SDLCALL SDL_HapticNumEffects(SDL_Haptic * haptic);
961
997
 
962
998
  /**
963
- * \brief Returns the number of effects a haptic device can play at the same
964
- * time.
999
+ * Get the number of effects a haptic device can play at the same time.
965
1000
  *
966
- * This is not supported on all platforms, but will always return a value.
967
- * Added here for the sake of completeness.
1001
+ * This is not supported on all platforms, but will always return a value.
968
1002
  *
969
- * \param haptic The haptic device to query maximum playing effects.
970
- * \return The number of effects the haptic device can play at the same time
971
- * or -1 on error.
1003
+ * \param haptic the SDL_Haptic device to query maximum playing effects
1004
+ * \returns the number of effects the haptic device can play at the same time
1005
+ * or a negative error code on failure; call SDL_GetError() for more
1006
+ * information.
972
1007
  *
973
- * \sa SDL_HapticNumEffects
974
- * \sa SDL_HapticQuery
1008
+ * \since This function is available since SDL 2.0.0.
1009
+ *
1010
+ * \sa SDL_HapticNumEffects
1011
+ * \sa SDL_HapticQuery
975
1012
  */
976
1013
  extern DECLSPEC int SDLCALL SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic);
977
1014
 
978
1015
  /**
979
- * \brief Gets the haptic device's supported features in bitwise manner.
1016
+ * Get the haptic device's supported features in bitwise manner.
980
1017
  *
981
- * Example:
982
- * \code
983
- * if (SDL_HapticQuery(haptic) & SDL_HAPTIC_CONSTANT) {
984
- * printf("We have constant haptic effect!\n");
985
- * }
986
- * \endcode
1018
+ * \param haptic the SDL_Haptic device to query
1019
+ * \returns a list of supported haptic features in bitwise manner (OR'd), or 0
1020
+ * on failure; call SDL_GetError() for more information.
987
1021
  *
988
- * \param haptic The haptic device to query.
989
- * \return Haptic features in bitwise manner (OR'd).
1022
+ * \since This function is available since SDL 2.0.0.
990
1023
  *
991
- * \sa SDL_HapticNumEffects
992
- * \sa SDL_HapticEffectSupported
1024
+ * \sa SDL_HapticEffectSupported
1025
+ * \sa SDL_HapticNumEffects
993
1026
  */
994
1027
  extern DECLSPEC unsigned int SDLCALL SDL_HapticQuery(SDL_Haptic * haptic);
995
1028
 
996
1029
 
997
1030
  /**
998
- * \brief Gets the number of haptic axes the device has.
1031
+ * Get the number of haptic axes the device has.
999
1032
  *
1000
- * \sa SDL_HapticDirection
1033
+ * The number of haptic axes might be useful if working with the
1034
+ * SDL_HapticDirection effect.
1035
+ *
1036
+ * \param haptic the SDL_Haptic device to query
1037
+ * \returns the number of axes on success or a negative error code on failure;
1038
+ * call SDL_GetError() for more information.
1039
+ *
1040
+ * \since This function is available since SDL 2.0.0.
1001
1041
  */
1002
1042
  extern DECLSPEC int SDLCALL SDL_HapticNumAxes(SDL_Haptic * haptic);
1003
1043
 
1004
1044
  /**
1005
- * \brief Checks to see if effect is supported by haptic.
1045
+ * Check to see if an effect is supported by a haptic device.
1046
+ *
1047
+ * \param haptic the SDL_Haptic device to query
1048
+ * \param effect the desired effect to query
1049
+ * \returns SDL_TRUE if effect is supported, SDL_FALSE if it isn't, or a
1050
+ * negative error code on failure; call SDL_GetError() for more
1051
+ * information.
1006
1052
  *
1007
- * \param haptic Haptic device to check on.
1008
- * \param effect Effect to check to see if it is supported.
1009
- * \return SDL_TRUE if effect is supported, SDL_FALSE if it isn't or -1 on error.
1053
+ * \since This function is available since SDL 2.0.0.
1010
1054
  *
1011
- * \sa SDL_HapticQuery
1012
- * \sa SDL_HapticNewEffect
1055
+ * \sa SDL_HapticNewEffect
1056
+ * \sa SDL_HapticQuery
1013
1057
  */
1014
1058
  extern DECLSPEC int SDLCALL SDL_HapticEffectSupported(SDL_Haptic * haptic,
1015
1059
  SDL_HapticEffect *
1016
1060
  effect);
1017
1061
 
1018
1062
  /**
1019
- * \brief Creates a new haptic effect on the device.
1063
+ * Create a new haptic effect on a specified device.
1020
1064
  *
1021
- * \param haptic Haptic device to create the effect on.
1022
- * \param effect Properties of the effect to create.
1023
- * \return The identifier of the effect on success or -1 on error.
1065
+ * \param haptic an SDL_Haptic device to create the effect on
1066
+ * \param effect an SDL_HapticEffect structure containing the properties of
1067
+ * the effect to create
1068
+ * \returns the ID of the effect on success or a negative error code on
1069
+ * failure; call SDL_GetError() for more information.
1024
1070
  *
1025
- * \sa SDL_HapticUpdateEffect
1026
- * \sa SDL_HapticRunEffect
1027
- * \sa SDL_HapticDestroyEffect
1071
+ * \since This function is available since SDL 2.0.0.
1072
+ *
1073
+ * \sa SDL_HapticDestroyEffect
1074
+ * \sa SDL_HapticRunEffect
1075
+ * \sa SDL_HapticUpdateEffect
1028
1076
  */
1029
1077
  extern DECLSPEC int SDLCALL SDL_HapticNewEffect(SDL_Haptic * haptic,
1030
1078
  SDL_HapticEffect * effect);
1031
1079
 
1032
1080
  /**
1033
- * \brief Updates the properties of an effect.
1081
+ * Update the properties of an effect.
1082
+ *
1083
+ * Can be used dynamically, although behavior when dynamically changing
1084
+ * direction may be strange. Specifically the effect may re-upload itself and
1085
+ * start playing from the start. You also cannot change the type either when
1086
+ * running SDL_HapticUpdateEffect().
1034
1087
  *
1035
- * Can be used dynamically, although behavior when dynamically changing
1036
- * direction may be strange. Specifically the effect may reupload itself
1037
- * and start playing from the start. You cannot change the type either when
1038
- * running SDL_HapticUpdateEffect().
1088
+ * \param haptic the SDL_Haptic device that has the effect
1089
+ * \param effect the identifier of the effect to update
1090
+ * \param data an SDL_HapticEffect structure containing the new effect
1091
+ * properties to use
1092
+ * \returns 0 on success or a negative error code on failure; call
1093
+ * SDL_GetError() for more information.
1039
1094
  *
1040
- * \param haptic Haptic device that has the effect.
1041
- * \param effect Identifier of the effect to update.
1042
- * \param data New effect properties to use.
1043
- * \return 0 on success or -1 on error.
1095
+ * \since This function is available since SDL 2.0.0.
1044
1096
  *
1045
- * \sa SDL_HapticNewEffect
1046
- * \sa SDL_HapticRunEffect
1047
- * \sa SDL_HapticDestroyEffect
1097
+ * \sa SDL_HapticDestroyEffect
1098
+ * \sa SDL_HapticNewEffect
1099
+ * \sa SDL_HapticRunEffect
1048
1100
  */
1049
1101
  extern DECLSPEC int SDLCALL SDL_HapticUpdateEffect(SDL_Haptic * haptic,
1050
1102
  int effect,
1051
1103
  SDL_HapticEffect * data);
1052
1104
 
1053
1105
  /**
1054
- * \brief Runs the haptic effect on its associated haptic device.
1106
+ * Run the haptic effect on its associated haptic device.
1055
1107
  *
1056
- * If iterations are ::SDL_HAPTIC_INFINITY, it'll run the effect over and over
1057
- * repeating the envelope (attack and fade) every time. If you only want the
1058
- * effect to last forever, set ::SDL_HAPTIC_INFINITY in the effect's length
1059
- * parameter.
1108
+ * To repeat the effect over and over indefinitely, set `iterations` to
1109
+ * `SDL_HAPTIC_INFINITY`. (Repeats the envelope - attack and fade.) To make
1110
+ * one instance of the effect last indefinitely (so the effect does not fade),
1111
+ * set the effect's `length` in its structure/union to `SDL_HAPTIC_INFINITY`
1112
+ * instead.
1060
1113
  *
1061
- * \param haptic Haptic device to run the effect on.
1062
- * \param effect Identifier of the haptic effect to run.
1063
- * \param iterations Number of iterations to run the effect. Use
1064
- * ::SDL_HAPTIC_INFINITY for infinity.
1065
- * \return 0 on success or -1 on error.
1114
+ * \param haptic the SDL_Haptic device to run the effect on
1115
+ * \param effect the ID of the haptic effect to run
1116
+ * \param iterations the number of iterations to run the effect; use
1117
+ * `SDL_HAPTIC_INFINITY` to repeat forever
1118
+ * \returns 0 on success or a negative error code on failure; call
1119
+ * SDL_GetError() for more information.
1066
1120
  *
1067
- * \sa SDL_HapticStopEffect
1068
- * \sa SDL_HapticDestroyEffect
1069
- * \sa SDL_HapticGetEffectStatus
1121
+ * \since This function is available since SDL 2.0.0.
1122
+ *
1123
+ * \sa SDL_HapticDestroyEffect
1124
+ * \sa SDL_HapticGetEffectStatus
1125
+ * \sa SDL_HapticStopEffect
1070
1126
  */
1071
1127
  extern DECLSPEC int SDLCALL SDL_HapticRunEffect(SDL_Haptic * haptic,
1072
1128
  int effect,
1073
1129
  Uint32 iterations);
1074
1130
 
1075
1131
  /**
1076
- * \brief Stops the haptic effect on its associated haptic device.
1132
+ * Stop the haptic effect on its associated haptic device.
1133
+ *
1134
+ * *
1077
1135
  *
1078
- * \param haptic Haptic device to stop the effect on.
1079
- * \param effect Identifier of the effect to stop.
1080
- * \return 0 on success or -1 on error.
1136
+ * \param haptic the SDL_Haptic device to stop the effect on
1137
+ * \param effect the ID of the haptic effect to stop
1138
+ * \returns 0 on success or a negative error code on failure; call
1139
+ * SDL_GetError() for more information.
1081
1140
  *
1082
- * \sa SDL_HapticRunEffect
1083
- * \sa SDL_HapticDestroyEffect
1141
+ * \since This function is available since SDL 2.0.0.
1142
+ *
1143
+ * \sa SDL_HapticDestroyEffect
1144
+ * \sa SDL_HapticRunEffect
1084
1145
  */
1085
1146
  extern DECLSPEC int SDLCALL SDL_HapticStopEffect(SDL_Haptic * haptic,
1086
1147
  int effect);
1087
1148
 
1088
1149
  /**
1089
- * \brief Destroys a haptic effect on the device.
1150
+ * Destroy a haptic effect on the device.
1151
+ *
1152
+ * This will stop the effect if it's running. Effects are automatically
1153
+ * destroyed when the device is closed.
1090
1154
  *
1091
- * This will stop the effect if it's running. Effects are automatically
1092
- * destroyed when the device is closed.
1155
+ * \param haptic the SDL_Haptic device to destroy the effect on
1156
+ * \param effect the ID of the haptic effect to destroy
1093
1157
  *
1094
- * \param haptic Device to destroy the effect on.
1095
- * \param effect Identifier of the effect to destroy.
1158
+ * \since This function is available since SDL 2.0.0.
1096
1159
  *
1097
- * \sa SDL_HapticNewEffect
1160
+ * \sa SDL_HapticNewEffect
1098
1161
  */
1099
1162
  extern DECLSPEC void SDLCALL SDL_HapticDestroyEffect(SDL_Haptic * haptic,
1100
1163
  int effect);
1101
1164
 
1102
1165
  /**
1103
- * \brief Gets the status of the current effect on the haptic device.
1166
+ * Get the status of the current effect on the specified haptic device.
1104
1167
  *
1105
- * Device must support the ::SDL_HAPTIC_STATUS feature.
1168
+ * Device must support the SDL_HAPTIC_STATUS feature.
1106
1169
  *
1107
- * \param haptic Haptic device to query the effect status on.
1108
- * \param effect Identifier of the effect to query its status.
1109
- * \return 0 if it isn't playing, 1 if it is playing or -1 on error.
1170
+ * \param haptic the SDL_Haptic device to query for the effect status on
1171
+ * \param effect the ID of the haptic effect to query its status
1172
+ * \returns 0 if it isn't playing, 1 if it is playing, or a negative error
1173
+ * code on failure; call SDL_GetError() for more information.
1110
1174
  *
1111
- * \sa SDL_HapticRunEffect
1112
- * \sa SDL_HapticStopEffect
1175
+ * \since This function is available since SDL 2.0.0.
1176
+ *
1177
+ * \sa SDL_HapticRunEffect
1178
+ * \sa SDL_HapticStopEffect
1113
1179
  */
1114
1180
  extern DECLSPEC int SDLCALL SDL_HapticGetEffectStatus(SDL_Haptic * haptic,
1115
1181
  int effect);
1116
1182
 
1117
1183
  /**
1118
- * \brief Sets the global gain of the device.
1184
+ * Set the global gain of the specified haptic device.
1119
1185
  *
1120
- * Device must support the ::SDL_HAPTIC_GAIN feature.
1186
+ * Device must support the SDL_HAPTIC_GAIN feature.
1121
1187
  *
1122
- * The user may specify the maximum gain by setting the environment variable
1123
- * SDL_HAPTIC_GAIN_MAX which should be between 0 and 100. All calls to
1124
- * SDL_HapticSetGain() will scale linearly using SDL_HAPTIC_GAIN_MAX as the
1125
- * maximum.
1188
+ * The user may specify the maximum gain by setting the environment variable
1189
+ * `SDL_HAPTIC_GAIN_MAX` which should be between 0 and 100. All calls to
1190
+ * SDL_HapticSetGain() will scale linearly using `SDL_HAPTIC_GAIN_MAX` as the
1191
+ * maximum.
1126
1192
  *
1127
- * \param haptic Haptic device to set the gain on.
1128
- * \param gain Value to set the gain to, should be between 0 and 100.
1129
- * \return 0 on success or -1 on error.
1193
+ * \param haptic the SDL_Haptic device to set the gain on
1194
+ * \param gain value to set the gain to, should be between 0 and 100 (0 - 100)
1195
+ * \returns 0 on success or a negative error code on failure; call
1196
+ * SDL_GetError() for more information.
1130
1197
  *
1131
- * \sa SDL_HapticQuery
1198
+ * \since This function is available since SDL 2.0.0.
1199
+ *
1200
+ * \sa SDL_HapticQuery
1132
1201
  */
1133
1202
  extern DECLSPEC int SDLCALL SDL_HapticSetGain(SDL_Haptic * haptic, int gain);
1134
1203
 
1135
1204
  /**
1136
- * \brief Sets the global autocenter of the device.
1205
+ * Set the global autocenter of the device.
1206
+ *
1207
+ * Autocenter should be between 0 and 100. Setting it to 0 will disable
1208
+ * autocentering.
1137
1209
  *
1138
- * Autocenter should be between 0 and 100. Setting it to 0 will disable
1139
- * autocentering.
1210
+ * Device must support the SDL_HAPTIC_AUTOCENTER feature.
1140
1211
  *
1141
- * Device must support the ::SDL_HAPTIC_AUTOCENTER feature.
1212
+ * \param haptic the SDL_Haptic device to set autocentering on
1213
+ * \param autocenter value to set autocenter to (0-100)
1214
+ * \returns 0 on success or a negative error code on failure; call
1215
+ * SDL_GetError() for more information.
1142
1216
  *
1143
- * \param haptic Haptic device to set autocentering on.
1144
- * \param autocenter Value to set autocenter to, 0 disables autocentering.
1145
- * \return 0 on success or -1 on error.
1217
+ * \since This function is available since SDL 2.0.0.
1146
1218
  *
1147
- * \sa SDL_HapticQuery
1219
+ * \sa SDL_HapticQuery
1148
1220
  */
1149
1221
  extern DECLSPEC int SDLCALL SDL_HapticSetAutocenter(SDL_Haptic * haptic,
1150
1222
  int autocenter);
1151
1223
 
1152
1224
  /**
1153
- * \brief Pauses a haptic device.
1225
+ * Pause a haptic device.
1154
1226
  *
1155
- * Device must support the ::SDL_HAPTIC_PAUSE feature. Call
1156
- * SDL_HapticUnpause() to resume playback.
1227
+ * Device must support the `SDL_HAPTIC_PAUSE` feature. Call
1228
+ * SDL_HapticUnpause() to resume playback.
1157
1229
  *
1158
- * Do not modify the effects nor add new ones while the device is paused.
1159
- * That can cause all sorts of weird errors.
1230
+ * Do not modify the effects nor add new ones while the device is paused. That
1231
+ * can cause all sorts of weird errors.
1160
1232
  *
1161
- * \param haptic Haptic device to pause.
1162
- * \return 0 on success or -1 on error.
1233
+ * \param haptic the SDL_Haptic device to pause
1234
+ * \returns 0 on success or a negative error code on failure; call
1235
+ * SDL_GetError() for more information.
1163
1236
  *
1164
- * \sa SDL_HapticUnpause
1237
+ * \since This function is available since SDL 2.0.0.
1238
+ *
1239
+ * \sa SDL_HapticUnpause
1165
1240
  */
1166
1241
  extern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic);
1167
1242
 
1168
1243
  /**
1169
- * \brief Unpauses a haptic device.
1244
+ * Unpause a haptic device.
1170
1245
  *
1171
- * Call to unpause after SDL_HapticPause().
1246
+ * Call to unpause after SDL_HapticPause().
1172
1247
  *
1173
- * \param haptic Haptic device to unpause.
1174
- * \return 0 on success or -1 on error.
1248
+ * \param haptic the SDL_Haptic device to unpause
1249
+ * \returns 0 on success or a negative error code on failure; call
1250
+ * SDL_GetError() for more information.
1175
1251
  *
1176
- * \sa SDL_HapticPause
1252
+ * \since This function is available since SDL 2.0.0.
1253
+ *
1254
+ * \sa SDL_HapticPause
1177
1255
  */
1178
1256
  extern DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic * haptic);
1179
1257
 
1180
1258
  /**
1181
- * \brief Stops all the currently playing effects on a haptic device.
1259
+ * Stop all the currently playing effects on a haptic device.
1260
+ *
1261
+ * \param haptic the SDL_Haptic device to stop
1262
+ * \returns 0 on success or a negative error code on failure; call
1263
+ * SDL_GetError() for more information.
1182
1264
  *
1183
- * \param haptic Haptic device to stop.
1184
- * \return 0 on success or -1 on error.
1265
+ * \since This function is available since SDL 2.0.0.
1185
1266
  */
1186
1267
  extern DECLSPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic * haptic);
1187
1268
 
1188
1269
  /**
1189
- * \brief Checks to see if rumble is supported on a haptic device.
1270
+ * Check whether rumble is supported on a haptic device.
1190
1271
  *
1191
- * \param haptic Haptic device to check to see if it supports rumble.
1192
- * \return SDL_TRUE if effect is supported, SDL_FALSE if it isn't or -1 on error.
1272
+ * \param haptic haptic device to check for rumble support
1273
+ * \returns SDL_TRUE if effect is supported, SDL_FALSE if it isn't, or a
1274
+ * negative error code on failure; call SDL_GetError() for more
1275
+ * information.
1193
1276
  *
1194
- * \sa SDL_HapticRumbleInit
1195
- * \sa SDL_HapticRumblePlay
1196
- * \sa SDL_HapticRumbleStop
1277
+ * \since This function is available since SDL 2.0.0.
1278
+ *
1279
+ * \sa SDL_HapticRumbleInit
1280
+ * \sa SDL_HapticRumblePlay
1281
+ * \sa SDL_HapticRumbleStop
1197
1282
  */
1198
1283
  extern DECLSPEC int SDLCALL SDL_HapticRumbleSupported(SDL_Haptic * haptic);
1199
1284
 
1200
1285
  /**
1201
- * \brief Initializes the haptic device for simple rumble playback.
1286
+ * Initialize a haptic device for simple rumble playback.
1202
1287
  *
1203
- * \param haptic Haptic device to initialize for simple rumble playback.
1204
- * \return 0 on success or -1 on error.
1288
+ * \param haptic the haptic device to initialize for simple rumble playback
1289
+ * \returns 0 on success or a negative error code on failure; call
1290
+ * SDL_GetError() for more information.
1205
1291
  *
1206
- * \sa SDL_HapticOpen
1207
- * \sa SDL_HapticRumbleSupported
1208
- * \sa SDL_HapticRumblePlay
1209
- * \sa SDL_HapticRumbleStop
1292
+ * \since This function is available since SDL 2.0.0.
1293
+ *
1294
+ * \sa SDL_HapticOpen
1295
+ * \sa SDL_HapticRumblePlay
1296
+ * \sa SDL_HapticRumbleStop
1297
+ * \sa SDL_HapticRumbleSupported
1210
1298
  */
1211
1299
  extern DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic * haptic);
1212
1300
 
1213
1301
  /**
1214
- * \brief Runs simple rumble on a haptic device
1302
+ * Run a simple rumble effect on a haptic device.
1303
+ *
1304
+ * \param haptic the haptic device to play the rumble effect on
1305
+ * \param strength strength of the rumble to play as a 0-1 float value
1306
+ * \param length length of the rumble to play in milliseconds
1307
+ * \returns 0 on success or a negative error code on failure; call
1308
+ * SDL_GetError() for more information.
1215
1309
  *
1216
- * \param haptic Haptic device to play rumble effect on.
1217
- * \param strength Strength of the rumble to play as a 0-1 float value.
1218
- * \param length Length of the rumble to play in milliseconds.
1219
- * \return 0 on success or -1 on error.
1310
+ * \since This function is available since SDL 2.0.0.
1220
1311
  *
1221
- * \sa SDL_HapticRumbleSupported
1222
- * \sa SDL_HapticRumbleInit
1223
- * \sa SDL_HapticRumbleStop
1312
+ * \sa SDL_HapticRumbleInit
1313
+ * \sa SDL_HapticRumbleStop
1314
+ * \sa SDL_HapticRumbleSupported
1224
1315
  */
1225
1316
  extern DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length );
1226
1317
 
1227
1318
  /**
1228
- * \brief Stops the simple rumble on a haptic device.
1319
+ * Stop the simple rumble on a haptic device.
1320
+ *
1321
+ * \param haptic the haptic device to stop the rumble effect on
1322
+ * \returns 0 on success or a negative error code on failure; call
1323
+ * SDL_GetError() for more information.
1229
1324
  *
1230
- * \param haptic Haptic to stop the rumble on.
1231
- * \return 0 on success or -1 on error.
1325
+ * \since This function is available since SDL 2.0.0.
1232
1326
  *
1233
- * \sa SDL_HapticRumbleSupported
1234
- * \sa SDL_HapticRumbleInit
1235
- * \sa SDL_HapticRumblePlay
1327
+ * \sa SDL_HapticRumbleInit
1328
+ * \sa SDL_HapticRumblePlay
1329
+ * \sa SDL_HapticRumbleSupported
1236
1330
  */
1237
1331
  extern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic);
1238
1332