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.
Files changed (313) hide show
  1. package/ChangeLog.md +13 -1
  2. package/build/qemu/2.1.2/koffi_darwin_arm64.tar.gz +0 -0
  3. package/build/qemu/2.1.2/koffi_darwin_x64.tar.gz +0 -0
  4. package/build/qemu/2.1.2/koffi_freebsd_arm64.tar.gz +0 -0
  5. package/build/qemu/2.1.2/koffi_freebsd_ia32.tar.gz +0 -0
  6. package/build/qemu/2.1.2/koffi_freebsd_x64.tar.gz +0 -0
  7. package/build/qemu/2.1.2/koffi_linux_arm32hf.tar.gz +0 -0
  8. package/build/qemu/2.1.2/koffi_linux_arm64.tar.gz +0 -0
  9. package/build/qemu/2.1.2/koffi_linux_ia32.tar.gz +0 -0
  10. package/build/qemu/2.1.2/koffi_linux_riscv64hf64.tar.gz +0 -0
  11. package/build/qemu/2.1.2/koffi_linux_x64.tar.gz +0 -0
  12. package/build/qemu/2.1.2/koffi_openbsd_ia32.tar.gz +0 -0
  13. package/build/qemu/2.1.2/koffi_openbsd_x64.tar.gz +0 -0
  14. package/build/qemu/2.1.2/koffi_win32_arm64.tar.gz +0 -0
  15. package/build/qemu/2.1.2/koffi_win32_ia32.tar.gz +0 -0
  16. package/build/qemu/2.1.2/koffi_win32_x64.tar.gz +0 -0
  17. package/doc/templates/badges.html +3 -0
  18. package/package.json +2 -2
  19. package/src/abi_arm64.cc +35 -1
  20. package/src/abi_x64_win.cc +2 -8
  21. package/src/abi_x86.cc +1 -7
  22. package/src/call.cc +2 -2
  23. package/src/call.hh +1 -1
  24. package/src/ffi.hh +1 -1
  25. package/src/util.hh +6 -0
  26. package/test/raylib.js +37 -5
  27. package/vendor/libcc/libcc.cc +488 -254
  28. package/vendor/libcc/libcc.hh +1463 -1277
  29. package/vendor/raylib/BINDINGS.md +87 -70
  30. package/vendor/raylib/CHANGELOG +263 -50
  31. package/vendor/raylib/CMakeLists.txt +12 -0
  32. package/vendor/raylib/CMakeOptions.txt +8 -1
  33. package/vendor/raylib/CONVENTIONS.md +2 -3
  34. package/vendor/raylib/FAQ.md +137 -0
  35. package/vendor/raylib/HISTORY.md +62 -29
  36. package/vendor/raylib/LICENSE +1 -1
  37. package/vendor/raylib/README.md +22 -17
  38. package/vendor/raylib/ROADMAP.md +8 -7
  39. package/vendor/raylib/cmake/CompileDefinitions.cmake +19 -15
  40. package/vendor/raylib/cmake/GlfwImport.cmake +2 -0
  41. package/vendor/raylib/cmake/LibraryConfigurations.cmake +22 -16
  42. package/vendor/raylib/cmake/raylib-config.cmake +52 -49
  43. package/vendor/raylib/examples/CMakeLists.txt +14 -9
  44. package/vendor/raylib/examples/Makefile +112 -125
  45. package/vendor/raylib/examples/Makefile.Android +1 -1
  46. package/vendor/raylib/examples/Makefile.Web +145 -158
  47. package/vendor/raylib/examples/README.md +141 -141
  48. package/vendor/raylib/examples/audio/audio_module_playing.c +9 -4
  49. package/vendor/raylib/examples/audio/audio_multichannel_sound.c +8 -3
  50. package/vendor/raylib/examples/audio/audio_music_stream.c +16 -11
  51. package/vendor/raylib/examples/audio/audio_raw_stream.c +57 -9
  52. package/vendor/raylib/examples/audio/audio_sound_loading.c +8 -3
  53. package/vendor/raylib/examples/audio/audio_stream_effects.c +179 -0
  54. package/vendor/raylib/examples/audio/audio_stream_effects.png +0 -0
  55. package/vendor/raylib/examples/build.zig +17 -6
  56. package/vendor/raylib/examples/core/core_2d_camera.c +8 -4
  57. package/vendor/raylib/examples/core/core_2d_camera_mouse_zoom.c +105 -0
  58. package/vendor/raylib/examples/core/core_2d_camera_mouse_zoom.png +0 -0
  59. package/vendor/raylib/examples/core/core_2d_camera_platformer.c +11 -6
  60. package/vendor/raylib/examples/core/core_3d_camera_first_person.c +9 -4
  61. package/vendor/raylib/examples/core/core_3d_camera_free.c +9 -4
  62. package/vendor/raylib/examples/core/core_3d_camera_mode.c +8 -3
  63. package/vendor/raylib/examples/core/core_3d_picking.c +9 -4
  64. package/vendor/raylib/examples/core/core_basic_screen_manager.c +9 -7
  65. package/vendor/raylib/examples/core/core_basic_window.c +8 -3
  66. package/vendor/raylib/examples/core/core_basic_window_web.c +13 -11
  67. package/vendor/raylib/examples/core/core_custom_frame_control.c +9 -4
  68. package/vendor/raylib/examples/core/core_custom_logging.c +12 -8
  69. package/vendor/raylib/examples/core/core_drop_files.c +20 -12
  70. package/vendor/raylib/examples/core/core_input_gamepad.c +20 -15
  71. package/vendor/raylib/examples/core/core_input_gestures.c +19 -15
  72. package/vendor/raylib/examples/core/core_input_keys.c +8 -3
  73. package/vendor/raylib/examples/core/core_input_mouse.c +8 -3
  74. package/vendor/raylib/examples/core/core_input_mouse_wheel.c +8 -3
  75. package/vendor/raylib/examples/core/core_input_multitouch.c +8 -3
  76. package/vendor/raylib/examples/core/core_loading_thread.c +10 -6
  77. package/vendor/raylib/examples/core/core_random_values.c +8 -3
  78. package/vendor/raylib/examples/core/core_scissor_test.c +8 -3
  79. package/vendor/raylib/examples/core/core_smooth_pixelperfect.c +9 -4
  80. package/vendor/raylib/examples/core/core_split_screen.c +8 -3
  81. package/vendor/raylib/examples/core/core_storage_values.c +109 -3
  82. package/vendor/raylib/examples/core/core_vr_simulator.c +15 -7
  83. package/vendor/raylib/examples/core/core_window_flags.c +8 -3
  84. package/vendor/raylib/examples/core/core_window_letterbox.c +13 -18
  85. package/vendor/raylib/examples/core/core_window_should_close.c +77 -0
  86. package/vendor/raylib/examples/core/core_window_should_close.png +0 -0
  87. package/vendor/raylib/examples/core/core_world_screen.c +9 -4
  88. package/vendor/raylib/examples/examples_template.c +8 -3
  89. package/vendor/raylib/examples/models/models_animation.c +11 -7
  90. package/vendor/raylib/examples/models/models_billboard.c +9 -4
  91. package/vendor/raylib/examples/models/models_box_collisions.c +8 -3
  92. package/vendor/raylib/examples/models/models_cubicmap.c +9 -4
  93. package/vendor/raylib/examples/models/models_first_person_maze.c +9 -4
  94. package/vendor/raylib/examples/models/models_geometric_shapes.c +8 -3
  95. package/vendor/raylib/examples/models/models_heightmap.c +9 -4
  96. package/vendor/raylib/examples/models/models_loading.c +21 -17
  97. package/vendor/raylib/examples/models/models_loading_gltf.c +15 -41
  98. package/vendor/raylib/examples/models/models_loading_vox.c +9 -4
  99. package/vendor/raylib/examples/models/models_mesh_generation.c +71 -58
  100. package/vendor/raylib/examples/models/models_mesh_picking.c +25 -7
  101. package/vendor/raylib/examples/models/models_orthographic_projection.c +8 -5
  102. package/vendor/raylib/examples/models/models_rlgl_solar_system.c +6 -4
  103. package/vendor/raylib/examples/models/models_skybox.c +16 -12
  104. package/vendor/raylib/examples/models/models_waving_cubes.c +9 -4
  105. package/vendor/raylib/examples/models/models_yaw_pitch_roll.c +12 -7
  106. package/vendor/raylib/examples/models/resources/LICENSE.md +9 -10
  107. package/vendor/raylib/examples/models/resources/models/gltf/LICENSE +2 -23
  108. package/vendor/raylib/examples/models/resources/models/gltf/{raylib_32x32.glb → raylib_logo_3d.glb} +0 -0
  109. package/vendor/raylib/examples/models/resources/models/gltf/robot.blend +0 -0
  110. package/vendor/raylib/examples/models/resources/models/gltf/robot.glb +0 -0
  111. package/vendor/raylib/examples/others/easings_testbed.c +10 -8
  112. package/vendor/raylib/examples/others/easings_testbed.png +0 -0
  113. package/vendor/raylib/examples/others/embedded_files_loading.c +10 -5
  114. package/vendor/raylib/examples/others/embedded_files_loading.png +0 -0
  115. package/vendor/raylib/examples/others/raylib_opengl_interop.c +10 -6
  116. package/vendor/raylib/{src/extras/easings.h → examples/others/reasings.h} +38 -38
  117. package/vendor/raylib/examples/others/rlgl_compute_shader.c +21 -20
  118. package/vendor/raylib/examples/others/rlgl_compute_shader.png +0 -0
  119. package/vendor/raylib/examples/others/rlgl_standalone.c +4 -4
  120. package/vendor/raylib/examples/others/rlgl_standalone.png +0 -0
  121. package/vendor/raylib/examples/raylib_compile_execute.bat +2 -2
  122. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/lighting.fs +1 -1
  123. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/{base_lighting_instanced.vs → lighting_instancing.vs} +2 -2
  124. package/vendor/raylib/examples/shaders/rlights.h +14 -27
  125. package/vendor/raylib/examples/shaders/shaders_basic_lighting.c +24 -26
  126. package/vendor/raylib/examples/shaders/shaders_custom_uniform.c +10 -5
  127. package/vendor/raylib/examples/shaders/shaders_eratosthenes.c +13 -8
  128. package/vendor/raylib/examples/shaders/shaders_fog.c +8 -12
  129. package/vendor/raylib/examples/shaders/shaders_hot_reloading.c +10 -5
  130. package/vendor/raylib/examples/shaders/shaders_julia_set.c +9 -4
  131. package/vendor/raylib/examples/shaders/shaders_mesh_instancing.c +45 -119
  132. package/vendor/raylib/examples/shaders/shaders_model_shader.c +10 -5
  133. package/vendor/raylib/examples/shaders/shaders_multi_sample2d.c +8 -3
  134. package/vendor/raylib/examples/shaders/shaders_palette_switch.c +8 -3
  135. package/vendor/raylib/examples/shaders/shaders_postprocessing.c +9 -4
  136. package/vendor/raylib/examples/shaders/shaders_raymarching.c +14 -11
  137. package/vendor/raylib/examples/shaders/shaders_shapes_textures.c +8 -3
  138. package/vendor/raylib/examples/shaders/shaders_simple_mask.c +10 -5
  139. package/vendor/raylib/examples/shaders/shaders_spotlight.c +10 -6
  140. package/vendor/raylib/examples/shaders/shaders_texture_drawing.c +9 -4
  141. package/vendor/raylib/examples/shaders/shaders_texture_outline.c +8 -3
  142. package/vendor/raylib/examples/shaders/shaders_texture_waves.c +8 -3
  143. package/vendor/raylib/{src/extras → examples/shapes}/raygui.h +1290 -1141
  144. package/vendor/raylib/examples/{others/easings.h → shapes/reasings.h} +40 -40
  145. package/vendor/raylib/examples/shapes/shapes_basic_shapes.c +8 -3
  146. package/vendor/raylib/examples/shapes/shapes_bouncing_ball.c +8 -3
  147. package/vendor/raylib/examples/shapes/shapes_collision_area.c +10 -4
  148. package/vendor/raylib/examples/shapes/shapes_colors_palette.c +8 -3
  149. package/vendor/raylib/examples/shapes/shapes_draw_circle_sector.c +9 -4
  150. package/vendor/raylib/examples/shapes/shapes_draw_rectangle_rounded.c +9 -4
  151. package/vendor/raylib/examples/shapes/shapes_draw_ring.c +10 -6
  152. package/vendor/raylib/examples/shapes/shapes_easings_ball_anim.c +9 -4
  153. package/vendor/raylib/examples/shapes/shapes_easings_box_anim.c +9 -4
  154. package/vendor/raylib/examples/shapes/shapes_easings_rectangle_array.c +9 -4
  155. package/vendor/raylib/examples/shapes/shapes_following_eyes.c +8 -3
  156. package/vendor/raylib/examples/shapes/shapes_lines_bezier.c +8 -3
  157. package/vendor/raylib/examples/shapes/shapes_logo_raylib.c +8 -3
  158. package/vendor/raylib/examples/shapes/shapes_logo_raylib_anim.c +8 -3
  159. package/vendor/raylib/examples/shapes/shapes_rectangle_scaling.c +14 -5
  160. package/vendor/raylib/examples/shapes/shapes_top_down_lights.c +355 -0
  161. package/vendor/raylib/examples/shapes/shapes_top_down_lights.png +0 -0
  162. package/vendor/raylib/examples/text/resources/DotGothic16-Regular.ttf +0 -0
  163. package/vendor/raylib/examples/text/resources/DotGothic16-Regular_OFL.txt +93 -0
  164. package/vendor/raylib/examples/text/resources/LICENSE.md +1 -1
  165. package/vendor/raylib/examples/text/text_codepoints_loading.c +138 -0
  166. package/vendor/raylib/examples/text/text_codepoints_loading.png +0 -0
  167. package/vendor/raylib/examples/text/text_draw_3d.c +42 -33
  168. package/vendor/raylib/examples/text/text_font_filters.c +14 -11
  169. package/vendor/raylib/examples/text/text_font_loading.c +9 -4
  170. package/vendor/raylib/examples/text/text_font_sdf.c +9 -4
  171. package/vendor/raylib/examples/text/text_font_spritefont.c +12 -6
  172. package/vendor/raylib/examples/text/text_format_text.c +8 -3
  173. package/vendor/raylib/examples/text/text_input_box.c +8 -3
  174. package/vendor/raylib/examples/text/text_raylib_fonts.c +9 -4
  175. package/vendor/raylib/examples/text/text_rectangle_bounds.c +9 -5
  176. package/vendor/raylib/examples/text/text_unicode.c +9 -7
  177. package/vendor/raylib/examples/text/text_writing_anim.c +8 -3
  178. package/vendor/raylib/examples/textures/resources/scarfy_run.gif +0 -0
  179. package/vendor/raylib/examples/textures/textures_background_scrolling.c +8 -3
  180. package/vendor/raylib/examples/textures/textures_blend_modes.c +8 -3
  181. package/vendor/raylib/examples/textures/textures_bunnymark.c +8 -3
  182. package/vendor/raylib/examples/textures/textures_draw_tiled.c +14 -10
  183. package/vendor/raylib/examples/textures/textures_fog_of_war.c +154 -0
  184. package/vendor/raylib/examples/textures/textures_fog_of_war.png +0 -0
  185. package/vendor/raylib/examples/textures/textures_gif_player.c +121 -0
  186. package/vendor/raylib/examples/textures/textures_gif_player.png +0 -0
  187. package/vendor/raylib/examples/textures/textures_image_drawing.c +8 -3
  188. package/vendor/raylib/examples/textures/textures_image_generation.c +8 -3
  189. package/vendor/raylib/examples/textures/textures_image_loading.c +8 -3
  190. package/vendor/raylib/examples/textures/textures_image_processing.c +8 -3
  191. package/vendor/raylib/examples/textures/textures_image_text.c +8 -3
  192. package/vendor/raylib/examples/textures/textures_logo_raylib.c +8 -3
  193. package/vendor/raylib/examples/textures/textures_mouse_painting.c +9 -4
  194. package/vendor/raylib/examples/textures/textures_npatch_drawing.c +8 -3
  195. package/vendor/raylib/examples/textures/textures_particles_blending.c +8 -3
  196. package/vendor/raylib/examples/textures/textures_polygon.c +9 -5
  197. package/vendor/raylib/examples/textures/textures_raw_data.c +8 -3
  198. package/vendor/raylib/examples/textures/{textures_rectangle.c → textures_sprite_anim.c} +11 -5
  199. package/vendor/raylib/examples/textures/{textures_rectangle.png → textures_sprite_anim.png} +0 -0
  200. package/vendor/raylib/examples/textures/textures_sprite_button.c +8 -3
  201. package/vendor/raylib/examples/textures/textures_sprite_explosion.c +8 -3
  202. package/vendor/raylib/examples/textures/textures_srcrec_dstrec.c +8 -3
  203. package/vendor/raylib/examples/textures/textures_to_image.c +8 -3
  204. package/vendor/raylib/parser/LICENSE +1 -1
  205. package/vendor/raylib/parser/Makefile +28 -0
  206. package/vendor/raylib/parser/README.md +49 -5
  207. package/vendor/raylib/parser/output/raylib_api.json +10717 -0
  208. package/vendor/raylib/parser/output/raylib_api.lua +7435 -0
  209. package/vendor/raylib/parser/{raylib_api.txt → output/raylib_api.txt} +1371 -824
  210. package/vendor/raylib/parser/{raylib_api.xml → output/raylib_api.xml} +827 -595
  211. package/vendor/raylib/parser/raylib_parser.c +1174 -196
  212. package/vendor/raylib/projects/4coder/Makefile +2 -4
  213. package/vendor/raylib/projects/4coder/main.c +0 -1
  214. package/vendor/raylib/projects/CMake/CMakeLists.txt +13 -16
  215. package/vendor/raylib/projects/CMake/README.md +27 -0
  216. package/vendor/raylib/projects/CMake/core_basic_window.c +52 -31
  217. package/vendor/raylib/projects/CodeBlocks/README.md +4 -4
  218. package/vendor/raylib/projects/Geany/core_basic_window.c +1 -1
  219. package/vendor/raylib/projects/Notepad++/c_raylib.xml +168 -128
  220. package/vendor/raylib/projects/Notepad++/npes_saved_tcc.txt +0 -0
  221. package/vendor/raylib/projects/Notepad++/npes_saved_w64devkit.txt +0 -0
  222. package/vendor/raylib/projects/Notepad++/npes_saved_zig.txt +0 -0
  223. package/vendor/raylib/projects/Notepad++/raylib_npp_parser/raylib_npp.xml +168 -84
  224. package/vendor/raylib/projects/Notepad++/raylib_npp_parser/raylib_to_parse.h +67 -51
  225. package/vendor/raylib/projects/README.md +1 -1
  226. package/vendor/raylib/projects/VSCode/.vscode/c_cpp_properties.json +1 -1
  227. package/vendor/raylib/projects/VSCode/Makefile +8 -11
  228. package/vendor/raylib/projects/VSCode/main.c +53 -26
  229. package/vendor/raylib/projects/VSCode/resources/LICENSE +1 -0
  230. package/vendor/raylib/projects/scripts/build-linux.sh +6 -6
  231. package/vendor/raylib/projects/scripts/build-osx.sh +6 -6
  232. package/vendor/raylib/projects/scripts/build-rpi.sh +6 -6
  233. package/vendor/raylib/projects/scripts/build-windows.bat +2 -2
  234. package/vendor/raylib/src/CMakeLists.txt +6 -7
  235. package/vendor/raylib/src/Makefile +209 -103
  236. package/vendor/raylib/src/build.zig +56 -20
  237. package/vendor/raylib/src/config.h +32 -27
  238. package/vendor/raylib/src/external/cgltf.h +342 -104
  239. package/vendor/raylib/src/external/dr_wav.h +487 -225
  240. package/vendor/raylib/src/external/glfw/src/posix_time.c +1 -3
  241. package/vendor/raylib/src/external/glfw/src/wl_init.c +1 -3
  242. package/vendor/raylib/src/external/jar_xm.h +2 -1
  243. package/vendor/raylib/src/external/miniaudio.h +62251 -42061
  244. package/vendor/raylib/src/external/qoi.h +671 -0
  245. package/vendor/raylib/src/external/stb_vorbis.h +1 -1
  246. package/vendor/raylib/src/external/vox_loader.h +30 -25
  247. package/vendor/raylib/src/minshell.html +82 -0
  248. package/vendor/raylib/src/raudio.c +359 -201
  249. package/vendor/raylib/src/raylib.dll.rc +5 -5
  250. package/vendor/raylib/src/raylib.dll.rc.data +0 -0
  251. package/vendor/raylib/src/raylib.h +95 -63
  252. package/vendor/raylib/src/raylib.rc +5 -5
  253. package/vendor/raylib/src/raylib.rc.data +0 -0
  254. package/vendor/raylib/src/raymath.h +391 -133
  255. package/vendor/raylib/src/rcamera.h +32 -41
  256. package/vendor/raylib/src/rcore.c +775 -471
  257. package/vendor/raylib/src/rgestures.h +5 -5
  258. package/vendor/raylib/src/rglfw.c +3 -3
  259. package/vendor/raylib/src/rlgl.h +184 -144
  260. package/vendor/raylib/src/rmodels.c +207 -144
  261. package/vendor/raylib/src/rshapes.c +105 -47
  262. package/vendor/raylib/src/rtext.c +255 -38
  263. package/vendor/raylib/src/rtextures.c +167 -71
  264. package/vendor/raylib/src/shell.html +63 -63
  265. package/vendor/raylib/src/utils.c +49 -3
  266. package/vendor/raylib/src/utils.h +3 -3
  267. package/build/qemu/2.1.0/koffi_darwin_arm64.tar.gz +0 -0
  268. package/build/qemu/2.1.0/koffi_darwin_x64.tar.gz +0 -0
  269. package/build/qemu/2.1.0/koffi_freebsd_arm64.tar.gz +0 -0
  270. package/build/qemu/2.1.0/koffi_freebsd_ia32.tar.gz +0 -0
  271. package/build/qemu/2.1.0/koffi_freebsd_x64.tar.gz +0 -0
  272. package/build/qemu/2.1.0/koffi_linux_arm32hf.tar.gz +0 -0
  273. package/build/qemu/2.1.0/koffi_linux_arm64.tar.gz +0 -0
  274. package/build/qemu/2.1.0/koffi_linux_ia32.tar.gz +0 -0
  275. package/build/qemu/2.1.0/koffi_linux_riscv64hf64.tar.gz +0 -0
  276. package/build/qemu/2.1.0/koffi_linux_x64.tar.gz +0 -0
  277. package/build/qemu/2.1.0/koffi_openbsd_ia32.tar.gz +0 -0
  278. package/build/qemu/2.1.0/koffi_openbsd_x64.tar.gz +0 -0
  279. package/build/qemu/2.1.0/koffi_win32_arm64.tar.gz +0 -0
  280. package/build/qemu/2.1.0/koffi_win32_ia32.tar.gz +0 -0
  281. package/build/qemu/2.1.0/koffi_win32_x64.tar.gz +0 -0
  282. package/vendor/raylib/CONTRIBUTORS.md +0 -63
  283. package/vendor/raylib/SPONSORS.md +0 -68
  284. package/vendor/raylib/examples/core/core_quat_conversion.c +0 -132
  285. package/vendor/raylib/examples/core/core_quat_conversion.png +0 -0
  286. package/vendor/raylib/examples/models/resources/models/gltf/AnimatedMorphCube.glb +0 -0
  287. package/vendor/raylib/examples/models/resources/models/gltf/AnimatedTriangle.gltf +0 -118
  288. package/vendor/raylib/examples/models/resources/models/gltf/BoxAnimated.glb +0 -0
  289. package/vendor/raylib/examples/models/resources/models/gltf/girl.glb +0 -0
  290. package/vendor/raylib/examples/models/resources/models/gltf/rigged_figure.glb +0 -0
  291. package/vendor/raylib/examples/models/resources/models/gltf/vertex_colored_object.glb +0 -0
  292. package/vendor/raylib/examples/models/resources/models/iqm/vertex_colored_object.iqm +0 -0
  293. package/vendor/raylib/examples/models/rlights.h +0 -183
  294. package/vendor/raylib/examples/others/raudio_standalone.c +0 -152
  295. package/vendor/raylib/examples/others/resources/audio/country.mp3 +0 -0
  296. package/vendor/raylib/examples/others/resources/audio/target.ogg +0 -0
  297. package/vendor/raylib/examples/others/resources/audio/weird.wav +0 -0
  298. package/vendor/raylib/examples/physics/physics_demo.c +0 -128
  299. package/vendor/raylib/examples/physics/physics_demo.png +0 -0
  300. package/vendor/raylib/examples/physics/physics_friction.c +0 -142
  301. package/vendor/raylib/examples/physics/physics_friction.png +0 -0
  302. package/vendor/raylib/examples/physics/physics_movement.c +0 -128
  303. package/vendor/raylib/examples/physics/physics_movement.png +0 -0
  304. package/vendor/raylib/examples/physics/physics_restitution.c +0 -129
  305. package/vendor/raylib/examples/physics/physics_restitution.png +0 -0
  306. package/vendor/raylib/examples/physics/physics_shatter.c +0 -111
  307. package/vendor/raylib/examples/physics/physics_shatter.png +0 -0
  308. package/vendor/raylib/parser/raylib_api.json +0 -6668
  309. package/vendor/raylib/projects/VS2019/raylib/raylib.rc +0 -0
  310. package/vendor/raylib/projects/VS2019/raylib/resource.h +0 -14
  311. package/vendor/raylib/src/extras/physac.h +0 -1977
  312. package/vendor/raylib/src/extras/rmem.h +0 -751
  313. package/vendor/raylib/src/raudio.h +0 -198
@@ -2,10 +2,12 @@
2
2
  *
3
3
  * raylib [models] example - Skybox loading and drawing
4
4
  *
5
- * This example has been created using raylib 3.5 (www.raylib.com)
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 4.0
7
6
  *
8
- * Copyright (c) 2017-2020 Ramon Santamaria (@raysan5)
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
 
@@ -23,6 +25,9 @@
23
25
  // Generate cubemap (6 faces) from equirectangular (panorama) texture
24
26
  static TextureCubemap GenTextureCubemap(Shader shader, Texture2D panorama, int size, int format);
25
27
 
28
+ //------------------------------------------------------------------------------------
29
+ // Program main entry point
30
+ //------------------------------------------------------------------------------------
26
31
  int main(void)
27
32
  {
28
33
  // Initialization
@@ -92,23 +97,22 @@ int main(void)
92
97
  {
93
98
  // Update
94
99
  //----------------------------------------------------------------------------------
95
- UpdateCamera(&camera); // Update camera
100
+ UpdateCamera(&camera);
96
101
 
97
102
  // Load new cubemap texture on drag&drop
98
103
  if (IsFileDropped())
99
104
  {
100
- int count = 0;
101
- char **droppedFiles = GetDroppedFiles(&count);
105
+ FilePathList droppedFiles = LoadDroppedFiles();
102
106
 
103
- if (count == 1) // Only support one file dropped
107
+ if (droppedFiles.count == 1) // Only support one file dropped
104
108
  {
105
- if (IsFileExtension(droppedFiles[0], ".png;.jpg;.hdr;.bmp;.tga"))
109
+ if (IsFileExtension(droppedFiles.paths[0], ".png;.jpg;.hdr;.bmp;.tga"))
106
110
  {
107
111
  // Unload current cubemap texture and load new one
108
112
  UnloadTexture(skybox.materials[0].maps[MATERIAL_MAP_CUBEMAP].texture);
109
113
  if (useHDR)
110
114
  {
111
- Texture2D panorama = LoadTexture(droppedFiles[0]);
115
+ Texture2D panorama = LoadTexture(droppedFiles.paths[0]);
112
116
 
113
117
  // Generate cubemap from panorama texture
114
118
  skybox.materials[0].maps[MATERIAL_MAP_CUBEMAP].texture = GenTextureCubemap(shdrCubemap, panorama, 1024, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8);
@@ -116,16 +120,16 @@ int main(void)
116
120
  }
117
121
  else
118
122
  {
119
- Image img = LoadImage(droppedFiles[0]);
123
+ Image img = LoadImage(droppedFiles.paths[0]);
120
124
  skybox.materials[0].maps[MATERIAL_MAP_CUBEMAP].texture = LoadTextureCubemap(img, CUBEMAP_LAYOUT_AUTO_DETECT);
121
125
  UnloadImage(img);
122
126
  }
123
127
 
124
- TextCopy(skyboxFileName, droppedFiles[0]);
128
+ TextCopy(skyboxFileName, droppedFiles.paths[0]);
125
129
  }
126
130
  }
127
131
 
128
- ClearDroppedFiles(); // Clear internal buffers
132
+ UnloadDroppedFiles(droppedFiles); // Unload filepaths from memory
129
133
  }
130
134
  //----------------------------------------------------------------------------------
131
135
 
@@ -2,19 +2,24 @@
2
2
  *
3
3
  * raylib [models] example - Waving cubes
4
4
  *
5
- * This example has been created using raylib 2.5 (www.raylib.com)
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.7
7
6
  *
8
7
  * Example contributed by Codecat (@codecat) and reviewed by Ramon Santamaria (@raysan5)
9
8
  *
10
- * Copyright (c) 2019 Codecat (@codecat) and Ramon Santamaria (@raysan5)
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 Codecat (@codecat) and Ramon Santamaria (@raysan5)
11
13
  *
12
14
  ********************************************************************************************/
13
15
 
14
16
  #include "raylib.h"
15
17
 
16
- #include <math.h>
18
+ #include <math.h> // Required for: sinf()
17
19
 
20
+ //------------------------------------------------------------------------------------
21
+ // Program main entry point
22
+ //------------------------------------------------------------------------------------
18
23
  int main()
19
24
  {
20
25
  // Initialization
@@ -2,12 +2,14 @@
2
2
  *
3
3
  * raylib [models] example - Plane rotations (yaw, pitch, roll)
4
4
  *
5
- * This example has been created using raylib 1.8 (www.raylib.com)
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 4.0
7
6
  *
8
7
  * Example contributed by Berni (@Berni8k) and reviewed by Ramon Santamaria (@raysan5)
9
8
  *
10
- * Copyright (c) 2017-2021 Berni (@Berni8k) and Ramon Santamaria (@raysan5)
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) 2017-2022 Berni (@Berni8k) and Ramon Santamaria (@raysan5)
11
13
  *
12
14
  ********************************************************************************************/
13
15
 
@@ -15,6 +17,9 @@
15
17
 
16
18
  #include "raymath.h" // Required for: MatrixRotateXYZ()
17
19
 
20
+ //------------------------------------------------------------------------------------
21
+ // Program main entry point
22
+ //------------------------------------------------------------------------------------
18
23
  int main(void)
19
24
  {
20
25
  // Initialization
@@ -58,8 +63,8 @@ int main(void)
58
63
  }
59
64
 
60
65
  // Plane yaw (y-axis) controls
61
- if (IsKeyDown(KEY_S)) yaw += 1.0f;
62
- else if (IsKeyDown(KEY_A)) yaw -= 1.0f;
66
+ if (IsKeyDown(KEY_S)) yaw -= 1.0f;
67
+ else if (IsKeyDown(KEY_A)) yaw += 1.0f;
63
68
  else
64
69
  {
65
70
  if (yaw > 0.0f) yaw -= 0.5f;
@@ -67,8 +72,8 @@ int main(void)
67
72
  }
68
73
 
69
74
  // Plane roll (z-axis) controls
70
- if (IsKeyDown(KEY_LEFT)) roll += 1.0f;
71
- else if (IsKeyDown(KEY_RIGHT)) roll -= 1.0f;
75
+ if (IsKeyDown(KEY_LEFT)) roll -= 1.0f;
76
+ else if (IsKeyDown(KEY_RIGHT)) roll += 1.0f;
72
77
  else
73
78
  {
74
79
  if (roll > 0.0f) roll -= 0.5f;
@@ -1,16 +1,15 @@
1
1
  | resource | author | licence | notes |
2
2
  | :------------------- | :---------: | :------ | :---- |
3
- | models/obj/castle.obj,<br>models/castle_diffuse.png | [Alberto Cano](https://www.artstation.com/albertocano) | [CC-BY-NC](https://creativecommons.org/licenses/by-nc/4.0/legalcode) | - |
4
- | models/obj/bridge.obj,<br>models/bridge_diffuse.png | [Alberto Cano](https://www.artstation.com/albertocano) | [CC-BY-NC](https://creativecommons.org/licenses/by-nc/4.0/legalcode) | - |
5
- | models/obj/house.obj,<br>models/house_diffuse.png | [Alberto Cano](https://www.artstation.com/albertocano) | [CC-BY-NC](https://creativecommons.org/licenses/by-nc/4.0/legalcode) | - |
6
- | models/obj/market.obj,<br>models/market_diffuse.png | [Alberto Cano](https://www.artstation.com/albertocano) | [CC-BY-NC](https://creativecommons.org/licenses/by-nc/4.0/legalcode) | - |
7
- | models/obj/turret.obj,<br>models/turret_diffuse.png | [Alberto Cano](https://www.artstation.com/albertocano) | [CC-BY-NC](https://creativecommons.org/licenses/by-nc/4.0/legalcode) | - |
8
- | models/obj/well.obj,<br>models/well_diffuse.png | [Alberto Cano](https://www.artstation.com/albertocano) | [CC-BY-NC](https://creativecommons.org/licenses/by-nc/4.0/legalcode) | - |
9
- | models/obj/cube.obj,<br>models/cube_diffuse.png | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | - |
10
- | models/obj/plane.gltf,<br>models/gltf/plane/plane.bin,<br>models/gltf/plane/plane_diffuse.png | [GiaHanLam](https://sketchfab.com/GiaHanLam) | [CC-BY](https://creativecommons.org/licenses/by/4.0/) | Used by: [`models_yaw_pitch_roll.c`](https://github.com/raysan5/raylib/blob/master/examples/models/models_yaw_pitch_roll.c)
3
+ | models/obj/castle.obj,<br>models/obj/castle_diffuse.png | [Alberto Cano](https://www.artstation.com/albertocano) | [CC-BY-NC](https://creativecommons.org/licenses/by-nc/4.0/legalcode) | - |
4
+ | models/obj/bridge.obj,<br>models/obj/bridge_diffuse.png | [Alberto Cano](https://www.artstation.com/albertocano) | [CC-BY-NC](https://creativecommons.org/licenses/by-nc/4.0/legalcode) | - |
5
+ | models/obj/house.obj,<br>models/obj/house_diffuse.png | [Alberto Cano](https://www.artstation.com/albertocano) | [CC-BY-NC](https://creativecommons.org/licenses/by-nc/4.0/legalcode) | - |
6
+ | models/obj/market.obj,<br>models/obj/market_diffuse.png | [Alberto Cano](https://www.artstation.com/albertocano) | [CC-BY-NC](https://creativecommons.org/licenses/by-nc/4.0/legalcode) | - |
7
+ | models/obj/turret.obj,<br>models/obj/turret_diffuse.png | [Alberto Cano](https://www.artstation.com/albertocano) | [CC-BY-NC](https://creativecommons.org/licenses/by-nc/4.0/legalcode) | - |
8
+ | models/obj/well.obj,<br>models/obj/well_diffuse.png | [Alberto Cano](https://www.artstation.com/albertocano) | [CC-BY-NC](https://creativecommons.org/licenses/by-nc/4.0/legalcode) | - |
9
+ | models/obj/cube.obj,<br>models/obj/cube_diffuse.png | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | - |
10
+ | models/obj/plane.obj,<br>models/obj/plane_diffuse.png | [GiaHanLam](https://sketchfab.com/GiaHanLam) | [CC-BY](https://creativecommons.org/licenses/by/4.0/) | Used by: [`models_yaw_pitch_roll.c`](https://github.com/raysan5/raylib/blob/master/examples/models/models_yaw_pitch_roll.c)
11
11
  | models/iqm/guy.iqm,<br>models/iqm/guyanim.iqm,<br>models/iqm/guytex.png,<br>models/iqm/guy.blend | [@culacant](https://github.com/culacant) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | - |
12
- | models/iqm/vertex_colored_object.iqm | ❔ | | - |
13
- | models/gltf/... | _various_ | Check [LICENSE](https://github.com/raysan5/raylib/blob/master/examples/models/resources/models/gltf/LICENSE) | - |
12
+ | models/gltf/robot.glb,<br>models/gltf/robot.blend | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | - |
14
13
  | models/vox/chr_knight.vox | ❔ | ❔ | - |
15
14
  | models/vox/chr_sword.vox | ❔ | ❔ | - |
16
15
  | models/vox/monu9.vox | ❔ | ❔ | - |
@@ -1,23 +1,2 @@
1
- Rigged Figure model has been created by Cesium (https://cesium.com/cesiumjs/),
2
- and licensed as Creative Commons Attribution 4.0 International License.
3
-
4
- Box Animated model has been created by Cesium (https://cesium.com/cesiumjs/)
5
- and is licensed as Creative Commons Attribution 4.0 International License
6
-
7
- Avocado model is provided by Microsoft
8
- and licensed as CC0 Universal Public Domain
9
-
10
- Animated Morph Cube model is provided by Microsoft
11
- and licensed as CC0 Universal Public Domain
12
-
13
- Animated Triangle model is licensed as CC0 Universal Public Domain
14
-
15
- Gearbox Assy model has been provided by Okino Computer Graphics, using Okino Polytrans Software.
16
- no license information was provided
17
-
18
- Girl model has been provided by Hristo Stamenov (https://thatonegamedev.com/)
19
- and licensed as CC0 Universal Public Domain
20
-
21
- Check for details on CC0: https://creativecommons.org/publicdomain/zero/1.0/
22
- Check for details on CC4: http://creativecommons.org/licenses/by/4.0/
23
- GLTF sample models for testing are taken from: https://github.com/KhronosGroup/glTF-Sample-Models/
1
+ robot.glb model by @Quaternius (https://www.patreon.com/quaternius)
2
+ Licensed under CC0 1.0 Universal (CC0 1.0) - Public Domain Dedication (https://creativecommons.org/publicdomain/zero/1.0/)
@@ -2,18 +2,20 @@
2
2
  *
3
3
  * raylib [easings] example - Easings Testbed
4
4
  *
5
- * This example has been created using raylib 2.5 (www.raylib.com)
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 2.5
7
6
  *
8
7
  * Example contributed by Juan Miguel López (@flashback-fx) and reviewed by Ramon Santamaria (@raysan5)
9
8
  *
10
- * Copyright (c) 2019 Juan Miguel López (@flashback-fx ) and Ramon Santamaria (@raysan5)
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 Juan Miguel López (@flashback-fx ) and Ramon Santamaria (@raysan5)
11
13
  *
12
14
  ********************************************************************************************/
13
15
 
14
- #include <raylib.h>
16
+ #include "raylib.h"
15
17
 
16
- #include "easings.h"
18
+ #include "reasings.h" // Required for easing functions
17
19
 
18
20
  #define FONT_SIZE 20
19
21
 
@@ -56,10 +58,8 @@ enum EasingTypes {
56
58
  EASING_NONE = NUM_EASING_TYPES
57
59
  };
58
60
 
59
-
60
61
  static float NoEase(float t, float b, float c, float d); // NoEase function declaration, function used when "no easing" is selected for any axis
61
62
 
62
-
63
63
  // Easing functions reference data
64
64
  static const struct {
65
65
  const char *name;
@@ -96,7 +96,9 @@ static const struct {
96
96
  [EASING_NONE] = { .name = "None", .func = NoEase },
97
97
  };
98
98
 
99
-
99
+ //------------------------------------------------------------------------------------
100
+ // Program main entry point
101
+ //------------------------------------------------------------------------------------
100
102
  int main(void)
101
103
  {
102
104
  // Initialization
@@ -2,12 +2,14 @@
2
2
  *
3
3
  * raylib [others] example - Embedded files loading (Wave and Image)
4
4
  *
5
- * This example has been created using raylib 3.0 (www.raylib.com)
6
- * raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
5
+ * Example originally created with raylib 3.0, last time updated with raylib 2.5
7
6
  *
8
7
  * Example contributed by Kristian Holmgren (@defutura) and reviewed by Ramon Santamaria (@raysan5)
9
8
  *
10
- * Copyright (c) 2020 Kristian Holmgren (@defutura) and Ramon Santamaria (@raysan5)
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) 2020-2022 Kristian Holmgren (@defutura) and Ramon Santamaria (@raysan5)
11
13
  *
12
14
  ********************************************************************************************/
13
15
 
@@ -16,6 +18,9 @@
16
18
  #include "resources/audio_data.h" // Wave file exported with ExportWaveAsCode()
17
19
  #include "resources/image_data.h" // Image file exported with ExportImageAsCode()
18
20
 
21
+ //------------------------------------------------------------------------------------
22
+ // Program main entry point
23
+ //------------------------------------------------------------------------------------
19
24
  int main(void)
20
25
  {
21
26
  // Initialization
@@ -82,8 +87,8 @@ int main(void)
82
87
 
83
88
  DrawTexture(texture, screenWidth/2 - texture.width/2, 40, WHITE);
84
89
 
85
- DrawText("raylib logo and sound loaded from header files", 65, 320, 20, LIGHTGRAY);
86
- DrawText("Press SPACE to PLAY the sound!", 200, 360, 20, LIGHTGRAY);
90
+ DrawText("raylib logo and sound loaded from header files", 150, 320, 20, LIGHTGRAY);
91
+ DrawText("Press SPACE to PLAY the sound!", 220, 370, 20, LIGHTGRAY);
87
92
 
88
93
  EndDrawing();
89
94
  //----------------------------------------------------------------------------------
@@ -2,13 +2,14 @@
2
2
  *
3
3
  * raylib [shaders] example - OpenGL point particle system
4
4
  *
5
- * This example has been created using raylib 3.8 (www.raylib.com)
6
- * raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
5
+ * Example originally created with raylib 3.8, last time updated with raylib 2.5
7
6
  *
8
- * Example contributed by Stephan Soller (@arkanis - http://arkanis.de/)
9
- * and reviewed by Ramon Santamaria (@raysan5)
7
+ * Example contributed by Stephan Soller (@arkanis) and reviewed by Ramon Santamaria (@raysan5)
10
8
  *
11
- * Copyright (c) 2021 Stephan Soller (@arkanis) and Ramon Santamaria (@raysan5)
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 Stephan Soller (@arkanis) and Ramon Santamaria (@raysan5)
12
13
  *
13
14
  ********************************************************************************************
14
15
  *
@@ -49,7 +50,10 @@ typedef struct Particle {
49
50
  float period;
50
51
  } Particle;
51
52
 
52
- int main()
53
+ //------------------------------------------------------------------------------------
54
+ // Program main entry point
55
+ //------------------------------------------------------------------------------------
56
+ int main(void)
53
57
  {
54
58
  // Initialization
55
59
  //--------------------------------------------------------------------------------------
@@ -1,11 +1,11 @@
1
1
  /*******************************************************************************************
2
2
  *
3
- * raylib easings (header only file)
3
+ * reasings - raylib easings library, based on Robert Penner library
4
4
  *
5
5
  * Useful easing functions for values animation
6
6
  *
7
7
  * This header uses:
8
- * #define EASINGS_STATIC_INLINE // Inlines all functions code, so it runs faster.
8
+ * #define REASINGS_STATIC_INLINE // Inlines all functions code, so it runs faster.
9
9
  * // This requires lots of memory on system.
10
10
  * How to use:
11
11
  * The four inputs t,b,c,d are defined as follows:
@@ -60,7 +60,7 @@
60
60
  * OF THE POSSIBILITY OF SUCH DAMAGE.
61
61
  * ---------------------------------------------------------------------------------
62
62
  *
63
- * Copyright (c) 2015 Ramon Santamaria
63
+ * Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
64
64
  *
65
65
  * This software is provided "as-is", without any express or implied warranty. In no event
66
66
  * will the authors be held liable for any damages arising from the use of this software.
@@ -79,12 +79,12 @@
79
79
  *
80
80
  **********************************************************************************************/
81
81
 
82
- #ifndef EASINGS_H
83
- #define EASINGS_H
82
+ #ifndef REASINGS_H
83
+ #define REASINGS_H
84
84
 
85
- #define EASINGS_STATIC_INLINE // NOTE: By default, compile functions as static inline
85
+ #define REASINGS_STATIC_INLINE // NOTE: By default, compile functions as static inline
86
86
 
87
- #if defined(EASINGS_STATIC_INLINE)
87
+ #if defined(REASINGS_STATIC_INLINE)
88
88
  #define EASEDEF static inline
89
89
  #else
90
90
  #define EASEDEF extern
@@ -96,52 +96,52 @@
96
96
  #define PI 3.14159265358979323846f //Required as PI is not always defined in math.h
97
97
  #endif
98
98
 
99
- #ifdef __cplusplus
99
+ #if defined(__cplusplus)
100
100
  extern "C" { // Prevents name mangling of functions
101
101
  #endif
102
102
 
103
103
  // Linear Easing functions
104
- EASEDEF float EaseLinearNone(float t, float b, float c, float d) { return (c*t/d + b); }
105
- EASEDEF float EaseLinearIn(float t, float b, float c, float d) { return (c*t/d + b); }
106
- EASEDEF float EaseLinearOut(float t, float b, float c, float d) { return (c*t/d + b); }
107
- EASEDEF float EaseLinearInOut(float t,float b, float c, float d) { return (c*t/d + b); }
104
+ EASEDEF float EaseLinearNone(float t, float b, float c, float d) { return (c*t/d + b); } // Ease: Linear
105
+ EASEDEF float EaseLinearIn(float t, float b, float c, float d) { return (c*t/d + b); } // Ease: Linear In
106
+ EASEDEF float EaseLinearOut(float t, float b, float c, float d) { return (c*t/d + b); } // Ease: Linear Out
107
+ EASEDEF float EaseLinearInOut(float t, float b, float c, float d) { return (c*t/d + b); } // Ease: Linear In Out
108
108
 
109
109
  // Sine Easing functions
110
- EASEDEF float EaseSineIn(float t, float b, float c, float d) { return (-c*cosf(t/d*(PI/2.0f)) + c + b); }
111
- EASEDEF float EaseSineOut(float t, float b, float c, float d) { return (c*sinf(t/d*(PI/2.0f)) + b); }
112
- EASEDEF float EaseSineInOut(float t, float b, float c, float d) { return (-c/2.0f*(cosf(PI*t/d) - 1.0f) + b); }
110
+ EASEDEF float EaseSineIn(float t, float b, float c, float d) { return (-c*cosf(t/d*(PI/2.0f)) + c + b); } // Ease: Sine In
111
+ EASEDEF float EaseSineOut(float t, float b, float c, float d) { return (c*sinf(t/d*(PI/2.0f)) + b); } // Ease: Sine Out
112
+ EASEDEF float EaseSineInOut(float t, float b, float c, float d) { return (-c/2.0f*(cosf(PI*t/d) - 1.0f) + b); } // Ease: Sine Out
113
113
 
114
114
  // Circular Easing functions
115
- EASEDEF float EaseCircIn(float t, float b, float c, float d) { t /= d; return (-c*(sqrtf(1.0f - t*t) - 1.0f) + b); }
116
- EASEDEF float EaseCircOut(float t, float b, float c, float d) { t = t/d - 1.0f; return (c*sqrtf(1.0f - t*t) + b); }
117
- EASEDEF float EaseCircInOut(float t, float b, float c, float d)
115
+ EASEDEF float EaseCircIn(float t, float b, float c, float d) { t /= d; return (-c*(sqrtf(1.0f - t*t) - 1.0f) + b); } // Ease: Circular In
116
+ EASEDEF float EaseCircOut(float t, float b, float c, float d) { t = t/d - 1.0f; return (c*sqrtf(1.0f - t*t) + b); } // Ease: Circular Out
117
+ EASEDEF float EaseCircInOut(float t, float b, float c, float d) // Ease: Circular In Out
118
118
  {
119
119
  if ((t/=d/2.0f) < 1.0f) return (-c/2.0f*(sqrtf(1.0f - t*t) - 1.0f) + b);
120
120
  t -= 2.0f; return (c/2.0f*(sqrtf(1.0f - t*t) + 1.0f) + b);
121
121
  }
122
122
 
123
123
  // Cubic Easing functions
124
- EASEDEF float EaseCubicIn(float t, float b, float c, float d) { t /= d; return (c*t*t*t + b); }
125
- EASEDEF float EaseCubicOut(float t, float b, float c, float d) { t = t/d - 1.0f; return (c*(t*t*t + 1.0f) + b); }
126
- EASEDEF float EaseCubicInOut(float t, float b, float c, float d)
124
+ EASEDEF float EaseCubicIn(float t, float b, float c, float d) { t /= d; return (c*t*t*t + b); } // Ease: Cubic In
125
+ EASEDEF float EaseCubicOut(float t, float b, float c, float d) { t = t/d - 1.0f; return (c*(t*t*t + 1.0f) + b); } // Ease: Cubic Out
126
+ EASEDEF float EaseCubicInOut(float t, float b, float c, float d) // Ease: Cubic In Out
127
127
  {
128
128
  if ((t/=d/2.0f) < 1.0f) return (c/2.0f*t*t*t + b);
129
129
  t -= 2.0f; return (c/2.0f*(t*t*t + 2.0f) + b);
130
130
  }
131
131
 
132
132
  // Quadratic Easing functions
133
- EASEDEF float EaseQuadIn(float t, float b, float c, float d) { t /= d; return (c*t*t + b); }
134
- EASEDEF float EaseQuadOut(float t, float b, float c, float d) { t /= d; return (-c*t*(t - 2.0f) + b); }
135
- EASEDEF float EaseQuadInOut(float t, float b, float c, float d)
133
+ EASEDEF float EaseQuadIn(float t, float b, float c, float d) { t /= d; return (c*t*t + b); } // Ease: Quadratic In
134
+ EASEDEF float EaseQuadOut(float t, float b, float c, float d) { t /= d; return (-c*t*(t - 2.0f) + b); } // Ease: Quadratic Out
135
+ EASEDEF float EaseQuadInOut(float t, float b, float c, float d) // Ease: Quadratic In Out
136
136
  {
137
137
  if ((t/=d/2) < 1) return (((c/2)*(t*t)) + b);
138
138
  return (-c/2.0f*(((t - 1.0f)*(t - 3.0f)) - 1.0f) + b);
139
139
  }
140
140
 
141
141
  // Exponential Easing functions
142
- EASEDEF float EaseExpoIn(float t, float b, float c, float d) { return (t == 0.0f) ? b : (c*powf(2.0f, 10.0f*(t/d - 1.0f)) + b); }
143
- EASEDEF float EaseExpoOut(float t, float b, float c, float d) { return (t == d) ? (b + c) : (c*(-powf(2.0f, -10.0f*t/d) + 1.0f) + b); }
144
- EASEDEF float EaseExpoInOut(float t, float b, float c, float d)
142
+ EASEDEF float EaseExpoIn(float t, float b, float c, float d) { return (t == 0.0f) ? b : (c*powf(2.0f, 10.0f*(t/d - 1.0f)) + b); } // Ease: Exponential In
143
+ EASEDEF float EaseExpoOut(float t, float b, float c, float d) { return (t == d) ? (b + c) : (c*(-powf(2.0f, -10.0f*t/d) + 1.0f) + b); } // Ease: Exponential Out
144
+ EASEDEF float EaseExpoInOut(float t, float b, float c, float d) // Ease: Exponential In Out
145
145
  {
146
146
  if (t == 0.0f) return b;
147
147
  if (t == d) return (b + c);
@@ -151,21 +151,21 @@ EASEDEF float EaseExpoInOut(float t, float b, float c, float d)
151
151
  }
152
152
 
153
153
  // Back Easing functions
154
- EASEDEF float EaseBackIn(float t, float b, float c, float d)
154
+ EASEDEF float EaseBackIn(float t, float b, float c, float d) // Ease: Back In
155
155
  {
156
156
  float s = 1.70158f;
157
157
  float postFix = t/=d;
158
158
  return (c*(postFix)*t*((s + 1.0f)*t - s) + b);
159
159
  }
160
160
 
161
- EASEDEF float EaseBackOut(float t, float b, float c, float d)
161
+ EASEDEF float EaseBackOut(float t, float b, float c, float d) // Ease: Back Out
162
162
  {
163
163
  float s = 1.70158f;
164
164
  t = t/d - 1.0f;
165
165
  return (c*(t*t*((s + 1.0f)*t + s) + 1.0f) + b);
166
166
  }
167
167
 
168
- EASEDEF float EaseBackInOut(float t, float b, float c, float d)
168
+ EASEDEF float EaseBackInOut(float t, float b, float c, float d) // Ease: Back In Out
169
169
  {
170
170
  float s = 1.70158f;
171
171
  if ((t/=d/2.0f) < 1.0f)
@@ -180,7 +180,7 @@ EASEDEF float EaseBackInOut(float t, float b, float c, float d)
180
180
  }
181
181
 
182
182
  // Bounce Easing functions
183
- EASEDEF float EaseBounceOut(float t, float b, float c, float d)
183
+ EASEDEF float EaseBounceOut(float t, float b, float c, float d) // Ease: Bounce Out
184
184
  {
185
185
  if ((t/=d) < (1.0f/2.75f))
186
186
  {
@@ -203,15 +203,15 @@ EASEDEF float EaseBounceOut(float t, float b, float c, float d)
203
203
  }
204
204
  }
205
205
 
206
- EASEDEF float EaseBounceIn(float t, float b, float c, float d) { return (c - EaseBounceOut(d - t, 0.0f, c, d) + b); }
207
- EASEDEF float EaseBounceInOut(float t, float b, float c, float d)
206
+ EASEDEF float EaseBounceIn(float t, float b, float c, float d) { return (c - EaseBounceOut(d - t, 0.0f, c, d) + b); } // Ease: Bounce In
207
+ EASEDEF float EaseBounceInOut(float t, float b, float c, float d) // Ease: Bounce In Out
208
208
  {
209
209
  if (t < d/2.0f) return (EaseBounceIn(t*2.0f, 0.0f, c, d)*0.5f + b);
210
210
  else return (EaseBounceOut(t*2.0f - d, 0.0f, c, d)*0.5f + c*0.5f + b);
211
211
  }
212
212
 
213
213
  // Elastic Easing functions
214
- EASEDEF float EaseElasticIn(float t, float b, float c, float d)
214
+ EASEDEF float EaseElasticIn(float t, float b, float c, float d) // Ease: Elastic In
215
215
  {
216
216
  if (t == 0.0f) return b;
217
217
  if ((t/=d) == 1.0f) return (b + c);
@@ -224,7 +224,7 @@ EASEDEF float EaseElasticIn(float t, float b, float c, float d)
224
224
  return (-(postFix*sinf((t*d-s)*(2.0f*PI)/p )) + b);
225
225
  }
226
226
 
227
- EASEDEF float EaseElasticOut(float t, float b, float c, float d)
227
+ EASEDEF float EaseElasticOut(float t, float b, float c, float d) // Ease: Elastic Out
228
228
  {
229
229
  if (t == 0.0f) return b;
230
230
  if ((t/=d) == 1.0f) return (b + c);
@@ -236,7 +236,7 @@ EASEDEF float EaseElasticOut(float t, float b, float c, float d)
236
236
  return (a*powf(2.0f,-10.0f*t)*sinf((t*d-s)*(2.0f*PI)/p) + c + b);
237
237
  }
238
238
 
239
- EASEDEF float EaseElasticInOut(float t, float b, float c, float d)
239
+ EASEDEF float EaseElasticInOut(float t, float b, float c, float d) // Ease: Elastic In Out
240
240
  {
241
241
  if (t == 0.0f) return b;
242
242
  if ((t/=d/2.0f) == 2.0f) return (b + c);
@@ -256,8 +256,8 @@ EASEDEF float EaseElasticInOut(float t, float b, float c, float d)
256
256
  return (postFix*sinf((t*d-s)*(2.0f*PI)/p)*0.5f + c + b);
257
257
  }
258
258
 
259
- #ifdef __cplusplus
259
+ #if defined(__cplusplus)
260
260
  }
261
261
  #endif
262
262
 
263
- #endif // EASINGS_H
263
+ #endif // REASINGS_H
@@ -5,12 +5,14 @@
5
5
  * NOTE: This example requires raylib OpenGL 4.3 versions for compute shaders support,
6
6
  * shaders used in this example are #version 430 (OpenGL 4.3)
7
7
  *
8
- * This example has been created using raylib 4.0 (www.raylib.com)
9
- * raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
8
+ * Example originally created with raylib 4.0, last time updated with raylib 2.5
10
9
  *
11
10
  * Example contributed by Teddy Astie (@tsnake41) and reviewed by Ramon Santamaria (@raysan5)
12
11
  *
13
- * Copyright (c) 2021 Teddy Astie (@tsnake41)
12
+ * Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
13
+ * BSD-like license that allows static linking with closed source software
14
+ *
15
+ * Copyright (c) 2021-2022 Teddy Astie (@tsnake41)
14
16
  *
15
17
  ********************************************************************************************/
16
18
 
@@ -40,6 +42,9 @@ typedef struct GolUpdateSSBO {
40
42
  GolUpdateCmd commands[MAX_BUFFERED_TRANSFERTS];
41
43
  } GolUpdateSSBO;
42
44
 
45
+ //------------------------------------------------------------------------------------
46
+ // Program main entry point
47
+ //------------------------------------------------------------------------------------
43
48
  int main(void)
44
49
  {
45
50
  // Initialization
@@ -55,27 +60,25 @@ int main(void)
55
60
  unsigned int golLogicProgram = rlLoadComputeShaderProgram(golLogicShader);
56
61
  UnloadFileText(golLogicCode);
57
62
 
58
- // Game of Life logic compute shader
63
+ // Game of Life logic render shader
59
64
  Shader golRenderShader = LoadShader(NULL, "resources/shaders/glsl430/gol_render.glsl");
60
65
  int resUniformLoc = GetShaderLocation(golRenderShader, "resolution");
61
66
 
62
- // Game of Life transfert shader
67
+ // Game of Life transfert shader (CPU<->GPU download and upload)
63
68
  char *golTransfertCode = LoadFileText("resources/shaders/glsl430/gol_transfert.glsl");
64
69
  unsigned int golTransfertShader = rlCompileShader(golTransfertCode, RL_COMPUTE_SHADER);
65
70
  unsigned int golTransfertProgram = rlLoadComputeShaderProgram(golTransfertShader);
66
71
  UnloadFileText(golTransfertCode);
67
72
 
68
- // SSBOs
73
+ // Load shader storage buffer object (SSBO), id returned
69
74
  unsigned int ssboA = rlLoadShaderBuffer(GOL_WIDTH*GOL_WIDTH*sizeof(unsigned int), NULL, RL_DYNAMIC_COPY);
70
75
  unsigned int ssboB = rlLoadShaderBuffer(GOL_WIDTH*GOL_WIDTH*sizeof(unsigned int), NULL, RL_DYNAMIC_COPY);
71
-
72
- struct GolUpdateSSBO transfertBuffer;
73
- transfertBuffer.count = 0;
74
-
75
- int transfertSSBO = rlLoadShaderBuffer(sizeof(struct GolUpdateSSBO), NULL, RL_DYNAMIC_COPY);
76
+ unsigned int ssboTransfert = rlLoadShaderBuffer(sizeof(GolUpdateSSBO), NULL, RL_DYNAMIC_COPY);
77
+
78
+ GolUpdateSSBO transfertBuffer = { 0 };
76
79
 
77
80
  // Create a white texture of the size of the window to update
78
- // each pixel of the window using the fragment shader
81
+ // each pixel of the window using the fragment shader: golRenderShader
79
82
  Image whiteImage = GenImageColor(GOL_WIDTH, GOL_WIDTH, WHITE);
80
83
  Texture whiteTex = LoadTextureFromImage(whiteImage);
81
84
  UnloadImage(whiteImage);
@@ -98,18 +101,16 @@ int main(void)
98
101
  transfertBuffer.commands[transfertBuffer.count].enabled = IsMouseButtonDown(MOUSE_BUTTON_LEFT);
99
102
  transfertBuffer.count++;
100
103
  }
101
- else if (transfertBuffer.count > 0)
104
+ else if (transfertBuffer.count > 0) // Process transfert buffer
102
105
  {
103
- // Process transfert buffer
104
-
105
106
  // Send SSBO buffer to GPU
106
- rlUpdateShaderBufferElements(transfertSSBO, &transfertBuffer, sizeof(struct GolUpdateSSBO), 0);
107
+ rlUpdateShaderBufferElements(ssboTransfert, &transfertBuffer, sizeof(GolUpdateSSBO), 0);
107
108
 
108
- // Process ssbo command
109
+ // Process ssbo commands on GPU
109
110
  rlEnableShader(golTransfertProgram);
110
111
  rlBindShaderBuffer(ssboA, 1);
111
- rlBindShaderBuffer(transfertSSBO, 3);
112
- rlComputeShaderDispatch(transfertBuffer.count, 1, 1); // each GPU unit will process a command
112
+ rlBindShaderBuffer(ssboTransfert, 3);
113
+ rlComputeShaderDispatch(transfertBuffer.count, 1, 1); // Each GPU unit will process a command!
113
114
  rlDisableShader();
114
115
 
115
116
  transfertBuffer.count = 0;
@@ -157,7 +158,7 @@ int main(void)
157
158
  // Unload shader buffers objects.
158
159
  rlUnloadShaderBuffer(ssboA);
159
160
  rlUnloadShaderBuffer(ssboB);
160
- rlUnloadShaderBuffer(transfertSSBO);
161
+ rlUnloadShaderBuffer(ssboTransfert);
161
162
 
162
163
  // Unload compute shader programs
163
164
  rlUnloadShaderProgram(golTransfertProgram);