ruby2d 0.11.0 → 0.11.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (404) 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/libmruby.a +0 -0
  172. data/assets/wasm/template.html +64 -0
  173. data/assets/windows/glew/README.md +10 -0
  174. data/assets/windows/glew/glew.h +23686 -0
  175. data/assets/{mingw/lib → windows/glew}/libglew32.a +0 -0
  176. data/assets/windows/mingw-w64-ucrt-x86_64/bin/mrbc.exe +0 -0
  177. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libFLAC.a +0 -0
  178. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libLerc.a +0 -0
  179. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2.a +0 -0
  180. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_image.a +0 -0
  181. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_mixer.a +0 -0
  182. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_ttf.a +0 -0
  183. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libbrotlicommon.a +0 -0
  184. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libbrotlidec.a +0 -0
  185. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libbz2.a +0 -0
  186. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libdeflate.a +0 -0
  187. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libfreetype.a +0 -0
  188. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libglew32.a +0 -0
  189. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libgraphite2.a +0 -0
  190. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libharfbuzz.a +0 -0
  191. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libjbig.a +0 -0
  192. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libjpeg.a +0 -0
  193. data/assets/windows/mingw-w64-ucrt-x86_64/lib/liblzma.a +0 -0
  194. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libmodplug.a +0 -0
  195. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libmpg123.a +0 -0
  196. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libmruby.a +0 -0
  197. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libogg.a +0 -0
  198. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libopus.a +0 -0
  199. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libopusfile.a +0 -0
  200. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libpng16.a +0 -0
  201. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libsndfile.a +0 -0
  202. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libssp.a +0 -0
  203. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libstdc++.a +0 -0
  204. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libtiff.a +0 -0
  205. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libvorbis.a +0 -0
  206. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libvorbisfile.a +0 -0
  207. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libwebp.a +0 -0
  208. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libz.a +0 -0
  209. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libzstd.a +0 -0
  210. data/assets/windows/mingw-w64-x86_64/bin/mrbc.exe +0 -0
  211. data/assets/windows/mingw-w64-x86_64/lib/libFLAC.a +0 -0
  212. data/assets/windows/mingw-w64-x86_64/lib/libLerc.a +0 -0
  213. data/assets/windows/mingw-w64-x86_64/lib/libSDL2.a +0 -0
  214. data/assets/windows/mingw-w64-x86_64/lib/libSDL2_image.a +0 -0
  215. data/assets/windows/mingw-w64-x86_64/lib/libSDL2_mixer.a +0 -0
  216. data/assets/windows/mingw-w64-x86_64/lib/libSDL2_ttf.a +0 -0
  217. data/assets/windows/mingw-w64-x86_64/lib/libbrotlicommon.a +0 -0
  218. data/assets/windows/mingw-w64-x86_64/lib/libbrotlidec.a +0 -0
  219. data/assets/windows/mingw-w64-x86_64/lib/libbz2.a +0 -0
  220. data/assets/windows/mingw-w64-x86_64/lib/libdeflate.a +0 -0
  221. data/assets/windows/mingw-w64-x86_64/lib/libfreetype.a +0 -0
  222. data/assets/windows/mingw-w64-x86_64/lib/libglew32.a +0 -0
  223. data/assets/windows/mingw-w64-x86_64/lib/libgraphite2.a +0 -0
  224. data/assets/windows/mingw-w64-x86_64/lib/libharfbuzz.a +0 -0
  225. data/assets/windows/mingw-w64-x86_64/lib/libjbig.a +0 -0
  226. data/assets/windows/mingw-w64-x86_64/lib/libjpeg.a +0 -0
  227. data/assets/windows/mingw-w64-x86_64/lib/liblzma.a +0 -0
  228. data/assets/windows/mingw-w64-x86_64/lib/libmodplug.a +0 -0
  229. data/assets/windows/mingw-w64-x86_64/lib/libmpg123.a +0 -0
  230. data/assets/windows/mingw-w64-x86_64/lib/libmruby.a +0 -0
  231. data/assets/windows/mingw-w64-x86_64/lib/libogg.a +0 -0
  232. data/assets/windows/mingw-w64-x86_64/lib/libopus.a +0 -0
  233. data/assets/windows/mingw-w64-x86_64/lib/libopusfile.a +0 -0
  234. data/assets/windows/mingw-w64-x86_64/lib/libpng16.a +0 -0
  235. data/assets/windows/mingw-w64-x86_64/lib/libsndfile.a +0 -0
  236. data/assets/windows/mingw-w64-x86_64/lib/libssp.a +0 -0
  237. data/assets/windows/mingw-w64-x86_64/lib/libstdc++.a +0 -0
  238. data/assets/windows/mingw-w64-x86_64/lib/libtiff.a +0 -0
  239. data/assets/windows/mingw-w64-x86_64/lib/libvorbis.a +0 -0
  240. data/assets/windows/mingw-w64-x86_64/lib/libvorbisfile.a +0 -0
  241. data/assets/windows/mingw-w64-x86_64/lib/libwebp.a +0 -0
  242. data/assets/windows/mingw-w64-x86_64/lib/libz.a +0 -0
  243. data/assets/windows/mingw-w64-x86_64/lib/libzstd.a +0 -0
  244. data/assets/{ios → xcode/ios}/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -0
  245. data/assets/{ios → xcode/ios}/Assets.xcassets/Contents.json +0 -0
  246. data/assets/{ios → xcode/ios}/Base.lproj/LaunchScreen.storyboard +0 -0
  247. data/assets/{ios → xcode/ios}/Info.plist +0 -0
  248. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mrbconf.h +0 -0
  249. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/array.h +0 -0
  250. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/boxing_nan.h +0 -0
  251. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/boxing_no.h +0 -0
  252. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/boxing_word.h +0 -0
  253. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/class.h +0 -0
  254. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/common.h +0 -0
  255. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/compile.h +0 -0
  256. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/data.h +0 -0
  257. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/debug.h +0 -0
  258. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/dump.h +0 -0
  259. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/error.h +0 -0
  260. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/gc.h +0 -0
  261. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/hash.h +0 -0
  262. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/irep.h +0 -0
  263. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/istruct.h +0 -0
  264. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/khash.h +0 -0
  265. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/numeric.h +0 -0
  266. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/object.h +0 -0
  267. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/opcode.h +0 -0
  268. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/ops.h +0 -0
  269. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/proc.h +0 -0
  270. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/range.h +0 -0
  271. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/re.h +0 -0
  272. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/string.h +0 -0
  273. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/throw.h +0 -0
  274. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/value.h +0 -0
  275. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/variable.h +0 -0
  276. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/version.h +0 -0
  277. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby.h +0 -0
  278. data/assets/{ios → xcode/ios}/MRuby.framework/Info.plist +0 -0
  279. data/assets/{ios → xcode/ios}/MRuby.framework/MRuby +0 -0
  280. data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.pbxproj +0 -0
  281. data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
  282. data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
  283. data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/MyApp.xcscmblueprint +0 -0
  284. data/assets/{ios → xcode/ios}/main.c +0 -0
  285. 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
  286. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json +0 -0
  287. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json +0 -0
  288. 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
  289. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json +0 -0
  290. 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
  291. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json +0 -0
  292. 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
  293. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json +0 -0
  294. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json +0 -0
  295. 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
  296. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json +0 -0
  297. 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
  298. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json +0 -0
  299. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json +0 -0
  300. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json +0 -0
  301. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json +0 -0
  302. data/assets/{tvos → xcode/tvos}/Assets.xcassets/Contents.json +0 -0
  303. data/assets/{tvos → xcode/tvos}/Assets.xcassets/LaunchImage.launchimage/Contents.json +0 -0
  304. data/assets/{tvos → xcode/tvos}/Info.plist +0 -0
  305. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mrbconf.h +0 -0
  306. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/array.h +0 -0
  307. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/boxing_nan.h +0 -0
  308. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/boxing_no.h +0 -0
  309. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/boxing_word.h +0 -0
  310. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/class.h +0 -0
  311. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/common.h +0 -0
  312. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/compile.h +0 -0
  313. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/data.h +0 -0
  314. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/debug.h +0 -0
  315. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/dump.h +0 -0
  316. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/error.h +0 -0
  317. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/gc.h +0 -0
  318. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/hash.h +0 -0
  319. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/irep.h +0 -0
  320. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/istruct.h +0 -0
  321. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/khash.h +0 -0
  322. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/numeric.h +0 -0
  323. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/object.h +0 -0
  324. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/opcode.h +0 -0
  325. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/ops.h +0 -0
  326. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/proc.h +0 -0
  327. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/range.h +0 -0
  328. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/re.h +0 -0
  329. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/string.h +0 -0
  330. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/throw.h +0 -0
  331. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/value.h +0 -0
  332. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/variable.h +0 -0
  333. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/version.h +0 -0
  334. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby.h +0 -0
  335. data/assets/{tvos → xcode/tvos}/MRuby.framework/Info.plist +0 -0
  336. data/assets/{tvos → xcode/tvos}/MRuby.framework/MRuby +0 -0
  337. data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.pbxproj +0 -0
  338. data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
  339. data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
  340. data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/MyApp.xcscmblueprint +0 -0
  341. data/assets/{tvos → xcode/tvos}/main.c +0 -0
  342. data/bin/ruby2d +3 -4
  343. data/ext/ruby2d/extconf.rb +44 -25
  344. data/ext/ruby2d/gl.c +1 -1
  345. data/ext/ruby2d/gl3.c +0 -1
  346. data/ext/ruby2d/gles.c +137 -84
  347. data/ext/ruby2d/ruby2d.c +126 -32
  348. data/ext/ruby2d/ruby2d.h +53 -6
  349. data/ext/ruby2d/text.c +14 -1
  350. data/ext/ruby2d/window.c +253 -215
  351. data/lib/ruby2d/cli/build.rb +242 -59
  352. data/lib/ruby2d/cli/colorize.rb +5 -4
  353. data/lib/ruby2d/cli/platform.rb +17 -0
  354. data/lib/ruby2d/font.rb +7 -1
  355. data/lib/ruby2d/sprite.rb +7 -2
  356. data/lib/ruby2d/text.rb +1 -3
  357. data/lib/ruby2d/texture.rb +21 -21
  358. data/lib/ruby2d/tileset.rb +34 -33
  359. data/lib/ruby2d/version.rb +1 -1
  360. data/lib/ruby2d/vertices.rb +11 -6
  361. data/lib/ruby2d.rb +14 -20
  362. metadata +279 -151
  363. data/assets/README.md +0 -22
  364. data/assets/Rakefile +0 -85
  365. data/assets/macos/lib/libFLAC.a +0 -0
  366. data/assets/macos/lib/libSDL2.a +0 -0
  367. data/assets/macos/lib/libSDL2_image.a +0 -0
  368. data/assets/macos/lib/libSDL2_ttf.a +0 -0
  369. data/assets/macos/lib/libfreetype.a +0 -0
  370. data/assets/macos/lib/libjpeg.a +0 -0
  371. data/assets/macos/lib/libpng16.a +0 -0
  372. data/assets/macos/lib/libtiff.a +0 -0
  373. data/assets/macos/lib/libvorbis.a +0 -0
  374. data/assets/macos/lib/libvorbisfile.a +0 -0
  375. data/assets/macos/lib/libwebp.a +0 -0
  376. data/assets/mingw/bin/SDL2.dll +0 -0
  377. data/assets/mingw/bin/SDL2_image.dll +0 -0
  378. data/assets/mingw/bin/SDL2_mixer.dll +0 -0
  379. data/assets/mingw/bin/SDL2_ttf.dll +0 -0
  380. data/assets/mingw/bin/glew32.dll +0 -0
  381. data/assets/mingw/bin/libFLAC-8.dll +0 -0
  382. data/assets/mingw/bin/libfreetype-6.dll +0 -0
  383. data/assets/mingw/bin/libjpeg-9.dll +0 -0
  384. data/assets/mingw/bin/libmodplug-1.dll +0 -0
  385. data/assets/mingw/bin/libmpg123-0.dll +0 -0
  386. data/assets/mingw/bin/libogg-0.dll +0 -0
  387. data/assets/mingw/bin/libopus-0.dll +0 -0
  388. data/assets/mingw/bin/libopusfile-0.dll +0 -0
  389. data/assets/mingw/bin/libpng16-16.dll +0 -0
  390. data/assets/mingw/bin/libtiff-5.dll +0 -0
  391. data/assets/mingw/bin/libvorbis-0.dll +0 -0
  392. data/assets/mingw/bin/libvorbisfile-3.dll +0 -0
  393. data/assets/mingw/bin/libwebp-7.dll +0 -0
  394. data/assets/mingw/bin/zlib1.dll +0 -0
  395. data/assets/mingw/lib/libSDL2.dll.a +0 -0
  396. data/assets/mingw/lib/libSDL2_image.a +0 -0
  397. data/assets/mingw/lib/libSDL2_image.dll.a +0 -0
  398. data/assets/mingw/lib/libSDL2_mixer.a +0 -0
  399. data/assets/mingw/lib/libSDL2_mixer.dll.a +0 -0
  400. data/assets/mingw/lib/libSDL2_test.a +0 -0
  401. data/assets/mingw/lib/libSDL2_ttf.a +0 -0
  402. data/assets/mingw/lib/libSDL2_ttf.dll.a +0 -0
  403. data/assets/mingw/lib/libSDL2main.a +0 -0
  404. data/assets/mingw/lib/libglew32.dll.a +0 -0
@@ -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
@@ -34,11 +34,20 @@
34
34
  /* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
35
35
  #if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
36
36
  #ifdef __clang__
37
- /* Many of the intrinsics SDL uses are not implemented by clang with Visual Studio */
38
- #undef __MMX__
39
- #undef __SSE__
40
- #undef __SSE2__
41
- #else
37
+ /* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
38
+ so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
39
+
40
+ #ifndef __PRFCHWINTRIN_H
41
+ #define __PRFCHWINTRIN_H
42
+
43
+ static __inline__ void __attribute__((__always_inline__, __nodebug__))
44
+ _m_prefetch(void *__P)
45
+ {
46
+ __builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
47
+ }
48
+
49
+ #endif /* __PRFCHWINTRIN_H */
50
+ #endif /* __clang__ */
42
51
  #include <intrin.h>
43
52
  #ifndef _WIN64
44
53
  #ifndef __MMX__
@@ -54,9 +63,14 @@
54
63
  #ifndef __SSE2__
55
64
  #define __SSE2__
56
65
  #endif
57
- #endif /* __clang__ */
66
+ #ifndef __SSE3__
67
+ #define __SSE3__
68
+ #endif
58
69
  #elif defined(__MINGW64_VERSION_MAJOR)
59
70
  #include <intrin.h>
71
+ #if !defined(SDL_DISABLE_ARM_NEON_H) && defined(__ARM_NEON)
72
+ # include <arm_neon.h>
73
+ #endif
60
74
  #else
61
75
  /* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */
62
76
  #if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)
@@ -79,6 +93,8 @@
79
93
  # endif
80
94
  # endif
81
95
  #endif
96
+ #endif /* compiler version */
97
+
82
98
  #if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
83
99
  #include <mm3dnow.h>
84
100
  #endif
@@ -98,7 +114,6 @@
98
114
  #include <pmmintrin.h>
99
115
  #endif
100
116
  #endif /* HAVE_IMMINTRIN_H */
101
- #endif /* compiler version */
102
117
 
103
118
  #include "begin_code.h"
104
119
  /* Set up for C function definitions, even when using C++ */
@@ -114,136 +129,370 @@ extern "C" {
114
129
  #define SDL_CACHELINE_SIZE 128
115
130
 
116
131
  /**
117
- * This function returns the number of CPU cores available.
132
+ * Get the number of CPU cores available.
133
+ *
134
+ * \returns the total number of logical CPU cores. On CPUs that include
135
+ * technologies such as hyperthreading, the number of logical cores
136
+ * may be more than the number of physical cores.
137
+ *
138
+ * \since This function is available since SDL 2.0.0.
118
139
  */
119
140
  extern DECLSPEC int SDLCALL SDL_GetCPUCount(void);
120
141
 
121
142
  /**
122
- * This function returns the L1 cache line size of the CPU
143
+ * Determine the L1 cache line size of the CPU.
144
+ *
145
+ * This is useful for determining multi-threaded structure padding or SIMD
146
+ * prefetch sizes.
147
+ *
148
+ * \returns the L1 cache line size of the CPU, in bytes.
123
149
  *
124
- * This is useful for determining multi-threaded structure padding
125
- * or SIMD prefetch sizes.
150
+ * \since This function is available since SDL 2.0.0.
126
151
  */
127
152
  extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);
128
153
 
129
154
  /**
130
- * This function returns true if the CPU has the RDTSC instruction.
155
+ * Determine whether the CPU has the RDTSC instruction.
156
+ *
157
+ * This always returns false on CPUs that aren't using Intel instruction sets.
158
+ *
159
+ * \returns SDL_TRUE if the CPU has the RDTSC instruction or SDL_FALSE if not.
160
+ *
161
+ * \since This function is available since SDL 2.0.0.
162
+ *
163
+ * \sa SDL_Has3DNow
164
+ * \sa SDL_HasAltiVec
165
+ * \sa SDL_HasAVX
166
+ * \sa SDL_HasAVX2
167
+ * \sa SDL_HasMMX
168
+ * \sa SDL_HasSSE
169
+ * \sa SDL_HasSSE2
170
+ * \sa SDL_HasSSE3
171
+ * \sa SDL_HasSSE41
172
+ * \sa SDL_HasSSE42
131
173
  */
132
174
  extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
133
175
 
134
176
  /**
135
- * This function returns true if the CPU has AltiVec features.
177
+ * Determine whether the CPU has AltiVec features.
178
+ *
179
+ * This always returns false on CPUs that aren't using PowerPC instruction
180
+ * sets.
181
+ *
182
+ * \returns SDL_TRUE if the CPU has AltiVec features or SDL_FALSE if not.
183
+ *
184
+ * \since This function is available since SDL 2.0.0.
185
+ *
186
+ * \sa SDL_Has3DNow
187
+ * \sa SDL_HasAVX
188
+ * \sa SDL_HasAVX2
189
+ * \sa SDL_HasMMX
190
+ * \sa SDL_HasRDTSC
191
+ * \sa SDL_HasSSE
192
+ * \sa SDL_HasSSE2
193
+ * \sa SDL_HasSSE3
194
+ * \sa SDL_HasSSE41
195
+ * \sa SDL_HasSSE42
136
196
  */
137
197
  extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
138
198
 
139
199
  /**
140
- * This function returns true if the CPU has MMX features.
200
+ * Determine whether the CPU has MMX features.
201
+ *
202
+ * This always returns false on CPUs that aren't using Intel instruction sets.
203
+ *
204
+ * \returns SDL_TRUE if the CPU has MMX features or SDL_FALSE if not.
205
+ *
206
+ * \since This function is available since SDL 2.0.0.
207
+ *
208
+ * \sa SDL_Has3DNow
209
+ * \sa SDL_HasAltiVec
210
+ * \sa SDL_HasAVX
211
+ * \sa SDL_HasAVX2
212
+ * \sa SDL_HasRDTSC
213
+ * \sa SDL_HasSSE
214
+ * \sa SDL_HasSSE2
215
+ * \sa SDL_HasSSE3
216
+ * \sa SDL_HasSSE41
217
+ * \sa SDL_HasSSE42
141
218
  */
142
219
  extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
143
220
 
144
221
  /**
145
- * This function returns true if the CPU has 3DNow! features.
222
+ * Determine whether the CPU has 3DNow! features.
223
+ *
224
+ * This always returns false on CPUs that aren't using AMD instruction sets.
225
+ *
226
+ * \returns SDL_TRUE if the CPU has 3DNow! features or SDL_FALSE if not.
227
+ *
228
+ * \since This function is available since SDL 2.0.0.
229
+ *
230
+ * \sa SDL_HasAltiVec
231
+ * \sa SDL_HasAVX
232
+ * \sa SDL_HasAVX2
233
+ * \sa SDL_HasMMX
234
+ * \sa SDL_HasRDTSC
235
+ * \sa SDL_HasSSE
236
+ * \sa SDL_HasSSE2
237
+ * \sa SDL_HasSSE3
238
+ * \sa SDL_HasSSE41
239
+ * \sa SDL_HasSSE42
146
240
  */
147
241
  extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
148
242
 
149
243
  /**
150
- * This function returns true if the CPU has SSE features.
244
+ * Determine whether the CPU has SSE features.
245
+ *
246
+ * This always returns false on CPUs that aren't using Intel instruction sets.
247
+ *
248
+ * \returns SDL_TRUE if the CPU has SSE features or SDL_FALSE if not.
249
+ *
250
+ * \since This function is available since SDL 2.0.0.
251
+ *
252
+ * \sa SDL_Has3DNow
253
+ * \sa SDL_HasAltiVec
254
+ * \sa SDL_HasAVX
255
+ * \sa SDL_HasAVX2
256
+ * \sa SDL_HasMMX
257
+ * \sa SDL_HasRDTSC
258
+ * \sa SDL_HasSSE2
259
+ * \sa SDL_HasSSE3
260
+ * \sa SDL_HasSSE41
261
+ * \sa SDL_HasSSE42
151
262
  */
152
263
  extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
153
264
 
154
265
  /**
155
- * This function returns true if the CPU has SSE2 features.
266
+ * Determine whether the CPU has SSE2 features.
267
+ *
268
+ * This always returns false on CPUs that aren't using Intel instruction sets.
269
+ *
270
+ * \returns SDL_TRUE if the CPU has SSE2 features or SDL_FALSE if not.
271
+ *
272
+ * \since This function is available since SDL 2.0.0.
273
+ *
274
+ * \sa SDL_Has3DNow
275
+ * \sa SDL_HasAltiVec
276
+ * \sa SDL_HasAVX
277
+ * \sa SDL_HasAVX2
278
+ * \sa SDL_HasMMX
279
+ * \sa SDL_HasRDTSC
280
+ * \sa SDL_HasSSE
281
+ * \sa SDL_HasSSE3
282
+ * \sa SDL_HasSSE41
283
+ * \sa SDL_HasSSE42
156
284
  */
157
285
  extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
158
286
 
159
287
  /**
160
- * This function returns true if the CPU has SSE3 features.
288
+ * Determine whether the CPU has SSE3 features.
289
+ *
290
+ * This always returns false on CPUs that aren't using Intel instruction sets.
291
+ *
292
+ * \returns SDL_TRUE if the CPU has SSE3 features or SDL_FALSE if not.
293
+ *
294
+ * \since This function is available since SDL 2.0.0.
295
+ *
296
+ * \sa SDL_Has3DNow
297
+ * \sa SDL_HasAltiVec
298
+ * \sa SDL_HasAVX
299
+ * \sa SDL_HasAVX2
300
+ * \sa SDL_HasMMX
301
+ * \sa SDL_HasRDTSC
302
+ * \sa SDL_HasSSE
303
+ * \sa SDL_HasSSE2
304
+ * \sa SDL_HasSSE41
305
+ * \sa SDL_HasSSE42
161
306
  */
162
307
  extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);
163
308
 
164
309
  /**
165
- * This function returns true if the CPU has SSE4.1 features.
310
+ * Determine whether the CPU has SSE4.1 features.
311
+ *
312
+ * This always returns false on CPUs that aren't using Intel instruction sets.
313
+ *
314
+ * \returns SDL_TRUE if the CPU has SSE4.1 features or SDL_FALSE if not.
315
+ *
316
+ * \since This function is available since SDL 2.0.0.
317
+ *
318
+ * \sa SDL_Has3DNow
319
+ * \sa SDL_HasAltiVec
320
+ * \sa SDL_HasAVX
321
+ * \sa SDL_HasAVX2
322
+ * \sa SDL_HasMMX
323
+ * \sa SDL_HasRDTSC
324
+ * \sa SDL_HasSSE
325
+ * \sa SDL_HasSSE2
326
+ * \sa SDL_HasSSE3
327
+ * \sa SDL_HasSSE42
166
328
  */
167
329
  extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);
168
330
 
169
331
  /**
170
- * This function returns true if the CPU has SSE4.2 features.
332
+ * Determine whether the CPU has SSE4.2 features.
333
+ *
334
+ * This always returns false on CPUs that aren't using Intel instruction sets.
335
+ *
336
+ * \returns SDL_TRUE if the CPU has SSE4.2 features or SDL_FALSE if not.
337
+ *
338
+ * \since This function is available since SDL 2.0.0.
339
+ *
340
+ * \sa SDL_Has3DNow
341
+ * \sa SDL_HasAltiVec
342
+ * \sa SDL_HasAVX
343
+ * \sa SDL_HasAVX2
344
+ * \sa SDL_HasMMX
345
+ * \sa SDL_HasRDTSC
346
+ * \sa SDL_HasSSE
347
+ * \sa SDL_HasSSE2
348
+ * \sa SDL_HasSSE3
349
+ * \sa SDL_HasSSE41
171
350
  */
172
351
  extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
173
352
 
174
353
  /**
175
- * This function returns true if the CPU has AVX features.
354
+ * Determine whether the CPU has AVX features.
355
+ *
356
+ * This always returns false on CPUs that aren't using Intel instruction sets.
357
+ *
358
+ * \returns SDL_TRUE if the CPU has AVX features or SDL_FALSE if not.
359
+ *
360
+ * \since This function is available since SDL 2.0.2.
361
+ *
362
+ * \sa SDL_Has3DNow
363
+ * \sa SDL_HasAltiVec
364
+ * \sa SDL_HasAVX2
365
+ * \sa SDL_HasMMX
366
+ * \sa SDL_HasRDTSC
367
+ * \sa SDL_HasSSE
368
+ * \sa SDL_HasSSE2
369
+ * \sa SDL_HasSSE3
370
+ * \sa SDL_HasSSE41
371
+ * \sa SDL_HasSSE42
176
372
  */
177
373
  extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
178
374
 
179
375
  /**
180
- * This function returns true if the CPU has AVX2 features.
376
+ * Determine whether the CPU has AVX2 features.
377
+ *
378
+ * This always returns false on CPUs that aren't using Intel instruction sets.
379
+ *
380
+ * \returns SDL_TRUE if the CPU has AVX2 features or SDL_FALSE if not.
381
+ *
382
+ * \since This function is available since SDL 2.0.4.
383
+ *
384
+ * \sa SDL_Has3DNow
385
+ * \sa SDL_HasAltiVec
386
+ * \sa SDL_HasAVX
387
+ * \sa SDL_HasMMX
388
+ * \sa SDL_HasRDTSC
389
+ * \sa SDL_HasSSE
390
+ * \sa SDL_HasSSE2
391
+ * \sa SDL_HasSSE3
392
+ * \sa SDL_HasSSE41
393
+ * \sa SDL_HasSSE42
181
394
  */
182
395
  extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
183
396
 
184
397
  /**
185
- * This function returns true if the CPU has AVX-512F (foundation) features.
398
+ * Determine whether the CPU has AVX-512F (foundation) features.
399
+ *
400
+ * This always returns false on CPUs that aren't using Intel instruction sets.
401
+ *
402
+ * \returns SDL_TRUE if the CPU has AVX-512F features or SDL_FALSE if not.
403
+ *
404
+ * \since This function is available since SDL 2.0.9.
405
+ *
406
+ * \sa SDL_HasAVX
186
407
  */
187
408
  extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
188
409
 
189
410
  /**
190
- * This function returns true if the CPU has ARM SIMD (ARMv6) features.
411
+ * Determine whether the CPU has ARM SIMD (ARMv6) features.
412
+ *
413
+ * This is different from ARM NEON, which is a different instruction set.
414
+ *
415
+ * This always returns false on CPUs that aren't using ARM instruction sets.
416
+ *
417
+ * \returns SDL_TRUE if the CPU has ARM SIMD features or SDL_FALSE if not.
418
+ *
419
+ * \since This function is available since SDL 2.0.12.
420
+ *
421
+ * \sa SDL_HasNEON
191
422
  */
192
423
  extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void);
193
424
 
194
425
  /**
195
- * This function returns true if the CPU has NEON (ARM SIMD) features.
426
+ * Determine whether the CPU has NEON (ARM SIMD) features.
427
+ *
428
+ * This always returns false on CPUs that aren't using ARM instruction sets.
429
+ *
430
+ * \returns SDL_TRUE if the CPU has ARM NEON features or SDL_FALSE if not.
431
+ *
432
+ * \since This function is available since SDL 2.0.6.
196
433
  */
197
434
  extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
198
435
 
199
436
  /**
200
- * This function returns the amount of RAM configured in the system, in MB.
437
+ * Get the amount of RAM configured in the system.
438
+ *
439
+ * \returns the amount of RAM configured in the system in MB.
440
+ *
441
+ * \since This function is available since SDL 2.0.1.
201
442
  */
202
443
  extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
203
444
 
204
445
  /**
205
- * \brief Report the alignment this system needs for SIMD allocations.
446
+ * Report the alignment this system needs for SIMD allocations.
206
447
  *
207
448
  * This will return the minimum number of bytes to which a pointer must be
208
- * aligned to be compatible with SIMD instructions on the current machine.
209
- * For example, if the machine supports SSE only, it will return 16, but if
210
- * it supports AVX-512F, it'll return 64 (etc). This only reports values for
211
- * instruction sets SDL knows about, so if your SDL build doesn't have
212
- * SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and
213
- * not 64 for the AVX-512 instructions that exist but SDL doesn't know about.
214
- * Plan accordingly.
449
+ * aligned to be compatible with SIMD instructions on the current machine. For
450
+ * example, if the machine supports SSE only, it will return 16, but if it
451
+ * supports AVX-512F, it'll return 64 (etc). This only reports values for
452
+ * instruction sets SDL knows about, so if your SDL build doesn't have
453
+ * SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and
454
+ * not 64 for the AVX-512 instructions that exist but SDL doesn't know about.
455
+ * Plan accordingly.
456
+ *
457
+ * \returns the alignment in bytes needed for available, known SIMD
458
+ * instructions.
459
+ *
460
+ * \since This function is available since SDL 2.0.10.
215
461
  */
216
462
  extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
217
463
 
218
464
  /**
219
- * \brief Allocate memory in a SIMD-friendly way.
465
+ * Allocate memory in a SIMD-friendly way.
220
466
  *
221
467
  * This will allocate a block of memory that is suitable for use with SIMD
222
- * instructions. Specifically, it will be properly aligned and padded for
223
- * the system's supported vector instructions.
468
+ * instructions. Specifically, it will be properly aligned and padded for the
469
+ * system's supported vector instructions.
224
470
  *
225
- * The memory returned will be padded such that it is safe to read or write
226
- * an incomplete vector at the end of the memory block. This can be useful
227
- * so you don't have to drop back to a scalar fallback at the end of your
228
- * SIMD processing loop to deal with the final elements without overflowing
229
- * the allocated buffer.
471
+ * The memory returned will be padded such that it is safe to read or write an
472
+ * incomplete vector at the end of the memory block. This can be useful so you
473
+ * don't have to drop back to a scalar fallback at the end of your SIMD
474
+ * processing loop to deal with the final elements without overflowing the
475
+ * allocated buffer.
230
476
  *
231
- * You must free this memory with SDL_FreeSIMD(), not free() or SDL_free()
232
- * or delete[], etc.
477
+ * You must free this memory with SDL_FreeSIMD(), not free() or SDL_free() or
478
+ * delete[], etc.
233
479
  *
234
- * Note that SDL will only deal with SIMD instruction sets it is aware of;
235
- * for example, SDL 2.0.8 knows that SSE wants 16-byte vectors
236
- * (SDL_HasSSE()), and AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't
237
- * know that AVX-512 wants 64. To be clear: if you can't decide to use an
238
- * instruction set with an SDL_Has*() function, don't use that instruction
239
- * set with memory allocated through here.
480
+ * Note that SDL will only deal with SIMD instruction sets it is aware of; for
481
+ * example, SDL 2.0.8 knows that SSE wants 16-byte vectors (SDL_HasSSE()), and
482
+ * AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't know that AVX-512 wants
483
+ * 64. To be clear: if you can't decide to use an instruction set with an
484
+ * SDL_Has*() function, don't use that instruction set with memory allocated
485
+ * through here.
240
486
  *
241
487
  * SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't
242
- * out of memory.
488
+ * out of memory, but you are not allowed to dereference it (because you only
489
+ * own zero bytes of that buffer).
243
490
  *
244
- * \param len The length, in bytes, of the block to allocated. The actual
245
- * allocated block might be larger due to padding, etc.
246
- * \return Pointer to newly-allocated block, NULL if out of memory.
491
+ * \param len The length, in bytes, of the block to allocate. The actual
492
+ * allocated block might be larger due to padding, etc.
493
+ * \returns a pointer to the newly-allocated block, NULL if out of memory.
494
+ *
495
+ * \since This function is available since SDL 2.0.10.
247
496
  *
248
497
  * \sa SDL_SIMDAlignment
249
498
  * \sa SDL_SIMDRealloc
@@ -252,20 +501,22 @@ extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
252
501
  extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
253
502
 
254
503
  /**
255
- * \brief Reallocate memory obtained from SDL_SIMDAlloc
504
+ * Reallocate memory obtained from SDL_SIMDAlloc
256
505
  *
257
506
  * It is not valid to use this function on a pointer from anything but
258
- * SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,
259
- * SDL_malloc, memalign, new[], etc.
260
- *
261
- * \param mem The pointer obtained from SDL_SIMDAlloc. This function also
262
- * accepts NULL, at which point this function is the same as
263
- * calling SDL_realloc with a NULL pointer.
264
- * \param len The length, in bytes, of the block to allocated. The actual
265
- * allocated block might be larger due to padding, etc. Passing 0
266
- * will return a non-NULL pointer, assuming the system isn't out of
267
- * memory.
268
- * \return Pointer to newly-reallocated block, NULL if out of memory.
507
+ * SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,
508
+ * SDL_malloc, memalign, new[], etc.
509
+ *
510
+ * \param mem The pointer obtained from SDL_SIMDAlloc. This function also
511
+ * accepts NULL, at which point this function is the same as
512
+ * calling SDL_SIMDAlloc with a NULL pointer.
513
+ * \param len The length, in bytes, of the block to allocated. The actual
514
+ * allocated block might be larger due to padding, etc. Passing 0
515
+ * will return a non-NULL pointer, assuming the system isn't out of
516
+ * memory.
517
+ * \returns a pointer to the newly-reallocated block, NULL if out of memory.
518
+ *
519
+ * \since This function is available since SDL 2.0.14.
269
520
  *
270
521
  * \sa SDL_SIMDAlignment
271
522
  * \sa SDL_SIMDAlloc
@@ -274,20 +525,29 @@ extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
274
525
  extern DECLSPEC void * SDLCALL SDL_SIMDRealloc(void *mem, const size_t len);
275
526
 
276
527
  /**
277
- * \brief Deallocate memory obtained from SDL_SIMDAlloc
528
+ * Deallocate memory obtained from SDL_SIMDAlloc
278
529
  *
279
530
  * It is not valid to use this function on a pointer from anything but
280
- * SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,
281
- * SDL_malloc, memalign, new[], etc.
531
+ * SDL_SIMDAlloc() or SDL_SIMDRealloc(). It can't be used on pointers from
532
+ * malloc, realloc, SDL_malloc, memalign, new[], etc.
282
533
  *
283
534
  * However, SDL_SIMDFree(NULL) is a legal no-op.
284
535
  *
536
+ * The memory pointed to by `ptr` is no longer valid for access upon return,
537
+ * and may be returned to the system or reused by a future allocation. The
538
+ * pointer passed to this function is no longer safe to dereference once this
539
+ * function returns, and should be discarded.
540
+ *
541
+ * \param ptr The pointer, returned from SDL_SIMDAlloc or SDL_SIMDRealloc, to
542
+ * deallocate. NULL is a legal no-op.
543
+ *
544
+ * \since This function is available since SDL 2.0.10.
545
+ *
285
546
  * \sa SDL_SIMDAlloc
286
547
  * \sa SDL_SIMDRealloc
287
548
  */
288
549
  extern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr);
289
550
 
290
- /* vi: set ts=4 sw=4 expandtab: */
291
551
  /* Ends C function definitions when using C++ */
292
552
  #ifdef __cplusplus
293
553
  }