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
|
@@ -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
|
@@ -130,126 +130,160 @@ typedef enum
|
|
130
130
|
* If you are using the sensor API or handling events from multiple threads
|
131
131
|
* you should use these locking functions to protect access to the sensors.
|
132
132
|
*
|
133
|
-
* In particular, you are guaranteed that the sensor list won't change, so
|
134
|
-
*
|
135
|
-
*
|
133
|
+
* In particular, you are guaranteed that the sensor list won't change, so the
|
134
|
+
* API functions that take a sensor index will be valid, and sensor events
|
135
|
+
* will not be delivered.
|
136
|
+
*
|
137
|
+
* \since This function is available since SDL 2.0.14.
|
136
138
|
*/
|
137
139
|
extern DECLSPEC void SDLCALL SDL_LockSensors(void);
|
138
140
|
extern DECLSPEC void SDLCALL SDL_UnlockSensors(void);
|
139
141
|
|
140
142
|
/**
|
141
|
-
*
|
143
|
+
* Count the number of sensors attached to the system right now.
|
144
|
+
*
|
145
|
+
* \returns the number of sensors detected.
|
146
|
+
*
|
147
|
+
* \since This function is available since SDL 2.0.9.
|
142
148
|
*/
|
143
149
|
extern DECLSPEC int SDLCALL SDL_NumSensors(void);
|
144
150
|
|
145
151
|
/**
|
146
|
-
*
|
152
|
+
* Get the implementation dependent name of a sensor.
|
147
153
|
*
|
148
|
-
*
|
149
|
-
*
|
150
|
-
*
|
154
|
+
* \param device_index The sensor to obtain name from
|
155
|
+
* \returns the sensor name, or NULL if `device_index` is out of range.
|
156
|
+
*
|
157
|
+
* \since This function is available since SDL 2.0.9.
|
151
158
|
*/
|
152
159
|
extern DECLSPEC const char *SDLCALL SDL_SensorGetDeviceName(int device_index);
|
153
160
|
|
154
161
|
/**
|
155
|
-
*
|
162
|
+
* Get the type of a sensor.
|
156
163
|
*
|
157
|
-
*
|
164
|
+
* \param device_index The sensor to get the type from
|
165
|
+
* \returns the SDL_SensorType, or `SDL_SENSOR_INVALID` if `device_index` is
|
166
|
+
* out of range.
|
158
167
|
*
|
159
|
-
*
|
168
|
+
* \since This function is available since SDL 2.0.9.
|
160
169
|
*/
|
161
170
|
extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetDeviceType(int device_index);
|
162
171
|
|
163
172
|
/**
|
164
|
-
*
|
173
|
+
* Get the platform dependent type of a sensor.
|
165
174
|
*
|
166
|
-
*
|
175
|
+
* \param device_index The sensor to check
|
176
|
+
* \returns the sensor platform dependent type, or -1 if `device_index` is out
|
177
|
+
* of range.
|
167
178
|
*
|
168
|
-
*
|
179
|
+
* \since This function is available since SDL 2.0.9.
|
169
180
|
*/
|
170
181
|
extern DECLSPEC int SDLCALL SDL_SensorGetDeviceNonPortableType(int device_index);
|
171
182
|
|
172
183
|
/**
|
173
|
-
*
|
184
|
+
* Get the instance ID of a sensor.
|
174
185
|
*
|
175
|
-
*
|
186
|
+
* \param device_index The sensor to get instance id from
|
187
|
+
* \returns the sensor instance ID, or -1 if `device_index` is out of range.
|
176
188
|
*
|
177
|
-
*
|
189
|
+
* \since This function is available since SDL 2.0.9.
|
178
190
|
*/
|
179
191
|
extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetDeviceInstanceID(int device_index);
|
180
192
|
|
181
193
|
/**
|
182
|
-
*
|
194
|
+
* Open a sensor for use.
|
183
195
|
*
|
184
|
-
*
|
196
|
+
* \param device_index The sensor to open
|
197
|
+
* \returns an SDL_Sensor sensor object, or NULL if an error occurred.
|
185
198
|
*
|
186
|
-
*
|
199
|
+
* \since This function is available since SDL 2.0.9.
|
187
200
|
*/
|
188
201
|
extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorOpen(int device_index);
|
189
202
|
|
190
203
|
/**
|
191
204
|
* Return the SDL_Sensor associated with an instance id.
|
205
|
+
*
|
206
|
+
* \param instance_id The sensor from instance id
|
207
|
+
* \returns an SDL_Sensor object.
|
208
|
+
*
|
209
|
+
* \since This function is available since SDL 2.0.9.
|
192
210
|
*/
|
193
211
|
extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorFromInstanceID(SDL_SensorID instance_id);
|
194
212
|
|
195
213
|
/**
|
196
|
-
*
|
214
|
+
* Get the implementation dependent name of a sensor
|
215
|
+
*
|
216
|
+
* \param sensor The SDL_Sensor object
|
217
|
+
* \returns the sensor name, or NULL if `sensor` is NULL.
|
197
218
|
*
|
198
|
-
*
|
219
|
+
* \since This function is available since SDL 2.0.9.
|
199
220
|
*/
|
200
221
|
extern DECLSPEC const char *SDLCALL SDL_SensorGetName(SDL_Sensor *sensor);
|
201
222
|
|
202
223
|
/**
|
203
|
-
*
|
224
|
+
* Get the type of a sensor.
|
204
225
|
*
|
205
|
-
*
|
226
|
+
* \param sensor The SDL_Sensor object to inspect
|
227
|
+
* \returns the SDL_SensorType type, or `SDL_SENSOR_INVALID` if `sensor` is
|
228
|
+
* NULL.
|
206
229
|
*
|
207
|
-
*
|
230
|
+
* \since This function is available since SDL 2.0.9.
|
208
231
|
*/
|
209
232
|
extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetType(SDL_Sensor *sensor);
|
210
233
|
|
211
234
|
/**
|
212
|
-
*
|
235
|
+
* Get the platform dependent type of a sensor.
|
213
236
|
*
|
214
|
-
*
|
237
|
+
* \param sensor The SDL_Sensor object to inspect
|
238
|
+
* \returns the sensor platform dependent type, or -1 if `sensor` is NULL.
|
215
239
|
*
|
216
|
-
*
|
240
|
+
* \since This function is available since SDL 2.0.9.
|
217
241
|
*/
|
218
242
|
extern DECLSPEC int SDLCALL SDL_SensorGetNonPortableType(SDL_Sensor *sensor);
|
219
243
|
|
220
244
|
/**
|
221
|
-
*
|
245
|
+
* Get the instance ID of a sensor.
|
222
246
|
*
|
223
|
-
*
|
247
|
+
* \param sensor The SDL_Sensor object to inspect
|
248
|
+
* \returns the sensor instance ID, or -1 if `sensor` is NULL.
|
224
249
|
*
|
225
|
-
*
|
250
|
+
* \since This function is available since SDL 2.0.9.
|
226
251
|
*/
|
227
252
|
extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetInstanceID(SDL_Sensor *sensor);
|
228
253
|
|
229
254
|
/**
|
230
|
-
*
|
255
|
+
* Get the current state of an opened sensor.
|
231
256
|
*
|
232
|
-
*
|
257
|
+
* The number of values and interpretation of the data is sensor dependent.
|
233
258
|
*
|
234
|
-
*
|
235
|
-
*
|
236
|
-
*
|
259
|
+
* \param sensor The SDL_Sensor object to query
|
260
|
+
* \param data A pointer filled with the current sensor state
|
261
|
+
* \param num_values The number of values to write to data
|
262
|
+
* \returns 0 or -1 if an error occurred.
|
237
263
|
*
|
238
|
-
*
|
264
|
+
* \since This function is available since SDL 2.0.9.
|
239
265
|
*/
|
240
266
|
extern DECLSPEC int SDLCALL SDL_SensorGetData(SDL_Sensor * sensor, float *data, int num_values);
|
241
267
|
|
242
268
|
/**
|
243
|
-
*
|
269
|
+
* Close a sensor previously opened with SDL_SensorOpen().
|
270
|
+
*
|
271
|
+
* \param sensor The SDL_Sensor object to close
|
272
|
+
*
|
273
|
+
* \since This function is available since SDL 2.0.9.
|
244
274
|
*/
|
245
275
|
extern DECLSPEC void SDLCALL SDL_SensorClose(SDL_Sensor * sensor);
|
246
276
|
|
247
277
|
/**
|
248
|
-
*
|
278
|
+
* Update the current state of the open sensors.
|
279
|
+
*
|
280
|
+
* This is called automatically by the event loop if sensor events are
|
281
|
+
* enabled.
|
249
282
|
*
|
250
|
-
*
|
283
|
+
* This needs to be called from the thread that initialized the sensor
|
284
|
+
* subsystem.
|
251
285
|
*
|
252
|
-
*
|
286
|
+
* \since This function is available since SDL 2.0.9.
|
253
287
|
*/
|
254
288
|
extern DECLSPEC void SDLCALL SDL_SensorUpdate(void);
|
255
289
|
|
@@ -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
|
@@ -44,33 +44,38 @@ extern "C" {
|
|
44
44
|
#define SDL_WINDOW_LACKS_SHAPE -3
|
45
45
|
|
46
46
|
/**
|
47
|
-
*
|
47
|
+
* Create a window that can be shaped with the specified position, dimensions,
|
48
|
+
* and flags.
|
48
49
|
*
|
49
|
-
*
|
50
|
-
*
|
51
|
-
*
|
52
|
-
*
|
53
|
-
*
|
54
|
-
*
|
55
|
-
*
|
56
|
-
*
|
57
|
-
*
|
58
|
-
*
|
59
|
-
*
|
60
|
-
*
|
50
|
+
* \param title The title of the window, in UTF-8 encoding.
|
51
|
+
* \param x The x position of the window, ::SDL_WINDOWPOS_CENTERED, or
|
52
|
+
* ::SDL_WINDOWPOS_UNDEFINED.
|
53
|
+
* \param y The y position of the window, ::SDL_WINDOWPOS_CENTERED, or
|
54
|
+
* ::SDL_WINDOWPOS_UNDEFINED.
|
55
|
+
* \param w The width of the window.
|
56
|
+
* \param h The height of the window.
|
57
|
+
* \param flags The flags for the window, a mask of SDL_WINDOW_BORDERLESS with
|
58
|
+
* any of the following: ::SDL_WINDOW_OPENGL,
|
59
|
+
* ::SDL_WINDOW_INPUT_GRABBED, ::SDL_WINDOW_HIDDEN,
|
60
|
+
* ::SDL_WINDOW_RESIZABLE, ::SDL_WINDOW_MAXIMIZED,
|
61
|
+
* ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_BORDERLESS is always set,
|
62
|
+
* and ::SDL_WINDOW_FULLSCREEN is always unset.
|
63
|
+
* \return the window created, or NULL if window creation failed.
|
61
64
|
*
|
62
|
-
*
|
65
|
+
* \since This function is available since SDL 2.0.0.
|
63
66
|
*
|
64
|
-
*
|
67
|
+
* \sa SDL_DestroyWindow
|
65
68
|
*/
|
66
69
|
extern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags);
|
67
70
|
|
68
71
|
/**
|
69
|
-
*
|
72
|
+
* Return whether the given window is a shaped window.
|
70
73
|
*
|
71
74
|
* \param window The window to query for being shaped.
|
75
|
+
* \return SDL_TRUE if the window is a window that can be shaped, SDL_FALSE if
|
76
|
+
* the window is unshaped or NULL.
|
72
77
|
*
|
73
|
-
* \
|
78
|
+
* \since This function is available since SDL 2.0.0.
|
74
79
|
*
|
75
80
|
* \sa SDL_CreateShapedWindow
|
76
81
|
*/
|
@@ -106,29 +111,35 @@ typedef struct SDL_WindowShapeMode {
|
|
106
111
|
} SDL_WindowShapeMode;
|
107
112
|
|
108
113
|
/**
|
109
|
-
*
|
114
|
+
* Set the shape and parameters of a shaped window.
|
110
115
|
*
|
111
116
|
* \param window The shaped window whose parameters should be set.
|
112
117
|
* \param shape A surface encoding the desired shape for the window.
|
113
118
|
* \param shape_mode The parameters to set for the shaped window.
|
119
|
+
* \return 0 on success, SDL_INVALID_SHAPE_ARGUMENT on an invalid shape
|
120
|
+
* argument, or SDL_NONSHAPEABLE_WINDOW if the SDL_Window given does
|
121
|
+
* not reference a valid shaped window.
|
114
122
|
*
|
115
|
-
* \
|
116
|
-
* if the SDL_Window given does not reference a valid shaped window.
|
123
|
+
* \since This function is available since SDL 2.0.0.
|
117
124
|
*
|
118
125
|
* \sa SDL_WindowShapeMode
|
119
|
-
* \sa SDL_GetShapedWindowMode
|
126
|
+
* \sa SDL_GetShapedWindowMode
|
120
127
|
*/
|
121
128
|
extern DECLSPEC int SDLCALL SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode);
|
122
129
|
|
123
130
|
/**
|
124
|
-
*
|
131
|
+
* Get the shape parameters of a shaped window.
|
125
132
|
*
|
126
133
|
* \param window The shaped window whose parameters should be retrieved.
|
127
|
-
* \param shape_mode An empty shape-mode structure to fill, or NULL to check
|
134
|
+
* \param shape_mode An empty shape-mode structure to fill, or NULL to check
|
135
|
+
* whether the window has a shape.
|
136
|
+
* \return 0 if the window has a shape and, provided shape_mode was not NULL,
|
137
|
+
* shape_mode has been filled with the mode data,
|
138
|
+
* SDL_NONSHAPEABLE_WINDOW if the SDL_Window given is not a shaped
|
139
|
+
* window, or SDL_WINDOW_LACKS_SHAPE if the SDL_Window given is a
|
140
|
+
* shapeable window currently lacking a shape.
|
128
141
|
*
|
129
|
-
* \
|
130
|
-
* data, SDL_NONSHAPEABLE_WINDOW if the SDL_Window given is not a shaped window, or SDL_WINDOW_LACKS_SHAPE if
|
131
|
-
* the SDL_Window given is a shapeable window currently lacking a shape.
|
142
|
+
* \since This function is available since SDL 2.0.0.
|
132
143
|
*
|
133
144
|
* \sa SDL_WindowShapeMode
|
134
145
|
* \sa SDL_SetWindowShape
|
@@ -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
|
@@ -115,6 +115,17 @@ char *alloca();
|
|
115
115
|
# endif
|
116
116
|
#endif
|
117
117
|
|
118
|
+
/**
|
119
|
+
* Check if the compiler supports a given builtin.
|
120
|
+
* Supported by virtually all clang versions and recent gcc. Use this
|
121
|
+
* instead of checking the clang version if possible.
|
122
|
+
*/
|
123
|
+
#ifdef __has_builtin
|
124
|
+
#define _SDL_HAS_BUILTIN(x) __has_builtin(x)
|
125
|
+
#else
|
126
|
+
#define _SDL_HAS_BUILTIN(x) 0
|
127
|
+
#endif
|
128
|
+
|
118
129
|
/**
|
119
130
|
* The number of elements in an array.
|
120
131
|
*/
|
@@ -223,7 +234,7 @@ typedef uint64_t Uint64;
|
|
223
234
|
|
224
235
|
/* @} *//* Basic data types */
|
225
236
|
|
226
|
-
/* Make sure we have macros for printing
|
237
|
+
/* Make sure we have macros for printing width-based integers.
|
227
238
|
* <stdint.h> should define these but this is not true all platforms.
|
228
239
|
* (for example win32) */
|
229
240
|
#ifndef SDL_PRIs64
|
@@ -270,6 +281,34 @@ typedef uint64_t Uint64;
|
|
270
281
|
#define SDL_PRIX64 "llX"
|
271
282
|
#endif
|
272
283
|
#endif
|
284
|
+
#ifndef SDL_PRIs32
|
285
|
+
#ifdef PRId32
|
286
|
+
#define SDL_PRIs32 PRId32
|
287
|
+
#else
|
288
|
+
#define SDL_PRIs32 "d"
|
289
|
+
#endif
|
290
|
+
#endif
|
291
|
+
#ifndef SDL_PRIu32
|
292
|
+
#ifdef PRIu32
|
293
|
+
#define SDL_PRIu32 PRIu32
|
294
|
+
#else
|
295
|
+
#define SDL_PRIu32 "u"
|
296
|
+
#endif
|
297
|
+
#endif
|
298
|
+
#ifndef SDL_PRIx32
|
299
|
+
#ifdef PRIx32
|
300
|
+
#define SDL_PRIx32 PRIx32
|
301
|
+
#else
|
302
|
+
#define SDL_PRIx32 "x"
|
303
|
+
#endif
|
304
|
+
#endif
|
305
|
+
#ifndef SDL_PRIX32
|
306
|
+
#ifdef PRIX32
|
307
|
+
#define SDL_PRIX32 PRIX32
|
308
|
+
#else
|
309
|
+
#define SDL_PRIX32 "X"
|
310
|
+
#endif
|
311
|
+
#endif
|
273
312
|
|
274
313
|
/* Annotations to help code analysis tools */
|
275
314
|
#ifdef SDL_DISABLE_ANALYZE_MACROS
|
@@ -338,7 +377,7 @@ SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
|
|
338
377
|
|
339
378
|
/** \cond */
|
340
379
|
#ifndef DOXYGEN_SHOULD_IGNORE_THIS
|
341
|
-
#if !defined(__ANDROID__)
|
380
|
+
#if !defined(__ANDROID__) && !defined(__VITA__)
|
342
381
|
/* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */
|
343
382
|
typedef enum
|
344
383
|
{
|
@@ -375,7 +414,9 @@ typedef void *(SDLCALL *SDL_realloc_func)(void *mem, size_t size);
|
|
375
414
|
typedef void (SDLCALL *SDL_free_func)(void *mem);
|
376
415
|
|
377
416
|
/**
|
378
|
-
*
|
417
|
+
* Get the current set of SDL memory functions
|
418
|
+
*
|
419
|
+
* \since This function is available since SDL 2.0.7.
|
379
420
|
*/
|
380
421
|
extern DECLSPEC void SDLCALL SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func,
|
381
422
|
SDL_calloc_func *calloc_func,
|
@@ -383,12 +424,9 @@ extern DECLSPEC void SDLCALL SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func
|
|
383
424
|
SDL_free_func *free_func);
|
384
425
|
|
385
426
|
/**
|
386
|
-
*
|
427
|
+
* Replace SDL's memory allocation functions with a custom set
|
387
428
|
*
|
388
|
-
*
|
389
|
-
* SDL_GetNumAllocations() and be very careful if it returns non-zero.
|
390
|
-
* That means that your free function will be called with memory
|
391
|
-
* allocated by the previous memory allocation functions.
|
429
|
+
* \since This function is available since SDL 2.0.7.
|
392
430
|
*/
|
393
431
|
extern DECLSPEC int SDLCALL SDL_SetMemoryFunctions(SDL_malloc_func malloc_func,
|
394
432
|
SDL_calloc_func calloc_func,
|
@@ -396,7 +434,9 @@ extern DECLSPEC int SDLCALL SDL_SetMemoryFunctions(SDL_malloc_func malloc_func,
|
|
396
434
|
SDL_free_func free_func);
|
397
435
|
|
398
436
|
/**
|
399
|
-
*
|
437
|
+
* Get the number of outstanding (unfreed) allocations
|
438
|
+
*
|
439
|
+
* \since This function is available since SDL 2.0.7.
|
400
440
|
*/
|
401
441
|
extern DECLSPEC int SDLCALL SDL_GetNumAllocations(void);
|
402
442
|
|
@@ -407,15 +447,23 @@ extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size, in
|
|
407
447
|
|
408
448
|
extern DECLSPEC int SDLCALL SDL_abs(int x);
|
409
449
|
|
410
|
-
/*
|
411
|
-
/* !!! FIXME: Maybe we do forceinline functions of SDL_mini, SDL_minf, etc? */
|
450
|
+
/* NOTE: these double-evaluate their arguments, so you should never have side effects in the parameters */
|
412
451
|
#define SDL_min(x, y) (((x) < (y)) ? (x) : (y))
|
413
452
|
#define SDL_max(x, y) (((x) > (y)) ? (x) : (y))
|
453
|
+
#define SDL_clamp(x, a, b) (((x) < (a)) ? (a) : (((x) > (b)) ? (b) : (x)))
|
414
454
|
|
455
|
+
extern DECLSPEC int SDLCALL SDL_isalpha(int x);
|
456
|
+
extern DECLSPEC int SDLCALL SDL_isalnum(int x);
|
457
|
+
extern DECLSPEC int SDLCALL SDL_isblank(int x);
|
458
|
+
extern DECLSPEC int SDLCALL SDL_iscntrl(int x);
|
415
459
|
extern DECLSPEC int SDLCALL SDL_isdigit(int x);
|
460
|
+
extern DECLSPEC int SDLCALL SDL_isxdigit(int x);
|
461
|
+
extern DECLSPEC int SDLCALL SDL_ispunct(int x);
|
416
462
|
extern DECLSPEC int SDLCALL SDL_isspace(int x);
|
417
463
|
extern DECLSPEC int SDLCALL SDL_isupper(int x);
|
418
464
|
extern DECLSPEC int SDLCALL SDL_islower(int x);
|
465
|
+
extern DECLSPEC int SDLCALL SDL_isprint(int x);
|
466
|
+
extern DECLSPEC int SDLCALL SDL_isgraph(int x);
|
419
467
|
extern DECLSPEC int SDLCALL SDL_toupper(int x);
|
420
468
|
extern DECLSPEC int SDLCALL SDL_tolower(int x);
|
421
469
|
|
@@ -432,7 +480,7 @@ SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
|
|
432
480
|
{
|
433
481
|
#ifdef __APPLE__
|
434
482
|
memset_pattern4(dst, &val, dwords * 4);
|
435
|
-
#elif defined(__GNUC__) && defined(
|
483
|
+
#elif defined(__GNUC__) && defined(__i386__)
|
436
484
|
int u0, u1, u2;
|
437
485
|
__asm__ __volatile__ (
|
438
486
|
"cld \n\t"
|
@@ -445,14 +493,14 @@ SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
|
|
445
493
|
size_t _n = (dwords + 3) / 4;
|
446
494
|
Uint32 *_p = SDL_static_cast(Uint32 *, dst);
|
447
495
|
Uint32 _val = (val);
|
448
|
-
if (dwords == 0)
|
496
|
+
if (dwords == 0) {
|
449
497
|
return;
|
450
|
-
|
451
|
-
{
|
452
|
-
case 0: do { *_p++ = _val;
|
453
|
-
case 3: *_p++ = _val;
|
454
|
-
case 2: *_p++ = _val;
|
455
|
-
case 1: *_p++ = _val;
|
498
|
+
}
|
499
|
+
switch (dwords % 4) {
|
500
|
+
case 0: do { *_p++ = _val; SDL_FALLTHROUGH;
|
501
|
+
case 3: *_p++ = _val; SDL_FALLTHROUGH;
|
502
|
+
case 2: *_p++ = _val; SDL_FALLTHROUGH;
|
503
|
+
case 1: *_p++ = _val;
|
456
504
|
} while ( --_n );
|
457
505
|
}
|
458
506
|
#endif
|
@@ -512,6 +560,8 @@ extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, SDL_SCANF_FORMAT_STRING
|
|
512
560
|
extern DECLSPEC int SDLCALL SDL_vsscanf(const char *text, const char *fmt, va_list ap);
|
513
561
|
extern DECLSPEC int SDLCALL SDL_snprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, ... ) SDL_PRINTF_VARARG_FUNC(3);
|
514
562
|
extern DECLSPEC int SDLCALL SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, va_list ap);
|
563
|
+
extern DECLSPEC int SDLCALL SDL_asprintf(char **strp, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
564
|
+
extern DECLSPEC int SDLCALL SDL_vasprintf(char **strp, const char *fmt, va_list ap);
|
515
565
|
|
516
566
|
#ifndef HAVE_M_PI
|
517
567
|
#ifndef M_PI
|
@@ -519,14 +569,28 @@ extern DECLSPEC int SDLCALL SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size
|
|
519
569
|
#endif
|
520
570
|
#endif
|
521
571
|
|
572
|
+
/**
|
573
|
+
* Use this function to compute arc cosine of `x`.
|
574
|
+
*
|
575
|
+
* The definition of `y = acos(x)` is `x = cos(y)`.
|
576
|
+
*
|
577
|
+
* Domain: `-1 <= x <= 1`
|
578
|
+
*
|
579
|
+
* Range: `0 <= y <= Pi`
|
580
|
+
*
|
581
|
+
* \param x floating point value, in radians.
|
582
|
+
* \returns arc cosine of `x`.
|
583
|
+
*
|
584
|
+
* \since This function is available since SDL 2.0.2.
|
585
|
+
*/
|
522
586
|
extern DECLSPEC double SDLCALL SDL_acos(double x);
|
523
587
|
extern DECLSPEC float SDLCALL SDL_acosf(float x);
|
524
588
|
extern DECLSPEC double SDLCALL SDL_asin(double x);
|
525
589
|
extern DECLSPEC float SDLCALL SDL_asinf(float x);
|
526
590
|
extern DECLSPEC double SDLCALL SDL_atan(double x);
|
527
591
|
extern DECLSPEC float SDLCALL SDL_atanf(float x);
|
528
|
-
extern DECLSPEC double SDLCALL SDL_atan2(double
|
529
|
-
extern DECLSPEC float SDLCALL SDL_atan2f(float
|
592
|
+
extern DECLSPEC double SDLCALL SDL_atan2(double y, double x);
|
593
|
+
extern DECLSPEC float SDLCALL SDL_atan2f(float y, float x);
|
530
594
|
extern DECLSPEC double SDLCALL SDL_ceil(double x);
|
531
595
|
extern DECLSPEC float SDLCALL SDL_ceilf(float x);
|
532
596
|
extern DECLSPEC double SDLCALL SDL_copysign(double x, double y);
|
@@ -549,6 +613,10 @@ extern DECLSPEC double SDLCALL SDL_log10(double x);
|
|
549
613
|
extern DECLSPEC float SDLCALL SDL_log10f(float x);
|
550
614
|
extern DECLSPEC double SDLCALL SDL_pow(double x, double y);
|
551
615
|
extern DECLSPEC float SDLCALL SDL_powf(float x, float y);
|
616
|
+
extern DECLSPEC double SDLCALL SDL_round(double x);
|
617
|
+
extern DECLSPEC float SDLCALL SDL_roundf(float x);
|
618
|
+
extern DECLSPEC long SDLCALL SDL_lround(double x);
|
619
|
+
extern DECLSPEC long SDLCALL SDL_lroundf(float x);
|
552
620
|
extern DECLSPEC double SDLCALL SDL_scalbn(double x, int n);
|
553
621
|
extern DECLSPEC float SDLCALL SDL_scalbnf(float x, int n);
|
554
622
|
extern DECLSPEC double SDLCALL SDL_sin(double x);
|
@@ -572,9 +640,12 @@ extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
|
|
572
640
|
extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf,
|
573
641
|
size_t * inbytesleft, char **outbuf,
|
574
642
|
size_t * outbytesleft);
|
643
|
+
|
575
644
|
/**
|
576
|
-
*
|
577
|
-
*
|
645
|
+
* This function converts a string between encodings in one pass, returning a
|
646
|
+
* string that must be freed with SDL_free() or NULL on error.
|
647
|
+
*
|
648
|
+
* \since This function is available since SDL 2.0.0.
|
578
649
|
*/
|
579
650
|
extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
|
580
651
|
const char *fromcode,
|
@@ -583,6 +654,7 @@ extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
|
|
583
654
|
#define SDL_iconv_utf8_locale(S) SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1)
|
584
655
|
#define SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
|
585
656
|
#define SDL_iconv_utf8_ucs4(S) (Uint32 *)SDL_iconv_string("UCS-4-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
|
657
|
+
#define SDL_iconv_wchar_utf8(S) SDL_iconv_string("UTF-8", "WCHAR_T", (char *)S, (SDL_wcslen(S)+1)*sizeof(wchar_t))
|
586
658
|
|
587
659
|
/* force builds using Clang's static analysis tools to use literal C runtime
|
588
660
|
here, since there are possibly tests that are ineffective otherwise. */
|