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