ruby2d 0.12.1 → 1.0.0
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/LICENSE.md +7 -0
- data/README.md +141 -0
- data/USAGE.md +2435 -0
- data/assets/Rakefile +637 -0
- data/assets/build_support/CMakeLists.txt +94 -0
- data/assets/build_support/mruby/build_config.rb +34 -0
- data/assets/build_support/mruby/build_config_wasm.rb +30 -0
- data/assets/build_support/sdl_test.c +174 -0
- data/assets/deps.yaml +16 -0
- data/assets/platform/include/SDL3/SDL.h +91 -0
- data/assets/platform/include/SDL3/SDL_assert.h +705 -0
- data/assets/platform/include/SDL3/SDL_asyncio.h +550 -0
- data/assets/platform/include/SDL3/SDL_atomic.h +692 -0
- data/assets/platform/include/SDL3/SDL_audio.h +2370 -0
- data/assets/platform/include/SDL3/SDL_begin_code.h +553 -0
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_bits.h +47 -27
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_blendmode.h +59 -55
- data/assets/platform/include/SDL3/SDL_camera.h +535 -0
- data/assets/platform/include/SDL3/SDL_clipboard.h +331 -0
- data/assets/{include/SDL2/close_code.h → platform/include/SDL3/SDL_close_code.h} +9 -8
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_copying.h +3 -1
- data/assets/platform/include/SDL3/SDL_cpuinfo.h +374 -0
- data/assets/platform/include/SDL3/SDL_dialog.h +343 -0
- data/assets/platform/include/SDL3/SDL_dlopennote.h +234 -0
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_egl.h +11 -8
- data/assets/platform/include/SDL3/SDL_endian.h +645 -0
- data/assets/platform/include/SDL3/SDL_error.h +226 -0
- data/assets/platform/include/SDL3/SDL_events.h +1645 -0
- data/assets/platform/include/SDL3/SDL_filesystem.h +537 -0
- data/assets/platform/include/SDL3/SDL_gamepad.h +1656 -0
- data/assets/platform/include/SDL3/SDL_gpu.h +4608 -0
- data/assets/platform/include/SDL3/SDL_guid.h +106 -0
- data/assets/platform/include/SDL3/SDL_haptic.h +1461 -0
- data/assets/platform/include/SDL3/SDL_hidapi.h +571 -0
- data/assets/platform/include/SDL3/SDL_hints.h +5001 -0
- data/assets/platform/include/SDL3/SDL_init.h +507 -0
- data/assets/platform/include/SDL3/SDL_intrin.h +410 -0
- data/assets/platform/include/SDL3/SDL_iostream.h +1379 -0
- data/assets/platform/include/SDL3/SDL_joystick.h +1385 -0
- data/assets/platform/include/SDL3/SDL_keyboard.h +608 -0
- data/assets/platform/include/SDL3/SDL_keycode.h +347 -0
- data/assets/platform/include/SDL3/SDL_loadso.h +145 -0
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_locale.h +40 -24
- data/assets/platform/include/SDL3/SDL_log.h +541 -0
- data/assets/platform/include/SDL3/SDL_main.h +704 -0
- data/assets/platform/include/SDL3/SDL_main_impl.h +151 -0
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_messagebox.h +85 -48
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_metal.h +29 -29
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_misc.h +13 -12
- data/assets/platform/include/SDL3/SDL_mouse.h +813 -0
- data/assets/platform/include/SDL3/SDL_mutex.h +1117 -0
- data/assets/platform/include/SDL3/SDL_oldnames.h +1339 -0
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_opengl.h +1247 -278
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_opengl_glext.h +5 -1
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_opengles.h +6 -7
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_opengles2.h +10 -11
- data/assets/platform/include/SDL3/SDL_pen.h +198 -0
- data/assets/platform/include/SDL3/SDL_pixels.h +1441 -0
- data/assets/{include/SDL2/SDL_test_log.h → platform/include/SDL3/SDL_platform.h} +25 -26
- data/assets/platform/include/SDL3/SDL_platform_defines.h +497 -0
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_power.h +40 -20
- data/assets/platform/include/SDL3/SDL_process.h +441 -0
- data/assets/platform/include/SDL3/SDL_properties.h +572 -0
- data/assets/platform/include/SDL3/SDL_rect.h +528 -0
- data/assets/platform/include/SDL3/SDL_render.h +3028 -0
- data/assets/platform/include/SDL3/SDL_revision.h +59 -0
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_scancode.h +59 -68
- data/assets/platform/include/SDL3/SDL_sensor.h +321 -0
- data/assets/platform/include/SDL3/SDL_stdinc.h +6186 -0
- data/assets/platform/include/SDL3/SDL_storage.h +686 -0
- data/assets/platform/include/SDL3/SDL_surface.h +1769 -0
- data/assets/platform/include/SDL3/SDL_system.h +840 -0
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_test.h +16 -22
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_test_assert.h +27 -34
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_test_common.h +109 -52
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_test_compare.h +22 -14
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_test_crc32.h +27 -30
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_test_font.h +50 -49
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_test_fuzzer.h +64 -79
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_test_harness.h +47 -30
- data/assets/platform/include/SDL3/SDL_test_log.h +83 -0
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_test_md5.h +21 -28
- data/assets/{include/SDL2 → platform/include/SDL3}/SDL_test_memory.h +19 -16
- data/assets/platform/include/SDL3/SDL_thread.h +602 -0
- data/assets/platform/include/SDL3/SDL_time.h +249 -0
- data/assets/platform/include/SDL3/SDL_timer.h +454 -0
- data/assets/platform/include/SDL3/SDL_touch.h +184 -0
- data/assets/platform/include/SDL3/SDL_tray.h +544 -0
- data/assets/platform/include/SDL3/SDL_version.h +198 -0
- data/assets/platform/include/SDL3/SDL_video.h +3497 -0
- data/assets/platform/include/SDL3/SDL_vulkan.h +287 -0
- data/assets/platform/include/SDL3_image/SDL_image.h +3328 -0
- data/assets/platform/include/SDL3_mixer/SDL_mixer.h +3369 -0
- data/assets/platform/include/SDL3_ttf/SDL_textengine.h +181 -0
- data/assets/platform/include/SDL3_ttf/SDL_ttf.h +2833 -0
- data/assets/{include → platform/include}/mrbconf.h +42 -31
- data/assets/{include → platform/include}/mruby/array.h +3 -4
- data/assets/{include → platform/include}/mruby/boxing_nan.h +10 -0
- data/assets/platform/include/mruby/boxing_no.h +59 -0
- data/assets/{include → platform/include}/mruby/boxing_word.h +72 -26
- data/assets/platform/include/mruby/class.h +157 -0
- data/assets/{include → platform/include}/mruby/common.h +30 -1
- data/assets/{include → platform/include}/mruby/compile.h +52 -74
- data/assets/{include → platform/include}/mruby/data.h +2 -2
- data/assets/{include → platform/include}/mruby/debug.h +12 -5
- data/assets/{include → platform/include}/mruby/dump.h +7 -9
- data/assets/{include → platform/include}/mruby/endian.h +1 -1
- data/assets/platform/include/mruby/error.h +173 -0
- data/assets/platform/include/mruby/gc.h +79 -0
- data/assets/{include → platform/include}/mruby/hash.h +1 -7
- data/assets/platform/include/mruby/internal.h +282 -0
- data/assets/platform/include/mruby/irep.h +143 -0
- data/assets/{include → platform/include}/mruby/istruct.h +1 -1
- data/assets/platform/include/mruby/khash.h +455 -0
- data/assets/platform/include/mruby/mempool.h +19 -0
- data/assets/{include → platform/include}/mruby/numeric.h +7 -10
- data/assets/platform/include/mruby/object.h +51 -0
- data/assets/{include → platform/include}/mruby/opcode.h +5 -5
- data/assets/{include → platform/include}/mruby/ops.h +19 -6
- data/assets/platform/include/mruby/presym/id.h +1447 -0
- data/assets/{include → platform/include}/mruby/presym/scanning.h +10 -7
- data/assets/platform/include/mruby/presym/table.h +2893 -0
- data/assets/platform/include/mruby/presym.h +65 -0
- data/assets/platform/include/mruby/proc.h +184 -0
- data/assets/{include → platform/include}/mruby/range.h +0 -2
- data/assets/{include → platform/include}/mruby/string.h +33 -53
- data/assets/platform/include/mruby/throw.h +81 -0
- data/assets/{include → platform/include}/mruby/value.h +64 -29
- data/assets/{include → platform/include}/mruby/variable.h +6 -23
- data/assets/{include → platform/include}/mruby/version.h +7 -7
- data/assets/{include → platform/include}/mruby.h +238 -116
- data/assets/platform/macos-arm64/bin/mrbc +0 -0
- data/assets/platform/macos-arm64/lib/libSDL3.a +0 -0
- data/assets/platform/macos-arm64/lib/libSDL3_image.a +0 -0
- data/assets/platform/macos-arm64/lib/libSDL3_mixer.a +0 -0
- data/assets/platform/macos-arm64/lib/libSDL3_ttf.a +0 -0
- data/assets/platform/macos-arm64/lib/libmruby.a +0 -0
- data/assets/platform/wasm/lib/libFLAC.a +0 -0
- data/assets/platform/wasm/lib/libSDL3.a +0 -0
- data/assets/platform/wasm/lib/libSDL3_image.a +0 -0
- data/assets/platform/wasm/lib/libSDL3_mixer.a +0 -0
- data/assets/platform/wasm/lib/libSDL3_ttf.a +0 -0
- data/assets/platform/wasm/lib/libfreetype.a +0 -0
- data/assets/platform/wasm/lib/libharfbuzz.a +0 -0
- data/assets/platform/wasm/lib/libmruby.a +0 -0
- data/assets/platform/wasm/lib/libogg.a +0 -0
- data/assets/platform/wasm/lib/libplutosvg.a +0 -0
- data/assets/platform/wasm/lib/libplutovg.a +0 -0
- data/assets/platform/wasm/lib/libpng.a +0 -0
- data/assets/platform/wasm/lib/libpng16.a +0 -0
- data/assets/platform/wasm/lib/libvorbis.a +0 -0
- data/assets/platform/wasm/lib/libvorbisfile.a +0 -0
- data/assets/platform/wasm/lib/libzlibstatic.a +0 -0
- data/assets/platform/windows-arm64-mingw-ucrt/bin/mrbc.exe +0 -0
- data/assets/platform/windows-arm64-mingw-ucrt/lib/libSDL3.a +0 -0
- data/assets/platform/windows-arm64-mingw-ucrt/lib/libSDL3_image.a +0 -0
- data/assets/platform/windows-arm64-mingw-ucrt/lib/libSDL3_mixer.a +0 -0
- data/assets/platform/windows-arm64-mingw-ucrt/lib/libSDL3_ttf.a +0 -0
- data/assets/platform/windows-arm64-mingw-ucrt/lib/libmruby.a +0 -0
- data/assets/platform/windows-x86_64-mingw-ucrt/bin/mrbc.exe +0 -0
- data/assets/platform/windows-x86_64-mingw-ucrt/lib/libSDL3.a +0 -0
- data/assets/platform/windows-x86_64-mingw-ucrt/lib/libSDL3_image.a +0 -0
- data/assets/platform/windows-x86_64-mingw-ucrt/lib/libSDL3_mixer.a +0 -0
- data/assets/platform/windows-x86_64-mingw-ucrt/lib/libSDL3_ttf.a +0 -0
- data/assets/platform/windows-x86_64-mingw-ucrt/lib/libmruby.a +0 -0
- data/assets/resources/fonts/outfit/OFL.txt +93 -0
- data/assets/resources/fonts/outfit/outfit.ttf +0 -0
- data/assets/resources/fonts/roboto_mono/OFL.txt +91 -0
- data/assets/resources/fonts/roboto_mono/roboto_mono.ttf +0 -0
- data/assets/resources/icons/icon.icns +0 -0
- data/assets/resources/icons/icon.png +0 -0
- data/assets/resources/spritesheets/License.txt +28 -0
- data/assets/resources/spritesheets/spritesheet-backgrounds.png +0 -0
- data/assets/resources/spritesheets/spritesheet-backgrounds.xml +16 -0
- data/assets/resources/spritesheets/spritesheet-characters.png +0 -0
- data/assets/resources/spritesheets/spritesheet-characters.xml +47 -0
- data/assets/resources/spritesheets/spritesheet-enemies.png +0 -0
- data/assets/resources/spritesheets/spritesheet-enemies.xml +62 -0
- data/assets/resources/spritesheets/spritesheet-tiles.png +0 -0
- data/assets/resources/spritesheets/spritesheet-tiles.xml +316 -0
- data/assets/{wasm → resources/web}/template.html +1 -1
- data/assets/target.rb +131 -0
- data/bin/ruby2d +281 -82
- data/examples/astar.rb +269 -0
- data/examples/asteroids.rb +403 -0
- data/examples/bezier_editor.rb +96 -0
- data/examples/boids.rb +191 -0
- data/examples/bouncing_balls.rb +119 -0
- data/examples/breakout.rb +186 -0
- data/examples/constellations.rb +100 -0
- data/examples/dashboard.rb +133 -0
- data/examples/double_pendulum.rb +254 -0
- data/examples/falling_sand.rb +291 -0
- data/examples/fireworks.rb +110 -0
- data/examples/fluid_dynamics.rb +340 -0
- data/examples/fourier_epicycles.rb +142 -0
- data/examples/fractal_tree.rb +326 -0
- data/examples/game_of_life.rb +148 -0
- data/examples/gamepads.rb +333 -0
- data/examples/hill_driver.rb +613 -0
- data/examples/logo_animation.rb +251 -0
- data/examples/lorenz_attractor.rb +115 -0
- data/examples/mandelbrot.rb +207 -0
- data/examples/marching_squares.rb +200 -0
- data/examples/maze.rb +323 -0
- data/examples/nbody.rb +338 -0
- data/examples/outrun.rb +391 -0
- data/examples/pixel_paint.rb +313 -0
- data/examples/platformer.rb +335 -0
- data/examples/ray_casting_maze.rb +175 -0
- data/examples/shadow_casting.rb +151 -0
- data/examples/shape_recognizer.rb +908 -0
- data/examples/snake.rb +144 -0
- data/examples/sprite_sheets.rb +246 -0
- data/examples/swarm.rb +206 -0
- data/examples/tsp_annealing.rb +104 -0
- data/examples/ui_controls.rb +163 -0
- data/examples/wireframe_3d.rb +139 -0
- data/ext/ruby2d/audio.c +324 -0
- data/ext/ruby2d/canvas.c +1715 -494
- data/ext/ruby2d/ext.c +541 -0
- data/ext/ruby2d/extconf.rb +122 -145
- data/ext/ruby2d/font.c +566 -20
- data/ext/ruby2d/fps.c +92 -0
- data/ext/ruby2d/image.c +466 -41
- data/ext/ruby2d/ruby2d.c +374 -1890
- data/ext/ruby2d/ruby2d.h +840 -460
- data/ext/ruby2d/shapes.c +931 -101
- data/ext/ruby2d/text.c +586 -21
- data/ext/ruby2d/window.c +1693 -283
- data/lib/ruby2d/atlas_parser.rb +194 -0
- data/lib/ruby2d/audio.rb +73 -0
- data/lib/ruby2d/benchmark.rb +259 -0
- data/lib/ruby2d/bitmap_text.rb +155 -0
- data/lib/ruby2d/button.rb +402 -0
- data/lib/ruby2d/canvas.rb +703 -279
- data/lib/ruby2d/circle.rb +206 -29
- data/lib/ruby2d/cli/browser.rb +314 -0
- data/lib/ruby2d/cli/build.rb +471 -257
- data/lib/ruby2d/cli/colorize.rb +7 -5
- data/lib/ruby2d/cli/examples.rb +127 -0
- data/lib/ruby2d/cli/launch.rb +24 -39
- data/lib/ruby2d/cli/lib_files.rb +48 -0
- data/lib/ruby2d/cli/messages.rb +40 -0
- data/lib/ruby2d/cli/setup.rb +273 -0
- data/lib/ruby2d/cli/static_server.rb +160 -0
- data/lib/ruby2d/cli/usage.rb +255 -0
- data/lib/ruby2d/color.rb +191 -69
- data/lib/ruby2d/core.rb +37 -19
- data/lib/ruby2d/deps_help.rb +89 -0
- data/lib/ruby2d/dsl.rb +51 -12
- data/lib/ruby2d/ellipse.rb +228 -0
- data/lib/ruby2d/exceptions.rb +0 -2
- data/lib/ruby2d/font.rb +34 -74
- data/lib/ruby2d/gamepad.rb +323 -0
- data/lib/ruby2d/gem_paths.rb +19 -0
- data/lib/ruby2d/image.rb +155 -52
- data/lib/ruby2d/interactive.rb +103 -0
- data/lib/ruby2d/json_parser.rb +268 -0
- data/lib/ruby2d/line.rb +194 -85
- data/lib/ruby2d/mruby_compat.rb +12 -0
- data/lib/ruby2d/polygon.rb +297 -0
- data/lib/ruby2d/polyline.rb +368 -0
- data/lib/ruby2d/quad.rb +358 -94
- data/lib/ruby2d/rectangle.rb +77 -19
- data/lib/ruby2d/renderable.rb +411 -11
- data/lib/ruby2d/sprite.rb +471 -180
- data/lib/ruby2d/sprite_sheet.rb +64 -0
- data/lib/ruby2d/square.rb +29 -17
- data/lib/ruby2d/text.rb +196 -65
- data/lib/ruby2d/tileset.rb +139 -81
- data/lib/ruby2d/triangle.rb +324 -89
- data/lib/ruby2d/version.rb +1 -3
- data/lib/ruby2d/vertices.rb +62 -85
- data/lib/ruby2d/warnings.rb +29 -0
- data/lib/ruby2d/window/class_methods.rb +218 -0
- data/lib/ruby2d/window/gamepad_events.rb +141 -0
- data/lib/ruby2d/window/key_events.rb +74 -0
- data/lib/ruby2d/window/mouse_events.rb +171 -0
- data/lib/ruby2d/window/object_events.rb +168 -0
- data/lib/ruby2d/window.rb +632 -585
- data/lib/ruby2d.rb +14 -19
- metadata +275 -443
- data/assets/app.icns +0 -0
- data/assets/include/GL/glew.h +0 -26427
- data/assets/include/GLES2/gl2.h +0 -656
- data/assets/include/GLES2/gl2ext.h +0 -3949
- data/assets/include/GLES2/gl2ext_angle.h +0 -701
- data/assets/include/GLES2/gl2platform.h +0 -27
- data/assets/include/GLES3/gl3.h +0 -1192
- data/assets/include/GLES3/gl31.h +0 -1507
- data/assets/include/GLES3/gl32.h +0 -1808
- data/assets/include/GLES3/gl3platform.h +0 -27
- data/assets/include/KHR/khrplatform.h +0 -290
- data/assets/include/SDL2/SDL.h +0 -233
- data/assets/include/SDL2/SDL_assert.h +0 -326
- data/assets/include/SDL2/SDL_atomic.h +0 -415
- data/assets/include/SDL2/SDL_audio.h +0 -1500
- data/assets/include/SDL2/SDL_clipboard.h +0 -141
- data/assets/include/SDL2/SDL_config.h +0 -61
- data/assets/include/SDL2/SDL_config_android.h +0 -194
- data/assets/include/SDL2/SDL_config_emscripten.h +0 -218
- data/assets/include/SDL2/SDL_config_iphoneos.h +0 -217
- data/assets/include/SDL2/SDL_config_macosx.h +0 -277
- data/assets/include/SDL2/SDL_config_minimal.h +0 -95
- data/assets/include/SDL2/SDL_config_ngage.h +0 -89
- data/assets/include/SDL2/SDL_config_os2.h +0 -207
- data/assets/include/SDL2/SDL_config_pandora.h +0 -141
- data/assets/include/SDL2/SDL_config_windows.h +0 -331
- data/assets/include/SDL2/SDL_config_wingdk.h +0 -253
- data/assets/include/SDL2/SDL_config_winrt.h +0 -220
- data/assets/include/SDL2/SDL_config_xbox.h +0 -235
- data/assets/include/SDL2/SDL_cpuinfo.h +0 -594
- data/assets/include/SDL2/SDL_endian.h +0 -348
- data/assets/include/SDL2/SDL_error.h +0 -163
- data/assets/include/SDL2/SDL_events.h +0 -1166
- data/assets/include/SDL2/SDL_filesystem.h +0 -149
- data/assets/include/SDL2/SDL_gamecontroller.h +0 -1074
- data/assets/include/SDL2/SDL_gesture.h +0 -117
- data/assets/include/SDL2/SDL_guid.h +0 -100
- data/assets/include/SDL2/SDL_haptic.h +0 -1341
- data/assets/include/SDL2/SDL_hidapi.h +0 -451
- data/assets/include/SDL2/SDL_hints.h +0 -2569
- data/assets/include/SDL2/SDL_image.h +0 -2173
- data/assets/include/SDL2/SDL_joystick.h +0 -1066
- data/assets/include/SDL2/SDL_keyboard.h +0 -353
- data/assets/include/SDL2/SDL_keycode.h +0 -358
- data/assets/include/SDL2/SDL_loadso.h +0 -115
- data/assets/include/SDL2/SDL_log.h +0 -404
- data/assets/include/SDL2/SDL_main.h +0 -275
- data/assets/include/SDL2/SDL_mixer.h +0 -2784
- data/assets/include/SDL2/SDL_mouse.h +0 -465
- data/assets/include/SDL2/SDL_mutex.h +0 -471
- data/assets/include/SDL2/SDL_name.h +0 -33
- data/assets/include/SDL2/SDL_pixels.h +0 -644
- data/assets/include/SDL2/SDL_platform.h +0 -261
- data/assets/include/SDL2/SDL_quit.h +0 -58
- data/assets/include/SDL2/SDL_rect.h +0 -376
- data/assets/include/SDL2/SDL_render.h +0 -1919
- data/assets/include/SDL2/SDL_revision.h +0 -6
- data/assets/include/SDL2/SDL_rwops.h +0 -841
- data/assets/include/SDL2/SDL_sensor.h +0 -322
- data/assets/include/SDL2/SDL_shape.h +0 -155
- data/assets/include/SDL2/SDL_stdinc.h +0 -830
- data/assets/include/SDL2/SDL_surface.h +0 -997
- data/assets/include/SDL2/SDL_system.h +0 -623
- data/assets/include/SDL2/SDL_syswm.h +0 -386
- data/assets/include/SDL2/SDL_test_images.h +0 -78
- data/assets/include/SDL2/SDL_test_random.h +0 -115
- data/assets/include/SDL2/SDL_thread.h +0 -464
- data/assets/include/SDL2/SDL_timer.h +0 -222
- data/assets/include/SDL2/SDL_touch.h +0 -150
- data/assets/include/SDL2/SDL_ttf.h +0 -2316
- data/assets/include/SDL2/SDL_types.h +0 -29
- data/assets/include/SDL2/SDL_version.h +0 -204
- data/assets/include/SDL2/SDL_video.h +0 -2150
- data/assets/include/SDL2/SDL_vulkan.h +0 -215
- data/assets/include/SDL2/begin_code.h +0 -187
- data/assets/include/mruby/boxing_no.h +0 -58
- data/assets/include/mruby/class.h +0 -108
- data/assets/include/mruby/error.h +0 -147
- data/assets/include/mruby/gc.h +0 -94
- data/assets/include/mruby/irep.h +0 -147
- data/assets/include/mruby/khash.h +0 -284
- data/assets/include/mruby/object.h +0 -43
- data/assets/include/mruby/presym/disable.h +0 -70
- data/assets/include/mruby/presym/enable.h +0 -37
- data/assets/include/mruby/presym.h +0 -40
- data/assets/include/mruby/proc.h +0 -211
- data/assets/include/mruby/throw.h +0 -66
- 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/universal/lib/libSDL2_mixer.a +0 -0
- data/assets/macos/universal/lib/libSDL2_ttf.a +0 -0
- data/assets/macos/universal/lib/libavif.a +0 -0
- data/assets/macos/universal/lib/libbrotlicommon-static.a +0 -0
- data/assets/macos/universal/lib/libbrotlidec-static.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/libhwy.a +0 -0
- data/assets/macos/universal/lib/libjpeg.a +0 -0
- data/assets/macos/universal/lib/libjxl.a +0 -0
- data/assets/macos/universal/lib/libmodplug.a +0 -0
- data/assets/macos/universal/lib/libmpg123.a +0 -0
- data/assets/macos/universal/lib/libmruby.a +0 -0
- data/assets/macos/universal/lib/libogg.a +0 -0
- data/assets/macos/universal/lib/libpng.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/macos/universal/lib/libzstd.a +0 -0
- data/assets/test_media/README.md +0 -3
- data/assets/test_media/bitstream_vera/COPYRIGHT.txt +0 -124
- 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/libmruby.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/bin/mrbc.exe +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libFLAC.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libLerc.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_image.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_mixer.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_ttf.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libbrotlicommon.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libbrotlidec.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libbz2.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libdeflate.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libfreetype.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libglew32.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libgraphite2.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libharfbuzz.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libhwy.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libjbig.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libjpeg.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libjxl.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/liblzma.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libmodplug.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libmpg123.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libmruby.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libogg.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libopus.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libopusfile.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libpng.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libsndfile.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libssp.a +0 -1
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libstdc++.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libtiff.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libvorbis.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libvorbisfile.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libwebp.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libz.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libzstd.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/libhwy.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/libjxl.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/libpng.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 -1
- 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/xcode/ios/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -98
- data/assets/xcode/ios/Assets.xcassets/Contents.json +0 -6
- data/assets/xcode/ios/Base.lproj/LaunchScreen.storyboard +0 -27
- data/assets/xcode/ios/Info.plist +0 -43
- data/assets/xcode/ios/MRuby.framework/Headers/mrbconf.h +0 -143
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/array.h +0 -280
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/boxing_nan.h +0 -102
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/boxing_no.h +0 -56
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/boxing_word.h +0 -144
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/class.h +0 -97
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/common.h +0 -77
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/compile.h +0 -195
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/data.h +0 -75
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/debug.h +0 -67
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/dump.h +0 -196
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/error.h +0 -75
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/gc.h +0 -91
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/hash.h +0 -215
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/irep.h +0 -75
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/istruct.h +0 -47
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/khash.h +0 -274
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/numeric.h +0 -161
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/object.h +0 -44
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/opcode.h +0 -69
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/ops.h +0 -117
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/proc.h +0 -131
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/range.h +0 -49
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/re.h +0 -16
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/string.h +0 -444
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/throw.h +0 -55
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/value.h +0 -309
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/variable.h +0 -136
- data/assets/xcode/ios/MRuby.framework/Headers/mruby/version.h +0 -110
- data/assets/xcode/ios/MRuby.framework/Headers/mruby.h +0 -1282
- data/assets/xcode/ios/MRuby.framework/Info.plist +0 -20
- data/assets/xcode/ios/MRuby.framework/MRuby +0 -0
- data/assets/xcode/ios/MyApp.xcodeproj/project.pbxproj +0 -368
- data/assets/xcode/ios/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- data/assets/xcode/ios/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- data/assets/xcode/ios/MyApp.xcodeproj/project.xcworkspace/xcshareddata/MyApp.xcscmblueprint +0 -30
- data/assets/xcode/ios/main.c +0 -1
- data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json +0 -16
- data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json +0 -6
- data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json +0 -17
- data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json +0 -16
- data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json +0 -6
- data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json +0 -16
- data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json +0 -6
- data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json +0 -16
- data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json +0 -6
- data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json +0 -17
- data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json +0 -16
- data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json +0 -6
- data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json +0 -16
- data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json +0 -6
- data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json +0 -32
- data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json +0 -16
- data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json +0 -16
- data/assets/xcode/tvos/Assets.xcassets/Contents.json +0 -6
- data/assets/xcode/tvos/Assets.xcassets/LaunchImage.launchimage/Contents.json +0 -22
- data/assets/xcode/tvos/Info.plist +0 -30
- data/assets/xcode/tvos/MRuby.framework/Headers/mrbconf.h +0 -143
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/array.h +0 -280
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/boxing_nan.h +0 -102
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/boxing_no.h +0 -56
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/boxing_word.h +0 -144
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/class.h +0 -97
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/common.h +0 -77
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/compile.h +0 -195
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/data.h +0 -75
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/debug.h +0 -67
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/dump.h +0 -196
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/error.h +0 -75
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/gc.h +0 -91
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/hash.h +0 -215
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/irep.h +0 -75
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/istruct.h +0 -47
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/khash.h +0 -274
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/numeric.h +0 -161
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/object.h +0 -44
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/opcode.h +0 -69
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/ops.h +0 -117
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/proc.h +0 -131
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/range.h +0 -49
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/re.h +0 -16
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/string.h +0 -444
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/throw.h +0 -55
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/value.h +0 -309
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/variable.h +0 -136
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby/version.h +0 -110
- data/assets/xcode/tvos/MRuby.framework/Headers/mruby.h +0 -1282
- data/assets/xcode/tvos/MRuby.framework/Info.plist +0 -20
- data/assets/xcode/tvos/MRuby.framework/MRuby +0 -0
- data/assets/xcode/tvos/MyApp.xcodeproj/project.pbxproj +0 -350
- data/assets/xcode/tvos/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- data/assets/xcode/tvos/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- data/assets/xcode/tvos/MyApp.xcodeproj/project.xcworkspace/xcshareddata/MyApp.xcscmblueprint +0 -30
- data/assets/xcode/tvos/main.c +0 -1
- data/ext/ruby2d/common.c +0 -185
- data/ext/ruby2d/controllers.c +0 -110
- data/ext/ruby2d/gl.c +0 -398
- data/ext/ruby2d/gl2.c +0 -86
- data/ext/ruby2d/gl3.c +0 -304
- data/ext/ruby2d/gles.c +0 -302
- data/ext/ruby2d/input.c +0 -48
- data/ext/ruby2d/music.c +0 -127
- data/ext/ruby2d/sound.c +0 -132
- data/lib/ruby2d/cli/console.rb +0 -65
- data/lib/ruby2d/cli/enable_console.rb +0 -7
- data/lib/ruby2d/cli/platform.rb +0 -17
- data/lib/ruby2d/music.rb +0 -77
- data/lib/ruby2d/pixel.rb +0 -18
- data/lib/ruby2d/pixmap.rb +0 -39
- data/lib/ruby2d/pixmap_atlas.rb +0 -56
- data/lib/ruby2d/sound.rb +0 -61
- data/lib/ruby2d/texture.rb +0 -38
- /data/assets/{include/SDL2 → platform/include/SDL3}/SDL_opengles2_gl2.h +0 -0
- /data/assets/{include/SDL2 → platform/include/SDL3}/SDL_opengles2_gl2ext.h +0 -0
- /data/assets/{include/SDL2 → platform/include/SDL3}/SDL_opengles2_gl2platform.h +0 -0
- /data/assets/{include/SDL2 → platform/include/SDL3}/SDL_opengles2_khrplatform.h +0 -0
- /data/assets/{include → platform/include}/mruby/re.h +0 -0
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
** @file mruby/object.h - mruby object definition
|
|
3
|
-
**
|
|
4
|
-
** See Copyright Notice in mruby.h
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
#ifndef MRUBY_OBJECT_H
|
|
8
|
-
#define MRUBY_OBJECT_H
|
|
9
|
-
|
|
10
|
-
#define MRB_OBJECT_HEADER \
|
|
11
|
-
struct RClass *c; \
|
|
12
|
-
struct RBasic *gcnext; \
|
|
13
|
-
enum mrb_vtype tt:8; \
|
|
14
|
-
uint32_t color:3; \
|
|
15
|
-
uint32_t flags:21
|
|
16
|
-
|
|
17
|
-
#define MRB_FLAG_TEST(obj, flag) ((obj)->flags & (flag))
|
|
18
|
-
|
|
19
|
-
struct RBasic {
|
|
20
|
-
MRB_OBJECT_HEADER;
|
|
21
|
-
};
|
|
22
|
-
#define mrb_basic_ptr(v) ((struct RBasic*)(mrb_ptr(v)))
|
|
23
|
-
|
|
24
|
-
#define MRB_FL_OBJ_IS_FROZEN (1 << 20)
|
|
25
|
-
#define MRB_FROZEN_P(o) ((o)->flags & MRB_FL_OBJ_IS_FROZEN)
|
|
26
|
-
#define MRB_SET_FROZEN_FLAG(o) ((o)->flags |= MRB_FL_OBJ_IS_FROZEN)
|
|
27
|
-
#define MRB_UNSET_FROZEN_FLAG(o) ((o)->flags &= ~MRB_FL_OBJ_IS_FROZEN)
|
|
28
|
-
#define mrb_frozen_p(o) MRB_FROZEN_P(o)
|
|
29
|
-
|
|
30
|
-
struct RObject {
|
|
31
|
-
MRB_OBJECT_HEADER;
|
|
32
|
-
struct iv_tbl *iv;
|
|
33
|
-
};
|
|
34
|
-
#define mrb_obj_ptr(v) ((struct RObject*)(mrb_ptr(v)))
|
|
35
|
-
|
|
36
|
-
#define mrb_special_const_p(x) mrb_immediate_p(x)
|
|
37
|
-
|
|
38
|
-
struct RFiber {
|
|
39
|
-
MRB_OBJECT_HEADER;
|
|
40
|
-
struct mrb_context *cxt;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
#endif /* MRUBY_OBJECT_H */
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
** @file mruby/presym/disable.h - Disable Preallocated Symbols
|
|
3
|
-
**
|
|
4
|
-
** See Copyright Notice in mruby.h
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
#ifndef MRUBY_PRESYM_DISABLE_H
|
|
8
|
-
#define MRUBY_PRESYM_DISABLE_H
|
|
9
|
-
|
|
10
|
-
#include <string.h>
|
|
11
|
-
|
|
12
|
-
#define MRB_PRESYM_MAX 0
|
|
13
|
-
|
|
14
|
-
#define MRB_OPSYM(name) MRB_OPSYM__##name(mrb)
|
|
15
|
-
#define MRB_CVSYM(name) mrb_intern_lit(mrb, "@@" #name)
|
|
16
|
-
#define MRB_IVSYM(name) mrb_intern_lit(mrb, "@" #name)
|
|
17
|
-
#define MRB_SYM_B(name) mrb_intern_lit(mrb, #name "!")
|
|
18
|
-
#define MRB_SYM_Q(name) mrb_intern_lit(mrb, #name "?")
|
|
19
|
-
#define MRB_SYM_E(name) mrb_intern_lit(mrb, #name "=")
|
|
20
|
-
#define MRB_SYM(name) mrb_intern_lit(mrb, #name)
|
|
21
|
-
|
|
22
|
-
#define MRB_OPSYM_2(mrb, name) MRB_OPSYM__##name(mrb)
|
|
23
|
-
#define MRB_CVSYM_2(mrb, name) mrb_intern_lit(mrb, "@@" #name)
|
|
24
|
-
#define MRB_IVSYM_2(mrb, name) mrb_intern_lit(mrb, "@" #name)
|
|
25
|
-
#define MRB_SYM_B_2(mrb, name) mrb_intern_lit(mrb, #name "!")
|
|
26
|
-
#define MRB_SYM_Q_2(mrb, name) mrb_intern_lit(mrb, #name "?")
|
|
27
|
-
#define MRB_SYM_E_2(mrb, name) mrb_intern_lit(mrb, #name "=")
|
|
28
|
-
#define MRB_SYM_2(mrb, name) mrb_intern_lit(mrb, #name)
|
|
29
|
-
|
|
30
|
-
#define MRB_OPSYM__not(mrb) mrb_intern_lit(mrb, "!")
|
|
31
|
-
#define MRB_OPSYM__mod(mrb) mrb_intern_lit(mrb, "%")
|
|
32
|
-
#define MRB_OPSYM__and(mrb) mrb_intern_lit(mrb, "&")
|
|
33
|
-
#define MRB_OPSYM__mul(mrb) mrb_intern_lit(mrb, "*")
|
|
34
|
-
#define MRB_OPSYM__add(mrb) mrb_intern_lit(mrb, "+")
|
|
35
|
-
#define MRB_OPSYM__sub(mrb) mrb_intern_lit(mrb, "-")
|
|
36
|
-
#define MRB_OPSYM__div(mrb) mrb_intern_lit(mrb, "/")
|
|
37
|
-
#define MRB_OPSYM__lt(mrb) mrb_intern_lit(mrb, "<")
|
|
38
|
-
#define MRB_OPSYM__gt(mrb) mrb_intern_lit(mrb, ">")
|
|
39
|
-
#define MRB_OPSYM__xor(mrb) mrb_intern_lit(mrb, "^")
|
|
40
|
-
#define MRB_OPSYM__tick(mrb) mrb_intern_lit(mrb, "`")
|
|
41
|
-
#define MRB_OPSYM__or(mrb) mrb_intern_lit(mrb, "|")
|
|
42
|
-
#define MRB_OPSYM__neg(mrb) mrb_intern_lit(mrb, "~")
|
|
43
|
-
#define MRB_OPSYM__neq(mrb) mrb_intern_lit(mrb, "!=")
|
|
44
|
-
#define MRB_OPSYM__nmatch(mrb) mrb_intern_lit(mrb, "!~")
|
|
45
|
-
#define MRB_OPSYM__andand(mrb) mrb_intern_lit(mrb, "&&")
|
|
46
|
-
#define MRB_OPSYM__pow(mrb) mrb_intern_lit(mrb, "**")
|
|
47
|
-
#define MRB_OPSYM__plus(mrb) mrb_intern_lit(mrb, "+@")
|
|
48
|
-
#define MRB_OPSYM__minus(mrb) mrb_intern_lit(mrb, "-@")
|
|
49
|
-
#define MRB_OPSYM__lshift(mrb) mrb_intern_lit(mrb, "<<")
|
|
50
|
-
#define MRB_OPSYM__le(mrb) mrb_intern_lit(mrb, "<=")
|
|
51
|
-
#define MRB_OPSYM__eq(mrb) mrb_intern_lit(mrb, "==")
|
|
52
|
-
#define MRB_OPSYM__match(mrb) mrb_intern_lit(mrb, "=~")
|
|
53
|
-
#define MRB_OPSYM__ge(mrb) mrb_intern_lit(mrb, ">=")
|
|
54
|
-
#define MRB_OPSYM__rshift(mrb) mrb_intern_lit(mrb, ">>")
|
|
55
|
-
#define MRB_OPSYM__aref(mrb) mrb_intern_lit(mrb, "[]")
|
|
56
|
-
#define MRB_OPSYM__oror(mrb) mrb_intern_lit(mrb, "||")
|
|
57
|
-
#define MRB_OPSYM__cmp(mrb) mrb_intern_lit(mrb, "<=>")
|
|
58
|
-
#define MRB_OPSYM__eqq(mrb) mrb_intern_lit(mrb, "===")
|
|
59
|
-
#define MRB_OPSYM__aset(mrb) mrb_intern_lit(mrb, "[]=")
|
|
60
|
-
|
|
61
|
-
#define MRB_PRESYM_DEFINE_VAR_AND_INITER(name, size, ...) \
|
|
62
|
-
static mrb_sym name[size]; \
|
|
63
|
-
static void presym_init_##name(mrb_state *mrb) { \
|
|
64
|
-
mrb_sym name__[] = {__VA_ARGS__}; \
|
|
65
|
-
memcpy(name, name__, sizeof(name)); \
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
#define MRB_PRESYM_INIT_SYMBOLS(mrb, name) presym_init_##name(mrb)
|
|
69
|
-
|
|
70
|
-
#endif /* MRUBY_PRESYM_DISABLE_H */
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
** @file mruby/presym/enable.h - Enable Preallocated Symbols
|
|
3
|
-
**
|
|
4
|
-
** See Copyright Notice in mruby.h
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
#ifndef MRUBY_PRESYM_ENABLE_H
|
|
8
|
-
#define MRUBY_PRESYM_ENABLE_H
|
|
9
|
-
|
|
10
|
-
#include <mruby/presym/id.h>
|
|
11
|
-
|
|
12
|
-
#define MRB_OPSYM(name) MRB_OPSYM__##name
|
|
13
|
-
#define MRB_CVSYM(name) MRB_CVSYM__##name
|
|
14
|
-
#define MRB_IVSYM(name) MRB_IVSYM__##name
|
|
15
|
-
#define MRB_SYM_B(name) MRB_SYM_B__##name
|
|
16
|
-
#define MRB_SYM_Q(name) MRB_SYM_Q__##name
|
|
17
|
-
#define MRB_SYM_E(name) MRB_SYM_E__##name
|
|
18
|
-
#define MRB_SYM(name) MRB_SYM__##name
|
|
19
|
-
|
|
20
|
-
#define MRB_OPSYM_2(mrb, name) MRB_OPSYM__##name
|
|
21
|
-
#define MRB_CVSYM_2(mrb, name) MRB_CVSYM__##name
|
|
22
|
-
#define MRB_IVSYM_2(mrb, name) MRB_IVSYM__##name
|
|
23
|
-
#define MRB_SYM_B_2(mrb, name) MRB_SYM_B__##name
|
|
24
|
-
#define MRB_SYM_Q_2(mrb, name) MRB_SYM_Q__##name
|
|
25
|
-
#define MRB_SYM_E_2(mrb, name) MRB_SYM_E__##name
|
|
26
|
-
#define MRB_SYM_2(mrb, name) MRB_SYM__##name
|
|
27
|
-
|
|
28
|
-
#define MRB_PRESYM_DEFINE_VAR_AND_INITER(name, size, ...) \
|
|
29
|
-
static const mrb_sym name[] = {__VA_ARGS__};
|
|
30
|
-
|
|
31
|
-
#define MRB_PRESYM_INIT_SYMBOLS(mrb, name) (void)(mrb)
|
|
32
|
-
|
|
33
|
-
/* use MRB_SYM() for E_RUNTIME_ERROR etc. */
|
|
34
|
-
#undef MRB_ERROR_SYM
|
|
35
|
-
#define MRB_ERROR_SYM(sym) MRB_SYM(sym)
|
|
36
|
-
|
|
37
|
-
#endif /* MRUBY_PRESYM_ENABLE_H */
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
** @file mruby/presym.h - Preallocated Symbols
|
|
3
|
-
**
|
|
4
|
-
** See Copyright Notice in mruby.h
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
#ifndef MRUBY_PRESYM_H
|
|
8
|
-
#define MRUBY_PRESYM_H
|
|
9
|
-
|
|
10
|
-
#if defined(MRB_NO_PRESYM)
|
|
11
|
-
# include <mruby/presym/disable.h>
|
|
12
|
-
#elif !defined(MRB_PRESYM_SCANNING)
|
|
13
|
-
# include <mruby/presym/enable.h>
|
|
14
|
-
#endif
|
|
15
|
-
|
|
16
|
-
/*
|
|
17
|
-
* Where `mrb_intern_lit` is allowed for symbol interning, it is directly
|
|
18
|
-
* replaced by the symbol ID if presym is enabled by using the following
|
|
19
|
-
* macros.
|
|
20
|
-
*
|
|
21
|
-
* MRB_OPSYM(xor) //=> ^ (Operator)
|
|
22
|
-
* MRB_CVSYM(xor) //=> @@xor (Class Variable)
|
|
23
|
-
* MRB_IVSYM(xor) //=> @xor (Instance Variable)
|
|
24
|
-
* MRB_SYM_B(xor) //=> xor! (Method with Bang)
|
|
25
|
-
* MRB_SYM_Q(xor) //=> xor? (Method with Question mark)
|
|
26
|
-
* MRB_SYM_E(xor) //=> xor= (Method with Equal)
|
|
27
|
-
* MRB_SYM(xor) //=> xor (Word characters)
|
|
28
|
-
*
|
|
29
|
-
* For `MRB_OPSYM`, specify the names corresponding to operators (see
|
|
30
|
-
* `MRuby::Presym::OPERATORS` in `lib/mruby/presym.rb` for the names that
|
|
31
|
-
* can be specified for it). Other than that, describe only word characters
|
|
32
|
-
* excluding leading and ending punctuations.
|
|
33
|
-
*
|
|
34
|
-
* These macros are expanded to `mrb_intern_lit` if presym is disabled,
|
|
35
|
-
* therefore the mruby state variable is required. The above macros can be
|
|
36
|
-
* used when the variable name is `mrb`. If you want to use other variable
|
|
37
|
-
* names, you need to use macros with `_2` suffix, such as `MRB_SYM_2`.
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
#endif /* MRUBY_PRESYM_H */
|
data/assets/include/mruby/proc.h
DELETED
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
** @file mruby/proc.h - Proc class
|
|
3
|
-
**
|
|
4
|
-
** See Copyright Notice in mruby.h
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
#ifndef MRUBY_PROC_H
|
|
8
|
-
#define MRUBY_PROC_H
|
|
9
|
-
|
|
10
|
-
#include "common.h"
|
|
11
|
-
#include <mruby/irep.h>
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Proc class
|
|
15
|
-
*/
|
|
16
|
-
MRB_BEGIN_DECL
|
|
17
|
-
|
|
18
|
-
struct REnv {
|
|
19
|
-
MRB_OBJECT_HEADER;
|
|
20
|
-
mrb_value *stack;
|
|
21
|
-
struct mrb_context *cxt;
|
|
22
|
-
mrb_sym mid;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
/* flags (21bits): 1(close):1(touched):1(heap):8(cioff/bidx):8(stack_len) */
|
|
26
|
-
#define MRB_ENV_SET_LEN(e,len) ((e)->flags = (((e)->flags & ~0xff)|((unsigned int)(len) & 0xff)))
|
|
27
|
-
#define MRB_ENV_LEN(e) ((mrb_int)((e)->flags & 0xff))
|
|
28
|
-
#define MRB_ENV_CLOSED (1<<20)
|
|
29
|
-
#define MRB_ENV_TOUCHED (1<<19)
|
|
30
|
-
#define MRB_ENV_HEAPED (1<<18)
|
|
31
|
-
#define MRB_ENV_CLOSE(e) ((e)->flags |= MRB_ENV_CLOSED)
|
|
32
|
-
#define MRB_ENV_TOUCH(e) ((e)->flags |= MRB_ENV_TOUCHED)
|
|
33
|
-
#define MRB_ENV_HEAP(e) ((e)->flags |= MRB_ENV_HEAPED)
|
|
34
|
-
#define MRB_ENV_HEAP_P(e) ((e)->flags & MRB_ENV_HEAPED)
|
|
35
|
-
#define MRB_ENV_ONSTACK_P(e) (((e)->flags & MRB_ENV_CLOSED) == 0)
|
|
36
|
-
#define MRB_ENV_BIDX(e) (((e)->flags >> 8) & 0xff)
|
|
37
|
-
#define MRB_ENV_SET_BIDX(e,idx) ((e)->flags = (((e)->flags & ~(0xff<<8))|((unsigned int)(idx) & 0xff)<<8))
|
|
38
|
-
|
|
39
|
-
void mrb_env_unshare(mrb_state*, struct REnv*);
|
|
40
|
-
|
|
41
|
-
struct RProc {
|
|
42
|
-
MRB_OBJECT_HEADER;
|
|
43
|
-
union {
|
|
44
|
-
const mrb_irep *irep;
|
|
45
|
-
mrb_func_t func;
|
|
46
|
-
} body;
|
|
47
|
-
const struct RProc *upper;
|
|
48
|
-
union {
|
|
49
|
-
struct RClass *target_class;
|
|
50
|
-
struct REnv *env;
|
|
51
|
-
} e;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
/* aspec access */
|
|
55
|
-
#define MRB_ASPEC_REQ(a) (((a) >> 18) & 0x1f)
|
|
56
|
-
#define MRB_ASPEC_OPT(a) (((a) >> 13) & 0x1f)
|
|
57
|
-
#define MRB_ASPEC_REST(a) (((a) >> 12) & 0x1)
|
|
58
|
-
#define MRB_ASPEC_POST(a) (((a) >> 7) & 0x1f)
|
|
59
|
-
#define MRB_ASPEC_KEY(a) (((a) >> 2) & 0x1f)
|
|
60
|
-
#define MRB_ASPEC_KDICT(a) (((a) >> 1) & 0x1)
|
|
61
|
-
#define MRB_ASPEC_BLOCK(a) ((a) & 1)
|
|
62
|
-
|
|
63
|
-
#define MRB_PROC_CFUNC_FL 128
|
|
64
|
-
#define MRB_PROC_CFUNC_P(p) (((p)->flags & MRB_PROC_CFUNC_FL) != 0)
|
|
65
|
-
#define MRB_PROC_CFUNC(p) (p)->body.func
|
|
66
|
-
#define MRB_PROC_STRICT 256
|
|
67
|
-
#define MRB_PROC_STRICT_P(p) (((p)->flags & MRB_PROC_STRICT) != 0)
|
|
68
|
-
#define MRB_PROC_ORPHAN 512
|
|
69
|
-
#define MRB_PROC_ORPHAN_P(p) (((p)->flags & MRB_PROC_ORPHAN) != 0)
|
|
70
|
-
#define MRB_PROC_ENVSET 1024
|
|
71
|
-
#define MRB_PROC_ENV_P(p) (((p)->flags & MRB_PROC_ENVSET) != 0)
|
|
72
|
-
#define MRB_PROC_ENV(p) (MRB_PROC_ENV_P(p) ? (p)->e.env : NULL)
|
|
73
|
-
#define MRB_PROC_TARGET_CLASS(p) (MRB_PROC_ENV_P(p) ? (p)->e.env->c : (p)->e.target_class)
|
|
74
|
-
#define MRB_PROC_SET_TARGET_CLASS(p,tc) do {\
|
|
75
|
-
if (MRB_PROC_ENV_P(p)) {\
|
|
76
|
-
(p)->e.env->c = (tc);\
|
|
77
|
-
mrb_field_write_barrier(mrb, (struct RBasic*)(p)->e.env, (struct RBasic*)(tc));\
|
|
78
|
-
}\
|
|
79
|
-
else {\
|
|
80
|
-
(p)->e.target_class = (tc);\
|
|
81
|
-
mrb_field_write_barrier(mrb, (struct RBasic*)p, (struct RBasic*)(tc));\
|
|
82
|
-
}\
|
|
83
|
-
} while (0)
|
|
84
|
-
#define MRB_PROC_SCOPE 2048
|
|
85
|
-
#define MRB_PROC_SCOPE_P(p) (((p)->flags & MRB_PROC_SCOPE) != 0)
|
|
86
|
-
#define MRB_PROC_NOARG 4096 /* for MRB_PROC_CFUNC_FL, it would be something like MRB_ARGS_NONE() or MRB_METHOD_NOARG_FL */
|
|
87
|
-
#define MRB_PROC_NOARG_P(p) (((p)->flags & MRB_PROC_NOARG) != 0)
|
|
88
|
-
|
|
89
|
-
#define mrb_proc_ptr(v) ((struct RProc*)(mrb_ptr(v)))
|
|
90
|
-
|
|
91
|
-
struct RProc *mrb_proc_new(mrb_state*, const mrb_irep*);
|
|
92
|
-
struct RProc *mrb_closure_new(mrb_state*, const mrb_irep*);
|
|
93
|
-
MRB_API struct RProc *mrb_proc_new_cfunc(mrb_state*, mrb_func_t);
|
|
94
|
-
MRB_API struct RProc *mrb_closure_new_cfunc(mrb_state *mrb, mrb_func_t func, int nlocals);
|
|
95
|
-
void mrb_proc_copy(mrb_state *mrb, struct RProc *a, struct RProc *b);
|
|
96
|
-
mrb_int mrb_proc_arity(const struct RProc *p);
|
|
97
|
-
|
|
98
|
-
/* following functions are defined in mruby-proc-ext so please include it when using */
|
|
99
|
-
MRB_API struct RProc *mrb_proc_new_cfunc_with_env(mrb_state *mrb, mrb_func_t func, mrb_int argc, const mrb_value *argv);
|
|
100
|
-
MRB_API mrb_value mrb_proc_cfunc_env_get(mrb_state *mrb, mrb_int idx);
|
|
101
|
-
/* old name */
|
|
102
|
-
#define mrb_cfunc_env_get(mrb, idx) mrb_proc_cfunc_env_get(mrb, idx)
|
|
103
|
-
|
|
104
|
-
#define MRB_METHOD_FUNC_FL 1
|
|
105
|
-
#define MRB_METHOD_NOARG_FL 2
|
|
106
|
-
|
|
107
|
-
#ifndef MRB_USE_METHOD_T_STRUCT
|
|
108
|
-
|
|
109
|
-
#define MRB_METHOD_FUNC_P(m) (((uintptr_t)(m))&MRB_METHOD_FUNC_FL)
|
|
110
|
-
#define MRB_METHOD_NOARG_P(m) ((((uintptr_t)(m))&MRB_METHOD_NOARG_FL)?1:0)
|
|
111
|
-
#define MRB_METHOD_NOARG_SET(m) ((m)=(mrb_method_t)(((uintptr_t)(m))|MRB_METHOD_NOARG_FL))
|
|
112
|
-
#define MRB_METHOD_FUNC(m) ((mrb_func_t)((uintptr_t)(m)>>2))
|
|
113
|
-
#define MRB_METHOD_FROM_FUNC(m,fn) ((m)=(mrb_method_t)((((uintptr_t)(fn))<<2)|MRB_METHOD_FUNC_FL))
|
|
114
|
-
#define MRB_METHOD_FROM_PROC(m,pr) ((m)=(mrb_method_t)(pr))
|
|
115
|
-
#define MRB_METHOD_PROC_P(m) (!MRB_METHOD_FUNC_P(m))
|
|
116
|
-
#define MRB_METHOD_PROC(m) ((struct RProc*)(m))
|
|
117
|
-
#define MRB_METHOD_UNDEF_P(m) ((m)==0)
|
|
118
|
-
|
|
119
|
-
#else
|
|
120
|
-
|
|
121
|
-
#define MRB_METHOD_FUNC_P(m) ((m).flags&MRB_METHOD_FUNC_FL)
|
|
122
|
-
#define MRB_METHOD_NOARG_P(m) (((m).flags&MRB_METHOD_NOARG_FL)?1:0)
|
|
123
|
-
#define MRB_METHOD_FUNC(m) ((m).func)
|
|
124
|
-
#define MRB_METHOD_NOARG_SET(m) do{(m).flags|=MRB_METHOD_NOARG_FL;}while(0)
|
|
125
|
-
#define MRB_METHOD_FROM_FUNC(m,fn) do{(m).flags=MRB_METHOD_FUNC_FL;(m).func=(fn);}while(0)
|
|
126
|
-
#define MRB_METHOD_FROM_PROC(m,pr) do{(m).flags=0;(m).proc=(struct RProc*)(pr);}while(0)
|
|
127
|
-
#define MRB_METHOD_PROC_P(m) (!MRB_METHOD_FUNC_P(m))
|
|
128
|
-
#define MRB_METHOD_PROC(m) ((m).proc)
|
|
129
|
-
#define MRB_METHOD_UNDEF_P(m) ((m).proc==NULL)
|
|
130
|
-
|
|
131
|
-
#endif /* MRB_USE_METHOD_T_STRUCT */
|
|
132
|
-
|
|
133
|
-
#define MRB_METHOD_CFUNC_P(m) (MRB_METHOD_FUNC_P(m)?TRUE:(MRB_METHOD_PROC(m)?(MRB_PROC_CFUNC_P(MRB_METHOD_PROC(m))):FALSE))
|
|
134
|
-
#define MRB_METHOD_CFUNC(m) (MRB_METHOD_FUNC_P(m)?MRB_METHOD_FUNC(m):((MRB_METHOD_PROC(m)&&MRB_PROC_CFUNC_P(MRB_METHOD_PROC(m)))?MRB_PROC_CFUNC(MRB_METHOD_PROC(m)):NULL))
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
#include <mruby/khash.h>
|
|
138
|
-
|
|
139
|
-
MRB_API mrb_value mrb_load_proc(mrb_state *mrb, const struct RProc *proc);
|
|
140
|
-
|
|
141
|
-
static inline void
|
|
142
|
-
mrb_vm_ci_proc_set(mrb_callinfo *ci, const struct RProc *p)
|
|
143
|
-
{
|
|
144
|
-
ci->proc = p;
|
|
145
|
-
ci->pc = (p && !MRB_PROC_CFUNC_P(p)) ? p->body.irep->iseq : NULL;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
static inline struct RClass *
|
|
149
|
-
mrb_vm_ci_target_class(const mrb_callinfo *ci)
|
|
150
|
-
{
|
|
151
|
-
if (ci->u.env && ci->u.env->tt == MRB_TT_ENV) {
|
|
152
|
-
return ci->u.env->c;
|
|
153
|
-
}
|
|
154
|
-
else {
|
|
155
|
-
return ci->u.target_class;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
static inline void
|
|
160
|
-
mrb_vm_ci_target_class_set(mrb_callinfo *ci, struct RClass *tc)
|
|
161
|
-
{
|
|
162
|
-
struct REnv *e = ci->u.env;
|
|
163
|
-
if (e) {
|
|
164
|
-
if (e->tt == MRB_TT_ENV) {
|
|
165
|
-
e->c = tc;
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
ci->u.target_class = tc;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
static inline struct REnv *
|
|
174
|
-
mrb_vm_ci_env(const mrb_callinfo *ci)
|
|
175
|
-
{
|
|
176
|
-
if (ci->u.env && ci->u.env->tt == MRB_TT_ENV) {
|
|
177
|
-
return ci->u.env;
|
|
178
|
-
}
|
|
179
|
-
else {
|
|
180
|
-
return NULL;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
static inline void
|
|
185
|
-
mrb_vm_ci_env_set(mrb_callinfo *ci, struct REnv *e)
|
|
186
|
-
{
|
|
187
|
-
if (ci->u.env) {
|
|
188
|
-
if (ci->u.env->tt == MRB_TT_ENV) {
|
|
189
|
-
if (e) {
|
|
190
|
-
e->c = ci->u.env->c;
|
|
191
|
-
ci->u.env = e;
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
ci->u.target_class = ci->u.env->c;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
if (e) {
|
|
199
|
-
e->c = ci->u.target_class;
|
|
200
|
-
ci->u.env = e;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
else {
|
|
205
|
-
ci->u.env = e;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
MRB_END_DECL
|
|
210
|
-
|
|
211
|
-
#endif /* MRUBY_PROC_H */
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
** @file mruby/throw.h - mruby exception throwing handler
|
|
3
|
-
**
|
|
4
|
-
** See Copyright Notice in mruby.h
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
#ifndef MRB_THROW_H
|
|
8
|
-
#define MRB_THROW_H
|
|
9
|
-
|
|
10
|
-
#if defined(MRB_USE_CXX_ABI)
|
|
11
|
-
# if !defined(__cplusplus)
|
|
12
|
-
# error Trying to use C++ exception handling in C code
|
|
13
|
-
# endif
|
|
14
|
-
#endif
|
|
15
|
-
|
|
16
|
-
#if defined(MRB_USE_CXX_EXCEPTION)
|
|
17
|
-
|
|
18
|
-
# if defined(__cplusplus)
|
|
19
|
-
|
|
20
|
-
#define MRB_TRY(buf) try {
|
|
21
|
-
#define MRB_CATCH(buf) } catch(mrb_jmpbuf_impl e) { if (e != (buf)->impl) { throw e; }
|
|
22
|
-
#define MRB_END_EXC(buf) }
|
|
23
|
-
|
|
24
|
-
#define MRB_THROW(buf) throw((buf)->impl)
|
|
25
|
-
typedef mrb_int mrb_jmpbuf_impl;
|
|
26
|
-
|
|
27
|
-
# else
|
|
28
|
-
# error "need to be compiled with C++ compiler"
|
|
29
|
-
# endif /* __cplusplus */
|
|
30
|
-
|
|
31
|
-
#else
|
|
32
|
-
|
|
33
|
-
#include <setjmp.h>
|
|
34
|
-
|
|
35
|
-
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
|
36
|
-
#define MRB_SETJMP _setjmp
|
|
37
|
-
#define MRB_LONGJMP _longjmp
|
|
38
|
-
#elif defined(__MINGW64__) && defined(__GNUC__) && __GNUC__ >= 4
|
|
39
|
-
#define MRB_SETJMP __builtin_setjmp
|
|
40
|
-
#define MRB_LONGJMP __builtin_longjmp
|
|
41
|
-
#else
|
|
42
|
-
#define MRB_SETJMP setjmp
|
|
43
|
-
#define MRB_LONGJMP longjmp
|
|
44
|
-
#endif
|
|
45
|
-
|
|
46
|
-
#define MRB_TRY(buf) if (MRB_SETJMP((buf)->impl) == 0) {
|
|
47
|
-
#define MRB_CATCH(buf) } else {
|
|
48
|
-
#define MRB_END_EXC(buf) }
|
|
49
|
-
|
|
50
|
-
#define MRB_THROW(buf) MRB_LONGJMP((buf)->impl, 1);
|
|
51
|
-
#define mrb_jmpbuf_impl jmp_buf
|
|
52
|
-
|
|
53
|
-
#endif
|
|
54
|
-
|
|
55
|
-
struct mrb_jmpbuf {
|
|
56
|
-
mrb_jmpbuf_impl impl;
|
|
57
|
-
|
|
58
|
-
#if defined(MRB_USE_CXX_EXCEPTION)
|
|
59
|
-
static mrb_int jmpbuf_id;
|
|
60
|
-
# if defined(__cplusplus)
|
|
61
|
-
mrb_jmpbuf() : impl(jmpbuf_id++) {}
|
|
62
|
-
# endif
|
|
63
|
-
#endif
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
#endif /* MRB_THROW_H */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/assets/test_media/README.md
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
Bitstream Vera Fonts Copyright
|
|
2
|
-
|
|
3
|
-
The fonts have a generous copyright, allowing derivative works (as
|
|
4
|
-
long as "Bitstream" or "Vera" are not in the names), and full
|
|
5
|
-
redistribution (so long as they are not *sold* by themselves). They
|
|
6
|
-
can be be bundled, redistributed and sold with any software.
|
|
7
|
-
|
|
8
|
-
The fonts are distributed under the following copyright:
|
|
9
|
-
|
|
10
|
-
Copyright
|
|
11
|
-
=========
|
|
12
|
-
|
|
13
|
-
Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream
|
|
14
|
-
Vera is a trademark of Bitstream, Inc.
|
|
15
|
-
|
|
16
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
17
|
-
a copy of the fonts accompanying this license ("Fonts") and associated
|
|
18
|
-
documentation files (the "Font Software"), to reproduce and distribute
|
|
19
|
-
the Font Software, including without limitation the rights to use,
|
|
20
|
-
copy, merge, publish, distribute, and/or sell copies of the Font
|
|
21
|
-
Software, and to permit persons to whom the Font Software is furnished
|
|
22
|
-
to do so, subject to the following conditions:
|
|
23
|
-
|
|
24
|
-
The above copyright and trademark notices and this permission notice
|
|
25
|
-
shall be included in all copies of one or more of the Font Software
|
|
26
|
-
typefaces.
|
|
27
|
-
|
|
28
|
-
The Font Software may be modified, altered, or added to, and in
|
|
29
|
-
particular the designs of glyphs or characters in the Fonts may be
|
|
30
|
-
modified and additional glyphs or characters may be added to the
|
|
31
|
-
Fonts, only if the fonts are renamed to names not containing either
|
|
32
|
-
the words "Bitstream" or the word "Vera".
|
|
33
|
-
|
|
34
|
-
This License becomes null and void to the extent applicable to Fonts
|
|
35
|
-
or Font Software that has been modified and is distributed under the
|
|
36
|
-
"Bitstream Vera" names.
|
|
37
|
-
|
|
38
|
-
The Font Software may be sold as part of a larger software package but
|
|
39
|
-
no copy of one or more of the Font Software typefaces may be sold by
|
|
40
|
-
itself.
|
|
41
|
-
|
|
42
|
-
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
43
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
44
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
45
|
-
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
|
|
46
|
-
BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
47
|
-
OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL,
|
|
48
|
-
OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
49
|
-
OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT
|
|
50
|
-
SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
51
|
-
|
|
52
|
-
Except as contained in this notice, the names of Gnome, the Gnome
|
|
53
|
-
Foundation, and Bitstream Inc., shall not be used in advertising or
|
|
54
|
-
otherwise to promote the sale, use or other dealings in this Font
|
|
55
|
-
Software without prior written authorization from the Gnome Foundation
|
|
56
|
-
or Bitstream Inc., respectively. For further information, contact:
|
|
57
|
-
fonts at gnome dot org.
|
|
58
|
-
|
|
59
|
-
Copyright FAQ
|
|
60
|
-
=============
|
|
61
|
-
|
|
62
|
-
1. I don't understand the resale restriction... What gives?
|
|
63
|
-
|
|
64
|
-
Bitstream is giving away these fonts, but wishes to ensure its
|
|
65
|
-
competitors can't just drop the fonts as is into a font sale system
|
|
66
|
-
and sell them as is. It seems fair that if Bitstream can't make money
|
|
67
|
-
from the Bitstream Vera fonts, their competitors should not be able to
|
|
68
|
-
do so either. You can sell the fonts as part of any software package,
|
|
69
|
-
however.
|
|
70
|
-
|
|
71
|
-
2. I want to package these fonts separately for distribution and
|
|
72
|
-
sale as part of a larger software package or system. Can I do so?
|
|
73
|
-
|
|
74
|
-
Yes. A RPM or Debian package is a "larger software package" to begin
|
|
75
|
-
with, and you aren't selling them independently by themselves.
|
|
76
|
-
See 1. above.
|
|
77
|
-
|
|
78
|
-
3. Are derivative works allowed?
|
|
79
|
-
Yes!
|
|
80
|
-
|
|
81
|
-
4. Can I change or add to the font(s)?
|
|
82
|
-
Yes, but you must change the name(s) of the font(s).
|
|
83
|
-
|
|
84
|
-
5. Under what terms are derivative works allowed?
|
|
85
|
-
|
|
86
|
-
You must change the name(s) of the fonts. This is to ensure the
|
|
87
|
-
quality of the fonts, both to protect Bitstream and Gnome. We want to
|
|
88
|
-
ensure that if an application has opened a font specifically of these
|
|
89
|
-
names, it gets what it expects (though of course, using fontconfig,
|
|
90
|
-
substitutions could still could have occurred during font
|
|
91
|
-
opening). You must include the Bitstream copyright. Additional
|
|
92
|
-
copyrights can be added, as per copyright law. Happy Font Hacking!
|
|
93
|
-
|
|
94
|
-
6. If I have improvements for Bitstream Vera, is it possible they might get
|
|
95
|
-
adopted in future versions?
|
|
96
|
-
|
|
97
|
-
Yes. The contract between the Gnome Foundation and Bitstream has
|
|
98
|
-
provisions for working with Bitstream to ensure quality additions to
|
|
99
|
-
the Bitstream Vera font family. Please contact us if you have such
|
|
100
|
-
additions. Note, that in general, we will want such additions for the
|
|
101
|
-
entire family, not just a single font, and that you'll have to keep
|
|
102
|
-
both Gnome and Jim Lyles, Vera's designer, happy! To make sense to add
|
|
103
|
-
glyphs to the font, they must be stylistically in keeping with Vera's
|
|
104
|
-
design. Vera cannot become a "ransom note" font. Jim Lyles will be
|
|
105
|
-
providing a document describing the design elements used in Vera, as a
|
|
106
|
-
guide and aid for people interested in contributing to Vera.
|
|
107
|
-
|
|
108
|
-
7. I want to sell a software package that uses these fonts: Can I do so?
|
|
109
|
-
|
|
110
|
-
Sure. Bundle the fonts with your software and sell your software
|
|
111
|
-
with the fonts. That is the intent of the copyright.
|
|
112
|
-
|
|
113
|
-
8. If applications have built the names "Bitstream Vera" into them,
|
|
114
|
-
can I override this somehow to use fonts of my choosing?
|
|
115
|
-
|
|
116
|
-
This depends on exact details of the software. Most open source
|
|
117
|
-
systems and software (e.g., Gnome, KDE, etc.) are now converting to
|
|
118
|
-
use fontconfig (see www.fontconfig.org) to handle font configuration,
|
|
119
|
-
selection and substitution; it has provisions for overriding font
|
|
120
|
-
names and subsituting alternatives. An example is provided by the
|
|
121
|
-
supplied local.conf file, which chooses the family Bitstream Vera for
|
|
122
|
-
"sans", "serif" and "monospace". Other software (e.g., the XFree86
|
|
123
|
-
core server) has other mechanisms for font substitution.
|
|
124
|
-
|
|
Binary file
|
data/assets/test_media/boom.png
DELETED
|
Binary file
|
data/assets/test_media/coin.png
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/assets/test_media/dial.wav
DELETED
|
Binary file
|