ruby2d 0.11.1 → 0.11.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/include/SDL2/SDL.h +108 -14
- data/assets/include/SDL2/SDL_assert.h +81 -50
- data/assets/include/SDL2/SDL_atomic.h +135 -35
- data/assets/include/SDL2/SDL_audio.h +960 -355
- data/assets/include/SDL2/SDL_bits.h +11 -6
- data/assets/include/SDL2/SDL_blendmode.h +91 -14
- data/assets/include/SDL2/SDL_clipboard.h +30 -7
- data/assets/include/SDL2/SDL_config.h +3 -1
- data/assets/include/SDL2/SDL_config_android.h +11 -1
- data/assets/include/SDL2/SDL_config_emscripten.h +216 -0
- data/assets/include/SDL2/SDL_config_iphoneos.h +9 -1
- data/assets/include/SDL2/SDL_config_macosx.h +16 -2
- data/assets/include/SDL2/SDL_config_minimal.h +4 -1
- data/assets/include/SDL2/SDL_config_os2.h +37 -20
- data/assets/include/SDL2/SDL_config_pandora.h +6 -1
- data/assets/include/SDL2/SDL_config_psp.h +8 -8
- data/assets/include/SDL2/SDL_config_windows.h +39 -22
- data/assets/include/SDL2/SDL_config_winrt.h +23 -8
- data/assets/include/SDL2/SDL_config_wiz.h +6 -1
- data/assets/include/SDL2/SDL_copying.h +1 -1
- data/assets/include/SDL2/SDL_cpuinfo.h +331 -71
- data/assets/include/SDL2/SDL_egl.h +906 -280
- data/assets/include/SDL2/SDL_endian.h +101 -47
- data/assets/include/SDL2/SDL_error.h +70 -19
- data/assets/include/SDL2/SDL_events.h +387 -79
- data/assets/include/SDL2/SDL_filesystem.h +73 -64
- data/assets/include/SDL2/SDL_gamecontroller.h +585 -125
- data/assets/include/SDL2/SDL_gesture.h +36 -6
- data/assets/include/SDL2/SDL_haptic.h +304 -210
- data/assets/include/SDL2/SDL_hidapi.h +451 -0
- data/assets/include/SDL2/SDL_hints.h +1286 -897
- data/assets/include/SDL2/SDL_joystick.h +577 -130
- data/assets/include/SDL2/SDL_keyboard.h +162 -63
- data/assets/include/SDL2/SDL_keycode.h +7 -5
- data/assets/include/SDL2/SDL_loadso.h +42 -8
- data/assets/include/SDL2/SDL_locale.h +34 -32
- data/assets/include/SDL2/SDL_log.h +212 -19
- data/assets/include/SDL2/SDL_main.h +72 -17
- data/assets/include/SDL2/SDL_messagebox.h +70 -23
- data/assets/include/SDL2/SDL_metal.h +27 -32
- data/assets/include/SDL2/SDL_misc.h +19 -15
- data/assets/include/SDL2/SDL_mouse.h +262 -110
- data/assets/include/SDL2/SDL_mutex.h +286 -66
- data/assets/include/SDL2/SDL_name.h +1 -1
- data/assets/include/SDL2/SDL_opengl.h +1 -1
- data/assets/include/SDL2/SDL_opengles.h +1 -1
- data/assets/include/SDL2/SDL_opengles2.h +2 -2
- data/assets/include/SDL2/SDL_pixels.h +199 -34
- data/assets/include/SDL2/SDL_platform.h +39 -2
- data/assets/include/SDL2/SDL_power.h +23 -10
- data/assets/include/SDL2/SDL_quit.h +1 -1
- data/assets/include/SDL2/SDL_rect.h +78 -28
- data/assets/include/SDL2/SDL_render.h +1204 -472
- data/assets/include/SDL2/SDL_revision.h +2 -2
- data/assets/include/SDL2/SDL_rwops.h +605 -33
- data/assets/include/SDL2/SDL_scancode.h +1 -1
- data/assets/include/SDL2/SDL_sensor.h +76 -42
- data/assets/include/SDL2/SDL_shape.h +38 -27
- data/assets/include/SDL2/SDL_stdinc.h +96 -24
- data/assets/include/SDL2/SDL_surface.h +571 -139
- data/assets/include/SDL2/SDL_system.h +339 -101
- data/assets/include/SDL2/SDL_syswm.h +50 -20
- data/assets/include/SDL2/SDL_test.h +1 -1
- data/assets/include/SDL2/SDL_test_assert.h +2 -2
- data/assets/include/SDL2/SDL_test_common.h +23 -6
- data/assets/include/SDL2/SDL_test_compare.h +1 -1
- data/assets/include/SDL2/SDL_test_crc32.h +1 -1
- data/assets/include/SDL2/SDL_test_font.h +3 -3
- data/assets/include/SDL2/SDL_test_fuzzer.h +28 -26
- data/assets/include/SDL2/SDL_test_harness.h +6 -6
- data/assets/include/SDL2/SDL_test_images.h +1 -1
- data/assets/include/SDL2/SDL_test_log.h +1 -1
- data/assets/include/SDL2/SDL_test_md5.h +1 -1
- data/assets/include/SDL2/SDL_test_memory.h +1 -1
- data/assets/include/SDL2/SDL_test_random.h +2 -2
- data/assets/include/SDL2/SDL_thread.h +226 -128
- data/assets/include/SDL2/SDL_timer.h +129 -22
- data/assets/include/SDL2/SDL_touch.h +48 -8
- data/assets/include/SDL2/SDL_ttf.h +102 -9
- data/assets/include/SDL2/SDL_types.h +1 -1
- data/assets/include/SDL2/SDL_version.h +72 -46
- data/assets/include/SDL2/SDL_video.h +1266 -460
- data/assets/include/SDL2/SDL_vulkan.h +100 -161
- data/assets/include/SDL2/begin_code.h +22 -1
- data/assets/include/SDL2/close_code.h +1 -1
- data/assets/include/mrbconf.h +234 -0
- data/assets/include/mruby/array.h +317 -0
- data/assets/include/mruby/boxing_nan.h +130 -0
- data/assets/include/mruby/boxing_no.h +58 -0
- data/assets/include/mruby/boxing_word.h +205 -0
- data/assets/include/mruby/class.h +108 -0
- data/assets/include/mruby/common.h +92 -0
- data/assets/include/mruby/compile.h +210 -0
- data/assets/include/mruby/data.h +76 -0
- data/assets/include/mruby/debug.h +66 -0
- data/assets/include/mruby/dump.h +158 -0
- data/assets/include/mruby/endian.h +44 -0
- data/assets/include/mruby/error.h +137 -0
- data/assets/include/mruby/gc.h +92 -0
- data/assets/include/mruby/hash.h +242 -0
- data/assets/include/mruby/irep.h +147 -0
- data/assets/include/mruby/istruct.h +50 -0
- data/assets/include/mruby/khash.h +284 -0
- data/assets/include/mruby/numeric.h +169 -0
- data/assets/include/mruby/object.h +43 -0
- data/assets/include/mruby/opcode.h +43 -0
- data/assets/include/mruby/ops.h +122 -0
- data/assets/include/mruby/presym/disable.h +70 -0
- data/assets/include/mruby/presym/enable.h +37 -0
- data/assets/include/mruby/presym/scanning.h +73 -0
- data/assets/include/mruby/presym.h +40 -0
- data/assets/include/mruby/proc.h +209 -0
- data/assets/include/mruby/range.h +79 -0
- data/assets/include/mruby/re.h +16 -0
- data/assets/include/mruby/string.h +469 -0
- data/assets/include/mruby/throw.h +66 -0
- data/assets/include/mruby/value.h +400 -0
- data/assets/include/mruby/variable.h +140 -0
- data/assets/include/mruby/version.h +143 -0
- data/assets/include/mruby.h +1444 -0
- data/assets/macos/universal/bin/mrbc +0 -0
- data/assets/macos/universal/lib/libFLAC.a +0 -0
- data/assets/macos/universal/lib/libSDL2.a +0 -0
- data/assets/macos/universal/lib/libSDL2_image.a +0 -0
- data/assets/macos/{lib → universal/lib}/libSDL2_mixer.a +0 -0
- data/assets/macos/universal/lib/libSDL2_ttf.a +0 -0
- data/assets/macos/universal/lib/libfreetype.a +0 -0
- data/assets/macos/universal/lib/libgraphite2.a +0 -0
- data/assets/macos/universal/lib/libharfbuzz.a +0 -0
- data/assets/macos/universal/lib/libjpeg.a +0 -0
- data/assets/macos/{lib → universal/lib}/libmodplug.a +0 -0
- data/assets/macos/{lib → universal/lib}/libmpg123.a +0 -0
- data/assets/{mingw/lib/libSDL2.a → macos/universal/lib/libmruby.a} +0 -0
- data/assets/macos/{lib → universal/lib}/libogg.a +0 -0
- data/assets/macos/universal/lib/libpng16.a +0 -0
- data/assets/macos/universal/lib/libtiff.a +0 -0
- data/assets/macos/universal/lib/libvorbis.a +0 -0
- data/assets/macos/universal/lib/libvorbisfile.a +0 -0
- data/assets/macos/universal/lib/libwebp.a +0 -0
- data/assets/test_media/README.md +3 -0
- data/assets/test_media/bitstream_vera/COPYRIGHT.txt +124 -0
- data/assets/test_media/bitstream_vera/vera.ttf +0 -0
- data/assets/test_media/boom.png +0 -0
- data/assets/test_media/coin.png +0 -0
- data/assets/test_media/colors.png +0 -0
- data/assets/test_media/controller.png +0 -0
- data/assets/test_media/dial.wav +0 -0
- data/assets/test_media/hero.png +0 -0
- data/assets/test_media/image.bmp +0 -0
- data/assets/test_media/image.jpg +0 -0
- data/assets/test_media/image.png +0 -0
- data/assets/test_media/music.flac +0 -0
- data/assets/test_media/music.mp3 +0 -0
- data/assets/test_media/music.ogg +0 -0
- data/assets/test_media/music.wav +0 -0
- data/assets/test_media/originals/boom.pxm +0 -0
- data/assets/test_media/originals/coin.pxm +0 -0
- data/assets/test_media/originals/controller.sketch +0 -0
- data/assets/test_media/originals/hero.pxm +0 -0
- data/assets/test_media/originals/image.pxm +0 -0
- data/assets/test_media/originals/music.caf +0 -0
- data/assets/test_media/originals/texture_atlas.pxm +0 -0
- data/assets/test_media/rondo_alla_turka.ogg +0 -0
- data/assets/test_media/sound.flac +0 -0
- data/assets/test_media/sound.mp3 +0 -0
- data/assets/test_media/sound.ogg +0 -0
- data/assets/test_media/sound.wav +0 -0
- data/assets/test_media/sprite_sheet.png +0 -0
- data/assets/test_media/texture_atlas.png +0 -0
- data/assets/wasm/build_config.rb +13 -0
- data/assets/wasm/libmruby.a +0 -0
- data/assets/wasm/template.html +17 -0
- data/assets/windows/glew/README.md +10 -0
- data/assets/windows/glew/glew.h +23686 -0
- data/assets/{mingw/lib → windows/glew}/libglew32.a +0 -0
- data/assets/windows/mingw-w64-x86_64/bin/mrbc.exe +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libFLAC.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libLerc.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libSDL2.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libSDL2_image.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libSDL2_mixer.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libSDL2_ttf.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libbrotlicommon.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libbrotlidec.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libbz2.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libdeflate.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libfreetype.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libglew32.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libgraphite2.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libharfbuzz.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libjbig.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libjpeg.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/liblzma.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libmodplug.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libmpg123.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libmruby.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libogg.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libopus.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libopusfile.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libpng16.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libsndfile.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libssp.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libstdc++.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libtiff.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libvorbis.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libvorbisfile.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libwebp.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libz.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libzstd.a +0 -0
- data/assets/{ios → xcode/ios}/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -0
- data/assets/{ios → xcode/ios}/Assets.xcassets/Contents.json +0 -0
- data/assets/{ios → xcode/ios}/Base.lproj/LaunchScreen.storyboard +0 -0
- data/assets/{ios → xcode/ios}/Info.plist +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mrbconf.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/array.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/boxing_nan.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/boxing_no.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/boxing_word.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/class.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/common.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/compile.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/data.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/debug.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/dump.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/error.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/gc.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/hash.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/irep.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/istruct.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/khash.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/numeric.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/object.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/opcode.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/ops.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/proc.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/range.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/re.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/string.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/throw.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/value.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/variable.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/version.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Info.plist +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/MRuby +0 -0
- data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.pbxproj +0 -0
- data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
- data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
- data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/MyApp.xcscmblueprint +0 -0
- data/assets/{ios → xcode/ios}/main.c +0 -0
- 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
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json +0 -0
- 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
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json +0 -0
- 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
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json +0 -0
- 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
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json +0 -0
- 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
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json +0 -0
- 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
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/LaunchImage.launchimage/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Info.plist +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mrbconf.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/array.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/boxing_nan.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/boxing_no.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/boxing_word.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/class.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/common.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/compile.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/data.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/debug.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/dump.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/error.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/gc.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/hash.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/irep.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/istruct.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/khash.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/numeric.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/object.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/opcode.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/ops.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/proc.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/range.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/re.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/string.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/throw.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/value.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/variable.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/version.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Info.plist +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/MRuby +0 -0
- data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.pbxproj +0 -0
- data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
- data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
- data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/MyApp.xcscmblueprint +0 -0
- data/assets/{tvos → xcode/tvos}/main.c +0 -0
- data/bin/ruby2d +3 -4
- data/ext/ruby2d/extconf.rb +39 -25
- data/ext/ruby2d/gl.c +1 -1
- data/ext/ruby2d/gl3.c +0 -1
- data/ext/ruby2d/gles.c +137 -84
- data/ext/ruby2d/ruby2d.c +126 -32
- data/ext/ruby2d/ruby2d.h +53 -6
- data/ext/ruby2d/text.c +14 -1
- data/ext/ruby2d/window.c +253 -215
- data/lib/ruby2d/cli/build.rb +237 -59
- data/lib/ruby2d/cli/colorize.rb +5 -4
- data/lib/ruby2d/cli/platform.rb +17 -0
- data/lib/ruby2d/font.rb +7 -1
- data/lib/ruby2d/sprite.rb +7 -2
- data/lib/ruby2d/text.rb +1 -3
- data/lib/ruby2d/texture.rb +21 -21
- data/lib/ruby2d/tileset.rb +34 -33
- data/lib/ruby2d/version.rb +1 -1
- data/lib/ruby2d/vertices.rb +11 -6
- data/lib/ruby2d.rb +14 -20
- metadata +246 -152
- data/assets/README.md +0 -22
- data/assets/Rakefile +0 -85
- data/assets/macos/lib/libFLAC.a +0 -0
- data/assets/macos/lib/libSDL2.a +0 -0
- data/assets/macos/lib/libSDL2_image.a +0 -0
- data/assets/macos/lib/libSDL2_ttf.a +0 -0
- data/assets/macos/lib/libfreetype.a +0 -0
- data/assets/macos/lib/libjpeg.a +0 -0
- data/assets/macos/lib/libpng16.a +0 -0
- data/assets/macos/lib/libtiff.a +0 -0
- data/assets/macos/lib/libvorbis.a +0 -0
- data/assets/macos/lib/libvorbisfile.a +0 -0
- data/assets/macos/lib/libwebp.a +0 -0
- data/assets/mingw/bin/SDL2.dll +0 -0
- data/assets/mingw/bin/SDL2_image.dll +0 -0
- data/assets/mingw/bin/SDL2_mixer.dll +0 -0
- data/assets/mingw/bin/SDL2_ttf.dll +0 -0
- data/assets/mingw/bin/glew32.dll +0 -0
- data/assets/mingw/bin/libFLAC-8.dll +0 -0
- data/assets/mingw/bin/libfreetype-6.dll +0 -0
- data/assets/mingw/bin/libjpeg-9.dll +0 -0
- data/assets/mingw/bin/libmodplug-1.dll +0 -0
- data/assets/mingw/bin/libmpg123-0.dll +0 -0
- data/assets/mingw/bin/libogg-0.dll +0 -0
- data/assets/mingw/bin/libopus-0.dll +0 -0
- data/assets/mingw/bin/libopusfile-0.dll +0 -0
- data/assets/mingw/bin/libpng16-16.dll +0 -0
- data/assets/mingw/bin/libtiff-5.dll +0 -0
- data/assets/mingw/bin/libvorbis-0.dll +0 -0
- data/assets/mingw/bin/libvorbisfile-3.dll +0 -0
- data/assets/mingw/bin/libwebp-7.dll +0 -0
- data/assets/mingw/bin/zlib1.dll +0 -0
- data/assets/mingw/lib/libSDL2.dll.a +0 -0
- data/assets/mingw/lib/libSDL2_image.a +0 -0
- data/assets/mingw/lib/libSDL2_image.dll.a +0 -0
- data/assets/mingw/lib/libSDL2_mixer.a +0 -0
- data/assets/mingw/lib/libSDL2_mixer.dll.a +0 -0
- data/assets/mingw/lib/libSDL2_test.a +0 -0
- data/assets/mingw/lib/libSDL2_ttf.a +0 -0
- data/assets/mingw/lib/libSDL2_ttf.dll.a +0 -0
- data/assets/mingw/lib/libSDL2main.a +0 -0
- data/assets/mingw/lib/libglew32.dll.a +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c12aee4afc99b74e30fe4e9e892342af166d8d27d81cf08b2b83cbc16a3ed897
|
4
|
+
data.tar.gz: 3b981ee133533471f7b09e9814cb8730f9d32cc3416c884cd24f6b25d6e16924
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f1fb4a14c5716674a606236e647c616dd1f2b3bfbb62fb885722d85c5c03f4f15367aed0bbf6ae7de81fec8915d22aca080c73380ff48462b1ccb3adec66586
|
7
|
+
data.tar.gz: 7f975bfe790b3bbbfdc1bbbbcf4897af7411244acdbb86ecba716562280ebb019249fc42d5a9f5a7afae95dbe675fda442aaf275a649a2a7866e9a2b89fe34c6
|
data/assets/include/SDL2/SDL.h
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
Simple DirectMedia Layer
|
3
|
-
Copyright (C) 1997-
|
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
|
@@ -42,6 +42,7 @@
|
|
42
42
|
#include "SDL_filesystem.h"
|
43
43
|
#include "SDL_gamecontroller.h"
|
44
44
|
#include "SDL_haptic.h"
|
45
|
+
#include "SDL_hidapi.h"
|
45
46
|
#include "SDL_hints.h"
|
46
47
|
#include "SDL_joystick.h"
|
47
48
|
#include "SDL_loadso.h"
|
@@ -93,37 +94,130 @@ extern "C" {
|
|
93
94
|
/* @} */
|
94
95
|
|
95
96
|
/**
|
96
|
-
*
|
97
|
+
* Initialize the SDL library.
|
98
|
+
*
|
99
|
+
* SDL_Init() simply forwards to calling SDL_InitSubSystem(). Therefore, the
|
100
|
+
* two may be used interchangeably. Though for readability of your code
|
101
|
+
* SDL_InitSubSystem() might be preferred.
|
102
|
+
*
|
103
|
+
* The file I/O (for example: SDL_RWFromFile) and threading (SDL_CreateThread)
|
104
|
+
* subsystems are initialized by default. Message boxes
|
105
|
+
* (SDL_ShowSimpleMessageBox) also attempt to work without initializing the
|
106
|
+
* video subsystem, in hopes of being useful in showing an error dialog when
|
107
|
+
* SDL_Init fails. You must specifically initialize other subsystems if you
|
108
|
+
* use them in your application.
|
109
|
+
*
|
110
|
+
* Logging (such as SDL_Log) works without initialization, too.
|
111
|
+
*
|
112
|
+
* `flags` may be any of the following OR'd together:
|
113
|
+
*
|
114
|
+
* - `SDL_INIT_TIMER`: timer subsystem
|
115
|
+
* - `SDL_INIT_AUDIO`: audio subsystem
|
116
|
+
* - `SDL_INIT_VIDEO`: video subsystem; automatically initializes the events
|
117
|
+
* subsystem
|
118
|
+
* - `SDL_INIT_JOYSTICK`: joystick subsystem; automatically initializes the
|
119
|
+
* events subsystem
|
120
|
+
* - `SDL_INIT_HAPTIC`: haptic (force feedback) subsystem
|
121
|
+
* - `SDL_INIT_GAMECONTROLLER`: controller subsystem; automatically
|
122
|
+
* initializes the joystick subsystem
|
123
|
+
* - `SDL_INIT_EVENTS`: events subsystem
|
124
|
+
* - `SDL_INIT_EVERYTHING`: all of the above subsystems
|
125
|
+
* - `SDL_INIT_NOPARACHUTE`: compatibility; this flag is ignored
|
126
|
+
*
|
127
|
+
* Subsystem initialization is ref-counted, you must call SDL_QuitSubSystem()
|
128
|
+
* for each SDL_InitSubSystem() to correctly shutdown a subsystem manually (or
|
129
|
+
* call SDL_Quit() to force shutdown). If a subsystem is already loaded then
|
130
|
+
* this call will increase the ref-count and return.
|
131
|
+
*
|
132
|
+
* \param flags subsystem initialization flags
|
133
|
+
* \returns 0 on success or a negative error code on failure; call
|
134
|
+
* SDL_GetError() for more information.
|
135
|
+
*
|
136
|
+
* \since This function is available since SDL 2.0.0.
|
137
|
+
*
|
138
|
+
* \sa SDL_InitSubSystem
|
139
|
+
* \sa SDL_Quit
|
140
|
+
* \sa SDL_SetMainReady
|
141
|
+
* \sa SDL_WasInit
|
97
142
|
*/
|
98
143
|
extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
|
99
144
|
|
100
145
|
/**
|
101
|
-
*
|
146
|
+
* Compatibility function to initialize the SDL library.
|
147
|
+
*
|
148
|
+
* In SDL2, this function and SDL_Init() are interchangeable.
|
102
149
|
*
|
103
|
-
*
|
104
|
-
*
|
105
|
-
*
|
106
|
-
*
|
107
|
-
*
|
150
|
+
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
|
151
|
+
* \returns 0 on success or a negative error code on failure; call
|
152
|
+
* SDL_GetError() for more information.
|
153
|
+
*
|
154
|
+
* \since This function is available since SDL 2.0.0.
|
155
|
+
*
|
156
|
+
* \sa SDL_Init
|
157
|
+
* \sa SDL_Quit
|
158
|
+
* \sa SDL_QuitSubSystem
|
108
159
|
*/
|
109
160
|
extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
|
110
161
|
|
111
162
|
/**
|
112
|
-
*
|
163
|
+
* Shut down specific SDL subsystems.
|
164
|
+
*
|
165
|
+
* If you start a subsystem using a call to that subsystem's init function
|
166
|
+
* (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
|
167
|
+
* SDL_QuitSubSystem() and SDL_WasInit() will not work. You will need to use
|
168
|
+
* that subsystem's quit function (SDL_VideoQuit()) directly instead. But
|
169
|
+
* generally, you should not be using those functions directly anyhow; use
|
170
|
+
* SDL_Init() instead.
|
171
|
+
*
|
172
|
+
* You still need to call SDL_Quit() even if you close all open subsystems
|
173
|
+
* with SDL_QuitSubSystem().
|
174
|
+
*
|
175
|
+
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
|
176
|
+
*
|
177
|
+
* \since This function is available since SDL 2.0.0.
|
178
|
+
*
|
179
|
+
* \sa SDL_InitSubSystem
|
180
|
+
* \sa SDL_Quit
|
113
181
|
*/
|
114
182
|
extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
|
115
183
|
|
116
184
|
/**
|
117
|
-
*
|
118
|
-
*
|
185
|
+
* Get a mask of the specified subsystems which are currently initialized.
|
186
|
+
*
|
187
|
+
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
|
188
|
+
* \returns a mask of all initialized subsystems if `flags` is 0, otherwise it
|
189
|
+
* returns the initialization status of the specified subsystems.
|
190
|
+
*
|
191
|
+
* The return value does not include SDL_INIT_NOPARACHUTE.
|
119
192
|
*
|
120
|
-
*
|
193
|
+
* \since This function is available since SDL 2.0.0.
|
194
|
+
*
|
195
|
+
* \sa SDL_Init
|
196
|
+
* \sa SDL_InitSubSystem
|
121
197
|
*/
|
122
198
|
extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
|
123
199
|
|
124
200
|
/**
|
125
|
-
*
|
126
|
-
*
|
201
|
+
* Clean up all initialized subsystems.
|
202
|
+
*
|
203
|
+
* You should call this function even if you have already shutdown each
|
204
|
+
* initialized subsystem with SDL_QuitSubSystem(). It is safe to call this
|
205
|
+
* function even in the case of errors in initialization.
|
206
|
+
*
|
207
|
+
* If you start a subsystem using a call to that subsystem's init function
|
208
|
+
* (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
|
209
|
+
* then you must use that subsystem's quit function (SDL_VideoQuit()) to shut
|
210
|
+
* it down before calling SDL_Quit(). But generally, you should not be using
|
211
|
+
* those functions directly anyhow; use SDL_Init() instead.
|
212
|
+
*
|
213
|
+
* You can use this function with atexit() to ensure that it is run when your
|
214
|
+
* application is shutdown, but it is not wise to do this from a library or
|
215
|
+
* other dynamically loaded code.
|
216
|
+
*
|
217
|
+
* \since This function is available since SDL 2.0.0.
|
218
|
+
*
|
219
|
+
* \sa SDL_Init
|
220
|
+
* \sa SDL_QuitSubSystem
|
127
221
|
*/
|
128
222
|
extern DECLSPEC void SDLCALL SDL_Quit(void);
|
129
223
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
Simple DirectMedia Layer
|
3
|
-
Copyright (C) 1997-
|
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
|
@@ -53,8 +53,10 @@ assert can have unique static variables associated with it.
|
|
53
53
|
#define SDL_TriggerBreakpoint() __debugbreak()
|
54
54
|
#elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
|
55
55
|
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
56
|
-
#elif ( defined(__APPLE__) && defined(__arm64__) ) /* this might work on other ARM targets, but this is a known quantity... */
|
56
|
+
#elif ( defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */
|
57
57
|
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
|
58
|
+
#elif defined(__APPLE__) && defined(__arm__)
|
59
|
+
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "bkpt #22\n\t" )
|
58
60
|
#elif defined(__386__) && defined(__WATCOMC__)
|
59
61
|
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
|
60
62
|
#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
|
@@ -187,92 +189,121 @@ extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
|
|
187
189
|
#define SDL_assert_always(condition) SDL_enabled_assert(condition)
|
188
190
|
|
189
191
|
|
192
|
+
/**
|
193
|
+
* A callback that fires when an SDL assertion fails.
|
194
|
+
*
|
195
|
+
* \param data a pointer to the SDL_AssertData structure corresponding to the
|
196
|
+
* current assertion
|
197
|
+
* \param userdata what was passed as `userdata` to SDL_SetAssertionHandler()
|
198
|
+
* \returns an SDL_AssertState value indicating how to handle the failure.
|
199
|
+
*/
|
190
200
|
typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
|
191
201
|
const SDL_AssertData* data, void* userdata);
|
192
202
|
|
193
203
|
/**
|
194
|
-
*
|
204
|
+
* Set an application-defined assertion handler.
|
195
205
|
*
|
196
|
-
*
|
197
|
-
*
|
198
|
-
*
|
199
|
-
*
|
206
|
+
* This function allows an application to show its own assertion UI and/or
|
207
|
+
* force the response to an assertion failure. If the application doesn't
|
208
|
+
* provide this, SDL will try to do the right thing, popping up a
|
209
|
+
* system-specific GUI dialog, and probably minimizing any fullscreen windows.
|
200
210
|
*
|
201
|
-
*
|
202
|
-
*
|
211
|
+
* This callback may fire from any thread, but it runs wrapped in a mutex, so
|
212
|
+
* it will only fire from one thread at a time.
|
203
213
|
*
|
204
|
-
*
|
214
|
+
* This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
|
205
215
|
*
|
206
|
-
*
|
216
|
+
* \param handler the SDL_AssertionHandler function to call when an assertion
|
217
|
+
* fails or NULL for the default handler
|
218
|
+
* \param userdata a pointer that is passed to `handler`
|
207
219
|
*
|
208
|
-
*
|
220
|
+
* \since This function is available since SDL 2.0.0.
|
209
221
|
*
|
210
|
-
*
|
211
|
-
* \param userdata A pointer passed to the callback as-is.
|
222
|
+
* \sa SDL_GetAssertionHandler
|
212
223
|
*/
|
213
224
|
extern DECLSPEC void SDLCALL SDL_SetAssertionHandler(
|
214
225
|
SDL_AssertionHandler handler,
|
215
226
|
void *userdata);
|
216
227
|
|
217
228
|
/**
|
218
|
-
*
|
229
|
+
* Get the default assertion handler.
|
219
230
|
*
|
220
|
-
*
|
221
|
-
*
|
222
|
-
*
|
223
|
-
*
|
231
|
+
* This returns the function pointer that is called by default when an
|
232
|
+
* assertion is triggered. This is an internal function provided by SDL, that
|
233
|
+
* is used for assertions when SDL_SetAssertionHandler() hasn't been used to
|
234
|
+
* provide a different function.
|
224
235
|
*
|
225
|
-
*
|
236
|
+
* \returns the default SDL_AssertionHandler that is called when an assert
|
237
|
+
* triggers.
|
238
|
+
*
|
239
|
+
* \since This function is available since SDL 2.0.2.
|
240
|
+
*
|
241
|
+
* \sa SDL_GetAssertionHandler
|
226
242
|
*/
|
227
243
|
extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);
|
228
244
|
|
229
245
|
/**
|
230
|
-
*
|
246
|
+
* Get the current assertion handler.
|
247
|
+
*
|
248
|
+
* This returns the function pointer that is called when an assertion is
|
249
|
+
* triggered. This is either the value last passed to
|
250
|
+
* SDL_SetAssertionHandler(), or if no application-specified function is set,
|
251
|
+
* is equivalent to calling SDL_GetDefaultAssertionHandler().
|
231
252
|
*
|
232
|
-
*
|
233
|
-
*
|
234
|
-
*
|
235
|
-
*
|
253
|
+
* The parameter `puserdata` is a pointer to a void*, which will store the
|
254
|
+
* "userdata" pointer that was passed to SDL_SetAssertionHandler(). This value
|
255
|
+
* will always be NULL for the default handler. If you don't care about this
|
256
|
+
* data, it is safe to pass a NULL pointer to this function to ignore it.
|
236
257
|
*
|
237
|
-
*
|
238
|
-
*
|
239
|
-
*
|
240
|
-
*
|
241
|
-
*
|
242
|
-
*
|
258
|
+
* \param puserdata pointer which is filled with the "userdata" pointer that
|
259
|
+
* was passed to SDL_SetAssertionHandler()
|
260
|
+
* \returns the SDL_AssertionHandler that is called when an assert triggers.
|
261
|
+
*
|
262
|
+
* \since This function is available since SDL 2.0.2.
|
263
|
+
*
|
264
|
+
* \sa SDL_SetAssertionHandler
|
243
265
|
*/
|
244
266
|
extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);
|
245
267
|
|
246
268
|
/**
|
247
|
-
*
|
269
|
+
* Get a list of all assertion failures.
|
270
|
+
*
|
271
|
+
* This function gets all assertions triggered since the last call to
|
272
|
+
* SDL_ResetAssertionReport(), or the start of the program.
|
248
273
|
*
|
249
|
-
*
|
250
|
-
* or the start of the program.
|
274
|
+
* The proper way to examine this data looks something like this:
|
251
275
|
*
|
252
|
-
*
|
276
|
+
* ```c
|
277
|
+
* const SDL_AssertData *item = SDL_GetAssertionReport();
|
278
|
+
* while (item) {
|
279
|
+
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
|
280
|
+
* item->condition, item->function, item->filename,
|
281
|
+
* item->linenum, item->trigger_count,
|
282
|
+
* item->always_ignore ? "yes" : "no");
|
283
|
+
* item = item->next;
|
284
|
+
* }
|
285
|
+
* ```
|
253
286
|
*
|
254
|
-
*
|
255
|
-
*
|
256
|
-
* while (item) {
|
257
|
-
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
|
258
|
-
* item->condition, item->function, item->filename,
|
259
|
-
* item->linenum, item->trigger_count,
|
260
|
-
* item->always_ignore ? "yes" : "no");
|
261
|
-
* item = item->next;
|
262
|
-
* }
|
263
|
-
* </code>
|
287
|
+
* \returns a list of all failed assertions or NULL if the list is empty. This
|
288
|
+
* memory should not be modified or freed by the application.
|
264
289
|
*
|
265
|
-
*
|
266
|
-
*
|
290
|
+
* \since This function is available since SDL 2.0.0.
|
291
|
+
*
|
292
|
+
* \sa SDL_ResetAssertionReport
|
267
293
|
*/
|
268
294
|
extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);
|
269
295
|
|
270
296
|
/**
|
271
|
-
*
|
297
|
+
* Clear the list of all assertion failures.
|
298
|
+
*
|
299
|
+
* This function will clear the list of all assertions triggered up to that
|
300
|
+
* point. Immediately following this call, SDL_GetAssertionReport will return
|
301
|
+
* no items. In addition, any previously-triggered assertions will be reset to
|
302
|
+
* a trigger_count of zero, and their always_ignore state will be false.
|
272
303
|
*
|
273
|
-
*
|
304
|
+
* \since This function is available since SDL 2.0.0.
|
274
305
|
*
|
275
|
-
*
|
306
|
+
* \sa SDL_GetAssertionReport
|
276
307
|
*/
|
277
308
|
extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
|
278
309
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
Simple DirectMedia Layer
|
3
|
-
Copyright (C) 1997-
|
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
|
@@ -89,25 +89,51 @@ extern "C" {
|
|
89
89
|
typedef int SDL_SpinLock;
|
90
90
|
|
91
91
|
/**
|
92
|
-
*
|
92
|
+
* Try to lock a spin lock by setting it to a non-zero value.
|
93
93
|
*
|
94
|
-
*
|
94
|
+
* ***Please note that spinlocks are dangerous if you don't know what you're
|
95
|
+
* doing. Please be careful using any sort of spinlock!***
|
95
96
|
*
|
96
|
-
* \
|
97
|
+
* \param lock a pointer to a lock variable
|
98
|
+
* \returns SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already
|
99
|
+
* held.
|
100
|
+
*
|
101
|
+
* \since This function is available since SDL 2.0.0.
|
102
|
+
*
|
103
|
+
* \sa SDL_AtomicLock
|
104
|
+
* \sa SDL_AtomicUnlock
|
97
105
|
*/
|
98
106
|
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTryLock(SDL_SpinLock *lock);
|
99
107
|
|
100
108
|
/**
|
101
|
-
*
|
109
|
+
* Lock a spin lock by setting it to a non-zero value.
|
110
|
+
*
|
111
|
+
* ***Please note that spinlocks are dangerous if you don't know what you're
|
112
|
+
* doing. Please be careful using any sort of spinlock!***
|
113
|
+
*
|
114
|
+
* \param lock a pointer to a lock variable
|
115
|
+
*
|
116
|
+
* \since This function is available since SDL 2.0.0.
|
102
117
|
*
|
103
|
-
* \
|
118
|
+
* \sa SDL_AtomicTryLock
|
119
|
+
* \sa SDL_AtomicUnlock
|
104
120
|
*/
|
105
121
|
extern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock);
|
106
122
|
|
107
123
|
/**
|
108
|
-
*
|
124
|
+
* Unlock a spin lock by setting it to 0.
|
125
|
+
*
|
126
|
+
* Always returns immediately.
|
127
|
+
*
|
128
|
+
* ***Please note that spinlocks are dangerous if you don't know what you're
|
129
|
+
* doing. Please be careful using any sort of spinlock!***
|
130
|
+
*
|
131
|
+
* \param lock a pointer to a lock variable
|
132
|
+
*
|
133
|
+
* \since This function is available since SDL 2.0.0.
|
109
134
|
*
|
110
|
-
* \
|
135
|
+
* \sa SDL_AtomicLock
|
136
|
+
* \sa SDL_AtomicTryLock
|
111
137
|
*/
|
112
138
|
extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
|
113
139
|
|
@@ -126,7 +152,7 @@ void _ReadWriteBarrier(void);
|
|
126
152
|
/* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */
|
127
153
|
#define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory")
|
128
154
|
#elif defined(__WATCOMC__)
|
129
|
-
extern
|
155
|
+
extern __inline void SDL_CompilerBarrier(void);
|
130
156
|
#pragma aux SDL_CompilerBarrier = "" parm [] modify exact [];
|
131
157
|
#else
|
132
158
|
#define SDL_CompilerBarrier() \
|
@@ -137,20 +163,22 @@ extern _inline void SDL_CompilerBarrier (void);
|
|
137
163
|
* Memory barriers are designed to prevent reads and writes from being
|
138
164
|
* reordered by the compiler and being seen out of order on multi-core CPUs.
|
139
165
|
*
|
140
|
-
* A typical pattern would be for thread A to write some data and a flag,
|
141
|
-
*
|
142
|
-
*
|
166
|
+
* A typical pattern would be for thread A to write some data and a flag, and
|
167
|
+
* for thread B to read the flag and get the data. In this case you would
|
168
|
+
* insert a release barrier between writing the data and the flag,
|
143
169
|
* guaranteeing that the data write completes no later than the flag is
|
144
|
-
* written, and you would insert an acquire barrier between reading the
|
145
|
-
*
|
146
|
-
*
|
170
|
+
* written, and you would insert an acquire barrier between reading the flag
|
171
|
+
* and reading the data, to ensure that all the reads associated with the flag
|
172
|
+
* have completed.
|
147
173
|
*
|
148
|
-
* In this pattern you should always see a release barrier paired with
|
149
|
-
*
|
150
|
-
*
|
174
|
+
* In this pattern you should always see a release barrier paired with an
|
175
|
+
* acquire barrier and you should gate the data reads/writes with a single
|
176
|
+
* flag variable.
|
151
177
|
*
|
152
178
|
* For more information on these semantics, take a look at the blog post:
|
153
179
|
* http://preshing.com/20120913/acquire-and-release-semantics
|
180
|
+
*
|
181
|
+
* \since This function is available since SDL 2.0.6.
|
154
182
|
*/
|
155
183
|
extern DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void);
|
156
184
|
extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
|
@@ -216,32 +244,73 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
|
|
216
244
|
typedef struct { int value; } SDL_atomic_t;
|
217
245
|
|
218
246
|
/**
|
219
|
-
*
|
247
|
+
* Set an atomic variable to a new value if it is currently an old value.
|
220
248
|
*
|
221
|
-
*
|
249
|
+
* ***Note: If you don't know what this function is for, you shouldn't use
|
250
|
+
* it!***
|
222
251
|
*
|
223
|
-
* \
|
224
|
-
|
252
|
+
* \param a a pointer to an SDL_atomic_t variable to be modified
|
253
|
+
* \param oldval the old value
|
254
|
+
* \param newval the new value
|
255
|
+
* \returns SDL_TRUE if the atomic variable was set, SDL_FALSE otherwise.
|
256
|
+
*
|
257
|
+
* \since This function is available since SDL 2.0.0.
|
258
|
+
*
|
259
|
+
* \sa SDL_AtomicCASPtr
|
260
|
+
* \sa SDL_AtomicGet
|
261
|
+
* \sa SDL_AtomicSet
|
262
|
+
*/
|
225
263
|
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval);
|
226
264
|
|
227
265
|
/**
|
228
|
-
*
|
266
|
+
* Set an atomic variable to a value.
|
267
|
+
*
|
268
|
+
* This function also acts as a full memory barrier.
|
269
|
+
*
|
270
|
+
* ***Note: If you don't know what this function is for, you shouldn't use
|
271
|
+
* it!***
|
272
|
+
*
|
273
|
+
* \param a a pointer to an SDL_atomic_t variable to be modified
|
274
|
+
* \param v the desired value
|
275
|
+
* \returns the previous value of the atomic variable.
|
276
|
+
*
|
277
|
+
* \since This function is available since SDL 2.0.2.
|
229
278
|
*
|
230
|
-
* \
|
279
|
+
* \sa SDL_AtomicGet
|
231
280
|
*/
|
232
281
|
extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v);
|
233
282
|
|
234
283
|
/**
|
235
|
-
*
|
284
|
+
* Get the value of an atomic variable.
|
285
|
+
*
|
286
|
+
* ***Note: If you don't know what this function is for, you shouldn't use
|
287
|
+
* it!***
|
288
|
+
*
|
289
|
+
* \param a a pointer to an SDL_atomic_t variable
|
290
|
+
* \returns the current value of an atomic variable.
|
291
|
+
*
|
292
|
+
* \since This function is available since SDL 2.0.2.
|
293
|
+
*
|
294
|
+
* \sa SDL_AtomicSet
|
236
295
|
*/
|
237
296
|
extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a);
|
238
297
|
|
239
298
|
/**
|
240
|
-
*
|
299
|
+
* Add to an atomic variable.
|
300
|
+
*
|
301
|
+
* This function also acts as a full memory barrier.
|
241
302
|
*
|
242
|
-
*
|
303
|
+
* ***Note: If you don't know what this function is for, you shouldn't use
|
304
|
+
* it!***
|
243
305
|
*
|
244
|
-
* \
|
306
|
+
* \param a a pointer to an SDL_atomic_t variable to be modified
|
307
|
+
* \param v the desired value to add
|
308
|
+
* \returns the previous value of the atomic variable.
|
309
|
+
*
|
310
|
+
* \since This function is available since SDL 2.0.2.
|
311
|
+
*
|
312
|
+
* \sa SDL_AtomicDecRef
|
313
|
+
* \sa SDL_AtomicIncRef
|
245
314
|
*/
|
246
315
|
extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_atomic_t *a, int v);
|
247
316
|
|
@@ -263,23 +332,54 @@ extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_atomic_t *a, int v);
|
|
263
332
|
#endif
|
264
333
|
|
265
334
|
/**
|
266
|
-
*
|
335
|
+
* Set a pointer to a new value if it is currently an old value.
|
267
336
|
*
|
268
|
-
*
|
337
|
+
* ***Note: If you don't know what this function is for, you shouldn't use
|
338
|
+
* it!***
|
269
339
|
*
|
270
|
-
* \
|
271
|
-
|
340
|
+
* \param a a pointer to a pointer
|
341
|
+
* \param oldval the old pointer value
|
342
|
+
* \param newval the new pointer value
|
343
|
+
* \returns SDL_TRUE if the pointer was set, SDL_FALSE otherwise.
|
344
|
+
*
|
345
|
+
* \since This function is available since SDL 2.0.0.
|
346
|
+
*
|
347
|
+
* \sa SDL_AtomicCAS
|
348
|
+
* \sa SDL_AtomicGetPtr
|
349
|
+
* \sa SDL_AtomicSetPtr
|
350
|
+
*/
|
272
351
|
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void *newval);
|
273
352
|
|
274
353
|
/**
|
275
|
-
*
|
354
|
+
* Set a pointer to a value atomically.
|
355
|
+
*
|
356
|
+
* ***Note: If you don't know what this function is for, you shouldn't use
|
357
|
+
* it!***
|
358
|
+
*
|
359
|
+
* \param a a pointer to a pointer
|
360
|
+
* \param v the desired pointer value
|
361
|
+
* \returns the previous value of the pointer.
|
362
|
+
*
|
363
|
+
* \since This function is available since SDL 2.0.2.
|
276
364
|
*
|
277
|
-
* \
|
365
|
+
* \sa SDL_AtomicCASPtr
|
366
|
+
* \sa SDL_AtomicGetPtr
|
278
367
|
*/
|
279
368
|
extern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v);
|
280
369
|
|
281
370
|
/**
|
282
|
-
*
|
371
|
+
* Get the value of a pointer atomically.
|
372
|
+
*
|
373
|
+
* ***Note: If you don't know what this function is for, you shouldn't use
|
374
|
+
* it!***
|
375
|
+
*
|
376
|
+
* \param a a pointer to a pointer
|
377
|
+
* \returns the current value of a pointer.
|
378
|
+
*
|
379
|
+
* \since This function is available since SDL 2.0.2.
|
380
|
+
*
|
381
|
+
* \sa SDL_AtomicCASPtr
|
382
|
+
* \sa SDL_AtomicSetPtr
|
283
383
|
*/
|
284
384
|
extern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a);
|
285
385
|
|