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
@@ -66,201 +66,140 @@ typedef VkSurfaceKHR SDL_vulkanSurface; /* for compatibility with Tizen */
66
66
  /* @{ */
67
67
 
68
68
  /**
69
- * \brief Dynamically load a Vulkan loader library.
70
- *
71
- * \param [in] path The platform dependent Vulkan loader library name, or
72
- * \c NULL.
73
- *
74
- * \return \c 0 on success, or \c -1 if the library couldn't be loaded.
75
- *
76
- * If \a path is NULL SDL will use the value of the environment variable
77
- * \c SDL_VULKAN_LIBRARY, if set, otherwise it loads the default Vulkan
78
- * loader library.
79
- *
80
- * This should be called after initializing the video driver, but before
81
- * creating any Vulkan windows. If no Vulkan loader library is loaded, the
82
- * default library will be loaded upon creation of the first Vulkan window.
83
- *
84
- * \note It is fairly common for Vulkan applications to link with \a libvulkan
85
- * instead of explicitly loading it at run time. This will work with
86
- * SDL provided the application links to a dynamic library and both it
87
- * and SDL use the same search path.
88
- *
89
- * \note If you specify a non-NULL \c path, an application should retrieve all
90
- * of the Vulkan functions it uses from the dynamic library using
91
- * \c SDL_Vulkan_GetVkGetInstanceProcAddr() unless you can guarantee
92
- * \c path points to the same vulkan loader library the application
93
- * linked to.
94
- *
95
- * \note On Apple devices, if \a path is NULL, SDL will attempt to find
96
- * the vkGetInstanceProcAddr address within all the mach-o images of
97
- * the current process. This is because it is fairly common for Vulkan
98
- * applications to link with libvulkan (and historically MoltenVK was
99
- * provided as a static library). If it is not found then, on macOS, SDL
100
- * will attempt to load \c vulkan.framework/vulkan, \c libvulkan.1.dylib,
101
- * followed by \c libvulkan.dylib, in that order.
102
- * On iOS SDL will attempt to load \c libvulkan.dylib only. Applications
103
- * using a dynamic framework or .dylib must ensure it is included in its
104
- * application bundle.
105
- *
106
- * \note On non-Apple devices, application linking with a static libvulkan is
107
- * not supported. Either do not link to the Vulkan loader or link to a
108
- * dynamic library version.
109
- *
110
- * \note This function will fail if there are no working Vulkan drivers
111
- * installed.
112
- *
113
- * \sa SDL_Vulkan_GetVkGetInstanceProcAddr()
114
- * \sa SDL_Vulkan_UnloadLibrary()
69
+ * Dynamically load the Vulkan loader library.
70
+ *
71
+ * This should be called after initializing the video driver, but before
72
+ * creating any Vulkan windows. If no Vulkan loader library is loaded, the
73
+ * default library will be loaded upon creation of the first Vulkan window.
74
+ *
75
+ * It is fairly common for Vulkan applications to link with libvulkan instead
76
+ * of explicitly loading it at run time. This will work with SDL provided the
77
+ * application links to a dynamic library and both it and SDL use the same
78
+ * search path.
79
+ *
80
+ * If you specify a non-NULL `path`, an application should retrieve all of the
81
+ * Vulkan functions it uses from the dynamic library using
82
+ * SDL_Vulkan_GetVkGetInstanceProcAddr unless you can guarantee `path` points
83
+ * to the same vulkan loader library the application linked to.
84
+ *
85
+ * On Apple devices, if `path` is NULL, SDL will attempt to find the
86
+ * `vkGetInstanceProcAddr` address within all the Mach-O images of the current
87
+ * process. This is because it is fairly common for Vulkan applications to
88
+ * link with libvulkan (and historically MoltenVK was provided as a static
89
+ * library). If it is not found, on macOS, SDL will attempt to load
90
+ * `vulkan.framework/vulkan`, `libvulkan.1.dylib`,
91
+ * `MoltenVK.framework/MoltenVK`, and `libMoltenVK.dylib`, in that order. On
92
+ * iOS, SDL will attempt to load `libMoltenVK.dylib`. Applications using a
93
+ * dynamic framework or .dylib must ensure it is included in its application
94
+ * bundle.
95
+ *
96
+ * On non-Apple devices, application linking with a static libvulkan is not
97
+ * supported. Either do not link to the Vulkan loader or link to a dynamic
98
+ * library version.
99
+ *
100
+ * \param path The platform dependent Vulkan loader library name or NULL
101
+ * \returns 0 on success or -1 if the library couldn't be loaded; call
102
+ * SDL_GetError() for more information.
103
+ *
104
+ * \since This function is available since SDL 2.0.6.
105
+ *
106
+ * \sa SDL_Vulkan_GetVkInstanceProcAddr
107
+ * \sa SDL_Vulkan_UnloadLibrary
115
108
  */
116
109
  extern DECLSPEC int SDLCALL SDL_Vulkan_LoadLibrary(const char *path);
117
110
 
118
111
  /**
119
- * \brief Get the address of the \c vkGetInstanceProcAddr function.
112
+ * Get the address of the `vkGetInstanceProcAddr` function.
113
+ *
114
+ * This should be called after either calling SDL_Vulkan_LoadLibrary() or
115
+ * creating an SDL_Window with the `SDL_WINDOW_VULKAN` flag.
120
116
  *
121
- * \note This should be called after either calling SDL_Vulkan_LoadLibrary
122
- * or creating an SDL_Window with the SDL_WINDOW_VULKAN flag.
117
+ * \returns the function pointer for `vkGetInstanceProcAddr` or NULL on error.
118
+ *
119
+ * \since This function is available since SDL 2.0.6.
123
120
  */
124
121
  extern DECLSPEC void *SDLCALL SDL_Vulkan_GetVkGetInstanceProcAddr(void);
125
122
 
126
123
  /**
127
- * \brief Unload the Vulkan loader library previously loaded by
128
- * \c SDL_Vulkan_LoadLibrary().
124
+ * Unload the Vulkan library previously loaded by SDL_Vulkan_LoadLibrary()
125
+ *
126
+ * \since This function is available since SDL 2.0.6.
129
127
  *
130
- * \sa SDL_Vulkan_LoadLibrary()
128
+ * \sa SDL_Vulkan_LoadLibrary
131
129
  */
132
130
  extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
133
131
 
134
132
  /**
135
- * \brief Get the names of the Vulkan instance extensions needed to create
136
- * a surface with \c SDL_Vulkan_CreateSurface().
137
- *
138
- * \param [in] \c NULL or window Window for which the required Vulkan instance
139
- * extensions should be retrieved
140
- * \param [in,out] pCount pointer to an \c unsigned related to the number of
141
- * required Vulkan instance extensions
142
- * \param [out] pNames \c NULL or a pointer to an array to be filled with the
143
- * required Vulkan instance extensions
144
- *
145
- * \return \c SDL_TRUE on success, \c SDL_FALSE on error.
146
- *
147
- * If \a pNames is \c NULL, then the number of required Vulkan instance
148
- * extensions is returned in pCount. Otherwise, \a pCount must point to a
149
- * variable set to the number of elements in the \a pNames array, and on
150
- * return the variable is overwritten with the number of names actually
151
- * written to \a pNames. If \a pCount is less than the number of required
152
- * extensions, at most \a pCount structures will be written. If \a pCount
153
- * is smaller than the number of required extensions, \c SDL_FALSE will be
154
- * returned instead of \c SDL_TRUE, to indicate that not all the required
155
- * extensions were returned.
156
- *
157
- * \note If \c window is not NULL, it will be checked against its creation
158
- * flags to ensure that the Vulkan flag is present. This parameter
159
- * will be removed in a future major release.
160
- *
161
- * \note The returned list of extensions will contain \c VK_KHR_surface
162
- * and zero or more platform specific extensions
163
- *
164
- * \note The extension names queried here must be enabled when calling
165
- * VkCreateInstance, otherwise surface creation will fail.
166
- *
167
- * \note \c window should have been created with the \c SDL_WINDOW_VULKAN flag
168
- * or be \c NULL
169
- *
170
- * \code
171
- * unsigned int count;
172
- * // get count of required extensions
173
- * if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, NULL))
174
- * handle_error();
175
- *
176
- * static const char *const additionalExtensions[] =
177
- * {
178
- * VK_EXT_DEBUG_REPORT_EXTENSION_NAME, // example additional extension
179
- * };
180
- * size_t additionalExtensionsCount = sizeof(additionalExtensions) / sizeof(additionalExtensions[0]);
181
- * size_t extensionCount = count + additionalExtensionsCount;
182
- * const char **names = malloc(sizeof(const char *) * extensionCount);
183
- * if(!names)
184
- * handle_error();
185
- *
186
- * // get names of required extensions
187
- * if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, names))
188
- * handle_error();
189
- *
190
- * // copy additional extensions after required extensions
191
- * for(size_t i = 0; i < additionalExtensionsCount; i++)
192
- * names[i + count] = additionalExtensions[i];
193
- *
194
- * VkInstanceCreateInfo instanceCreateInfo = {};
195
- * instanceCreateInfo.enabledExtensionCount = extensionCount;
196
- * instanceCreateInfo.ppEnabledExtensionNames = names;
197
- * // fill in rest of instanceCreateInfo
198
- *
199
- * VkInstance instance;
200
- * // create the Vulkan instance
201
- * VkResult result = vkCreateInstance(&instanceCreateInfo, NULL, &instance);
202
- * free(names);
203
- * \endcode
204
- *
205
- * \sa SDL_Vulkan_CreateSurface()
133
+ * Get the names of the Vulkan instance extensions needed to create a surface
134
+ * with SDL_Vulkan_CreateSurface.
135
+ *
136
+ * If `pNames` is NULL, then the number of required Vulkan instance extensions
137
+ * is returned in `pCount`. Otherwise, `pCount` must point to a variable set
138
+ * to the number of elements in the `pNames` array, and on return the variable
139
+ * is overwritten with the number of names actually written to `pNames`. If
140
+ * `pCount` is less than the number of required extensions, at most `pCount`
141
+ * structures will be written. If `pCount` is smaller than the number of
142
+ * required extensions, SDL_FALSE will be returned instead of SDL_TRUE, to
143
+ * indicate that not all the required extensions were returned.
144
+ *
145
+ * The `window` parameter is currently needed to be valid as of SDL 2.0.8,
146
+ * however, this parameter will likely be removed in future releases
147
+ *
148
+ * \param window A window for which the required Vulkan instance extensions
149
+ * should be retrieved (will be deprecated in a future release)
150
+ * \param pCount A pointer to an unsigned int corresponding to the number of
151
+ * extensions to be returned
152
+ * \param pNames NULL or a pointer to an array to be filled with required
153
+ * Vulkan instance extensions
154
+ * \returns SDL_TRUE on success, SDL_FALSE on error.
155
+ *
156
+ * \since This function is available since SDL 2.0.6.
157
+ *
158
+ * \sa SDL_Vulkan_CreateSurface
206
159
  */
207
160
  extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(SDL_Window *window,
208
161
  unsigned int *pCount,
209
162
  const char **pNames);
210
163
 
211
164
  /**
212
- * \brief Create a Vulkan rendering surface for a window.
213
- *
214
- * \param [in] window SDL_Window to which to attach the rendering surface.
215
- * \param [in] instance handle to the Vulkan instance to use.
216
- * \param [out] surface pointer to a VkSurfaceKHR handle to receive the
217
- * handle of the newly created surface.
218
- *
219
- * \return \c SDL_TRUE on success, \c SDL_FALSE on error.
165
+ * Create a Vulkan rendering surface for a window.
220
166
  *
221
- * \code
222
- * VkInstance instance;
223
- * SDL_Window *window;
167
+ * The `window` must have been created with the `SDL_WINDOW_VULKAN` flag and
168
+ * `instance` must have been created with extensions returned by
169
+ * SDL_Vulkan_GetInstanceExtensions() enabled.
224
170
  *
225
- * // create instance and window
171
+ * \param window The window to which to attach the Vulkan surface
172
+ * \param instance The Vulkan instance handle
173
+ * \param surface A pointer to a VkSurfaceKHR handle to output the newly
174
+ * created surface
175
+ * \returns SDL_TRUE on success, SDL_FALSE on error.
226
176
  *
227
- * // create the Vulkan surface
228
- * VkSurfaceKHR surface;
229
- * if(!SDL_Vulkan_CreateSurface(window, instance, &surface))
230
- * handle_error();
231
- * \endcode
177
+ * \since This function is available since SDL 2.0.6.
232
178
  *
233
- * \note \a window should have been created with the \c SDL_WINDOW_VULKAN flag.
234
- *
235
- * \note \a instance should have been created with the extensions returned
236
- * by \c SDL_Vulkan_CreateSurface() enabled.
237
- *
238
- * \sa SDL_Vulkan_GetInstanceExtensions()
179
+ * \sa SDL_Vulkan_GetInstanceExtensions
180
+ * \sa SDL_Vulkan_GetDrawableSize
239
181
  */
240
182
  extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface(SDL_Window *window,
241
183
  VkInstance instance,
242
184
  VkSurfaceKHR* surface);
243
185
 
244
186
  /**
245
- * \brief Get the size of a window's underlying drawable in pixels (for use
246
- * with setting viewport, scissor & etc).
247
- *
248
- * \param window SDL_Window from which the drawable size should be queried
249
- * \param w Pointer to variable for storing the width in pixels,
250
- * may be NULL
251
- * \param h Pointer to variable for storing the height in pixels,
252
- * may be NULL
187
+ * Get the size of the window's underlying drawable dimensions in pixels.
253
188
  *
254
189
  * This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI
255
- * drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a
256
- * platform with high-DPI support (Apple calls this "Retina"), and not disabled
257
- * by the \c SDL_HINT_VIDEO_HIGHDPI_DISABLED hint.
190
+ * drawable, i.e. the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a
191
+ * platform with high-DPI support (Apple calls this "Retina"), and not
192
+ * disabled by the `SDL_HINT_VIDEO_HIGHDPI_DISABLED` hint.
193
+ *
194
+ * \param window an SDL_Window for which the size is to be queried
195
+ * \param w Pointer to the variable to write the width to or NULL
196
+ * \param h Pointer to the variable to write the height to or NULL
258
197
  *
259
- * \note On macOS high-DPI support must be enabled for an application by
260
- * setting NSHighResolutionCapable to true in its Info.plist.
198
+ * \since This function is available since SDL 2.0.6.
261
199
  *
262
- * \sa SDL_GetWindowSize()
263
- * \sa SDL_CreateWindow()
200
+ * \sa SDL_GetWindowSize
201
+ * \sa SDL_CreateWindow
202
+ * \sa SDL_Vulkan_CreateSurface
264
203
  */
265
204
  extern DECLSPEC void SDLCALL SDL_Vulkan_GetDrawableSize(SDL_Window * window,
266
205
  int *w, int *h);
@@ -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
@@ -164,3 +164,24 @@
164
164
  #endif
165
165
  #endif /* NULL */
166
166
  #endif /* ! Mac OS X - breaks precompiled headers */
167
+
168
+ #ifndef SDL_FALLTHROUGH
169
+ #if (defined(__cplusplus) && __cplusplus >= 201703L) || \
170
+ (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L)
171
+ #define SDL_FALLTHROUGH [[fallthrough]]
172
+ #else
173
+ #if defined(__has_attribute)
174
+ #define _HAS_FALLTHROUGH __has_attribute(__fallthrough__)
175
+ #else
176
+ #define _HAS_FALLTHROUGH 0
177
+ #endif /* __has_attribute */
178
+ #if _HAS_FALLTHROUGH && \
179
+ ((defined(__GNUC__) && __GNUC__ >= 7) || \
180
+ (defined(__clang_major__) && __clang_major__ >= 10))
181
+ #define SDL_FALLTHROUGH __attribute__((__fallthrough__))
182
+ #else
183
+ #define SDL_FALLTHROUGH do {} while (0) /* fallthrough */
184
+ #endif /* _HAS_FALLTHROUGH */
185
+ #undef _HAS_FALLTHROUGH
186
+ #endif /* C++17 or C2x */
187
+ #endif /* SDL_FALLTHROUGH not defined */
@@ -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
@@ -0,0 +1,234 @@
1
+ /*
2
+ ** mrbconf.h - mruby core configuration
3
+ **
4
+ ** See Copyright Notice in mruby.h
5
+ */
6
+
7
+ #ifndef MRUBYCONF_H
8
+ #define MRUBYCONF_H
9
+
10
+ #include <limits.h>
11
+ #include <stdint.h>
12
+
13
+ /* architecture selection: */
14
+ /* specify -DMRB_32BIT or -DMRB_64BIT to override */
15
+ #if !defined(MRB_32BIT) && !defined(MRB_64BIT)
16
+ #if UINT64_MAX == SIZE_MAX
17
+ #define MRB_64BIT
18
+ #else
19
+ #define MRB_32BIT
20
+ #endif
21
+ #endif
22
+
23
+ #if defined(MRB_32BIT) && defined(MRB_64BIT)
24
+ #error Cannot build for 32 and 64 bit architecture at the same time
25
+ #endif
26
+
27
+ /* configuration options: */
28
+ /* add -DMRB_USE_FLOAT32 to use float instead of double for floating point numbers */
29
+ //#define MRB_USE_FLOAT32
30
+
31
+ /* exclude floating point numbers */
32
+ //#define MRB_NO_FLOAT
33
+
34
+ /* obsolete configuration */
35
+ #if defined(MRB_USE_FLOAT)
36
+ # define MRB_USE_FLOAT32
37
+ #endif
38
+
39
+ /* obsolete configuration */
40
+ #if defined(MRB_WITHOUT_FLOAT)
41
+ # define MRB_NO_FLOAT
42
+ #endif
43
+
44
+ #if defined(MRB_USE_FLOAT32) && defined(MRB_NO_FLOAT)
45
+ #error Cannot define MRB_USE_FLOAT32 and MRB_NO_FLOAT at the same time
46
+ #endif
47
+
48
+ /* add -DMRB_NO_METHOD_CACHE to disable method cache to save memory */
49
+ //#define MRB_NO_METHOD_CACHE
50
+ /* size of the method cache (need to be the power of 2) */
51
+ //#define MRB_METHOD_CACHE_SIZE (1<<8)
52
+
53
+ /* add -DMRB_USE_METHOD_T_STRUCT on machines that use higher bits of function pointers */
54
+ /* no MRB_USE_METHOD_T_STRUCT requires highest 2 bits of function pointers to be zero */
55
+ #ifndef MRB_USE_METHOD_T_STRUCT
56
+ // can't use highest 2 bits of function pointers at least on 32bit
57
+ // Windows and 32bit Linux.
58
+ # ifdef MRB_32BIT
59
+ # define MRB_USE_METHOD_T_STRUCT
60
+ # endif
61
+ #endif
62
+
63
+ /* define on big endian machines; used by MRB_NAN_BOXING, etc. */
64
+ #ifndef MRB_ENDIAN_BIG
65
+ # if (defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN) || \
66
+ (defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
67
+ # define MRB_ENDIAN_BIG
68
+ # endif
69
+ #endif
70
+
71
+ /* represent mrb_value in boxed double; conflict with MRB_USE_FLOAT32 and MRB_NO_FLOAT */
72
+ //#define MRB_NAN_BOXING
73
+
74
+ /* represent mrb_value as a word (natural unit of data for the processor) */
75
+ //#define MRB_WORD_BOXING
76
+
77
+ /* represent mrb_value as a struct; occupies 2 words */
78
+ //#define MRB_NO_BOXING
79
+
80
+ /* if no specific boxing type is chosen */
81
+ #if !defined(MRB_NAN_BOXING) && !defined(MRB_WORD_BOXING) && !defined(MRB_NO_BOXING)
82
+ # define MRB_WORD_BOXING
83
+ #endif
84
+
85
+ /* add -DMRB_INT32 to use 32bit integer for mrb_int; conflict with MRB_INT64;
86
+ Default for 32-bit CPU mode. */
87
+ //#define MRB_INT32
88
+
89
+ /* add -DMRB_INT64 to use 64bit integer for mrb_int; conflict with MRB_INT32;
90
+ Default for 64-bit CPU mode (unless using MRB_NAN_BOXING). */
91
+ //#define MRB_INT64
92
+
93
+ /* if no specific integer type is chosen */
94
+ #if !defined(MRB_INT32) && !defined(MRB_INT64)
95
+ # if defined(MRB_64BIT) && !defined(MRB_NAN_BOXING)
96
+ /* Use 64bit integers on 64bit architecture (without MRB_NAN_BOXING) */
97
+ # define MRB_INT64
98
+ # else
99
+ /* Otherwise use 32bit integers */
100
+ # define MRB_INT32
101
+ # endif
102
+ #endif
103
+
104
+ /* call malloc_trim(0) from mrb_full_gc() */
105
+ //#define MRB_USE_MALLOC_TRIM
106
+
107
+ /* string class to handle UTF-8 encoding */
108
+ //#define MRB_UTF8_STRING
109
+
110
+ /* argv max size in mrb_funcall */
111
+ //#define MRB_FUNCALL_ARGC_MAX 16
112
+
113
+ /* number of object per heap page */
114
+ //#define MRB_HEAP_PAGE_SIZE 1024
115
+
116
+ /* if __ehdr_start is available, mruby can reduce memory used by symbols */
117
+ //#define MRB_USE_LINK_TIME_RO_DATA_P
118
+
119
+ /* if MRB_USE_LINK_TIME_RO_DATA_P does not work,
120
+ you can try mrb_ro_data_p() that you have implemented yourself in any file;
121
+ prototype is `mrb_bool mrb_ro_data_p(const char *ptr)` */
122
+ //#define MRB_USE_CUSTOM_RO_DATA_P
123
+
124
+ /* turn off generational GC by default */
125
+ //#define MRB_GC_TURN_OFF_GENERATIONAL
126
+
127
+ /* default size of khash table bucket */
128
+ //#define KHASH_DEFAULT_SIZE 32
129
+
130
+ /* allocated memory address alignment */
131
+ //#define POOL_ALIGNMENT 4
132
+
133
+ /* page size of memory pool */
134
+ //#define POOL_PAGE_SIZE 16000
135
+
136
+ /* arena size */
137
+ //#define MRB_GC_ARENA_SIZE 100
138
+
139
+ /* fixed size GC arena */
140
+ //#define MRB_GC_FIXED_ARENA
141
+
142
+ /* state atexit stack size */
143
+ //#define MRB_FIXED_STATE_ATEXIT_STACK_SIZE 5
144
+
145
+ /* fixed size state atexit stack */
146
+ //#define MRB_FIXED_STATE_ATEXIT_STACK
147
+
148
+ /* -DMRB_NO_XXXX to drop following features */
149
+ //#define MRB_NO_STDIO /* use of stdio */
150
+
151
+ /* -DMRB_USE_XXXX to enable following features */
152
+ //#define MRB_USE_DEBUG_HOOK /* hooks for debugger */
153
+ //#define MRB_USE_ALL_SYMBOLS /* Symbol.all_symbols */
154
+
155
+ /* obsolete configurations */
156
+ #ifdef MRB_METHOD_T_STRUCT
157
+ # define MRB_USE_METHOD_T_STRUCT
158
+ #endif
159
+ #if defined(DISABLE_STDIO) || defined(MRB_DISABLE_STDIO)
160
+ # define MRB_NO_STDIO
161
+ #endif
162
+ #ifdef MRB_DISABLE_DIRECT_THREADING
163
+ # define MRB_NO_DIRECT_THREADING
164
+ #endif
165
+ #if defined(ENABLE_DEBUG) || defined(MRB_ENABLE_DEBUG_HOOK)
166
+ # define MRB_USE_DEBUG_HOOK
167
+ #endif
168
+ #ifdef MRB_ENABLE_ALL_SYMBOLS
169
+ # define MRB_USE_ALL_SYMBOLS
170
+ #endif
171
+ #ifdef MRB_ENABLE_CXX_ABI
172
+ # define MRB_USE_CXX_ABI
173
+ #endif
174
+ #ifdef MRB_ENABLE_CXX_EXCEPTION
175
+ # define MRB_USE_CXX_EXCEPTION
176
+ #endif
177
+
178
+ /* end of configuration */
179
+
180
+ #ifndef MRB_NO_STDIO
181
+ # include <stdio.h>
182
+ #endif
183
+
184
+ #ifndef FALSE
185
+ # define FALSE 0
186
+ #endif
187
+
188
+ #ifndef TRUE
189
+ # define TRUE 1
190
+ #endif
191
+
192
+ /*
193
+ ** mruby tuning profiles
194
+ **/
195
+
196
+ /* A profile for micro controllers */
197
+ #if defined(MRB_CONSTRAINED_BASELINE_PROFILE)
198
+ # ifndef MRB_NO_METHOD_CACHE
199
+ # define MRB_NO_METHOD_CACHE
200
+ # endif
201
+
202
+ # ifndef KHASH_DEFAULT_SIZE
203
+ # define KHASH_DEFAULT_SIZE 16
204
+ # endif
205
+
206
+ # ifndef MRB_HEAP_PAGE_SIZE
207
+ # define MRB_HEAP_PAGE_SIZE 256
208
+ # endif
209
+
210
+ /* A profile for default mruby */
211
+ #elif defined(MRB_BASELINE_PROFILE)
212
+
213
+ /* A profile for desktop computers or workstations; rich memory! */
214
+ #elif defined(MRB_MAIN_PROFILE)
215
+ # ifndef MRB_METHOD_CACHE_SIZE
216
+ # define MRB_METHOD_CACHE_SIZE (1<<10)
217
+ # endif
218
+
219
+ # ifndef MRB_HEAP_PAGE_SIZE
220
+ # define MRB_HEAP_PAGE_SIZE 4096
221
+ # endif
222
+
223
+ /* A profile for server; mruby vm is long life */
224
+ #elif defined(MRB_HIGH_PROFILE)
225
+ # ifndef MRB_METHOD_CACHE_SIZE
226
+ # define MRB_METHOD_CACHE_SIZE (1<<12)
227
+ # endif
228
+
229
+ # ifndef MRB_HEAP_PAGE_SIZE
230
+ # define MRB_HEAP_PAGE_SIZE 4096
231
+ # endif
232
+ #endif
233
+
234
+ #endif /* MRUBYCONF_H */