koffi 2.1.1 → 2.1.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.
- package/ChangeLog.md +6 -0
- package/build/qemu/2.1.2/koffi_darwin_arm64.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_darwin_x64.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_freebsd_arm64.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_freebsd_ia32.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_freebsd_x64.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_linux_arm32hf.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_linux_arm64.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_linux_ia32.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_linux_riscv64hf64.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_linux_x64.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_openbsd_ia32.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_openbsd_x64.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_win32_arm64.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_win32_ia32.tar.gz +0 -0
- package/build/qemu/2.1.2/koffi_win32_x64.tar.gz +0 -0
- package/doc/templates/badges.html +3 -0
- package/package.json +2 -2
- package/src/abi_arm64.cc +35 -1
- package/src/abi_x64_win.cc +2 -8
- package/src/abi_x86.cc +1 -7
- package/src/ffi.hh +1 -1
- package/src/util.hh +6 -0
- package/test/raylib.js +37 -5
- package/vendor/libcc/libcc.cc +430 -196
- package/vendor/libcc/libcc.hh +1417 -1283
- package/vendor/raylib/BINDINGS.md +87 -70
- package/vendor/raylib/CHANGELOG +263 -50
- package/vendor/raylib/CMakeLists.txt +12 -0
- package/vendor/raylib/CMakeOptions.txt +8 -1
- package/vendor/raylib/CONVENTIONS.md +2 -3
- package/vendor/raylib/FAQ.md +137 -0
- package/vendor/raylib/HISTORY.md +62 -29
- package/vendor/raylib/LICENSE +1 -1
- package/vendor/raylib/README.md +22 -17
- package/vendor/raylib/ROADMAP.md +8 -7
- package/vendor/raylib/cmake/CompileDefinitions.cmake +19 -15
- package/vendor/raylib/cmake/GlfwImport.cmake +2 -0
- package/vendor/raylib/cmake/LibraryConfigurations.cmake +22 -16
- package/vendor/raylib/cmake/raylib-config.cmake +52 -49
- package/vendor/raylib/examples/CMakeLists.txt +14 -9
- package/vendor/raylib/examples/Makefile +112 -125
- package/vendor/raylib/examples/Makefile.Android +1 -1
- package/vendor/raylib/examples/Makefile.Web +145 -158
- package/vendor/raylib/examples/README.md +141 -141
- package/vendor/raylib/examples/audio/audio_module_playing.c +9 -4
- package/vendor/raylib/examples/audio/audio_multichannel_sound.c +8 -3
- package/vendor/raylib/examples/audio/audio_music_stream.c +16 -11
- package/vendor/raylib/examples/audio/audio_raw_stream.c +57 -9
- package/vendor/raylib/examples/audio/audio_sound_loading.c +8 -3
- package/vendor/raylib/examples/audio/audio_stream_effects.c +179 -0
- package/vendor/raylib/examples/audio/audio_stream_effects.png +0 -0
- package/vendor/raylib/examples/build.zig +17 -6
- package/vendor/raylib/examples/core/core_2d_camera.c +8 -4
- package/vendor/raylib/examples/core/core_2d_camera_mouse_zoom.c +105 -0
- package/vendor/raylib/examples/core/core_2d_camera_mouse_zoom.png +0 -0
- package/vendor/raylib/examples/core/core_2d_camera_platformer.c +11 -6
- package/vendor/raylib/examples/core/core_3d_camera_first_person.c +9 -4
- package/vendor/raylib/examples/core/core_3d_camera_free.c +9 -4
- package/vendor/raylib/examples/core/core_3d_camera_mode.c +8 -3
- package/vendor/raylib/examples/core/core_3d_picking.c +9 -4
- package/vendor/raylib/examples/core/core_basic_screen_manager.c +9 -7
- package/vendor/raylib/examples/core/core_basic_window.c +8 -3
- package/vendor/raylib/examples/core/core_basic_window_web.c +13 -11
- package/vendor/raylib/examples/core/core_custom_frame_control.c +9 -4
- package/vendor/raylib/examples/core/core_custom_logging.c +12 -8
- package/vendor/raylib/examples/core/core_drop_files.c +20 -12
- package/vendor/raylib/examples/core/core_input_gamepad.c +20 -15
- package/vendor/raylib/examples/core/core_input_gestures.c +19 -15
- package/vendor/raylib/examples/core/core_input_keys.c +8 -3
- package/vendor/raylib/examples/core/core_input_mouse.c +8 -3
- package/vendor/raylib/examples/core/core_input_mouse_wheel.c +8 -3
- package/vendor/raylib/examples/core/core_input_multitouch.c +8 -3
- package/vendor/raylib/examples/core/core_loading_thread.c +10 -6
- package/vendor/raylib/examples/core/core_random_values.c +8 -3
- package/vendor/raylib/examples/core/core_scissor_test.c +8 -3
- package/vendor/raylib/examples/core/core_smooth_pixelperfect.c +9 -4
- package/vendor/raylib/examples/core/core_split_screen.c +8 -3
- package/vendor/raylib/examples/core/core_storage_values.c +109 -3
- package/vendor/raylib/examples/core/core_vr_simulator.c +15 -7
- package/vendor/raylib/examples/core/core_window_flags.c +8 -3
- package/vendor/raylib/examples/core/core_window_letterbox.c +13 -18
- package/vendor/raylib/examples/core/core_window_should_close.c +77 -0
- package/vendor/raylib/examples/core/core_window_should_close.png +0 -0
- package/vendor/raylib/examples/core/core_world_screen.c +9 -4
- package/vendor/raylib/examples/examples_template.c +8 -3
- package/vendor/raylib/examples/models/models_animation.c +11 -7
- package/vendor/raylib/examples/models/models_billboard.c +9 -4
- package/vendor/raylib/examples/models/models_box_collisions.c +8 -3
- package/vendor/raylib/examples/models/models_cubicmap.c +9 -4
- package/vendor/raylib/examples/models/models_first_person_maze.c +9 -4
- package/vendor/raylib/examples/models/models_geometric_shapes.c +8 -3
- package/vendor/raylib/examples/models/models_heightmap.c +9 -4
- package/vendor/raylib/examples/models/models_loading.c +21 -17
- package/vendor/raylib/examples/models/models_loading_gltf.c +15 -41
- package/vendor/raylib/examples/models/models_loading_vox.c +9 -4
- package/vendor/raylib/examples/models/models_mesh_generation.c +71 -58
- package/vendor/raylib/examples/models/models_mesh_picking.c +25 -7
- package/vendor/raylib/examples/models/models_orthographic_projection.c +8 -5
- package/vendor/raylib/examples/models/models_rlgl_solar_system.c +6 -4
- package/vendor/raylib/examples/models/models_skybox.c +16 -12
- package/vendor/raylib/examples/models/models_waving_cubes.c +9 -4
- package/vendor/raylib/examples/models/models_yaw_pitch_roll.c +12 -7
- package/vendor/raylib/examples/models/resources/LICENSE.md +9 -10
- package/vendor/raylib/examples/models/resources/models/gltf/LICENSE +2 -23
- package/vendor/raylib/examples/models/resources/models/gltf/{raylib_32x32.glb → raylib_logo_3d.glb} +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/robot.blend +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/robot.glb +0 -0
- package/vendor/raylib/examples/others/easings_testbed.c +10 -8
- package/vendor/raylib/examples/others/easings_testbed.png +0 -0
- package/vendor/raylib/examples/others/embedded_files_loading.c +10 -5
- package/vendor/raylib/examples/others/embedded_files_loading.png +0 -0
- package/vendor/raylib/examples/others/raylib_opengl_interop.c +10 -6
- package/vendor/raylib/{src/extras/easings.h → examples/others/reasings.h} +38 -38
- package/vendor/raylib/examples/others/rlgl_compute_shader.c +21 -20
- package/vendor/raylib/examples/others/rlgl_compute_shader.png +0 -0
- package/vendor/raylib/examples/others/rlgl_standalone.c +4 -4
- package/vendor/raylib/examples/others/rlgl_standalone.png +0 -0
- package/vendor/raylib/examples/raylib_compile_execute.bat +2 -2
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/lighting.fs +1 -1
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/{base_lighting_instanced.vs → lighting_instancing.vs} +2 -2
- package/vendor/raylib/examples/shaders/rlights.h +14 -27
- package/vendor/raylib/examples/shaders/shaders_basic_lighting.c +24 -26
- package/vendor/raylib/examples/shaders/shaders_custom_uniform.c +10 -5
- package/vendor/raylib/examples/shaders/shaders_eratosthenes.c +13 -8
- package/vendor/raylib/examples/shaders/shaders_fog.c +8 -12
- package/vendor/raylib/examples/shaders/shaders_hot_reloading.c +10 -5
- package/vendor/raylib/examples/shaders/shaders_julia_set.c +9 -4
- package/vendor/raylib/examples/shaders/shaders_mesh_instancing.c +45 -119
- package/vendor/raylib/examples/shaders/shaders_model_shader.c +10 -5
- package/vendor/raylib/examples/shaders/shaders_multi_sample2d.c +8 -3
- package/vendor/raylib/examples/shaders/shaders_palette_switch.c +8 -3
- package/vendor/raylib/examples/shaders/shaders_postprocessing.c +9 -4
- package/vendor/raylib/examples/shaders/shaders_raymarching.c +14 -11
- package/vendor/raylib/examples/shaders/shaders_shapes_textures.c +8 -3
- package/vendor/raylib/examples/shaders/shaders_simple_mask.c +10 -5
- package/vendor/raylib/examples/shaders/shaders_spotlight.c +10 -6
- package/vendor/raylib/examples/shaders/shaders_texture_drawing.c +9 -4
- package/vendor/raylib/examples/shaders/shaders_texture_outline.c +8 -3
- package/vendor/raylib/examples/shaders/shaders_texture_waves.c +8 -3
- package/vendor/raylib/{src/extras → examples/shapes}/raygui.h +1290 -1141
- package/vendor/raylib/examples/{others/easings.h → shapes/reasings.h} +40 -40
- package/vendor/raylib/examples/shapes/shapes_basic_shapes.c +8 -3
- package/vendor/raylib/examples/shapes/shapes_bouncing_ball.c +8 -3
- package/vendor/raylib/examples/shapes/shapes_collision_area.c +10 -4
- package/vendor/raylib/examples/shapes/shapes_colors_palette.c +8 -3
- package/vendor/raylib/examples/shapes/shapes_draw_circle_sector.c +9 -4
- package/vendor/raylib/examples/shapes/shapes_draw_rectangle_rounded.c +9 -4
- package/vendor/raylib/examples/shapes/shapes_draw_ring.c +10 -6
- package/vendor/raylib/examples/shapes/shapes_easings_ball_anim.c +9 -4
- package/vendor/raylib/examples/shapes/shapes_easings_box_anim.c +9 -4
- package/vendor/raylib/examples/shapes/shapes_easings_rectangle_array.c +9 -4
- package/vendor/raylib/examples/shapes/shapes_following_eyes.c +8 -3
- package/vendor/raylib/examples/shapes/shapes_lines_bezier.c +8 -3
- package/vendor/raylib/examples/shapes/shapes_logo_raylib.c +8 -3
- package/vendor/raylib/examples/shapes/shapes_logo_raylib_anim.c +8 -3
- package/vendor/raylib/examples/shapes/shapes_rectangle_scaling.c +14 -5
- package/vendor/raylib/examples/shapes/shapes_top_down_lights.c +355 -0
- package/vendor/raylib/examples/shapes/shapes_top_down_lights.png +0 -0
- package/vendor/raylib/examples/text/resources/DotGothic16-Regular.ttf +0 -0
- package/vendor/raylib/examples/text/resources/DotGothic16-Regular_OFL.txt +93 -0
- package/vendor/raylib/examples/text/resources/LICENSE.md +1 -1
- package/vendor/raylib/examples/text/text_codepoints_loading.c +138 -0
- package/vendor/raylib/examples/text/text_codepoints_loading.png +0 -0
- package/vendor/raylib/examples/text/text_draw_3d.c +42 -33
- package/vendor/raylib/examples/text/text_font_filters.c +14 -11
- package/vendor/raylib/examples/text/text_font_loading.c +9 -4
- package/vendor/raylib/examples/text/text_font_sdf.c +9 -4
- package/vendor/raylib/examples/text/text_font_spritefont.c +12 -6
- package/vendor/raylib/examples/text/text_format_text.c +8 -3
- package/vendor/raylib/examples/text/text_input_box.c +8 -3
- package/vendor/raylib/examples/text/text_raylib_fonts.c +9 -4
- package/vendor/raylib/examples/text/text_rectangle_bounds.c +9 -5
- package/vendor/raylib/examples/text/text_unicode.c +9 -7
- package/vendor/raylib/examples/text/text_writing_anim.c +8 -3
- package/vendor/raylib/examples/textures/resources/scarfy_run.gif +0 -0
- package/vendor/raylib/examples/textures/textures_background_scrolling.c +8 -3
- package/vendor/raylib/examples/textures/textures_blend_modes.c +8 -3
- package/vendor/raylib/examples/textures/textures_bunnymark.c +8 -3
- package/vendor/raylib/examples/textures/textures_draw_tiled.c +14 -10
- package/vendor/raylib/examples/textures/textures_fog_of_war.c +154 -0
- package/vendor/raylib/examples/textures/textures_fog_of_war.png +0 -0
- package/vendor/raylib/examples/textures/textures_gif_player.c +121 -0
- package/vendor/raylib/examples/textures/textures_gif_player.png +0 -0
- package/vendor/raylib/examples/textures/textures_image_drawing.c +8 -3
- package/vendor/raylib/examples/textures/textures_image_generation.c +8 -3
- package/vendor/raylib/examples/textures/textures_image_loading.c +8 -3
- package/vendor/raylib/examples/textures/textures_image_processing.c +8 -3
- package/vendor/raylib/examples/textures/textures_image_text.c +8 -3
- package/vendor/raylib/examples/textures/textures_logo_raylib.c +8 -3
- package/vendor/raylib/examples/textures/textures_mouse_painting.c +9 -4
- package/vendor/raylib/examples/textures/textures_npatch_drawing.c +8 -3
- package/vendor/raylib/examples/textures/textures_particles_blending.c +8 -3
- package/vendor/raylib/examples/textures/textures_polygon.c +9 -5
- package/vendor/raylib/examples/textures/textures_raw_data.c +8 -3
- package/vendor/raylib/examples/textures/{textures_rectangle.c → textures_sprite_anim.c} +11 -5
- package/vendor/raylib/examples/textures/{textures_rectangle.png → textures_sprite_anim.png} +0 -0
- package/vendor/raylib/examples/textures/textures_sprite_button.c +8 -3
- package/vendor/raylib/examples/textures/textures_sprite_explosion.c +8 -3
- package/vendor/raylib/examples/textures/textures_srcrec_dstrec.c +8 -3
- package/vendor/raylib/examples/textures/textures_to_image.c +8 -3
- package/vendor/raylib/parser/LICENSE +1 -1
- package/vendor/raylib/parser/Makefile +28 -0
- package/vendor/raylib/parser/README.md +49 -5
- package/vendor/raylib/parser/output/raylib_api.json +10717 -0
- package/vendor/raylib/parser/output/raylib_api.lua +7435 -0
- package/vendor/raylib/parser/{raylib_api.txt → output/raylib_api.txt} +1371 -824
- package/vendor/raylib/parser/{raylib_api.xml → output/raylib_api.xml} +827 -595
- package/vendor/raylib/parser/raylib_parser.c +1174 -196
- package/vendor/raylib/projects/4coder/Makefile +2 -4
- package/vendor/raylib/projects/4coder/main.c +0 -1
- package/vendor/raylib/projects/CMake/CMakeLists.txt +13 -16
- package/vendor/raylib/projects/CMake/README.md +27 -0
- package/vendor/raylib/projects/CMake/core_basic_window.c +52 -31
- package/vendor/raylib/projects/CodeBlocks/README.md +4 -4
- package/vendor/raylib/projects/Geany/core_basic_window.c +1 -1
- package/vendor/raylib/projects/Notepad++/c_raylib.xml +168 -128
- package/vendor/raylib/projects/Notepad++/npes_saved_tcc.txt +0 -0
- package/vendor/raylib/projects/Notepad++/npes_saved_w64devkit.txt +0 -0
- package/vendor/raylib/projects/Notepad++/npes_saved_zig.txt +0 -0
- package/vendor/raylib/projects/Notepad++/raylib_npp_parser/raylib_npp.xml +168 -84
- package/vendor/raylib/projects/Notepad++/raylib_npp_parser/raylib_to_parse.h +67 -51
- package/vendor/raylib/projects/README.md +1 -1
- package/vendor/raylib/projects/VSCode/.vscode/c_cpp_properties.json +1 -1
- package/vendor/raylib/projects/VSCode/Makefile +8 -11
- package/vendor/raylib/projects/VSCode/main.c +53 -26
- package/vendor/raylib/projects/VSCode/resources/LICENSE +1 -0
- package/vendor/raylib/projects/scripts/build-linux.sh +6 -6
- package/vendor/raylib/projects/scripts/build-osx.sh +6 -6
- package/vendor/raylib/projects/scripts/build-rpi.sh +6 -6
- package/vendor/raylib/projects/scripts/build-windows.bat +2 -2
- package/vendor/raylib/src/CMakeLists.txt +6 -7
- package/vendor/raylib/src/Makefile +209 -103
- package/vendor/raylib/src/build.zig +56 -20
- package/vendor/raylib/src/config.h +32 -27
- package/vendor/raylib/src/external/cgltf.h +342 -104
- package/vendor/raylib/src/external/dr_wav.h +487 -225
- package/vendor/raylib/src/external/glfw/src/posix_time.c +1 -3
- package/vendor/raylib/src/external/glfw/src/wl_init.c +1 -3
- package/vendor/raylib/src/external/jar_xm.h +2 -1
- package/vendor/raylib/src/external/miniaudio.h +62251 -42061
- package/vendor/raylib/src/external/qoi.h +671 -0
- package/vendor/raylib/src/external/stb_vorbis.h +1 -1
- package/vendor/raylib/src/external/vox_loader.h +30 -25
- package/vendor/raylib/src/minshell.html +82 -0
- package/vendor/raylib/src/raudio.c +359 -201
- package/vendor/raylib/src/raylib.dll.rc +5 -5
- package/vendor/raylib/src/raylib.dll.rc.data +0 -0
- package/vendor/raylib/src/raylib.h +95 -63
- package/vendor/raylib/src/raylib.rc +5 -5
- package/vendor/raylib/src/raylib.rc.data +0 -0
- package/vendor/raylib/src/raymath.h +391 -133
- package/vendor/raylib/src/rcamera.h +32 -41
- package/vendor/raylib/src/rcore.c +775 -471
- package/vendor/raylib/src/rgestures.h +5 -5
- package/vendor/raylib/src/rglfw.c +3 -3
- package/vendor/raylib/src/rlgl.h +184 -144
- package/vendor/raylib/src/rmodels.c +207 -144
- package/vendor/raylib/src/rshapes.c +105 -47
- package/vendor/raylib/src/rtext.c +255 -38
- package/vendor/raylib/src/rtextures.c +167 -71
- package/vendor/raylib/src/shell.html +63 -63
- package/vendor/raylib/src/utils.c +49 -3
- package/vendor/raylib/src/utils.h +3 -3
- package/build/qemu/2.1.1/koffi_darwin_arm64.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_darwin_x64.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_freebsd_arm64.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_freebsd_ia32.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_freebsd_x64.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_linux_arm32hf.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_linux_arm64.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_linux_ia32.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_linux_riscv64hf64.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_linux_x64.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_openbsd_ia32.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_openbsd_x64.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_win32_arm64.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_win32_ia32.tar.gz +0 -0
- package/build/qemu/2.1.1/koffi_win32_x64.tar.gz +0 -0
- package/vendor/raylib/CONTRIBUTORS.md +0 -63
- package/vendor/raylib/SPONSORS.md +0 -68
- package/vendor/raylib/examples/core/core_quat_conversion.c +0 -132
- package/vendor/raylib/examples/core/core_quat_conversion.png +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/AnimatedMorphCube.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/AnimatedTriangle.gltf +0 -118
- package/vendor/raylib/examples/models/resources/models/gltf/BoxAnimated.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/girl.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/rigged_figure.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/vertex_colored_object.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/iqm/vertex_colored_object.iqm +0 -0
- package/vendor/raylib/examples/models/rlights.h +0 -183
- package/vendor/raylib/examples/others/raudio_standalone.c +0 -152
- package/vendor/raylib/examples/others/resources/audio/country.mp3 +0 -0
- package/vendor/raylib/examples/others/resources/audio/target.ogg +0 -0
- package/vendor/raylib/examples/others/resources/audio/weird.wav +0 -0
- package/vendor/raylib/examples/physics/physics_demo.c +0 -128
- package/vendor/raylib/examples/physics/physics_demo.png +0 -0
- package/vendor/raylib/examples/physics/physics_friction.c +0 -142
- package/vendor/raylib/examples/physics/physics_friction.png +0 -0
- package/vendor/raylib/examples/physics/physics_movement.c +0 -128
- package/vendor/raylib/examples/physics/physics_movement.png +0 -0
- package/vendor/raylib/examples/physics/physics_restitution.c +0 -129
- package/vendor/raylib/examples/physics/physics_restitution.png +0 -0
- package/vendor/raylib/examples/physics/physics_shatter.c +0 -111
- package/vendor/raylib/examples/physics/physics_shatter.png +0 -0
- package/vendor/raylib/parser/raylib_api.json +0 -6668
- package/vendor/raylib/projects/VS2019/raylib/raylib.rc +0 -0
- package/vendor/raylib/projects/VS2019/raylib/resource.h +0 -14
- package/vendor/raylib/src/extras/physac.h +0 -1977
- package/vendor/raylib/src/extras/rmem.h +0 -751
- package/vendor/raylib/src/raudio.h +0 -198
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
const std = @import("std");
|
|
2
2
|
|
|
3
|
-
pub fn
|
|
4
|
-
// Standard target options allows the person running `zig build` to choose
|
|
5
|
-
// what target to build for. Here we do not override the defaults, which
|
|
6
|
-
// means any target is allowed, and the default is native. Other options
|
|
7
|
-
// for restricting supported target set are available.
|
|
8
|
-
const target = b.standardTargetOptions(.{});
|
|
9
|
-
|
|
3
|
+
pub fn addRaylib(b: *std.build.Builder, target: std.zig.CrossTarget) *std.build.LibExeObjStep {
|
|
10
4
|
// Standard release options allow the person running `zig build` to select
|
|
11
5
|
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
|
|
12
6
|
const mode = b.standardReleaseOptions();
|
|
@@ -14,47 +8,89 @@ pub fn build(b: *std.build.Builder) void {
|
|
|
14
8
|
const raylib_flags = &[_][]const u8{
|
|
15
9
|
"-std=gnu99",
|
|
16
10
|
"-DPLATFORM_DESKTOP",
|
|
17
|
-
"-DGL_SILENCE_DEPRECATION",
|
|
11
|
+
"-DGL_SILENCE_DEPRECATION=199309L",
|
|
18
12
|
"-fno-sanitize=undefined", // https://github.com/raysan5/raylib/issues/1891
|
|
19
13
|
};
|
|
20
14
|
|
|
21
|
-
const raylib = b.addStaticLibrary("raylib", "raylib.h");
|
|
15
|
+
const raylib = b.addStaticLibrary("raylib", srcdir ++ "/raylib.h");
|
|
22
16
|
raylib.setTarget(target);
|
|
23
17
|
raylib.setBuildMode(mode);
|
|
24
18
|
raylib.linkLibC();
|
|
25
19
|
|
|
26
|
-
raylib.addIncludeDir("external/glfw/include");
|
|
20
|
+
raylib.addIncludeDir(srcdir ++ "/external/glfw/include");
|
|
27
21
|
|
|
28
22
|
raylib.addCSourceFiles(&.{
|
|
29
|
-
"raudio.c",
|
|
30
|
-
"rcore.c",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"utils.c",
|
|
23
|
+
srcdir ++ "/raudio.c",
|
|
24
|
+
srcdir ++ "/rcore.c",
|
|
25
|
+
srcdir ++ "/rmodels.c",
|
|
26
|
+
srcdir ++ "/rshapes.c",
|
|
27
|
+
srcdir ++ "/rtext.c",
|
|
28
|
+
srcdir ++ "/rtextures.c",
|
|
29
|
+
srcdir ++ "/utils.c",
|
|
37
30
|
}, raylib_flags);
|
|
38
31
|
|
|
39
32
|
switch (raylib.target.toTarget().os.tag) {
|
|
40
33
|
.windows => {
|
|
34
|
+
raylib.addCSourceFiles(&.{srcdir ++ "/rglfw.c"}, raylib_flags);
|
|
41
35
|
raylib.linkSystemLibrary("winmm");
|
|
42
36
|
raylib.linkSystemLibrary("gdi32");
|
|
43
37
|
raylib.linkSystemLibrary("opengl32");
|
|
44
38
|
raylib.addIncludeDir("external/glfw/deps/mingw");
|
|
45
39
|
},
|
|
46
40
|
.linux => {
|
|
41
|
+
raylib.addCSourceFiles(&.{srcdir ++ "/rglfw.c"}, raylib_flags);
|
|
42
|
+
raylib.linkSystemLibrary("GL");
|
|
43
|
+
raylib.linkSystemLibrary("rt");
|
|
44
|
+
raylib.linkSystemLibrary("dl");
|
|
45
|
+
raylib.linkSystemLibrary("m");
|
|
46
|
+
raylib.linkSystemLibrary("X11");
|
|
47
|
+
},
|
|
48
|
+
.freebsd, .openbsd, .netbsd, .dragonfly => {
|
|
49
|
+
raylib.addCSourceFiles(&.{srcdir ++ "/rglfw.c"}, raylib_flags);
|
|
47
50
|
raylib.linkSystemLibrary("GL");
|
|
48
51
|
raylib.linkSystemLibrary("rt");
|
|
49
52
|
raylib.linkSystemLibrary("dl");
|
|
50
53
|
raylib.linkSystemLibrary("m");
|
|
51
54
|
raylib.linkSystemLibrary("X11");
|
|
55
|
+
raylib.linkSystemLibrary("Xrandr");
|
|
56
|
+
raylib.linkSystemLibrary("Xinerama");
|
|
57
|
+
raylib.linkSystemLibrary("Xi");
|
|
58
|
+
raylib.linkSystemLibrary("Xxf86vm");
|
|
59
|
+
raylib.linkSystemLibrary("Xcursor");
|
|
60
|
+
},
|
|
61
|
+
.macos => {
|
|
62
|
+
// On macos rglfw.c include Objective-C files.
|
|
63
|
+
const raylib_flags_extra_macos = &[_][]const u8{
|
|
64
|
+
"-ObjC",
|
|
65
|
+
};
|
|
66
|
+
raylib.addCSourceFiles(
|
|
67
|
+
&.{srcdir ++ "/rglfw.c"},
|
|
68
|
+
raylib_flags ++ raylib_flags_extra_macos,
|
|
69
|
+
);
|
|
70
|
+
raylib.linkFramework("Foundation");
|
|
52
71
|
},
|
|
53
72
|
else => {
|
|
54
73
|
@panic("Unsupported OS");
|
|
55
74
|
},
|
|
56
75
|
}
|
|
57
76
|
|
|
58
|
-
raylib
|
|
59
|
-
|
|
77
|
+
return raylib;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
pub fn build(b: *std.build.Builder) void {
|
|
81
|
+
// Standard target options allows the person running `zig build` to choose
|
|
82
|
+
// what target to build for. Here we do not override the defaults, which
|
|
83
|
+
// means any target is allowed, and the default is native. Other options
|
|
84
|
+
// for restricting supported target set are available.
|
|
85
|
+
const target = b.standardTargetOptions(.{});
|
|
86
|
+
|
|
87
|
+
const lib = addRaylib(b, target);
|
|
88
|
+
lib.setOutputDir(srcdir);
|
|
89
|
+
lib.install();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const srcdir = getSrcDir();
|
|
93
|
+
|
|
94
|
+
fn getSrcDir() []const u8 {
|
|
95
|
+
return std.fs.path.dirname(@src().file) orelse ".";
|
|
60
96
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* LICENSE: zlib/libpng
|
|
8
8
|
*
|
|
9
|
-
* Copyright (c) 2018-
|
|
9
|
+
* Copyright (c) 2018-2022 Ahmad Fatoum & Ramon Santamaria (@raysan5)
|
|
10
10
|
*
|
|
11
11
|
* This software is provided "as-is", without any express or implied warranty. In no event
|
|
12
12
|
* will the authors be held liable for any damages arising from the use of this software.
|
|
@@ -26,7 +26,17 @@
|
|
|
26
26
|
**********************************************************************************************/
|
|
27
27
|
|
|
28
28
|
//------------------------------------------------------------------------------------
|
|
29
|
-
// Module
|
|
29
|
+
// Module selection - Some modules could be avoided
|
|
30
|
+
// Mandatory modules: rcore, rlgl, utils
|
|
31
|
+
//------------------------------------------------------------------------------------
|
|
32
|
+
#define SUPPORT_MODULE_RSHAPES 1
|
|
33
|
+
#define SUPPORT_MODULE_RTEXTURES 1
|
|
34
|
+
#define SUPPORT_MODULE_RTEXT 1 // WARNING: It requires SUPPORT_MODULE_RTEXTURES to load sprite font textures
|
|
35
|
+
#define SUPPORT_MODULE_RMODELS 1
|
|
36
|
+
#define SUPPORT_MODULE_RAUDIO 1
|
|
37
|
+
|
|
38
|
+
//------------------------------------------------------------------------------------
|
|
39
|
+
// Module: rcore - Configuration Flags
|
|
30
40
|
//------------------------------------------------------------------------------------
|
|
31
41
|
// Camera module is included (rcamera.h) and multiple predefined cameras are available: free, 1st/3rd person, orbital
|
|
32
42
|
#define SUPPORT_CAMERA_SYSTEM 1
|
|
@@ -36,8 +46,6 @@
|
|
|
36
46
|
#define SUPPORT_MOUSE_GESTURES 1
|
|
37
47
|
// Reconfigure standard input to receive key inputs, works with SSH connection.
|
|
38
48
|
#define SUPPORT_SSH_KEYBOARD_RPI 1
|
|
39
|
-
// Draw a mouse pointer on screen
|
|
40
|
-
//#define SUPPORT_MOUSE_CURSOR_POINT 1
|
|
41
49
|
// Setting a higher resolution can improve the accuracy of time-out intervals in wait functions.
|
|
42
50
|
// However, it can also reduce overall system performance, because the thread scheduler switches tasks more often.
|
|
43
51
|
#define SUPPORT_WINMM_HIGHRES_TIMER 1
|
|
@@ -53,8 +61,6 @@
|
|
|
53
61
|
#define SUPPORT_GIF_RECORDING 1
|
|
54
62
|
// Support CompressData() and DecompressData() functions
|
|
55
63
|
#define SUPPORT_COMPRESSION_API 1
|
|
56
|
-
// Support saving binary data automatically to a generated storage.data file. This file is managed internally.
|
|
57
|
-
#define SUPPORT_DATA_STORAGE 1
|
|
58
64
|
// Support automatic generated events, loading and recording of those events when required
|
|
59
65
|
//#define SUPPORT_EVENTS_AUTOMATION 1
|
|
60
66
|
// Support custom frame control, only for advance users
|
|
@@ -62,21 +68,19 @@
|
|
|
62
68
|
// Enabling this flag allows manual control of the frame processes, use at your own risk
|
|
63
69
|
//#define SUPPORT_CUSTOM_FRAME_CONTROL 1
|
|
64
70
|
|
|
65
|
-
//
|
|
71
|
+
// rcore: Configuration values
|
|
66
72
|
//------------------------------------------------------------------------------------
|
|
67
|
-
#
|
|
68
|
-
|
|
69
|
-
#else
|
|
70
|
-
#define MAX_FILEPATH_LENGTH 512 // Maximum length supported for filepaths
|
|
71
|
-
#endif
|
|
73
|
+
#define MAX_FILEPATH_CAPACITY 8192 // Maximum file paths capacity
|
|
74
|
+
#define MAX_FILEPATH_LENGTH 4096 // Maximum length for filepaths (Linux PATH_MAX default value)
|
|
72
75
|
|
|
73
|
-
#define
|
|
74
|
-
#define
|
|
75
|
-
#define
|
|
76
|
+
#define MAX_KEYBOARD_KEYS 512 // Maximum number of keyboard keys supported
|
|
77
|
+
#define MAX_MOUSE_BUTTONS 8 // Maximum number of mouse buttons supported
|
|
78
|
+
#define MAX_GAMEPADS 4 // Maximum number of gamepads supported
|
|
79
|
+
#define MAX_GAMEPAD_AXIS 8 // Maximum number of axis supported (per gamepad)
|
|
80
|
+
#define MAX_GAMEPAD_BUTTONS 32 // Maximum number of buttons supported (per gamepad)
|
|
76
81
|
#define MAX_TOUCH_POINTS 8 // Maximum number of touch points supported
|
|
77
|
-
#define MAX_KEY_PRESSED_QUEUE 16 //
|
|
78
|
-
|
|
79
|
-
#define STORAGE_DATA_FILE "storage.data" // Automatic storage filename
|
|
82
|
+
#define MAX_KEY_PRESSED_QUEUE 16 // Maximum number of keys in the key input queue
|
|
83
|
+
#define MAX_CHAR_PRESSED_QUEUE 16 // Maximum number of characters in the char input queue
|
|
80
84
|
|
|
81
85
|
#define MAX_DECOMPRESSION_SIZE 64 // Max size allocated for decompression in MB
|
|
82
86
|
|
|
@@ -124,7 +128,7 @@
|
|
|
124
128
|
|
|
125
129
|
|
|
126
130
|
//------------------------------------------------------------------------------------
|
|
127
|
-
// Module:
|
|
131
|
+
// Module: rshapes - Configuration Flags
|
|
128
132
|
//------------------------------------------------------------------------------------
|
|
129
133
|
// Use QUADS instead of TRIANGLES for drawing when possible
|
|
130
134
|
// Some lines-based shapes could still use lines
|
|
@@ -132,7 +136,7 @@
|
|
|
132
136
|
|
|
133
137
|
|
|
134
138
|
//------------------------------------------------------------------------------------
|
|
135
|
-
// Module:
|
|
139
|
+
// Module: rtextures - Configuration Flags
|
|
136
140
|
//------------------------------------------------------------------------------------
|
|
137
141
|
// Selecte desired fileformats to be supported for image data loading
|
|
138
142
|
#define SUPPORT_FILEFORMAT_PNG 1
|
|
@@ -140,6 +144,7 @@
|
|
|
140
144
|
//#define SUPPORT_FILEFORMAT_TGA 1
|
|
141
145
|
//#define SUPPORT_FILEFORMAT_JPG 1
|
|
142
146
|
#define SUPPORT_FILEFORMAT_GIF 1
|
|
147
|
+
#define SUPPORT_FILEFORMAT_QOI 1
|
|
143
148
|
//#define SUPPORT_FILEFORMAT_PSD 1
|
|
144
149
|
#define SUPPORT_FILEFORMAT_DDS 1
|
|
145
150
|
#define SUPPORT_FILEFORMAT_HDR 1
|
|
@@ -148,7 +153,7 @@
|
|
|
148
153
|
//#define SUPPORT_FILEFORMAT_PKM 1
|
|
149
154
|
//#define SUPPORT_FILEFORMAT_PVR 1
|
|
150
155
|
|
|
151
|
-
// Support image export functionality (.png, .bmp, .tga, .jpg)
|
|
156
|
+
// Support image export functionality (.png, .bmp, .tga, .jpg, .qoi)
|
|
152
157
|
#define SUPPORT_IMAGE_EXPORT 1
|
|
153
158
|
// Support procedural image generation functionality (gradient, spot, perlin-noise, cellular)
|
|
154
159
|
#define SUPPORT_IMAGE_GENERATION 1
|
|
@@ -158,7 +163,7 @@
|
|
|
158
163
|
|
|
159
164
|
|
|
160
165
|
//------------------------------------------------------------------------------------
|
|
161
|
-
// Module:
|
|
166
|
+
// Module: rtext - Configuration Flags
|
|
162
167
|
//------------------------------------------------------------------------------------
|
|
163
168
|
// Default font is loaded on window initialization to be available for the user to render simple text
|
|
164
169
|
// NOTE: If enabled, uses external module functions to load default raylib font
|
|
@@ -171,7 +176,7 @@
|
|
|
171
176
|
// If not defined, still some functions are supported: TextLength(), TextFormat()
|
|
172
177
|
#define SUPPORT_TEXT_MANIPULATION 1
|
|
173
178
|
|
|
174
|
-
//
|
|
179
|
+
// rtext: Configuration values
|
|
175
180
|
//------------------------------------------------------------------------------------
|
|
176
181
|
#define MAX_TEXT_BUFFER_LENGTH 1024 // Size of internal static buffers used on some functions:
|
|
177
182
|
// TextFormat(), TextSubtext(), TextToUpper(), TextToLower(), TextToPascal(), TextSplit()
|
|
@@ -179,7 +184,7 @@
|
|
|
179
184
|
|
|
180
185
|
|
|
181
186
|
//------------------------------------------------------------------------------------
|
|
182
|
-
// Module:
|
|
187
|
+
// Module: rmodels - Configuration Flags
|
|
183
188
|
//------------------------------------------------------------------------------------
|
|
184
189
|
// Selected desired model fileformats to be supported for loading
|
|
185
190
|
#define SUPPORT_FILEFORMAT_OBJ 1
|
|
@@ -191,13 +196,13 @@
|
|
|
191
196
|
// NOTE: Some generated meshes DO NOT include generated texture coordinates
|
|
192
197
|
#define SUPPORT_MESH_GENERATION 1
|
|
193
198
|
|
|
194
|
-
//
|
|
199
|
+
// rmodels: Configuration values
|
|
195
200
|
//------------------------------------------------------------------------------------
|
|
196
201
|
#define MAX_MATERIAL_MAPS 12 // Maximum number of shader maps supported
|
|
197
202
|
#define MAX_MESH_VERTEX_BUFFERS 7 // Maximum vertex buffers (VBO) per mesh
|
|
198
203
|
|
|
199
204
|
//------------------------------------------------------------------------------------
|
|
200
|
-
// Module:
|
|
205
|
+
// Module: raudio - Configuration Flags
|
|
201
206
|
//------------------------------------------------------------------------------------
|
|
202
207
|
// Desired audio fileformats to be supported for loading
|
|
203
208
|
#define SUPPORT_FILEFORMAT_WAV 1
|
|
@@ -207,7 +212,7 @@
|
|
|
207
212
|
#define SUPPORT_FILEFORMAT_MP3 1
|
|
208
213
|
//#define SUPPORT_FILEFORMAT_FLAC 1
|
|
209
214
|
|
|
210
|
-
//
|
|
215
|
+
// raudio: Configuration values
|
|
211
216
|
//------------------------------------------------------------------------------------
|
|
212
217
|
#define AUDIO_DEVICE_FORMAT ma_format_f32 // Device output format (miniaudio: float-32bit)
|
|
213
218
|
#define AUDIO_DEVICE_CHANNELS 2 // Device output channels: stereo
|