koffi 2.1.0 → 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 +13 -1
- 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/call.cc +2 -2
- package/src/call.hh +1 -1
- package/src/ffi.hh +1 -1
- package/src/util.hh +6 -0
- package/test/raylib.js +37 -5
- package/vendor/libcc/libcc.cc +488 -254
- package/vendor/libcc/libcc.hh +1463 -1277
- 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.0/koffi_darwin_arm64.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_darwin_x64.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_freebsd_arm64.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_freebsd_ia32.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_freebsd_x64.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_linux_arm32hf.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_linux_arm64.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_linux_ia32.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_linux_riscv64hf64.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_linux_x64.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_openbsd_ia32.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_openbsd_x64.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_win32_arm64.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_win32_ia32.tar.gz +0 -0
- package/build/qemu/2.1.0/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
|
@@ -2,17 +2,22 @@
|
|
|
2
2
|
*
|
|
3
3
|
* raylib [core] example - Scissor test
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
5
|
+
* Example originally created with raylib 2.5, last time updated with raylib 3.0
|
|
7
6
|
*
|
|
8
7
|
* Example contributed by Chris Dill (@MysteriousSpace) and reviewed by Ramon Santamaria (@raysan5)
|
|
9
8
|
*
|
|
10
|
-
*
|
|
9
|
+
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
|
10
|
+
* BSD-like license that allows static linking with closed source software
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) 2019-2022 Chris Dill (@MysteriousSpace)
|
|
11
13
|
*
|
|
12
14
|
********************************************************************************************/
|
|
13
15
|
|
|
14
16
|
#include "raylib.h"
|
|
15
17
|
|
|
18
|
+
//------------------------------------------------------------------------------------
|
|
19
|
+
// Program main entry point
|
|
20
|
+
//------------------------------------------------------------------------------------
|
|
16
21
|
int main(void)
|
|
17
22
|
{
|
|
18
23
|
// Initialization
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
*
|
|
3
3
|
* raylib [core] example - smooth pixel-perfect camera
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Example originally created with raylib 3.7, last time updated with raylib 4.0
|
|
6
|
+
*
|
|
8
7
|
* Example contributed by Giancamillo Alessandroni (@NotManyIdeasDev) and
|
|
9
8
|
* reviewed by Ramon Santamaria (@raysan5)
|
|
10
9
|
*
|
|
11
|
-
*
|
|
10
|
+
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
|
11
|
+
* BSD-like license that allows static linking with closed source software
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) 2021-2022 Giancamillo Alessandroni (@NotManyIdeasDev) and Ramon Santamaria (@raysan5)
|
|
12
14
|
*
|
|
13
15
|
********************************************************************************************/
|
|
14
16
|
|
|
@@ -16,6 +18,9 @@
|
|
|
16
18
|
|
|
17
19
|
#include <math.h> // Required for: sinf(), cosf()
|
|
18
20
|
|
|
21
|
+
//------------------------------------------------------------------------------------
|
|
22
|
+
// Program main entry point
|
|
23
|
+
//------------------------------------------------------------------------------------
|
|
19
24
|
int main(void)
|
|
20
25
|
{
|
|
21
26
|
// Initialization
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
*
|
|
3
3
|
* raylib [core] example - split screen
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
5
|
+
* Example originally created with raylib 3.7, last time updated with raylib 4.0
|
|
7
6
|
*
|
|
8
7
|
* Example contributed by Jeffery Myers (@JeffM2501) and reviewed by Ramon Santamaria (@raysan5)
|
|
9
8
|
*
|
|
10
|
-
*
|
|
9
|
+
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
|
10
|
+
* BSD-like license that allows static linking with closed source software
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) 2021-2022 Jeffery Myers (@JeffM2501)
|
|
11
13
|
*
|
|
12
14
|
********************************************************************************************/
|
|
13
15
|
|
|
@@ -40,6 +42,9 @@ void DrawScene(void)
|
|
|
40
42
|
DrawCube(cameraPlayer2.position, 1, 1, 1, BLUE);
|
|
41
43
|
}
|
|
42
44
|
|
|
45
|
+
//------------------------------------------------------------------------------------
|
|
46
|
+
// Program main entry point
|
|
47
|
+
//------------------------------------------------------------------------------------
|
|
43
48
|
int main(void)
|
|
44
49
|
{
|
|
45
50
|
// Initialization
|
|
@@ -2,21 +2,34 @@
|
|
|
2
2
|
*
|
|
3
3
|
* raylib [core] example - Storage save/load values
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
5
|
+
* Example originally created with raylib 1.4, last time updated with raylib 4.2
|
|
7
6
|
*
|
|
8
|
-
*
|
|
7
|
+
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
|
8
|
+
* BSD-like license that allows static linking with closed source software
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
|
9
11
|
*
|
|
10
12
|
********************************************************************************************/
|
|
11
13
|
|
|
12
14
|
#include "raylib.h"
|
|
13
15
|
|
|
16
|
+
#include <stdlib.h> // Required for: calloc(), free()
|
|
17
|
+
|
|
18
|
+
#define STORAGE_DATA_FILE "storage.data" // Storage file
|
|
19
|
+
|
|
14
20
|
// NOTE: Storage positions must start with 0, directly related to file memory layout
|
|
15
21
|
typedef enum {
|
|
16
22
|
STORAGE_POSITION_SCORE = 0,
|
|
17
23
|
STORAGE_POSITION_HISCORE = 1
|
|
18
24
|
} StorageData;
|
|
19
25
|
|
|
26
|
+
// Persistent storage functions
|
|
27
|
+
static bool SaveStorageValue(unsigned int position, int value);
|
|
28
|
+
static int LoadStorageValue(unsigned int position);
|
|
29
|
+
|
|
30
|
+
//------------------------------------------------------------------------------------
|
|
31
|
+
// Program main entry point
|
|
32
|
+
//------------------------------------------------------------------------------------
|
|
20
33
|
int main(void)
|
|
21
34
|
{
|
|
22
35
|
// Initialization
|
|
@@ -84,4 +97,97 @@ int main(void)
|
|
|
84
97
|
//--------------------------------------------------------------------------------------
|
|
85
98
|
|
|
86
99
|
return 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Save integer value to storage file (to defined position)
|
|
103
|
+
// NOTE: Storage positions is directly related to file memory layout (4 bytes each integer)
|
|
104
|
+
bool SaveStorageValue(unsigned int position, int value)
|
|
105
|
+
{
|
|
106
|
+
bool success = false;
|
|
107
|
+
unsigned int dataSize = 0;
|
|
108
|
+
unsigned int newDataSize = 0;
|
|
109
|
+
unsigned char *fileData = LoadFileData(STORAGE_DATA_FILE, &dataSize);
|
|
110
|
+
unsigned char *newFileData = NULL;
|
|
111
|
+
|
|
112
|
+
if (fileData != NULL)
|
|
113
|
+
{
|
|
114
|
+
if (dataSize <= (position*sizeof(int)))
|
|
115
|
+
{
|
|
116
|
+
// Increase data size up to position and store value
|
|
117
|
+
newDataSize = (position + 1)*sizeof(int);
|
|
118
|
+
newFileData = (unsigned char *)RL_REALLOC(fileData, newDataSize);
|
|
119
|
+
|
|
120
|
+
if (newFileData != NULL)
|
|
121
|
+
{
|
|
122
|
+
// RL_REALLOC succeded
|
|
123
|
+
int *dataPtr = (int *)newFileData;
|
|
124
|
+
dataPtr[position] = value;
|
|
125
|
+
}
|
|
126
|
+
else
|
|
127
|
+
{
|
|
128
|
+
// RL_REALLOC failed
|
|
129
|
+
TraceLog(LOG_WARNING, "FILEIO: [%s] Failed to realloc data (%u), position in bytes (%u) bigger than actual file size", STORAGE_DATA_FILE, dataSize, position*sizeof(int));
|
|
130
|
+
|
|
131
|
+
// We store the old size of the file
|
|
132
|
+
newFileData = fileData;
|
|
133
|
+
newDataSize = dataSize;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
else
|
|
137
|
+
{
|
|
138
|
+
// Store the old size of the file
|
|
139
|
+
newFileData = fileData;
|
|
140
|
+
newDataSize = dataSize;
|
|
141
|
+
|
|
142
|
+
// Replace value on selected position
|
|
143
|
+
int *dataPtr = (int *)newFileData;
|
|
144
|
+
dataPtr[position] = value;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
success = SaveFileData(STORAGE_DATA_FILE, newFileData, newDataSize);
|
|
148
|
+
RL_FREE(newFileData);
|
|
149
|
+
|
|
150
|
+
TraceLog(LOG_INFO, "FILEIO: [%s] Saved storage value: %i", STORAGE_DATA_FILE, value);
|
|
151
|
+
}
|
|
152
|
+
else
|
|
153
|
+
{
|
|
154
|
+
TraceLog(LOG_INFO, "FILEIO: [%s] File created successfully", STORAGE_DATA_FILE);
|
|
155
|
+
|
|
156
|
+
dataSize = (position + 1)*sizeof(int);
|
|
157
|
+
fileData = (unsigned char *)RL_MALLOC(dataSize);
|
|
158
|
+
int *dataPtr = (int *)fileData;
|
|
159
|
+
dataPtr[position] = value;
|
|
160
|
+
|
|
161
|
+
success = SaveFileData(STORAGE_DATA_FILE, fileData, dataSize);
|
|
162
|
+
UnloadFileData(fileData);
|
|
163
|
+
|
|
164
|
+
TraceLog(LOG_INFO, "FILEIO: [%s] Saved storage value: %i", STORAGE_DATA_FILE, value);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return success;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Load integer value from storage file (from defined position)
|
|
171
|
+
// NOTE: If requested position could not be found, value 0 is returned
|
|
172
|
+
int LoadStorageValue(unsigned int position)
|
|
173
|
+
{
|
|
174
|
+
int value = 0;
|
|
175
|
+
unsigned int dataSize = 0;
|
|
176
|
+
unsigned char *fileData = LoadFileData(STORAGE_DATA_FILE, &dataSize);
|
|
177
|
+
|
|
178
|
+
if (fileData != NULL)
|
|
179
|
+
{
|
|
180
|
+
if (dataSize < (position*4)) TraceLog(LOG_WARNING, "FILEIO: [%s] Failed to find storage position: %i", STORAGE_DATA_FILE, position);
|
|
181
|
+
else
|
|
182
|
+
{
|
|
183
|
+
int *dataPtr = (int *)fileData;
|
|
184
|
+
value = dataPtr[position];
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
UnloadFileData(fileData);
|
|
188
|
+
|
|
189
|
+
TraceLog(LOG_INFO, "FILEIO: [%s] Loaded storage value: %i", STORAGE_DATA_FILE, value);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
return value;
|
|
87
193
|
}
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
*
|
|
3
3
|
* raylib [core] example - VR Simulator (Oculus Rift CV1 parameters)
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
5
|
+
* Example originally created with raylib 2.5, last time updated with raylib 4.0
|
|
7
6
|
*
|
|
8
|
-
*
|
|
7
|
+
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
|
8
|
+
* BSD-like license that allows static linking with closed source software
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2017-2022 Ramon Santamaria (@raysan5)
|
|
9
11
|
*
|
|
10
12
|
********************************************************************************************/
|
|
11
13
|
|
|
@@ -17,6 +19,9 @@
|
|
|
17
19
|
#define GLSL_VERSION 100
|
|
18
20
|
#endif
|
|
19
21
|
|
|
22
|
+
//------------------------------------------------------------------------------------
|
|
23
|
+
// Program main entry point
|
|
24
|
+
//------------------------------------------------------------------------------------
|
|
20
25
|
int main(void)
|
|
21
26
|
{
|
|
22
27
|
// Initialization
|
|
@@ -78,7 +83,11 @@ int main(void)
|
|
|
78
83
|
|
|
79
84
|
// Initialize framebuffer for stereo rendering
|
|
80
85
|
// NOTE: Screen size should match HMD aspect ratio
|
|
81
|
-
RenderTexture2D target = LoadRenderTexture(
|
|
86
|
+
RenderTexture2D target = LoadRenderTexture(device.hResolution, device.vResolution);
|
|
87
|
+
|
|
88
|
+
// The target's height is flipped (in the source Rectangle), due to OpenGL reasons
|
|
89
|
+
Rectangle sourceRec = { 0.0f, 0.0f, (float)target.texture.width, -(float)target.texture.height };
|
|
90
|
+
Rectangle destRec = { 0.0f, 0.0f, (float)GetScreenWidth(), (float)GetScreenHeight() };
|
|
82
91
|
|
|
83
92
|
// Define the camera to look into our 3d world
|
|
84
93
|
Camera camera = { 0 };
|
|
@@ -100,7 +109,7 @@ int main(void)
|
|
|
100
109
|
{
|
|
101
110
|
// Update
|
|
102
111
|
//----------------------------------------------------------------------------------
|
|
103
|
-
UpdateCamera(&camera);
|
|
112
|
+
UpdateCamera(&camera);
|
|
104
113
|
//----------------------------------------------------------------------------------
|
|
105
114
|
|
|
106
115
|
// Draw
|
|
@@ -121,8 +130,7 @@ int main(void)
|
|
|
121
130
|
BeginDrawing();
|
|
122
131
|
ClearBackground(RAYWHITE);
|
|
123
132
|
BeginShaderMode(distortion);
|
|
124
|
-
|
|
125
|
-
(float)-target.texture.height }, (Vector2){ 0.0f, 0.0f }, WHITE);
|
|
133
|
+
DrawTexturePro(target.texture, sourceRec, destRec, (Vector2){ 0.0f, 0.0f }, 0.0f, WHITE);
|
|
126
134
|
EndShaderMode();
|
|
127
135
|
DrawFPS(10, 10);
|
|
128
136
|
EndDrawing();
|
|
@@ -2,15 +2,20 @@
|
|
|
2
2
|
*
|
|
3
3
|
* raylib [core] example - window flags
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
5
|
+
* Example originally created with raylib 3.5, last time updated with raylib 3.5
|
|
7
6
|
*
|
|
8
|
-
*
|
|
7
|
+
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
|
8
|
+
* BSD-like license that allows static linking with closed source software
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2020-2022 Ramon Santamaria (@raysan5)
|
|
9
11
|
*
|
|
10
12
|
********************************************************************************************/
|
|
11
13
|
|
|
12
14
|
#include "raylib.h"
|
|
13
15
|
|
|
16
|
+
//------------------------------------------------------------------------------------
|
|
17
|
+
// Program main entry point
|
|
18
|
+
//------------------------------------------------------------------------------------
|
|
14
19
|
int main(void)
|
|
15
20
|
{
|
|
16
21
|
// Initialization
|
|
@@ -2,32 +2,27 @@
|
|
|
2
2
|
*
|
|
3
3
|
* raylib [core] example - window scale letterbox (and virtual mouse)
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
5
|
+
* Example originally created with raylib 2.5, last time updated with raylib 4.0
|
|
7
6
|
*
|
|
8
7
|
* Example contributed by Anata (@anatagawa) and reviewed by Ramon Santamaria (@raysan5)
|
|
9
8
|
*
|
|
10
|
-
*
|
|
9
|
+
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
|
10
|
+
* BSD-like license that allows static linking with closed source software
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) 2019-2022 Anata (@anatagawa) and Ramon Santamaria (@raysan5)
|
|
11
13
|
*
|
|
12
14
|
********************************************************************************************/
|
|
13
15
|
|
|
14
16
|
#include "raylib.h"
|
|
15
17
|
|
|
16
|
-
#
|
|
17
|
-
#define min(a, b) ((a)<(b)? (a) : (b))
|
|
18
|
+
#include "raymath.h" // Required for: Vector2Clamp()
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Vector2 ClampValue(Vector2 value, Vector2 min, Vector2 max)
|
|
22
|
-
{
|
|
23
|
-
Vector2 result = value;
|
|
24
|
-
result.x = (result.x > max.x)? max.x : result.x;
|
|
25
|
-
result.x = (result.x < min.x)? min.x : result.x;
|
|
26
|
-
result.y = (result.y > max.y)? max.y : result.y;
|
|
27
|
-
result.y = (result.y < min.y)? min.y : result.y;
|
|
28
|
-
return result;
|
|
29
|
-
}
|
|
20
|
+
#define MAX(a, b) ((a)>(b)? (a) : (b))
|
|
21
|
+
#define MIN(a, b) ((a)<(b)? (a) : (b))
|
|
30
22
|
|
|
23
|
+
//------------------------------------------------------------------------------------
|
|
24
|
+
// Program main entry point
|
|
25
|
+
//------------------------------------------------------------------------------------
|
|
31
26
|
int main(void)
|
|
32
27
|
{
|
|
33
28
|
const int windowWidth = 800;
|
|
@@ -57,7 +52,7 @@ int main(void)
|
|
|
57
52
|
// Update
|
|
58
53
|
//----------------------------------------------------------------------------------
|
|
59
54
|
// Compute required framebuffer scaling
|
|
60
|
-
float scale =
|
|
55
|
+
float scale = MIN((float)GetScreenWidth()/gameScreenWidth, (float)GetScreenHeight()/gameScreenHeight);
|
|
61
56
|
|
|
62
57
|
if (IsKeyPressed(KEY_SPACE))
|
|
63
58
|
{
|
|
@@ -70,7 +65,7 @@ int main(void)
|
|
|
70
65
|
Vector2 virtualMouse = { 0 };
|
|
71
66
|
virtualMouse.x = (mouse.x - (GetScreenWidth() - (gameScreenWidth*scale))*0.5f)/scale;
|
|
72
67
|
virtualMouse.y = (mouse.y - (GetScreenHeight() - (gameScreenHeight*scale))*0.5f)/scale;
|
|
73
|
-
virtualMouse =
|
|
68
|
+
virtualMouse = Vector2Clamp(virtualMouse, (Vector2){ 0, 0 }, (Vector2){ (float)gameScreenWidth, (float)gameScreenHeight });
|
|
74
69
|
|
|
75
70
|
// Apply the same transformation as the virtual mouse to the real mouse (i.e. to work with raygui)
|
|
76
71
|
//SetMouseOffset(-(GetScreenWidth() - (gameScreenWidth*scale))*0.5f, -(GetScreenHeight() - (gameScreenHeight*scale))*0.5f);
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/*******************************************************************************************
|
|
2
|
+
*
|
|
3
|
+
* raylib [core] example - Window should close
|
|
4
|
+
*
|
|
5
|
+
* Example originally created with raylib 4.2, last time updated with raylib 4.2
|
|
6
|
+
*
|
|
7
|
+
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
|
8
|
+
* BSD-like license that allows static linking with closed source software
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2013-2022 Ramon Santamaria (@raysan5)
|
|
11
|
+
*
|
|
12
|
+
********************************************************************************************/
|
|
13
|
+
|
|
14
|
+
#include "raylib.h"
|
|
15
|
+
|
|
16
|
+
//------------------------------------------------------------------------------------
|
|
17
|
+
// Program main entry point
|
|
18
|
+
//------------------------------------------------------------------------------------
|
|
19
|
+
int main()
|
|
20
|
+
{
|
|
21
|
+
// Initialization
|
|
22
|
+
//--------------------------------------------------------------------------------------
|
|
23
|
+
const int screenWidth = 800;
|
|
24
|
+
const int screenHeight = 450;
|
|
25
|
+
|
|
26
|
+
InitWindow(screenWidth, screenHeight, "raylib [core] example - window should close");
|
|
27
|
+
|
|
28
|
+
SetExitKey(KEY_NULL); // Disable KEY_ESCAPE to close window, X-button still works
|
|
29
|
+
|
|
30
|
+
bool exitWindowRequested = false; // Flag to request window to exit
|
|
31
|
+
bool exitWindow = false; // Flag to set window to exit
|
|
32
|
+
|
|
33
|
+
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
|
34
|
+
//--------------------------------------------------------------------------------------
|
|
35
|
+
|
|
36
|
+
// Main game loop
|
|
37
|
+
while (!exitWindow)
|
|
38
|
+
{
|
|
39
|
+
// Update
|
|
40
|
+
//----------------------------------------------------------------------------------
|
|
41
|
+
// Detect if X-button or KEY_ESCAPE have been pressed to close window
|
|
42
|
+
if (WindowShouldClose() || IsKeyPressed(KEY_ESCAPE)) exitWindowRequested = true;
|
|
43
|
+
|
|
44
|
+
if (exitWindowRequested)
|
|
45
|
+
{
|
|
46
|
+
// A request for close window has been issued, we can save data before closing
|
|
47
|
+
// or just show a message asking for confirmation
|
|
48
|
+
|
|
49
|
+
if (IsKeyPressed(KEY_Y)) exitWindow = true;
|
|
50
|
+
else if (IsKeyPressed(KEY_N)) exitWindowRequested = false;
|
|
51
|
+
}
|
|
52
|
+
//----------------------------------------------------------------------------------
|
|
53
|
+
|
|
54
|
+
// Draw
|
|
55
|
+
//----------------------------------------------------------------------------------
|
|
56
|
+
BeginDrawing();
|
|
57
|
+
|
|
58
|
+
ClearBackground(RAYWHITE);
|
|
59
|
+
|
|
60
|
+
if (exitWindowRequested)
|
|
61
|
+
{
|
|
62
|
+
DrawRectangle(0, 100, screenWidth, 200, BLACK);
|
|
63
|
+
DrawText("Are you sure you want to exit program? [Y/N]", 40, 180, 30, WHITE);
|
|
64
|
+
}
|
|
65
|
+
else DrawText("Try to close the window to get confirmation message!", 120, 200, 20, LIGHTGRAY);
|
|
66
|
+
|
|
67
|
+
EndDrawing();
|
|
68
|
+
//----------------------------------------------------------------------------------
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// De-Initialization
|
|
72
|
+
//--------------------------------------------------------------------------------------
|
|
73
|
+
CloseWindow(); // Close window and OpenGL context
|
|
74
|
+
//--------------------------------------------------------------------------------------
|
|
75
|
+
|
|
76
|
+
return 0;
|
|
77
|
+
}
|
|
Binary file
|
|
@@ -2,15 +2,20 @@
|
|
|
2
2
|
*
|
|
3
3
|
* raylib [core] example - World to screen
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
5
|
+
* Example originally created with raylib 1.3, last time updated with raylib 1.4
|
|
7
6
|
*
|
|
8
|
-
*
|
|
7
|
+
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
|
8
|
+
* BSD-like license that allows static linking with closed source software
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
|
9
11
|
*
|
|
10
12
|
********************************************************************************************/
|
|
11
13
|
|
|
12
14
|
#include "raylib.h"
|
|
13
15
|
|
|
16
|
+
//------------------------------------------------------------------------------------
|
|
17
|
+
// Program main entry point
|
|
18
|
+
//------------------------------------------------------------------------------------
|
|
14
19
|
int main(void)
|
|
15
20
|
{
|
|
16
21
|
// Initialization
|
|
@@ -41,7 +46,7 @@ int main(void)
|
|
|
41
46
|
{
|
|
42
47
|
// Update
|
|
43
48
|
//----------------------------------------------------------------------------------
|
|
44
|
-
UpdateCamera(&camera);
|
|
49
|
+
UpdateCamera(&camera);
|
|
45
50
|
|
|
46
51
|
// Calculate cube screen space position (with a little offset to be in top)
|
|
47
52
|
cubeScreenPosition = GetWorldToScreen((Vector3){cubePosition.x, cubePosition.y + 2.5f, cubePosition.z}, camera);
|
|
@@ -41,17 +41,22 @@
|
|
|
41
41
|
*
|
|
42
42
|
* raylib [core] example - Basic window
|
|
43
43
|
*
|
|
44
|
-
*
|
|
45
|
-
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
44
|
+
* Example originally created with raylib 4.2, last time updated with raylib 4.2
|
|
46
45
|
*
|
|
47
46
|
* Example contributed by <user_name> (@<user_github>) and reviewed by Ramon Santamaria (@raysan5)
|
|
48
47
|
*
|
|
49
|
-
*
|
|
48
|
+
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
|
49
|
+
* BSD-like license that allows static linking with closed source software
|
|
50
|
+
*
|
|
51
|
+
* Copyright (c) 2022 <user_name> (@<user_github>)
|
|
50
52
|
*
|
|
51
53
|
********************************************************************************************/
|
|
52
54
|
|
|
53
55
|
#include "raylib.h"
|
|
54
56
|
|
|
57
|
+
//------------------------------------------------------------------------------------
|
|
58
|
+
// Program main entry point
|
|
59
|
+
//------------------------------------------------------------------------------------
|
|
55
60
|
int main(void)
|
|
56
61
|
{
|
|
57
62
|
// Initialization
|
|
@@ -2,18 +2,20 @@
|
|
|
2
2
|
*
|
|
3
3
|
* raylib [models] example - Load 3d model with animations and play them
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
5
|
+
* Example originally created with raylib 2.5, last time updated with raylib 3.5
|
|
7
6
|
*
|
|
8
7
|
* Example contributed by Culacant (@culacant) and reviewed by Ramon Santamaria (@raysan5)
|
|
9
8
|
*
|
|
10
|
-
*
|
|
9
|
+
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
|
10
|
+
* BSD-like license that allows static linking with closed source software
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) 2019-2022 Culacant (@culacant) and Ramon Santamaria (@raysan5)
|
|
11
13
|
*
|
|
12
14
|
********************************************************************************************
|
|
13
15
|
*
|
|
14
|
-
* To export a model from blender, make sure it is not posed, the vertices need to be
|
|
15
|
-
* same position as they would be in edit mode
|
|
16
|
-
*
|
|
16
|
+
* NOTE: To export a model from blender, make sure it is not posed, the vertices need to be
|
|
17
|
+
* in the same position as they would be in edit mode and the scale of your models is
|
|
18
|
+
* set to 0. Scaling can be done from the export menu.
|
|
17
19
|
*
|
|
18
20
|
********************************************************************************************/
|
|
19
21
|
|
|
@@ -21,7 +23,9 @@
|
|
|
21
23
|
|
|
22
24
|
#include <stdlib.h>
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
//------------------------------------------------------------------------------------
|
|
27
|
+
// Program main entry point
|
|
28
|
+
//------------------------------------------------------------------------------------
|
|
25
29
|
int main(void)
|
|
26
30
|
{
|
|
27
31
|
// Initialization
|
|
@@ -2,15 +2,20 @@
|
|
|
2
2
|
*
|
|
3
3
|
* raylib [models] example - Drawing billboards
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
5
|
+
* Example originally created with raylib 1.3, last time updated with raylib 3.5
|
|
7
6
|
*
|
|
8
|
-
*
|
|
7
|
+
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
|
8
|
+
* BSD-like license that allows static linking with closed source software
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
|
9
11
|
*
|
|
10
12
|
********************************************************************************************/
|
|
11
13
|
|
|
12
14
|
#include "raylib.h"
|
|
13
15
|
|
|
16
|
+
//------------------------------------------------------------------------------------
|
|
17
|
+
// Program main entry point
|
|
18
|
+
//------------------------------------------------------------------------------------
|
|
14
19
|
int main(void)
|
|
15
20
|
{
|
|
16
21
|
// Initialization
|
|
@@ -41,7 +46,7 @@ int main(void)
|
|
|
41
46
|
{
|
|
42
47
|
// Update
|
|
43
48
|
//----------------------------------------------------------------------------------
|
|
44
|
-
UpdateCamera(&camera);
|
|
49
|
+
UpdateCamera(&camera);
|
|
45
50
|
//----------------------------------------------------------------------------------
|
|
46
51
|
|
|
47
52
|
// Draw
|
|
@@ -2,15 +2,20 @@
|
|
|
2
2
|
*
|
|
3
3
|
* raylib [models] example - Detect basic 3d collisions (box vs sphere vs box)
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
5
|
+
* Example originally created with raylib 1.3, last time updated with raylib 3.5
|
|
7
6
|
*
|
|
8
|
-
*
|
|
7
|
+
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
|
8
|
+
* BSD-like license that allows static linking with closed source software
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
|
9
11
|
*
|
|
10
12
|
********************************************************************************************/
|
|
11
13
|
|
|
12
14
|
#include "raylib.h"
|
|
13
15
|
|
|
16
|
+
//------------------------------------------------------------------------------------
|
|
17
|
+
// Program main entry point
|
|
18
|
+
//------------------------------------------------------------------------------------
|
|
14
19
|
int main(void)
|
|
15
20
|
{
|
|
16
21
|
// Initialization
|
|
@@ -2,15 +2,20 @@
|
|
|
2
2
|
*
|
|
3
3
|
* raylib [models] example - Cubicmap loading and drawing
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
5
|
+
* Example originally created with raylib 1.8, last time updated with raylib 3.5
|
|
7
6
|
*
|
|
8
|
-
*
|
|
7
|
+
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
|
8
|
+
* BSD-like license that allows static linking with closed source software
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
|
9
11
|
*
|
|
10
12
|
********************************************************************************************/
|
|
11
13
|
|
|
12
14
|
#include "raylib.h"
|
|
13
15
|
|
|
16
|
+
//------------------------------------------------------------------------------------
|
|
17
|
+
// Program main entry point
|
|
18
|
+
//------------------------------------------------------------------------------------
|
|
14
19
|
int main(void)
|
|
15
20
|
{
|
|
16
21
|
// Initialization
|
|
@@ -47,7 +52,7 @@ int main(void)
|
|
|
47
52
|
{
|
|
48
53
|
// Update
|
|
49
54
|
//----------------------------------------------------------------------------------
|
|
50
|
-
UpdateCamera(&camera);
|
|
55
|
+
UpdateCamera(&camera);
|
|
51
56
|
//----------------------------------------------------------------------------------
|
|
52
57
|
|
|
53
58
|
// Draw
|