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
@@ -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
|
@@ -76,7 +76,7 @@
|
|
76
76
|
* }
|
77
77
|
*
|
78
78
|
* // Create the effect
|
79
|
-
*
|
79
|
+
* SDL_memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default
|
80
80
|
* effect.type = SDL_HAPTIC_SINE;
|
81
81
|
* effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates
|
82
82
|
* effect.periodic.direction.dir[0] = 18000; // Force comes from south
|
@@ -820,419 +820,513 @@ typedef union SDL_HapticEffect
|
|
820
820
|
|
821
821
|
|
822
822
|
/* Function prototypes */
|
823
|
+
|
823
824
|
/**
|
824
|
-
*
|
825
|
+
* Count the number of haptic devices attached to the system.
|
826
|
+
*
|
827
|
+
* \returns the number of haptic devices detected on the system or a negative
|
828
|
+
* error code on failure; call SDL_GetError() for more information.
|
825
829
|
*
|
826
|
-
*
|
830
|
+
* \since This function is available since SDL 2.0.0.
|
831
|
+
*
|
832
|
+
* \sa SDL_HapticName
|
827
833
|
*/
|
828
834
|
extern DECLSPEC int SDLCALL SDL_NumHaptics(void);
|
829
835
|
|
830
836
|
/**
|
831
|
-
*
|
837
|
+
* Get the implementation dependent name of a haptic device.
|
838
|
+
*
|
839
|
+
* This can be called before any joysticks are opened. If no name can be
|
840
|
+
* found, this function returns NULL.
|
832
841
|
*
|
833
|
-
*
|
834
|
-
*
|
842
|
+
* \param device_index index of the device to query.
|
843
|
+
* \returns the name of the device or NULL on failure; call SDL_GetError() for
|
844
|
+
* more information.
|
835
845
|
*
|
836
|
-
*
|
837
|
-
* \return Name of the device or NULL on error.
|
846
|
+
* \since This function is available since SDL 2.0.0.
|
838
847
|
*
|
839
|
-
*
|
848
|
+
* \sa SDL_NumHaptics
|
840
849
|
*/
|
841
850
|
extern DECLSPEC const char *SDLCALL SDL_HapticName(int device_index);
|
842
851
|
|
843
852
|
/**
|
844
|
-
*
|
853
|
+
* Open a haptic device for use.
|
845
854
|
*
|
846
|
-
*
|
847
|
-
*
|
855
|
+
* The index passed as an argument refers to the N'th haptic device on this
|
856
|
+
* system.
|
848
857
|
*
|
849
|
-
*
|
850
|
-
*
|
851
|
-
*
|
858
|
+
* When opening a haptic device, its gain will be set to maximum and
|
859
|
+
* autocenter will be disabled. To modify these values use SDL_HapticSetGain()
|
860
|
+
* and SDL_HapticSetAutocenter().
|
852
861
|
*
|
853
|
-
*
|
854
|
-
*
|
862
|
+
* \param device_index index of the device to open
|
863
|
+
* \returns the device identifier or NULL on failure; call SDL_GetError() for
|
864
|
+
* more information.
|
855
865
|
*
|
856
|
-
*
|
857
|
-
*
|
858
|
-
*
|
859
|
-
*
|
860
|
-
*
|
861
|
-
*
|
862
|
-
*
|
863
|
-
*
|
866
|
+
* \since This function is available since SDL 2.0.0.
|
867
|
+
*
|
868
|
+
* \sa SDL_HapticClose
|
869
|
+
* \sa SDL_HapticIndex
|
870
|
+
* \sa SDL_HapticOpenFromJoystick
|
871
|
+
* \sa SDL_HapticOpenFromMouse
|
872
|
+
* \sa SDL_HapticPause
|
873
|
+
* \sa SDL_HapticSetAutocenter
|
874
|
+
* \sa SDL_HapticSetGain
|
875
|
+
* \sa SDL_HapticStopAll
|
864
876
|
*/
|
865
877
|
extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpen(int device_index);
|
866
878
|
|
867
879
|
/**
|
868
|
-
*
|
880
|
+
* Check if the haptic device at the designated index has been opened.
|
869
881
|
*
|
870
|
-
*
|
871
|
-
*
|
882
|
+
* \param device_index the index of the device to query
|
883
|
+
* \returns 1 if it has been opened, 0 if it hasn't or on failure; call
|
884
|
+
* SDL_GetError() for more information.
|
872
885
|
*
|
873
|
-
*
|
874
|
-
*
|
886
|
+
* \since This function is available since SDL 2.0.0.
|
887
|
+
*
|
888
|
+
* \sa SDL_HapticIndex
|
889
|
+
* \sa SDL_HapticOpen
|
875
890
|
*/
|
876
891
|
extern DECLSPEC int SDLCALL SDL_HapticOpened(int device_index);
|
877
892
|
|
878
893
|
/**
|
879
|
-
*
|
894
|
+
* Get the index of a haptic device.
|
880
895
|
*
|
881
|
-
*
|
882
|
-
*
|
896
|
+
* \param haptic the SDL_Haptic device to query
|
897
|
+
* \returns the index of the specified haptic device or a negative error code
|
898
|
+
* on failure; call SDL_GetError() for more information.
|
883
899
|
*
|
884
|
-
*
|
885
|
-
*
|
900
|
+
* \since This function is available since SDL 2.0.0.
|
901
|
+
*
|
902
|
+
* \sa SDL_HapticOpen
|
903
|
+
* \sa SDL_HapticOpened
|
886
904
|
*/
|
887
905
|
extern DECLSPEC int SDLCALL SDL_HapticIndex(SDL_Haptic * haptic);
|
888
906
|
|
889
907
|
/**
|
890
|
-
*
|
908
|
+
* Query whether or not the current mouse has haptic capabilities.
|
891
909
|
*
|
892
|
-
*
|
910
|
+
* \returns SDL_TRUE if the mouse is haptic or SDL_FALSE if it isn't.
|
893
911
|
*
|
894
|
-
*
|
912
|
+
* \since This function is available since SDL 2.0.0.
|
913
|
+
*
|
914
|
+
* \sa SDL_HapticOpenFromMouse
|
895
915
|
*/
|
896
916
|
extern DECLSPEC int SDLCALL SDL_MouseIsHaptic(void);
|
897
917
|
|
898
918
|
/**
|
899
|
-
*
|
919
|
+
* Try to open a haptic device from the current mouse.
|
900
920
|
*
|
901
|
-
*
|
921
|
+
* \returns the haptic device identifier or NULL on failure; call
|
922
|
+
* SDL_GetError() for more information.
|
902
923
|
*
|
903
|
-
*
|
904
|
-
*
|
924
|
+
* \since This function is available since SDL 2.0.0.
|
925
|
+
*
|
926
|
+
* \sa SDL_HapticOpen
|
927
|
+
* \sa SDL_MouseIsHaptic
|
905
928
|
*/
|
906
929
|
extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromMouse(void);
|
907
930
|
|
908
931
|
/**
|
909
|
-
*
|
932
|
+
* Query if a joystick has haptic features.
|
910
933
|
*
|
911
|
-
*
|
912
|
-
*
|
913
|
-
*
|
934
|
+
* \param joystick the SDL_Joystick to test for haptic capabilities
|
935
|
+
* \returns SDL_TRUE if the joystick is haptic, SDL_FALSE if it isn't, or a
|
936
|
+
* negative error code on failure; call SDL_GetError() for more
|
937
|
+
* information.
|
914
938
|
*
|
915
|
-
*
|
939
|
+
* \since This function is available since SDL 2.0.0.
|
940
|
+
*
|
941
|
+
* \sa SDL_HapticOpenFromJoystick
|
916
942
|
*/
|
917
943
|
extern DECLSPEC int SDLCALL SDL_JoystickIsHaptic(SDL_Joystick * joystick);
|
918
944
|
|
919
945
|
/**
|
920
|
-
*
|
946
|
+
* Open a haptic device for use from a joystick device.
|
921
947
|
*
|
922
|
-
*
|
923
|
-
*
|
948
|
+
* You must still close the haptic device separately. It will not be closed
|
949
|
+
* with the joystick.
|
924
950
|
*
|
925
|
-
*
|
926
|
-
*
|
927
|
-
*
|
928
|
-
*
|
951
|
+
* When opened from a joystick you should first close the haptic device before
|
952
|
+
* closing the joystick device. If not, on some implementations the haptic
|
953
|
+
* device will also get unallocated and you'll be unable to use force feedback
|
954
|
+
* on that device.
|
929
955
|
*
|
930
|
-
*
|
931
|
-
*
|
956
|
+
* \param joystick the SDL_Joystick to create a haptic device from
|
957
|
+
* \returns a valid haptic device identifier on success or NULL on failure;
|
958
|
+
* call SDL_GetError() for more information.
|
932
959
|
*
|
933
|
-
*
|
934
|
-
*
|
960
|
+
* \since This function is available since SDL 2.0.0.
|
961
|
+
*
|
962
|
+
* \sa SDL_HapticClose
|
963
|
+
* \sa SDL_HapticOpen
|
964
|
+
* \sa SDL_JoystickIsHaptic
|
935
965
|
*/
|
936
966
|
extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromJoystick(SDL_Joystick *
|
937
967
|
joystick);
|
938
968
|
|
939
969
|
/**
|
940
|
-
*
|
970
|
+
* Close a haptic device previously opened with SDL_HapticOpen().
|
971
|
+
*
|
972
|
+
* \param haptic the SDL_Haptic device to close
|
941
973
|
*
|
942
|
-
*
|
974
|
+
* \since This function is available since SDL 2.0.0.
|
975
|
+
*
|
976
|
+
* \sa SDL_HapticOpen
|
943
977
|
*/
|
944
978
|
extern DECLSPEC void SDLCALL SDL_HapticClose(SDL_Haptic * haptic);
|
945
979
|
|
946
980
|
/**
|
947
|
-
*
|
981
|
+
* Get the number of effects a haptic device can store.
|
982
|
+
*
|
983
|
+
* On some platforms this isn't fully supported, and therefore is an
|
984
|
+
* approximation. Always check to see if your created effect was actually
|
985
|
+
* created and do not rely solely on SDL_HapticNumEffects().
|
948
986
|
*
|
949
|
-
*
|
950
|
-
*
|
951
|
-
*
|
987
|
+
* \param haptic the SDL_Haptic device to query
|
988
|
+
* \returns the number of effects the haptic device can store or a negative
|
989
|
+
* error code on failure; call SDL_GetError() for more information.
|
952
990
|
*
|
953
|
-
*
|
954
|
-
* \return The number of effects the haptic device can store or
|
955
|
-
* -1 on error.
|
991
|
+
* \since This function is available since SDL 2.0.0.
|
956
992
|
*
|
957
|
-
*
|
958
|
-
*
|
993
|
+
* \sa SDL_HapticNumEffectsPlaying
|
994
|
+
* \sa SDL_HapticQuery
|
959
995
|
*/
|
960
996
|
extern DECLSPEC int SDLCALL SDL_HapticNumEffects(SDL_Haptic * haptic);
|
961
997
|
|
962
998
|
/**
|
963
|
-
*
|
964
|
-
* time.
|
999
|
+
* Get the number of effects a haptic device can play at the same time.
|
965
1000
|
*
|
966
|
-
*
|
967
|
-
* Added here for the sake of completeness.
|
1001
|
+
* This is not supported on all platforms, but will always return a value.
|
968
1002
|
*
|
969
|
-
*
|
970
|
-
*
|
971
|
-
* or
|
1003
|
+
* \param haptic the SDL_Haptic device to query maximum playing effects
|
1004
|
+
* \returns the number of effects the haptic device can play at the same time
|
1005
|
+
* or a negative error code on failure; call SDL_GetError() for more
|
1006
|
+
* information.
|
972
1007
|
*
|
973
|
-
*
|
974
|
-
*
|
1008
|
+
* \since This function is available since SDL 2.0.0.
|
1009
|
+
*
|
1010
|
+
* \sa SDL_HapticNumEffects
|
1011
|
+
* \sa SDL_HapticQuery
|
975
1012
|
*/
|
976
1013
|
extern DECLSPEC int SDLCALL SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic);
|
977
1014
|
|
978
1015
|
/**
|
979
|
-
*
|
1016
|
+
* Get the haptic device's supported features in bitwise manner.
|
980
1017
|
*
|
981
|
-
*
|
982
|
-
*
|
983
|
-
*
|
984
|
-
* printf("We have constant haptic effect!\n");
|
985
|
-
* }
|
986
|
-
* \endcode
|
1018
|
+
* \param haptic the SDL_Haptic device to query
|
1019
|
+
* \returns a list of supported haptic features in bitwise manner (OR'd), or 0
|
1020
|
+
* on failure; call SDL_GetError() for more information.
|
987
1021
|
*
|
988
|
-
*
|
989
|
-
* \return Haptic features in bitwise manner (OR'd).
|
1022
|
+
* \since This function is available since SDL 2.0.0.
|
990
1023
|
*
|
991
|
-
*
|
992
|
-
*
|
1024
|
+
* \sa SDL_HapticEffectSupported
|
1025
|
+
* \sa SDL_HapticNumEffects
|
993
1026
|
*/
|
994
1027
|
extern DECLSPEC unsigned int SDLCALL SDL_HapticQuery(SDL_Haptic * haptic);
|
995
1028
|
|
996
1029
|
|
997
1030
|
/**
|
998
|
-
*
|
1031
|
+
* Get the number of haptic axes the device has.
|
999
1032
|
*
|
1000
|
-
*
|
1033
|
+
* The number of haptic axes might be useful if working with the
|
1034
|
+
* SDL_HapticDirection effect.
|
1035
|
+
*
|
1036
|
+
* \param haptic the SDL_Haptic device to query
|
1037
|
+
* \returns the number of axes on success or a negative error code on failure;
|
1038
|
+
* call SDL_GetError() for more information.
|
1039
|
+
*
|
1040
|
+
* \since This function is available since SDL 2.0.0.
|
1001
1041
|
*/
|
1002
1042
|
extern DECLSPEC int SDLCALL SDL_HapticNumAxes(SDL_Haptic * haptic);
|
1003
1043
|
|
1004
1044
|
/**
|
1005
|
-
*
|
1045
|
+
* Check to see if an effect is supported by a haptic device.
|
1046
|
+
*
|
1047
|
+
* \param haptic the SDL_Haptic device to query
|
1048
|
+
* \param effect the desired effect to query
|
1049
|
+
* \returns SDL_TRUE if effect is supported, SDL_FALSE if it isn't, or a
|
1050
|
+
* negative error code on failure; call SDL_GetError() for more
|
1051
|
+
* information.
|
1006
1052
|
*
|
1007
|
-
*
|
1008
|
-
* \param effect Effect to check to see if it is supported.
|
1009
|
-
* \return SDL_TRUE if effect is supported, SDL_FALSE if it isn't or -1 on error.
|
1053
|
+
* \since This function is available since SDL 2.0.0.
|
1010
1054
|
*
|
1011
|
-
*
|
1012
|
-
*
|
1055
|
+
* \sa SDL_HapticNewEffect
|
1056
|
+
* \sa SDL_HapticQuery
|
1013
1057
|
*/
|
1014
1058
|
extern DECLSPEC int SDLCALL SDL_HapticEffectSupported(SDL_Haptic * haptic,
|
1015
1059
|
SDL_HapticEffect *
|
1016
1060
|
effect);
|
1017
1061
|
|
1018
1062
|
/**
|
1019
|
-
*
|
1063
|
+
* Create a new haptic effect on a specified device.
|
1020
1064
|
*
|
1021
|
-
*
|
1022
|
-
*
|
1023
|
-
*
|
1065
|
+
* \param haptic an SDL_Haptic device to create the effect on
|
1066
|
+
* \param effect an SDL_HapticEffect structure containing the properties of
|
1067
|
+
* the effect to create
|
1068
|
+
* \returns the ID of the effect on success or a negative error code on
|
1069
|
+
* failure; call SDL_GetError() for more information.
|
1024
1070
|
*
|
1025
|
-
*
|
1026
|
-
*
|
1027
|
-
*
|
1071
|
+
* \since This function is available since SDL 2.0.0.
|
1072
|
+
*
|
1073
|
+
* \sa SDL_HapticDestroyEffect
|
1074
|
+
* \sa SDL_HapticRunEffect
|
1075
|
+
* \sa SDL_HapticUpdateEffect
|
1028
1076
|
*/
|
1029
1077
|
extern DECLSPEC int SDLCALL SDL_HapticNewEffect(SDL_Haptic * haptic,
|
1030
1078
|
SDL_HapticEffect * effect);
|
1031
1079
|
|
1032
1080
|
/**
|
1033
|
-
*
|
1081
|
+
* Update the properties of an effect.
|
1082
|
+
*
|
1083
|
+
* Can be used dynamically, although behavior when dynamically changing
|
1084
|
+
* direction may be strange. Specifically the effect may re-upload itself and
|
1085
|
+
* start playing from the start. You also cannot change the type either when
|
1086
|
+
* running SDL_HapticUpdateEffect().
|
1034
1087
|
*
|
1035
|
-
*
|
1036
|
-
*
|
1037
|
-
*
|
1038
|
-
*
|
1088
|
+
* \param haptic the SDL_Haptic device that has the effect
|
1089
|
+
* \param effect the identifier of the effect to update
|
1090
|
+
* \param data an SDL_HapticEffect structure containing the new effect
|
1091
|
+
* properties to use
|
1092
|
+
* \returns 0 on success or a negative error code on failure; call
|
1093
|
+
* SDL_GetError() for more information.
|
1039
1094
|
*
|
1040
|
-
*
|
1041
|
-
* \param effect Identifier of the effect to update.
|
1042
|
-
* \param data New effect properties to use.
|
1043
|
-
* \return 0 on success or -1 on error.
|
1095
|
+
* \since This function is available since SDL 2.0.0.
|
1044
1096
|
*
|
1045
|
-
*
|
1046
|
-
*
|
1047
|
-
*
|
1097
|
+
* \sa SDL_HapticDestroyEffect
|
1098
|
+
* \sa SDL_HapticNewEffect
|
1099
|
+
* \sa SDL_HapticRunEffect
|
1048
1100
|
*/
|
1049
1101
|
extern DECLSPEC int SDLCALL SDL_HapticUpdateEffect(SDL_Haptic * haptic,
|
1050
1102
|
int effect,
|
1051
1103
|
SDL_HapticEffect * data);
|
1052
1104
|
|
1053
1105
|
/**
|
1054
|
-
*
|
1106
|
+
* Run the haptic effect on its associated haptic device.
|
1055
1107
|
*
|
1056
|
-
*
|
1057
|
-
*
|
1058
|
-
*
|
1059
|
-
*
|
1108
|
+
* To repeat the effect over and over indefinitely, set `iterations` to
|
1109
|
+
* `SDL_HAPTIC_INFINITY`. (Repeats the envelope - attack and fade.) To make
|
1110
|
+
* one instance of the effect last indefinitely (so the effect does not fade),
|
1111
|
+
* set the effect's `length` in its structure/union to `SDL_HAPTIC_INFINITY`
|
1112
|
+
* instead.
|
1060
1113
|
*
|
1061
|
-
*
|
1062
|
-
*
|
1063
|
-
*
|
1064
|
-
*
|
1065
|
-
*
|
1114
|
+
* \param haptic the SDL_Haptic device to run the effect on
|
1115
|
+
* \param effect the ID of the haptic effect to run
|
1116
|
+
* \param iterations the number of iterations to run the effect; use
|
1117
|
+
* `SDL_HAPTIC_INFINITY` to repeat forever
|
1118
|
+
* \returns 0 on success or a negative error code on failure; call
|
1119
|
+
* SDL_GetError() for more information.
|
1066
1120
|
*
|
1067
|
-
*
|
1068
|
-
*
|
1069
|
-
*
|
1121
|
+
* \since This function is available since SDL 2.0.0.
|
1122
|
+
*
|
1123
|
+
* \sa SDL_HapticDestroyEffect
|
1124
|
+
* \sa SDL_HapticGetEffectStatus
|
1125
|
+
* \sa SDL_HapticStopEffect
|
1070
1126
|
*/
|
1071
1127
|
extern DECLSPEC int SDLCALL SDL_HapticRunEffect(SDL_Haptic * haptic,
|
1072
1128
|
int effect,
|
1073
1129
|
Uint32 iterations);
|
1074
1130
|
|
1075
1131
|
/**
|
1076
|
-
*
|
1132
|
+
* Stop the haptic effect on its associated haptic device.
|
1133
|
+
*
|
1134
|
+
* *
|
1077
1135
|
*
|
1078
|
-
*
|
1079
|
-
*
|
1080
|
-
*
|
1136
|
+
* \param haptic the SDL_Haptic device to stop the effect on
|
1137
|
+
* \param effect the ID of the haptic effect to stop
|
1138
|
+
* \returns 0 on success or a negative error code on failure; call
|
1139
|
+
* SDL_GetError() for more information.
|
1081
1140
|
*
|
1082
|
-
*
|
1083
|
-
*
|
1141
|
+
* \since This function is available since SDL 2.0.0.
|
1142
|
+
*
|
1143
|
+
* \sa SDL_HapticDestroyEffect
|
1144
|
+
* \sa SDL_HapticRunEffect
|
1084
1145
|
*/
|
1085
1146
|
extern DECLSPEC int SDLCALL SDL_HapticStopEffect(SDL_Haptic * haptic,
|
1086
1147
|
int effect);
|
1087
1148
|
|
1088
1149
|
/**
|
1089
|
-
*
|
1150
|
+
* Destroy a haptic effect on the device.
|
1151
|
+
*
|
1152
|
+
* This will stop the effect if it's running. Effects are automatically
|
1153
|
+
* destroyed when the device is closed.
|
1090
1154
|
*
|
1091
|
-
*
|
1092
|
-
*
|
1155
|
+
* \param haptic the SDL_Haptic device to destroy the effect on
|
1156
|
+
* \param effect the ID of the haptic effect to destroy
|
1093
1157
|
*
|
1094
|
-
*
|
1095
|
-
* \param effect Identifier of the effect to destroy.
|
1158
|
+
* \since This function is available since SDL 2.0.0.
|
1096
1159
|
*
|
1097
|
-
*
|
1160
|
+
* \sa SDL_HapticNewEffect
|
1098
1161
|
*/
|
1099
1162
|
extern DECLSPEC void SDLCALL SDL_HapticDestroyEffect(SDL_Haptic * haptic,
|
1100
1163
|
int effect);
|
1101
1164
|
|
1102
1165
|
/**
|
1103
|
-
*
|
1166
|
+
* Get the status of the current effect on the specified haptic device.
|
1104
1167
|
*
|
1105
|
-
*
|
1168
|
+
* Device must support the SDL_HAPTIC_STATUS feature.
|
1106
1169
|
*
|
1107
|
-
*
|
1108
|
-
*
|
1109
|
-
*
|
1170
|
+
* \param haptic the SDL_Haptic device to query for the effect status on
|
1171
|
+
* \param effect the ID of the haptic effect to query its status
|
1172
|
+
* \returns 0 if it isn't playing, 1 if it is playing, or a negative error
|
1173
|
+
* code on failure; call SDL_GetError() for more information.
|
1110
1174
|
*
|
1111
|
-
*
|
1112
|
-
*
|
1175
|
+
* \since This function is available since SDL 2.0.0.
|
1176
|
+
*
|
1177
|
+
* \sa SDL_HapticRunEffect
|
1178
|
+
* \sa SDL_HapticStopEffect
|
1113
1179
|
*/
|
1114
1180
|
extern DECLSPEC int SDLCALL SDL_HapticGetEffectStatus(SDL_Haptic * haptic,
|
1115
1181
|
int effect);
|
1116
1182
|
|
1117
1183
|
/**
|
1118
|
-
*
|
1184
|
+
* Set the global gain of the specified haptic device.
|
1119
1185
|
*
|
1120
|
-
*
|
1186
|
+
* Device must support the SDL_HAPTIC_GAIN feature.
|
1121
1187
|
*
|
1122
|
-
*
|
1123
|
-
*
|
1124
|
-
*
|
1125
|
-
*
|
1188
|
+
* The user may specify the maximum gain by setting the environment variable
|
1189
|
+
* `SDL_HAPTIC_GAIN_MAX` which should be between 0 and 100. All calls to
|
1190
|
+
* SDL_HapticSetGain() will scale linearly using `SDL_HAPTIC_GAIN_MAX` as the
|
1191
|
+
* maximum.
|
1126
1192
|
*
|
1127
|
-
*
|
1128
|
-
*
|
1129
|
-
*
|
1193
|
+
* \param haptic the SDL_Haptic device to set the gain on
|
1194
|
+
* \param gain value to set the gain to, should be between 0 and 100 (0 - 100)
|
1195
|
+
* \returns 0 on success or a negative error code on failure; call
|
1196
|
+
* SDL_GetError() for more information.
|
1130
1197
|
*
|
1131
|
-
*
|
1198
|
+
* \since This function is available since SDL 2.0.0.
|
1199
|
+
*
|
1200
|
+
* \sa SDL_HapticQuery
|
1132
1201
|
*/
|
1133
1202
|
extern DECLSPEC int SDLCALL SDL_HapticSetGain(SDL_Haptic * haptic, int gain);
|
1134
1203
|
|
1135
1204
|
/**
|
1136
|
-
*
|
1205
|
+
* Set the global autocenter of the device.
|
1206
|
+
*
|
1207
|
+
* Autocenter should be between 0 and 100. Setting it to 0 will disable
|
1208
|
+
* autocentering.
|
1137
1209
|
*
|
1138
|
-
*
|
1139
|
-
* autocentering.
|
1210
|
+
* Device must support the SDL_HAPTIC_AUTOCENTER feature.
|
1140
1211
|
*
|
1141
|
-
*
|
1212
|
+
* \param haptic the SDL_Haptic device to set autocentering on
|
1213
|
+
* \param autocenter value to set autocenter to (0-100)
|
1214
|
+
* \returns 0 on success or a negative error code on failure; call
|
1215
|
+
* SDL_GetError() for more information.
|
1142
1216
|
*
|
1143
|
-
*
|
1144
|
-
* \param autocenter Value to set autocenter to, 0 disables autocentering.
|
1145
|
-
* \return 0 on success or -1 on error.
|
1217
|
+
* \since This function is available since SDL 2.0.0.
|
1146
1218
|
*
|
1147
|
-
*
|
1219
|
+
* \sa SDL_HapticQuery
|
1148
1220
|
*/
|
1149
1221
|
extern DECLSPEC int SDLCALL SDL_HapticSetAutocenter(SDL_Haptic * haptic,
|
1150
1222
|
int autocenter);
|
1151
1223
|
|
1152
1224
|
/**
|
1153
|
-
*
|
1225
|
+
* Pause a haptic device.
|
1154
1226
|
*
|
1155
|
-
*
|
1156
|
-
*
|
1227
|
+
* Device must support the `SDL_HAPTIC_PAUSE` feature. Call
|
1228
|
+
* SDL_HapticUnpause() to resume playback.
|
1157
1229
|
*
|
1158
|
-
*
|
1159
|
-
*
|
1230
|
+
* Do not modify the effects nor add new ones while the device is paused. That
|
1231
|
+
* can cause all sorts of weird errors.
|
1160
1232
|
*
|
1161
|
-
*
|
1162
|
-
*
|
1233
|
+
* \param haptic the SDL_Haptic device to pause
|
1234
|
+
* \returns 0 on success or a negative error code on failure; call
|
1235
|
+
* SDL_GetError() for more information.
|
1163
1236
|
*
|
1164
|
-
*
|
1237
|
+
* \since This function is available since SDL 2.0.0.
|
1238
|
+
*
|
1239
|
+
* \sa SDL_HapticUnpause
|
1165
1240
|
*/
|
1166
1241
|
extern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic);
|
1167
1242
|
|
1168
1243
|
/**
|
1169
|
-
*
|
1244
|
+
* Unpause a haptic device.
|
1170
1245
|
*
|
1171
|
-
*
|
1246
|
+
* Call to unpause after SDL_HapticPause().
|
1172
1247
|
*
|
1173
|
-
*
|
1174
|
-
*
|
1248
|
+
* \param haptic the SDL_Haptic device to unpause
|
1249
|
+
* \returns 0 on success or a negative error code on failure; call
|
1250
|
+
* SDL_GetError() for more information.
|
1175
1251
|
*
|
1176
|
-
*
|
1252
|
+
* \since This function is available since SDL 2.0.0.
|
1253
|
+
*
|
1254
|
+
* \sa SDL_HapticPause
|
1177
1255
|
*/
|
1178
1256
|
extern DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic * haptic);
|
1179
1257
|
|
1180
1258
|
/**
|
1181
|
-
*
|
1259
|
+
* Stop all the currently playing effects on a haptic device.
|
1260
|
+
*
|
1261
|
+
* \param haptic the SDL_Haptic device to stop
|
1262
|
+
* \returns 0 on success or a negative error code on failure; call
|
1263
|
+
* SDL_GetError() for more information.
|
1182
1264
|
*
|
1183
|
-
*
|
1184
|
-
* \return 0 on success or -1 on error.
|
1265
|
+
* \since This function is available since SDL 2.0.0.
|
1185
1266
|
*/
|
1186
1267
|
extern DECLSPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic * haptic);
|
1187
1268
|
|
1188
1269
|
/**
|
1189
|
-
*
|
1270
|
+
* Check whether rumble is supported on a haptic device.
|
1190
1271
|
*
|
1191
|
-
*
|
1192
|
-
*
|
1272
|
+
* \param haptic haptic device to check for rumble support
|
1273
|
+
* \returns SDL_TRUE if effect is supported, SDL_FALSE if it isn't, or a
|
1274
|
+
* negative error code on failure; call SDL_GetError() for more
|
1275
|
+
* information.
|
1193
1276
|
*
|
1194
|
-
*
|
1195
|
-
*
|
1196
|
-
*
|
1277
|
+
* \since This function is available since SDL 2.0.0.
|
1278
|
+
*
|
1279
|
+
* \sa SDL_HapticRumbleInit
|
1280
|
+
* \sa SDL_HapticRumblePlay
|
1281
|
+
* \sa SDL_HapticRumbleStop
|
1197
1282
|
*/
|
1198
1283
|
extern DECLSPEC int SDLCALL SDL_HapticRumbleSupported(SDL_Haptic * haptic);
|
1199
1284
|
|
1200
1285
|
/**
|
1201
|
-
*
|
1286
|
+
* Initialize a haptic device for simple rumble playback.
|
1202
1287
|
*
|
1203
|
-
*
|
1204
|
-
*
|
1288
|
+
* \param haptic the haptic device to initialize for simple rumble playback
|
1289
|
+
* \returns 0 on success or a negative error code on failure; call
|
1290
|
+
* SDL_GetError() for more information.
|
1205
1291
|
*
|
1206
|
-
*
|
1207
|
-
*
|
1208
|
-
*
|
1209
|
-
*
|
1292
|
+
* \since This function is available since SDL 2.0.0.
|
1293
|
+
*
|
1294
|
+
* \sa SDL_HapticOpen
|
1295
|
+
* \sa SDL_HapticRumblePlay
|
1296
|
+
* \sa SDL_HapticRumbleStop
|
1297
|
+
* \sa SDL_HapticRumbleSupported
|
1210
1298
|
*/
|
1211
1299
|
extern DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic * haptic);
|
1212
1300
|
|
1213
1301
|
/**
|
1214
|
-
*
|
1302
|
+
* Run a simple rumble effect on a haptic device.
|
1303
|
+
*
|
1304
|
+
* \param haptic the haptic device to play the rumble effect on
|
1305
|
+
* \param strength strength of the rumble to play as a 0-1 float value
|
1306
|
+
* \param length length of the rumble to play in milliseconds
|
1307
|
+
* \returns 0 on success or a negative error code on failure; call
|
1308
|
+
* SDL_GetError() for more information.
|
1215
1309
|
*
|
1216
|
-
*
|
1217
|
-
* \param strength Strength of the rumble to play as a 0-1 float value.
|
1218
|
-
* \param length Length of the rumble to play in milliseconds.
|
1219
|
-
* \return 0 on success or -1 on error.
|
1310
|
+
* \since This function is available since SDL 2.0.0.
|
1220
1311
|
*
|
1221
|
-
*
|
1222
|
-
*
|
1223
|
-
*
|
1312
|
+
* \sa SDL_HapticRumbleInit
|
1313
|
+
* \sa SDL_HapticRumbleStop
|
1314
|
+
* \sa SDL_HapticRumbleSupported
|
1224
1315
|
*/
|
1225
1316
|
extern DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length );
|
1226
1317
|
|
1227
1318
|
/**
|
1228
|
-
*
|
1319
|
+
* Stop the simple rumble on a haptic device.
|
1320
|
+
*
|
1321
|
+
* \param haptic the haptic device to stop the rumble effect on
|
1322
|
+
* \returns 0 on success or a negative error code on failure; call
|
1323
|
+
* SDL_GetError() for more information.
|
1229
1324
|
*
|
1230
|
-
*
|
1231
|
-
* \return 0 on success or -1 on error.
|
1325
|
+
* \since This function is available since SDL 2.0.0.
|
1232
1326
|
*
|
1233
|
-
*
|
1234
|
-
*
|
1235
|
-
*
|
1327
|
+
* \sa SDL_HapticRumbleInit
|
1328
|
+
* \sa SDL_HapticRumblePlay
|
1329
|
+
* \sa SDL_HapticRumbleSupported
|
1236
1330
|
*/
|
1237
1331
|
extern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic);
|
1238
1332
|
|