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
@@ -45,13 +45,12 @@ extern "C" {
45
45
  * with 0. This operation can also be stated as "count leading zeroes" and
46
46
  * "log base 2".
47
47
  *
48
- * \return Index of the most significant bit, or -1 if the value is 0.
48
+ * \return the index of the most significant bit, or -1 if the value is 0.
49
49
  */
50
50
  #if defined(__WATCOMC__) && defined(__386__)
51
- extern _inline int _SDL_clz_watcom (Uint32);
52
- #pragma aux _SDL_clz_watcom = \
51
+ extern __inline int _SDL_bsr_watcom(Uint32);
52
+ #pragma aux _SDL_bsr_watcom = \
53
53
  "bsr eax, eax" \
54
- "xor eax, 31" \
55
54
  parm [eax] nomemory \
56
55
  value [eax] \
57
56
  modify exact [eax] nomemory;
@@ -72,7 +71,13 @@ SDL_MostSignificantBitIndex32(Uint32 x)
72
71
  if (x == 0) {
73
72
  return -1;
74
73
  }
75
- return 31 - _SDL_clz_watcom(x);
74
+ return _SDL_bsr_watcom(x);
75
+ #elif defined(_MSC_VER)
76
+ unsigned long index;
77
+ if (_BitScanReverse(&index, x)) {
78
+ return index;
79
+ }
80
+ return -1;
76
81
  #else
77
82
  /* Based off of Bit Twiddling Hacks by Sean Eron Anderson
78
83
  * <seander@cs.stanford.edu>, released in the public domain.
@@ -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
@@ -91,19 +91,96 @@ typedef enum
91
91
  } SDL_BlendFactor;
92
92
 
93
93
  /**
94
- * \brief Create a custom blend mode, which may or may not be supported by a given renderer
95
- *
96
- * \param srcColorFactor source color factor
97
- * \param dstColorFactor destination color factor
98
- * \param colorOperation color operation
99
- * \param srcAlphaFactor source alpha factor
100
- * \param dstAlphaFactor destination alpha factor
101
- * \param alphaOperation alpha operation
102
- *
103
- * The result of the blend mode operation will be:
104
- * dstRGB = dstRGB * dstColorFactor colorOperation srcRGB * srcColorFactor
105
- * and
106
- * dstA = dstA * dstAlphaFactor alphaOperation srcA * srcAlphaFactor
94
+ * Compose a custom blend mode for renderers.
95
+ *
96
+ * The functions SDL_SetRenderDrawBlendMode and SDL_SetTextureBlendMode accept
97
+ * the SDL_BlendMode returned by this function if the renderer supports it.
98
+ *
99
+ * A blend mode controls how the pixels from a drawing operation (source) get
100
+ * combined with the pixels from the render target (destination). First, the
101
+ * components of the source and destination pixels get multiplied with their
102
+ * blend factors. Then, the blend operation takes the two products and
103
+ * calculates the result that will get stored in the render target.
104
+ *
105
+ * Expressed in pseudocode, it would look like this:
106
+ *
107
+ * ```c
108
+ * dstRGB = colorOperation(srcRGB * srcColorFactor, dstRGB * dstColorFactor);
109
+ * dstA = alphaOperation(srcA * srcAlphaFactor, dstA * dstAlphaFactor);
110
+ * ```
111
+ *
112
+ * Where the functions `colorOperation(src, dst)` and `alphaOperation(src,
113
+ * dst)` can return one of the following:
114
+ *
115
+ * - `src + dst`
116
+ * - `src - dst`
117
+ * - `dst - src`
118
+ * - `min(src, dst)`
119
+ * - `max(src, dst)`
120
+ *
121
+ * The red, green, and blue components are always multiplied with the first,
122
+ * second, and third components of the SDL_BlendFactor, respectively. The
123
+ * fourth component is not used.
124
+ *
125
+ * The alpha component is always multiplied with the fourth component of the
126
+ * SDL_BlendFactor. The other components are not used in the alpha
127
+ * calculation.
128
+ *
129
+ * Support for these blend modes varies for each renderer. To check if a
130
+ * specific SDL_BlendMode is supported, create a renderer and pass it to
131
+ * either SDL_SetRenderDrawBlendMode or SDL_SetTextureBlendMode. They will
132
+ * return with an error if the blend mode is not supported.
133
+ *
134
+ * This list describes the support of custom blend modes for each renderer in
135
+ * SDL 2.0.6. All renderers support the four blend modes listed in the
136
+ * SDL_BlendMode enumeration.
137
+ *
138
+ * - **direct3d**: Supports `SDL_BLENDOPERATION_ADD` with all factors.
139
+ * - **direct3d11**: Supports all operations with all factors. However, some
140
+ * factors produce unexpected results with `SDL_BLENDOPERATION_MINIMUM` and
141
+ * `SDL_BLENDOPERATION_MAXIMUM`.
142
+ * - **opengl**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
143
+ * factors. OpenGL versions 1.1, 1.2, and 1.3 do not work correctly with SDL
144
+ * 2.0.6.
145
+ * - **opengles**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
146
+ * factors. Color and alpha factors need to be the same. OpenGL ES 1
147
+ * implementation specific: May also support `SDL_BLENDOPERATION_SUBTRACT`
148
+ * and `SDL_BLENDOPERATION_REV_SUBTRACT`. May support color and alpha
149
+ * operations being different from each other. May support color and alpha
150
+ * factors being different from each other.
151
+ * - **opengles2**: Supports the `SDL_BLENDOPERATION_ADD`,
152
+ * `SDL_BLENDOPERATION_SUBTRACT`, `SDL_BLENDOPERATION_REV_SUBTRACT`
153
+ * operations with all factors.
154
+ * - **psp**: No custom blend mode support.
155
+ * - **software**: No custom blend mode support.
156
+ *
157
+ * Some renderers do not provide an alpha component for the default render
158
+ * target. The `SDL_BLENDFACTOR_DST_ALPHA` and
159
+ * `SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA` factors do not have an effect in this
160
+ * case.
161
+ *
162
+ * \param srcColorFactor the SDL_BlendFactor applied to the red, green, and
163
+ * blue components of the source pixels
164
+ * \param dstColorFactor the SDL_BlendFactor applied to the red, green, and
165
+ * blue components of the destination pixels
166
+ * \param colorOperation the SDL_BlendOperation used to combine the red,
167
+ * green, and blue components of the source and
168
+ * destination pixels
169
+ * \param srcAlphaFactor the SDL_BlendFactor applied to the alpha component of
170
+ * the source pixels
171
+ * \param dstAlphaFactor the SDL_BlendFactor applied to the alpha component of
172
+ * the destination pixels
173
+ * \param alphaOperation the SDL_BlendOperation used to combine the alpha
174
+ * component of the source and destination pixels
175
+ * \returns an SDL_BlendMode that represents the chosen factors and
176
+ * operations.
177
+ *
178
+ * \since This function is available since SDL 2.0.6.
179
+ *
180
+ * \sa SDL_SetRenderDrawBlendMode
181
+ * \sa SDL_GetRenderDrawBlendMode
182
+ * \sa SDL_SetTextureBlendMode
183
+ * \sa SDL_GetTextureBlendMode
107
184
  */
108
185
  extern DECLSPEC SDL_BlendMode SDLCALL SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor,
109
186
  SDL_BlendFactor dstColorFactor,
@@ -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
@@ -39,23 +39,46 @@ extern "C" {
39
39
  /* Function prototypes */
40
40
 
41
41
  /**
42
- * \brief Put UTF-8 text into the clipboard
42
+ * Put UTF-8 text into the clipboard.
43
43
  *
44
- * \sa SDL_GetClipboardText()
44
+ * \param text the text to store in the clipboard
45
+ * \returns 0 on success or a negative error code on failure; call
46
+ * SDL_GetError() for more information.
47
+ *
48
+ * \since This function is available since SDL 2.0.0.
49
+ *
50
+ * \sa SDL_GetClipboardText
51
+ * \sa SDL_HasClipboardText
45
52
  */
46
53
  extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);
47
54
 
48
55
  /**
49
- * \brief Get UTF-8 text from the clipboard, which must be freed with SDL_free()
56
+ * Get UTF-8 text from the clipboard, which must be freed with SDL_free().
57
+ *
58
+ * This functions returns empty string if there was not enough memory left for
59
+ * a copy of the clipboard's content.
60
+ *
61
+ * \returns the clipboard text on success or an empty string on failure; call
62
+ * SDL_GetError() for more information. Caller must call SDL_free()
63
+ * on the returned pointer when done with it (even if there was an
64
+ * error).
50
65
  *
51
- * \sa SDL_SetClipboardText()
66
+ * \since This function is available since SDL 2.0.0.
67
+ *
68
+ * \sa SDL_HasClipboardText
69
+ * \sa SDL_SetClipboardText
52
70
  */
53
71
  extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
54
72
 
55
73
  /**
56
- * \brief Returns a flag indicating whether the clipboard exists and contains a text string that is non-empty
74
+ * Query whether the clipboard exists and contains a non-empty text string.
75
+ *
76
+ * \returns SDL_TRUE if the clipboard has text, or SDL_FALSE if it does not.
77
+ *
78
+ * \since This function is available since SDL 2.0.0.
57
79
  *
58
- * \sa SDL_GetClipboardText()
80
+ * \sa SDL_GetClipboardText
81
+ * \sa SDL_SetClipboardText
59
82
  */
60
83
  extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);
61
84
 
@@ -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
@@ -43,6 +43,8 @@
43
43
  #include "SDL_config_psp.h"
44
44
  #elif defined(__OS2__)
45
45
  #include "SDL_config_os2.h"
46
+ #elif defined(__EMSCRIPTEN__)
47
+ #include "SDL_config_emscripten.h"
46
48
  #else
47
49
  /* This is a minimal configuration just to get SDL running on new platforms. */
48
50
  #include "SDL_config_minimal.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
@@ -48,6 +48,7 @@
48
48
  #define HAVE_SYS_TYPES_H 1
49
49
 
50
50
  /* C library functions */
51
+ #define HAVE_DLOPEN 1
51
52
  #define HAVE_MALLOC 1
52
53
  #define HAVE_CALLOC 1
53
54
  #define HAVE_REALLOC 1
@@ -111,8 +112,12 @@
111
112
  #define HAVE_LOGF 1
112
113
  #define HAVE_LOG10 1
113
114
  #define HAVE_LOG10F 1
115
+ #define HAVE_LROUND 1
116
+ #define HAVE_LROUNDF 1
114
117
  #define HAVE_POW 1
115
118
  #define HAVE_POWF 1
119
+ #define HAVE_ROUND 1
120
+ #define HAVE_ROUNDF 1
116
121
  #define HAVE_SCALBN 1
117
122
  #define HAVE_SCALBNF 1
118
123
  #define HAVE_SIN 1
@@ -129,11 +134,16 @@
129
134
  #define HAVE_SYSCONF 1
130
135
  #define HAVE_CLOCK_GETTIME 1
131
136
 
137
+ #ifdef __LP64__
138
+ #define SIZEOF_VOIDP 8
139
+ #else
132
140
  #define SIZEOF_VOIDP 4
141
+ #endif
133
142
 
134
143
  /* Enable various audio drivers */
135
144
  #define SDL_AUDIO_DRIVER_ANDROID 1
136
145
  #define SDL_AUDIO_DRIVER_OPENSLES 1
146
+ #define SDL_AUDIO_DRIVER_AAUDIO 1
137
147
  #define SDL_AUDIO_DRIVER_DUMMY 1
138
148
 
139
149
  /* Enable various input drivers */
@@ -0,0 +1,216 @@
1
+ /*
2
+ Simple DirectMedia Layer
3
+ Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
4
+
5
+ This software is provided 'as-is', without any express or implied
6
+ warranty. In no event will the authors be held liable for any damages
7
+ arising from the use of this software.
8
+
9
+ Permission is granted to anyone to use this software for any purpose,
10
+ including commercial applications, and to alter it and redistribute it
11
+ freely, subject to the following restrictions:
12
+
13
+ 1. The origin of this software must not be misrepresented; you must not
14
+ claim that you wrote the original software. If you use this software
15
+ in a product, an acknowledgment in the product documentation would be
16
+ appreciated but is not required.
17
+ 2. Altered source versions must be plainly marked as such, and must not be
18
+ misrepresented as being the original software.
19
+ 3. This notice may not be removed or altered from any source distribution.
20
+ */
21
+
22
+ #ifndef _SDL_config_emscripten_h_
23
+ #define _SDL_config_emscripten_h_
24
+
25
+ #include "SDL_platform.h"
26
+
27
+ /**
28
+ * \file SDL_config_emscripten.h
29
+ *
30
+ * This is a configuration that can be used to build SDL for Emscripten.
31
+ */
32
+
33
+ #ifdef __LP64__
34
+ #define SIZEOF_VOIDP 8
35
+ #else
36
+ #define SIZEOF_VOIDP 4
37
+ #endif
38
+ #define HAVE_GCC_ATOMICS 1
39
+
40
+ /* Useful headers */
41
+ #define STDC_HEADERS 1
42
+ #define HAVE_ALLOCA_H 1
43
+ #define HAVE_CTYPE_H 1
44
+ #define HAVE_ICONV_H 1
45
+ #define HAVE_INTTYPES_H 1
46
+ #define HAVE_LIMITS_H 1
47
+ #define HAVE_MALLOC_H 1
48
+ #define HAVE_MATH_H 1
49
+ #define HAVE_MEMORY_H 1
50
+ #define HAVE_SIGNAL_H 1
51
+ #define HAVE_STDARG_H 1
52
+ #define HAVE_STDINT_H 1
53
+ #define HAVE_STDIO_H 1
54
+ #define HAVE_STDLIB_H 1
55
+ #define HAVE_STRINGS_H 1
56
+ #define HAVE_STRING_H 1
57
+ #define HAVE_SYS_TYPES_H 1
58
+ #define HAVE_WCHAR_H 1
59
+
60
+ /* C library functions */
61
+ #define HAVE_DLOPEN 1
62
+ #define HAVE_MALLOC 1
63
+ #define HAVE_CALLOC 1
64
+ #define HAVE_REALLOC 1
65
+ #define HAVE_FREE 1
66
+ #define HAVE_ALLOCA 1
67
+ #define HAVE_GETENV 1
68
+ #define HAVE_SETENV 1
69
+ #define HAVE_PUTENV 1
70
+ #define HAVE_UNSETENV 1
71
+ #define HAVE_QSORT 1
72
+ #define HAVE_ABS 1
73
+ #define HAVE_BCOPY 1
74
+ #define HAVE_MEMSET 1
75
+ #define HAVE_MEMCPY 1
76
+ #define HAVE_MEMMOVE 1
77
+ #define HAVE_MEMCMP 1
78
+ #define HAVE_WCSLEN 1
79
+ #define HAVE_WCSDUP 1
80
+ #define HAVE_WCSSTR 1
81
+ #define HAVE_WCSCMP 1
82
+ #define HAVE_WCSNCMP 1
83
+ #define HAVE_WCSCASECMP 1
84
+ #define HAVE_WCSNCASECMP 1
85
+ #define HAVE_STRLEN 1
86
+ #define HAVE_STRLCPY 1
87
+ #define HAVE_STRLCAT 1
88
+ #define HAVE_STRCHR 1
89
+ #define HAVE_STRRCHR 1
90
+ #define HAVE_STRSTR 1
91
+ #define HAVE_STRTOK_R 1
92
+ #define HAVE_STRTOL 1
93
+ #define HAVE_STRTOUL 1
94
+ #define HAVE_STRTOLL 1
95
+ #define HAVE_STRTOULL 1
96
+ #define HAVE_STRTOD 1
97
+ #define HAVE_ATOI 1
98
+ #define HAVE_ATOF 1
99
+ #define HAVE_STRCMP 1
100
+ #define HAVE_STRNCMP 1
101
+ #define HAVE_STRCASECMP 1
102
+ #define HAVE_STRNCASECMP 1
103
+ #define HAVE_SSCANF 1
104
+ #define HAVE_VSSCANF 1
105
+ #define HAVE_VSNPRINTF 1
106
+ #define HAVE_M_PI 1
107
+ #define HAVE_ACOS 1
108
+ #define HAVE_ACOSF 1
109
+ #define HAVE_ASIN 1
110
+ #define HAVE_ASINF 1
111
+ #define HAVE_ATAN 1
112
+ #define HAVE_ATANF 1
113
+ #define HAVE_ATAN2 1
114
+ #define HAVE_ATAN2F 1
115
+ #define HAVE_CEIL 1
116
+ #define HAVE_CEILF 1
117
+ #define HAVE_COPYSIGN 1
118
+ #define HAVE_COPYSIGNF 1
119
+ #define HAVE_COS 1
120
+ #define HAVE_COSF 1
121
+ #define HAVE_EXP 1
122
+ #define HAVE_EXPF 1
123
+ #define HAVE_FABS 1
124
+ #define HAVE_FABSF 1
125
+ #define HAVE_FLOOR 1
126
+ #define HAVE_FLOORF 1
127
+ #define HAVE_FMOD 1
128
+ #define HAVE_FMODF 1
129
+ #define HAVE_LOG 1
130
+ #define HAVE_LOGF 1
131
+ #define HAVE_LOG10 1
132
+ #define HAVE_LOG10F 1
133
+ #define HAVE_LROUND 1
134
+ #define HAVE_LROUNDF 1
135
+ #define HAVE_POW 1
136
+ #define HAVE_POWF 1
137
+ #define HAVE_ROUND 1
138
+ #define HAVE_ROUNDF 1
139
+ #define HAVE_SCALBN 1
140
+ #define HAVE_SCALBNF 1
141
+ #define HAVE_SIN 1
142
+ #define HAVE_SINF 1
143
+ #define HAVE_SQRT 1
144
+ #define HAVE_SQRTF 1
145
+ #define HAVE_TAN 1
146
+ #define HAVE_TANF 1
147
+ #define HAVE_TRUNC 1
148
+ #define HAVE_TRUNCF 1
149
+ #define HAVE_FSEEKO 1
150
+ #define HAVE_FSEEKO64 1
151
+ #define HAVE_SIGACTION 1
152
+ #define HAVE_SA_SIGACTION 1
153
+ #define HAVE_SETJMP 1
154
+ #define HAVE_NANOSLEEP 1
155
+ #define HAVE_SYSCONF 1
156
+ #define HAVE_CLOCK_GETTIME 1
157
+ /* #undef HAVE_GETPAGESIZE */
158
+ #define HAVE_MPROTECT 1
159
+ #define HAVE_ICONV 1
160
+
161
+ /* SDL internal assertion support */
162
+ /* #undef SDL_DEFAULT_ASSERT_LEVEL */
163
+
164
+ #define SDL_CPUINFO_DISABLED 1
165
+ #define SDL_HAPTIC_DISABLED 1
166
+ #define SDL_HIDAPI_DISABLED 1
167
+ #ifndef __EMSCRIPTEN_PTHREADS__
168
+ #define SDL_THREADS_DISABLED 1
169
+ #endif
170
+
171
+ /* Enable various audio drivers */
172
+ #define SDL_AUDIO_DRIVER_DISK 1
173
+ #define SDL_AUDIO_DRIVER_DUMMY 1
174
+ #define SDL_AUDIO_DRIVER_EMSCRIPTEN 1
175
+
176
+ /* Enable various input drivers */
177
+ #define SDL_JOYSTICK_EMSCRIPTEN 1
178
+
179
+ /* Enable various sensor drivers */
180
+ #define SDL_SENSOR_DUMMY 1
181
+
182
+ /* Enable various shared object loading systems */
183
+ #define SDL_LOADSO_DLOPEN 1
184
+
185
+ /* Enable various threading systems */
186
+ #ifdef __EMSCRIPTEN_PTHREADS__
187
+ #define SDL_THREAD_PTHREAD 1
188
+ #endif
189
+
190
+ /* Enable various timer systems */
191
+ #define SDL_TIMER_UNIX 1
192
+
193
+ /* Enable various video drivers */
194
+ #define SDL_VIDEO_DRIVER_EMSCRIPTEN 1
195
+
196
+ #define SDL_VIDEO_RENDER_OGL_ES2 1
197
+
198
+ /* Enable OpenGL support */
199
+ /* #undef SDL_VIDEO_OPENGL */
200
+ /* #undef SDL_VIDEO_OPENGL_ES */
201
+ #define SDL_VIDEO_OPENGL_ES2 1
202
+ /* #undef SDL_VIDEO_OPENGL_BGL */
203
+ /* #undef SDL_VIDEO_OPENGL_CGL */
204
+ /* #undef SDL_VIDEO_OPENGL_GLX */
205
+ /* #undef SDL_VIDEO_OPENGL_WGL */
206
+ #define SDL_VIDEO_OPENGL_EGL 1
207
+ /* #undef SDL_VIDEO_OPENGL_OSMESA */
208
+ /* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */
209
+
210
+ /* Enable system power support */
211
+ #define SDL_POWER_EMSCRIPTEN 1
212
+
213
+ /* Enable system filesystem support */
214
+ #define SDL_FILESYSTEM_EMSCRIPTEN 1
215
+
216
+ #endif /* _SDL_config_emscripten_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
@@ -48,6 +48,7 @@
48
48
  /* #undef HAVE_LIBUNWIND_H */
49
49
 
50
50
  /* C library functions */
51
+ #define HAVE_DLOPEN 1
51
52
  #define HAVE_MALLOC 1
52
53
  #define HAVE_CALLOC 1
53
54
  #define HAVE_REALLOC 1
@@ -112,8 +113,12 @@
112
113
  #define HAVE_LOGF 1
113
114
  #define HAVE_LOG10 1
114
115
  #define HAVE_LOG10F 1
116
+ #define HAVE_LROUND 1
117
+ #define HAVE_LROUNDF 1
115
118
  #define HAVE_POW 1
116
119
  #define HAVE_POWF 1
120
+ #define HAVE_ROUND 1
121
+ #define HAVE_ROUNDF 1
117
122
  #define HAVE_SCALBN 1
118
123
  #define HAVE_SCALBNF 1
119
124
  #define HAVE_SIN 1
@@ -129,6 +134,7 @@
129
134
  #define HAVE_NANOSLEEP 1
130
135
  #define HAVE_SYSCONF 1
131
136
  #define HAVE_SYSCTLBYNAME 1
137
+ #define HAVE_O_CLOEXEC 1
132
138
 
133
139
  /* enable iPhone version of Core Audio driver */
134
140
  #define SDL_AUDIO_DRIVER_COREAUDIO 1
@@ -166,10 +172,12 @@
166
172
  #define SDL_VIDEO_DRIVER_DUMMY 1
167
173
 
168
174
  /* Enable OpenGL ES */
175
+ #if !TARGET_OS_MACCATALYST
169
176
  #define SDL_VIDEO_OPENGL_ES2 1
170
177
  #define SDL_VIDEO_OPENGL_ES 1
171
178
  #define SDL_VIDEO_RENDER_OGL_ES 1
172
179
  #define SDL_VIDEO_RENDER_OGL_ES2 1
180
+ #endif
173
181
 
174
182
  /* Metal supported on 64-bit devices running iOS 8.0 and tvOS 9.0 and newer
175
183
  Also supported in simulator from iOS 13.0 and tvOS 13.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
@@ -52,6 +52,7 @@
52
52
  #define HAVE_LIBUNWIND_H 1
53
53
 
54
54
  /* C library functions */
55
+ #define HAVE_DLOPEN 1
55
56
  #define HAVE_MALLOC 1
56
57
  #define HAVE_CALLOC 1
57
58
  #define HAVE_REALLOC 1
@@ -115,8 +116,12 @@
115
116
  #define HAVE_LOGF 1
116
117
  #define HAVE_LOG10 1
117
118
  #define HAVE_LOG10F 1
119
+ #define HAVE_LROUND 1
120
+ #define HAVE_LROUNDF 1
118
121
  #define HAVE_POW 1
119
122
  #define HAVE_POWF 1
123
+ #define HAVE_ROUND 1
124
+ #define HAVE_ROUNDF 1
120
125
  #define HAVE_SCALBN 1
121
126
  #define HAVE_SCALBNF 1
122
127
  #define HAVE_SIN 1
@@ -133,6 +138,16 @@
133
138
  #define HAVE_SYSCONF 1
134
139
  #define HAVE_SYSCTLBYNAME 1
135
140
 
141
+ #if defined(__has_include) && (defined(__i386__) || defined(__x86_64))
142
+ # if __has_include(<immintrin.h>)
143
+ # define HAVE_IMMINTRIN_H 1
144
+ # endif
145
+ #endif
146
+
147
+ #if (MAC_OS_X_VERSION_MAX_ALLOWED >= 1070)
148
+ #define HAVE_O_CLOEXEC 1
149
+ #endif
150
+
136
151
  #define HAVE_GCC_ATOMICS 1
137
152
 
138
153
  /* Enable various audio drivers */
@@ -191,7 +206,6 @@
191
206
  */
192
207
  #define SDL_VIDEO_DRIVER_X11_XINPUT2 1
193
208
  #define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1
194
- #define SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY 1
195
209
  #endif
196
210
 
197
211
  #ifndef SDL_VIDEO_RENDER_OGL
@@ -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
@@ -64,6 +64,9 @@ typedef unsigned long uintptr_t;
64
64
  /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
65
65
  #define SDL_HAPTIC_DISABLED 1
66
66
 
67
+ /* Enable the stub HIDAPI */
68
+ #define SDL_HIDAPI_DISABLED 1
69
+
67
70
  /* Enable the stub sensor driver (src/sensor/dummy/\*.c) */
68
71
  #define SDL_SENSOR_DISABLED 1
69
72