ruby2d 0.11.1 → 0.11.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (371) 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/{lib → 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 +39 -25
  311. data/ext/ruby2d/gl.c +1 -1
  312. data/ext/ruby2d/gl3.c +0 -1
  313. data/ext/ruby2d/gles.c +137 -84
  314. data/ext/ruby2d/ruby2d.c +126 -32
  315. data/ext/ruby2d/ruby2d.h +53 -6
  316. data/ext/ruby2d/text.c +14 -1
  317. data/ext/ruby2d/window.c +253 -215
  318. data/lib/ruby2d/cli/build.rb +237 -59
  319. data/lib/ruby2d/cli/colorize.rb +5 -4
  320. data/lib/ruby2d/cli/platform.rb +17 -0
  321. data/lib/ruby2d/font.rb +7 -1
  322. data/lib/ruby2d/sprite.rb +7 -2
  323. data/lib/ruby2d/text.rb +1 -3
  324. data/lib/ruby2d/texture.rb +21 -21
  325. data/lib/ruby2d/tileset.rb +34 -33
  326. data/lib/ruby2d/version.rb +1 -1
  327. data/lib/ruby2d/vertices.rb +11 -6
  328. data/lib/ruby2d.rb +14 -20
  329. metadata +246 -152
  330. data/assets/README.md +0 -22
  331. data/assets/Rakefile +0 -85
  332. data/assets/macos/lib/libFLAC.a +0 -0
  333. data/assets/macos/lib/libSDL2.a +0 -0
  334. data/assets/macos/lib/libSDL2_image.a +0 -0
  335. data/assets/macos/lib/libSDL2_ttf.a +0 -0
  336. data/assets/macos/lib/libfreetype.a +0 -0
  337. data/assets/macos/lib/libjpeg.a +0 -0
  338. data/assets/macos/lib/libpng16.a +0 -0
  339. data/assets/macos/lib/libtiff.a +0 -0
  340. data/assets/macos/lib/libvorbis.a +0 -0
  341. data/assets/macos/lib/libvorbisfile.a +0 -0
  342. data/assets/macos/lib/libwebp.a +0 -0
  343. data/assets/mingw/bin/SDL2.dll +0 -0
  344. data/assets/mingw/bin/SDL2_image.dll +0 -0
  345. data/assets/mingw/bin/SDL2_mixer.dll +0 -0
  346. data/assets/mingw/bin/SDL2_ttf.dll +0 -0
  347. data/assets/mingw/bin/glew32.dll +0 -0
  348. data/assets/mingw/bin/libFLAC-8.dll +0 -0
  349. data/assets/mingw/bin/libfreetype-6.dll +0 -0
  350. data/assets/mingw/bin/libjpeg-9.dll +0 -0
  351. data/assets/mingw/bin/libmodplug-1.dll +0 -0
  352. data/assets/mingw/bin/libmpg123-0.dll +0 -0
  353. data/assets/mingw/bin/libogg-0.dll +0 -0
  354. data/assets/mingw/bin/libopus-0.dll +0 -0
  355. data/assets/mingw/bin/libopusfile-0.dll +0 -0
  356. data/assets/mingw/bin/libpng16-16.dll +0 -0
  357. data/assets/mingw/bin/libtiff-5.dll +0 -0
  358. data/assets/mingw/bin/libvorbis-0.dll +0 -0
  359. data/assets/mingw/bin/libvorbisfile-3.dll +0 -0
  360. data/assets/mingw/bin/libwebp-7.dll +0 -0
  361. data/assets/mingw/bin/zlib1.dll +0 -0
  362. data/assets/mingw/lib/libSDL2.dll.a +0 -0
  363. data/assets/mingw/lib/libSDL2_image.a +0 -0
  364. data/assets/mingw/lib/libSDL2_image.dll.a +0 -0
  365. data/assets/mingw/lib/libSDL2_mixer.a +0 -0
  366. data/assets/mingw/lib/libSDL2_mixer.dll.a +0 -0
  367. data/assets/mingw/lib/libSDL2_test.a +0 -0
  368. data/assets/mingw/lib/libSDL2_ttf.a +0 -0
  369. data/assets/mingw/lib/libSDL2_ttf.dll.a +0 -0
  370. data/assets/mingw/lib/libSDL2main.a +0 -0
  371. 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
@@ -30,6 +30,23 @@
30
30
 
31
31
  #include "SDL_stdinc.h"
32
32
 
33
+ #if defined(_MSC_VER) && (_MSC_VER >= 1400)
34
+ /* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
35
+ so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
36
+ #ifdef __clang__
37
+ #ifndef __PRFCHWINTRIN_H
38
+ #define __PRFCHWINTRIN_H
39
+ static __inline__ void __attribute__((__always_inline__, __nodebug__))
40
+ _m_prefetch(void *__P)
41
+ {
42
+ __builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
43
+ }
44
+ #endif /* __PRFCHWINTRIN_H */
45
+ #endif /* __clang__ */
46
+
47
+ #include <intrin.h>
48
+ #endif
49
+
33
50
  /**
34
51
  * \name The two types of endianness
35
52
  */
@@ -45,6 +62,9 @@
45
62
  #elif defined(__OpenBSD__)
46
63
  #include <endian.h>
47
64
  #define SDL_BYTEORDER BYTE_ORDER
65
+ #elif defined(__FreeBSD__) || defined(__NetBSD__)
66
+ #include <sys/endian.h>
67
+ #define SDL_BYTEORDER BYTE_ORDER
48
68
  #else
49
69
  #if defined(__hppa__) || \
50
70
  defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
@@ -68,22 +88,45 @@ extern "C" {
68
88
  /**
69
89
  * \file SDL_endian.h
70
90
  */
71
- #if defined(__GNUC__) && defined(__i386__) && \
72
- !(__GNUC__ == 2 && __GNUC_MINOR__ == 95 /* broken gcc version */)
91
+
92
+ /* various modern compilers may have builtin swap */
93
+ #if defined(__GNUC__) || defined(__clang__)
94
+ # define HAS_BUILTIN_BSWAP16 (_SDL_HAS_BUILTIN(__builtin_bswap16)) || \
95
+ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))
96
+ # define HAS_BUILTIN_BSWAP32 (_SDL_HAS_BUILTIN(__builtin_bswap32)) || \
97
+ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
98
+ # define HAS_BUILTIN_BSWAP64 (_SDL_HAS_BUILTIN(__builtin_bswap64)) || \
99
+ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
100
+
101
+ /* this one is broken */
102
+ # define HAS_BROKEN_BSWAP (__GNUC__ == 2 && __GNUC_MINOR__ <= 95)
103
+ #else
104
+ # define HAS_BUILTIN_BSWAP16 0
105
+ # define HAS_BUILTIN_BSWAP32 0
106
+ # define HAS_BUILTIN_BSWAP64 0
107
+ # define HAS_BROKEN_BSWAP 0
108
+ #endif
109
+
110
+ #if HAS_BUILTIN_BSWAP16
111
+ #define SDL_Swap16(x) __builtin_bswap16(x)
112
+ #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
113
+ #pragma intrinsic(_byteswap_ushort)
114
+ #define SDL_Swap16(x) _byteswap_ushort(x)
115
+ #elif defined(__i386__) && !HAS_BROKEN_BSWAP
73
116
  SDL_FORCE_INLINE Uint16
74
117
  SDL_Swap16(Uint16 x)
75
118
  {
76
119
  __asm__("xchgb %b0,%h0": "=q"(x):"0"(x));
77
120
  return x;
78
121
  }
79
- #elif defined(__GNUC__) && defined(__x86_64__)
122
+ #elif defined(__x86_64__)
80
123
  SDL_FORCE_INLINE Uint16
81
124
  SDL_Swap16(Uint16 x)
82
125
  {
83
126
  __asm__("xchgb %b0,%h0": "=Q"(x):"0"(x));
84
127
  return x;
85
128
  }
86
- #elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
129
+ #elif (defined(__powerpc__) || defined(__ppc__))
87
130
  SDL_FORCE_INLINE Uint16
88
131
  SDL_Swap16(Uint16 x)
89
132
  {
@@ -92,7 +135,7 @@ SDL_Swap16(Uint16 x)
92
135
  __asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
93
136
  return (Uint16)result;
94
137
  }
95
- #elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)
138
+ #elif (defined(__m68k__) && !defined(__mcoldfire__))
96
139
  SDL_FORCE_INLINE Uint16
97
140
  SDL_Swap16(Uint16 x)
98
141
  {
@@ -100,7 +143,7 @@ SDL_Swap16(Uint16 x)
100
143
  return x;
101
144
  }
102
145
  #elif defined(__WATCOMC__) && defined(__386__)
103
- extern _inline Uint16 SDL_Swap16(Uint16);
146
+ extern __inline Uint16 SDL_Swap16(Uint16);
104
147
  #pragma aux SDL_Swap16 = \
105
148
  "xchg al, ah" \
106
149
  parm [ax] \
@@ -113,32 +156,37 @@ SDL_Swap16(Uint16 x)
113
156
  }
114
157
  #endif
115
158
 
116
- #if defined(__GNUC__) && defined(__i386__)
159
+ #if HAS_BUILTIN_BSWAP32
160
+ #define SDL_Swap32(x) __builtin_bswap32(x)
161
+ #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
162
+ #pragma intrinsic(_byteswap_ulong)
163
+ #define SDL_Swap32(x) _byteswap_ulong(x)
164
+ #elif defined(__i386__) && !HAS_BROKEN_BSWAP
117
165
  SDL_FORCE_INLINE Uint32
118
166
  SDL_Swap32(Uint32 x)
119
167
  {
120
168
  __asm__("bswap %0": "=r"(x):"0"(x));
121
169
  return x;
122
170
  }
123
- #elif defined(__GNUC__) && defined(__x86_64__)
171
+ #elif defined(__x86_64__)
124
172
  SDL_FORCE_INLINE Uint32
125
173
  SDL_Swap32(Uint32 x)
126
174
  {
127
175
  __asm__("bswapl %0": "=r"(x):"0"(x));
128
176
  return x;
129
177
  }
130
- #elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
178
+ #elif (defined(__powerpc__) || defined(__ppc__))
131
179
  SDL_FORCE_INLINE Uint32
132
180
  SDL_Swap32(Uint32 x)
133
181
  {
134
182
  Uint32 result;
135
183
 
136
- __asm__("rlwimi %0,%2,24,16,23": "=&r"(result):"0"(x >> 24), "r"(x));
137
- __asm__("rlwimi %0,%2,8,8,15": "=&r"(result):"0"(result), "r"(x));
138
- __asm__("rlwimi %0,%2,24,0,7": "=&r"(result):"0"(result), "r"(x));
184
+ __asm__("rlwimi %0,%2,24,16,23": "=&r"(result): "0" (x>>24), "r"(x));
185
+ __asm__("rlwimi %0,%2,8,8,15" : "=&r"(result): "0" (result), "r"(x));
186
+ __asm__("rlwimi %0,%2,24,0,7" : "=&r"(result): "0" (result), "r"(x));
139
187
  return result;
140
188
  }
141
- #elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)
189
+ #elif (defined(__m68k__) && !defined(__mcoldfire__))
142
190
  SDL_FORCE_INLINE Uint32
143
191
  SDL_Swap32(Uint32 x)
144
192
  {
@@ -146,20 +194,11 @@ SDL_Swap32(Uint32 x)
146
194
  return x;
147
195
  }
148
196
  #elif defined(__WATCOMC__) && defined(__386__)
149
- extern _inline Uint32 SDL_Swap32(Uint32);
150
- #ifndef __SW_3 /* 486+ */
197
+ extern __inline Uint32 SDL_Swap32(Uint32);
151
198
  #pragma aux SDL_Swap32 = \
152
199
  "bswap eax" \
153
200
  parm [eax] \
154
201
  modify [eax];
155
- #else /* 386-only */
156
- #pragma aux SDL_Swap32 = \
157
- "xchg al, ah" \
158
- "ror eax, 16" \
159
- "xchg al, ah" \
160
- parm [eax] \
161
- modify [eax];
162
- #endif
163
202
  #else
164
203
  SDL_FORCE_INLINE Uint32
165
204
  SDL_Swap32(Uint32 x)
@@ -169,31 +208,42 @@ SDL_Swap32(Uint32 x)
169
208
  }
170
209
  #endif
171
210
 
172
- #if defined(__GNUC__) && defined(__i386__)
211
+ #if HAS_BUILTIN_BSWAP64
212
+ #define SDL_Swap64(x) __builtin_bswap64(x)
213
+ #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
214
+ #pragma intrinsic(_byteswap_uint64)
215
+ #define SDL_Swap64(x) _byteswap_uint64(x)
216
+ #elif defined(__i386__) && !HAS_BROKEN_BSWAP
173
217
  SDL_FORCE_INLINE Uint64
174
218
  SDL_Swap64(Uint64 x)
175
219
  {
176
- union
177
- {
178
- struct
179
- {
220
+ union {
221
+ struct {
180
222
  Uint32 a, b;
181
223
  } s;
182
224
  Uint64 u;
183
225
  } v;
184
226
  v.u = x;
185
- __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1": "=r"(v.s.a), "=r"(v.s.b):"0"(v.s.a),
186
- "1"(v.s.
187
- b));
227
+ __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
228
+ : "=r"(v.s.a), "=r"(v.s.b)
229
+ : "0" (v.s.a), "1"(v.s.b));
188
230
  return v.u;
189
231
  }
190
- #elif defined(__GNUC__) && defined(__x86_64__)
232
+ #elif defined(__x86_64__)
191
233
  SDL_FORCE_INLINE Uint64
192
234
  SDL_Swap64(Uint64 x)
193
235
  {
194
236
  __asm__("bswapq %0": "=r"(x):"0"(x));
195
237
  return x;
196
238
  }
239
+ #elif defined(__WATCOMC__) && defined(__386__)
240
+ extern __inline Uint64 SDL_Swap64(Uint64);
241
+ #pragma aux SDL_Swap64 = \
242
+ "bswap eax" \
243
+ "bswap edx" \
244
+ "xchg eax,edx" \
245
+ parm [eax edx] \
246
+ modify [eax edx];
197
247
  #else
198
248
  SDL_FORCE_INLINE Uint64
199
249
  SDL_Swap64(Uint64 x)
@@ -215,8 +265,7 @@ SDL_Swap64(Uint64 x)
215
265
  SDL_FORCE_INLINE float
216
266
  SDL_SwapFloat(float x)
217
267
  {
218
- union
219
- {
268
+ union {
220
269
  float f;
221
270
  Uint32 ui32;
222
271
  } swapper;
@@ -225,6 +274,11 @@ SDL_SwapFloat(float x)
225
274
  return swapper.f;
226
275
  }
227
276
 
277
+ /* remove extra macros */
278
+ #undef HAS_BROKEN_BSWAP
279
+ #undef HAS_BUILTIN_BSWAP16
280
+ #undef HAS_BUILTIN_BSWAP32
281
+ #undef HAS_BUILTIN_BSWAP64
228
282
 
229
283
  /**
230
284
  * \name Swap to native
@@ -232,22 +286,22 @@ SDL_SwapFloat(float x)
232
286
  */
233
287
  /* @{ */
234
288
  #if SDL_BYTEORDER == SDL_LIL_ENDIAN
235
- #define SDL_SwapLE16(X) (X)
236
- #define SDL_SwapLE32(X) (X)
237
- #define SDL_SwapLE64(X) (X)
289
+ #define SDL_SwapLE16(X) (X)
290
+ #define SDL_SwapLE32(X) (X)
291
+ #define SDL_SwapLE64(X) (X)
238
292
  #define SDL_SwapFloatLE(X) (X)
239
- #define SDL_SwapBE16(X) SDL_Swap16(X)
240
- #define SDL_SwapBE32(X) SDL_Swap32(X)
241
- #define SDL_SwapBE64(X) SDL_Swap64(X)
293
+ #define SDL_SwapBE16(X) SDL_Swap16(X)
294
+ #define SDL_SwapBE32(X) SDL_Swap32(X)
295
+ #define SDL_SwapBE64(X) SDL_Swap64(X)
242
296
  #define SDL_SwapFloatBE(X) SDL_SwapFloat(X)
243
297
  #else
244
- #define SDL_SwapLE16(X) SDL_Swap16(X)
245
- #define SDL_SwapLE32(X) SDL_Swap32(X)
246
- #define SDL_SwapLE64(X) SDL_Swap64(X)
298
+ #define SDL_SwapLE16(X) SDL_Swap16(X)
299
+ #define SDL_SwapLE32(X) SDL_Swap32(X)
300
+ #define SDL_SwapLE64(X) SDL_Swap64(X)
247
301
  #define SDL_SwapFloatLE(X) SDL_SwapFloat(X)
248
- #define SDL_SwapBE16(X) (X)
249
- #define SDL_SwapBE32(X) (X)
250
- #define SDL_SwapBE64(X) (X)
302
+ #define SDL_SwapBE16(X) (X)
303
+ #define SDL_SwapBE32(X) (X)
304
+ #define SDL_SwapBE64(X) (X)
251
305
  #define SDL_SwapFloatBE(X) (X)
252
306
  #endif
253
307
  /* @} *//* Swap to native */
@@ -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
@@ -40,41 +40,92 @@ extern "C" {
40
40
 
41
41
 
42
42
  /**
43
- * \brief Set the error message for the current thread
43
+ * Set the SDL error message for the current thread.
44
44
  *
45
- * \return -1, there is no error handling for this function
45
+ * Calling this function will replace any previous error message that was set.
46
+ *
47
+ * This function always returns -1, since SDL frequently uses -1 to signify an
48
+ * failing result, leading to this idiom:
49
+ *
50
+ * ```c
51
+ * if (error_code) {
52
+ * return SDL_SetError("This operation has failed: %d", error_code);
53
+ * }
54
+ * ```
55
+ *
56
+ * \param fmt a printf()-style message format string
57
+ * \param ... additional parameters matching % tokens in the `fmt` string, if
58
+ * any
59
+ * \returns always -1.
60
+ *
61
+ * \since This function is available since SDL 2.0.0.
62
+ *
63
+ * \sa SDL_ClearError
64
+ * \sa SDL_GetError
46
65
  */
47
66
  extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
48
67
 
49
68
  /**
50
- * \brief Get the last error message that was set
69
+ * Retrieve a message about the last error that occurred on the current
70
+ * thread.
71
+ *
72
+ * It is possible for multiple errors to occur before calling SDL_GetError().
73
+ * Only the last error is returned.
74
+ *
75
+ * The message is only applicable when an SDL function has signaled an error.
76
+ * You must check the return values of SDL function calls to determine when to
77
+ * appropriately call SDL_GetError(). You should *not* use the results of
78
+ * SDL_GetError() to decide if an error has occurred! Sometimes SDL will set
79
+ * an error string even when reporting success.
80
+ *
81
+ * SDL will *not* clear the error string for successful API calls. You *must*
82
+ * check return values for failure cases before you can assume the error
83
+ * string applies.
51
84
  *
52
- * SDL API functions may set error messages and then succeed, so you should
53
- * only use the error value if a function fails.
54
- *
55
- * This returns a pointer to a static buffer for convenience and should not
56
- * be called by multiple threads simultaneously.
85
+ * Error strings are set per-thread, so an error set in a different thread
86
+ * will not interfere with the current thread's operation.
57
87
  *
58
- * \return a pointer to the last error message that was set
88
+ * The returned string is internally allocated and must not be freed by the
89
+ * application.
90
+ *
91
+ * \returns a message with information about the specific error that occurred,
92
+ * or an empty string if there hasn't been an error message set since
93
+ * the last call to SDL_ClearError(). The message is only applicable
94
+ * when an SDL function has signaled an error. You must check the
95
+ * return values of SDL function calls to determine when to
96
+ * appropriately call SDL_GetError().
97
+ *
98
+ * \since This function is available since SDL 2.0.0.
99
+ *
100
+ * \sa SDL_ClearError
101
+ * \sa SDL_SetError
59
102
  */
60
103
  extern DECLSPEC const char *SDLCALL SDL_GetError(void);
61
104
 
62
105
  /**
63
- * \brief Get the last error message that was set for the current thread
106
+ * Get the last error message that was set for the current thread.
107
+ *
108
+ * This allows the caller to copy the error string into a provided buffer, but
109
+ * otherwise operates exactly the same as SDL_GetError().
64
110
  *
65
- * SDL API functions may set error messages and then succeed, so you should
66
- * only use the error value if a function fails.
67
- *
68
- * \param errstr A buffer to fill with the last error message that was set
69
- * for the current thread
70
- * \param maxlen The size of the buffer pointed to by the errstr parameter
111
+ * \param errstr A buffer to fill with the last error message that was set for
112
+ * the current thread
113
+ * \param maxlen The size of the buffer pointed to by the errstr parameter
114
+ * \returns the pointer passed in as the `errstr` parameter.
71
115
  *
72
- * \return errstr
116
+ * \since This function is available since SDL 2.0.14.
117
+ *
118
+ * \sa SDL_GetError
73
119
  */
74
120
  extern DECLSPEC char * SDLCALL SDL_GetErrorMsg(char *errstr, int maxlen);
75
121
 
76
122
  /**
77
- * \brief Clear the error message for the current thread
123
+ * Clear any previous error message for this thread.
124
+ *
125
+ * \since This function is available since SDL 2.0.0.
126
+ *
127
+ * \sa SDL_GetError
128
+ * \sa SDL_SetError
78
129
  */
79
130
  extern DECLSPEC void SDLCALL SDL_ClearError(void);
80
131