Commit graph

987 commits

Author SHA1 Message Date
Ray
890058abcd Update raylib.h 2024-04-04 13:18:28 +02:00
Ray
d30cfea82d REVIEWED: GetScreenToWorldRayEx() 2024-04-03 20:10:15 +02:00
Ray
3b353da3ab Address parsing issue when generating XML #3893 2024-04-01 18:00:52 +02:00
MrMugame
eda239cc97
Fixing gamepad buttons not working in drm backend (#3888)
* Fixing gamepad buttons in drm backend

* Remove trailing spaces

* Axis enumeration now works properly
2024-03-29 01:40:20 +01:00
Ray
93a828f744 REVIEWED: GetMouseRay() functions rename #3830 2024-03-07 12:33:37 +01:00
aiafrasinei
3b7be85151
Screen space related functions consistency (#3830)
* Screen/world-space related functions rename

* Update raylib_api.* by CI

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-07 12:28:11 +01:00
Ray
68b553cfc1 Update raylib.h 2024-03-07 12:10:02 +01:00
Ray
1e8450665c ADDED: New function ColorIsEqual() 2024-02-29 18:40:10 +01:00
GideonSerf
371d25c8c9
Gamepad rumble support with SDL2 (#3819)
* Added gamepad rumble to rcore_desktop.c and rcore_desktop_sdl.c
Still need to add to the rest of the platforms.

* Add SetGamepadVibration warnings to unimplemented platforms.

* Added MAX_GAMEPAD_VIBRATION_TIME
The rumble in SDL2 will continue for MAX_GAMEPAD_VIBRATION_TIME unless the user cancels it with a call to SetGamepadVibration(0.0f,0.0f,0.0f)

* Cast float duration value to Uint 32

* Changed defines from int to float and fixed typo

---------

Co-authored-by: Gideon Serfontein <gse@newspacesystems.com>
2024-02-24 16:47:27 +01:00
Ray
80580746e5 Reorder functions 2024-02-04 12:02:58 +01:00
Luís Almeida
9a5dddc311
Added viewport independent raycast (#3709)
* added viewport independent raycast

* Renamed GetMouseRayEx to GetViewRay
2024-02-04 11:37:10 +01:00
Alexandre Almeida
5c25913e09
Fix Android keycode translation and duplicate key constants (#3733)
* Fix Android keycode translation

* Simplify code a bit

* Rename KEYCODE_MAPPED_NUM to KEYCODE_MAP_SIZE

* Fix KEY_R and KEY_MENU duplicate

* Update raylib_api.* by CI

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-20 21:22:33 +01:00
Ray
3f1e59a7cf Update copyright to 2024 2024-01-02 20:58:12 +01:00
Ray
1f3121d2fa Revert "Update raylib.h"
This reverts commit 7ea6adb29e.
2023-12-28 23:17:07 +01:00
Ray
dde738a2fd Merge branch 'master' of https://github.com/raysan5/raylib 2023-12-28 23:16:57 +01:00
ubkp
fd5e1e6afb
[rtextures] Fix LoadImageAnimFromMemory() warning for fileData (#3686)
* Fix LoadImageAnimFromMemory() warning for fileData

* Add LoadImageAnimFromMemory() to raylib.h

* Fix missing ; on previous commit
2023-12-28 23:15:04 +01:00
Ray
7ea6adb29e Update raylib.h 2023-12-28 22:10:10 +01:00
maverikou
7cfdf33ff0
TextReplace const correctness (#3678)
* TextReplace const correctness

* cleanup
2023-12-28 20:09:49 +01:00
Jeffery Myers
ad64a43b34
[rshapes] Expose shapes drawing texture and rectangle (#3677)
* provide access to the shape texture so that shapes can be extended outside of raylib with the same optimizations as internal raylib functions.

* PR feedback, comply with C standards

* oops
2023-12-28 15:40:03 +01:00
Antonis Geralis
7ca95512d8
Review UnloadAutomationEventList (#3658)
* Review UnloadAutomationEventList

* Update raylib.h

* Update rcore.c

* Update core_automation_events.c

* Fix mistake
2023-12-23 12:14:39 +01:00
Matthew Oros
387506faab
[rcore] Remove unused vScreenCenter (#3632) 2023-12-13 21:22:44 +01:00
Benjamin Schmid Ties
6083d2b9f3
fixed coding style in function TextToFloat (#3627)
* function to convert string to float

* fix code to match coding conventions
2023-12-13 21:20:13 +01:00
Ray
6b136fac67 ADDED: ExportMeshAsCode() 2023-11-30 13:01:19 +01:00
Peter0x44
e7a486fa81
Hide unneeded internal symbols when building raylib as an so or dylib (#3573) 2023-11-28 20:43:45 +01:00
Karim
21469e92b0
Image convolution function ImageKernelConvolution (#3528)
* Added image convultion ImageKernelConvolution

* comment changes

* spelling changes and change to kernel size

* removed kernel normalization inside function

* fix to formating
2023-11-18 20:05:45 +01:00
Dennis E. Hamilton
f607cac267
Preparing for 5.1-dev (#3550)
Adjusting raylib.h to reflect post-5.0 changes now.
2023-11-18 20:01:02 +01:00
Ray
737cd0be7f Updated for upcoming raylib 5.0 2023-11-10 13:27:13 +01:00
Ray
bd3ffa7db3 REDESIGNED: Spline drawing functionality
This change allows more versatile and consistent splines drawing. It also gives more control to advance users to draw splines as individual segments.
2023-11-08 17:42:35 +01:00
Ray
f01d3db739 ADDED: GetSplinePoint*() functions for spline evaluation
RENAMED: `DrawLine<spline_type>()` to `DrawSpline<spline_type>()` for more consistent and clear naming
REVIEWED: Bezier drawing parameters order, more consistent
REVIEWED: Spline-based examples -WIP-
2023-11-07 19:25:49 +01:00
Ray
2d1b211920 ADDED: LoadRandomSequence()/UnloadRandomSequence() 2023-11-03 20:21:43 +01:00
Ray
301d1b85ab Update raylib version to **raylib 5.0** 2023-11-02 18:18:27 +01:00
Ray
b8fce54c0f Minor tweaks 2023-10-30 13:29:14 +01:00
Ray
fc7dcff4a7 ADDED: Pseudo-random numbers generator! 2023-10-29 21:11:30 +01:00
Ray
f721429f25 ADDED: SetAutomationEventBaseFrame(int frame) 2023-10-27 01:19:10 +02:00
Ray
99dac5451c ADDED: Automation Events System, exposed to users
Added new API to record and play events
Added examples illustrating functionality
2023-10-26 23:59:19 +02:00
Ray
eddeafd2ed Revert "Fix IsGestureDetected parameter inconsistency in raylib.h with rgextures.h (#3464)"
This reverts commit 804f1a83eb.
2023-10-26 10:28:00 +02:00
jestarray
804f1a83eb
Fix IsGestureDetected parameter inconsistency in raylib.h with rgextures.h (#3464)
closes https://github.com/raysan5/raylib/issues/3463
2023-10-26 10:24:21 +02:00
Peter0x44
e33e9da277
Add DrawCircleLinesV for consistency (#3452)
ImageDrawCircleLinesV already existed, so I'm not sure why this was
missing. It is trivial to implement, anyway
2023-10-22 17:13:49 +02:00
Ray
fc6152613f REVIEWED: raylib 5.0-dev version for a future release 2023-10-18 00:33:05 +02:00
Alexey Kutepov
d7d04a07a2
[raudio] Implement GetMasterVolume() (#3434)
It feels a little unfinished when you can SetMasterVolume but can't
really Get it. So to finish the symmetry here is the GetMasterVolume
implementation.
2023-10-17 23:35:38 +02:00
Ray
da9c2894fe Reorganized some functions, WaitTime() is common to all platforms 2023-10-11 12:10:38 +02:00
Ray
101a9b0445 Added comments and review some functions #3313 2023-10-10 11:59:41 +02:00
Ray
be8eea9eda Format tweaks 2023-10-08 18:10:05 +02:00
Ray
73b54c862e Update raylib.h 2023-09-29 00:28:16 +02:00
Ray
f27ea1f0c8 REVIEWED: IsGestureDetected() parameter type 2023-09-22 11:58:14 +02:00
Brian E
acf211a5fa
general syntax fixes (#3319)
* Prettified a comment

* fixed broken indentation caused by another commit.
the commit renamed a bool to int and broke indentation: 233cf3970c

* Changed 0.001 and 0.00001 to EPSILON
This commit is untested.
I don't know what consequences this has.
Since the commits that added these numbers were before epsilon was added,
I have assumed that epsilon could replace them.

* Prettied up indentation in a few places

* removed spacing around *, standardizing it.

* I may have gotten overboard with indentation

* removed a few useless parenthesis

* Added fortran-raylib

* Fix examples/others/rlgl_standalone.c compilation issue (#3242)

* Update BINDINGS.md

* Ignore unused return value of GetCodepointNext in GetCodepointCount (#3241)

* Ignore unused return value of GetCodepointNext in GetCodepointCount

Removes the last warning from non-external libraries when compiling with
the default build configuration on x64 Linux.

* Remove unnecessary void cast in GetCodepointCount

* Fix #3246

* Revert "Fix #3246"

This reverts commit e4dcbd5180.

* Fix text_unicode.c example crashing (#3250)

* Fix text_unicode.c example crashing

* Adjust the text_unicode.c example crashing fix

* tweaks

* add build.zig options for individual modules (#3254)

* Add `IsKeyPressedRepeat` (desktop only) (#3245)

Since the key pressed are handle by comparing current vs previous
state (ie frame), a special way is needed to handle key repeats.

* Reviewed `IsKeyPressedRepeat()` #3248

* Update rcore.c (#3255)

* Match CMakeOptions.txt options default values (#3258)

* Fix SetClipboardText for web (#3257)

* [Image] Validate that ImageDrawRectangleRec is drawing entirely inside the image (#3264)

* Add a function to clone a sound and share data with another sound.

* rename items based on feedback

* PR Feedback, use custom unload for sound alias, not variant of normal sound unloading

* sound_multi example

* Validate that image rect drawing is inside the image so we don't overflow a buffer

* remove files that should not have been added.

* remove changes that should not have been

* revert

* adsfasdfsdfsdf

* Add Vector3 Projecting and Rejection to Raymath (#3263)

* Update raymath.h

* formatting

* [Feature] IsKey... safety checks and more (#3256)

* [Feature] Add GetKeyRepeat

* Update rcore.c

* Simpler design, only one repeat per frame

* Update config.h

* Update rcore.c

* Add KEYBOARD_KEYS_MASK

* Update config.h

* reversions

* Update rcore.c

* Update rcore.c

* change docs

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update raylib.h

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Fix bug where default shaders was not linking. (#3261)

* Formating review

* Add missing cmake options (#3267)

* Fix CMake extraneous -lglfw (#3266)

Closes #3265.

The problem: LIBS_PRIVATE is a list of library names (used by pkg-config), but the shared library of the same name doesn't always exist.

* Fix example/models/models_loading_gltf.c controls (#3268)

* Fix example/models/models_loading_m3d.c controls (#3269)

* Remove e from secondes (#3270)

* Fix example/audio/audio_module_player.c help instructions and small bug (#3272)

* Fix example/audio/audio_module_player.c help instructions and small bug

* Update example/audio/audio_module_player.png screenshot

* Use type name instead of valid specifier

long long --> long long int

* REVIEWED: `GetFileLength()`, added comment #3262

* Update examples/models/models_loading_gltf.png;m3d.png screenshots (#3273)

* Remove a duplicated screenshot and add missing one (#3275)

* Add examples/shaders/shaders_lightmap.c to Makefiles (#3276)

* Fix examples/others/easings_testbed.c help instructions and small tweak (#3277)

* Fix examples/shaders/shaders_texture_outline.c help instructions (#3278)

* Fix examples/shapes/shapes_collision_area.c help instructions (#3279)

* RENAMED: LoadFont*() parameter names for consistency and coherence

* Fix uninitialized thread-locals in stbi #3282 (#3283)

* REVIEWED: Added `SetTextLineSpacing()` to multiline examples

* REVIEWED: Data size type consistency between functions #3168

* Some tweaks

* Use internal default allocators, instead of user-exposed ones

* Added rudimentary SVG support. (#2738)

* Added rudimentary SVG support. Added 2 functions ImageLoadSvg and ImageLoadSvgWithSize.

* Added an example on how to use ImageLoadSvgWithSize and adjusted Makefiles accordingly.

* Added actual correct example file.

* Reviewed the code to keep the raylib coding conventions in mind.
Moved the LoadImageSvg() code into LoadImage() guarded by SUPPORT_FILEFORMAT_SVG.
Renamed LoadImageSvgWithSize() to LoadImageSvg().
Added a LoadImageSvgFromString() function to parse the loaded SVG into an actual image. This does the bulk of the work.

* Fixed typo.

---------

Co-authored-by: Ray <raysan5@gmail.com>

* REVIEWED: `LoadImageSvg()`

* REVIEWED: `LoadImageSvg()`

* Add SUPPORT_FILEFORMAT_SVG to cmake (#3284)

* Fix examples/textures/textures_fog_of_war.c help instructions (#3285)

* Fix examples/textures/textures_image_rotate.c help instructions (#3286)

* Update rtextures.c

* Fix #3247

* Update config.h

* Fix #3293

* Disable UBSAN in zig builds. (#3292)

Zig debug builds automatically enable ubsan.
As the fix for #1891 had to be reverted, debug builds using zig will crash like so:

```
Illegal instruction at address 0x3237d2
raylib/src/rlgl.h:3690:91: 0x3237d2 in rlDrawVertexArrayElements (/home/rcorre/src/raylib-zig-template/raylib/src/rcore.c)
    glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, (const unsigned short *)buffer + offset);
```

This disables UBSAN when using zig to build raylib.

* Update README.md (#3290)

specially -> especially

* Update cmake SUPPORT_FILEFORMAT_SVG default value (#3291)

* Mouse offset and scaling must be considered also on web!

* Update rcore.c

* Update Makefile : clean raygui.c & physac.c (#3296)

* Remove PLATFORM_RPI (#3232)

* Remove PLATFORM_RPI

* remove build artifacts

---------

Co-authored-by: MichaelFiber <michael@cubeofb.org>
Co-authored-by: Ray <raysan5@gmail.com>

* Review to avoid UBSAN complaining #1891

* added raylib-raku to bindings (#3299)

* examples: core: adds 2D camera two player split screen (#3298)

* Reviewed examples for consistency

* Update rtext.c

* Some code restructuring for input functions, consistency review

* Remove unneeded #if (#3301)

Co-authored-by: MichaelFiber <michael@cubeofb.org>

* Revert "Disable UBSAN in zig builds. (#3292)" (#3303)

This reverts commit a316f9e7fc.

Issue #1891 was fixed again, so this is no longer needed.

* rtextures: Fix ImageDraw() source clipping when drawing beyond top left (#3306)

* REVIEWED: `TextToPascal()` issue when first char is uppercase

* Implement FLAG_WINDOW_RESIZABLE for web (#3305)

Fixes #3231

* Update BINDINGS.md (#3307)

Fix Kaylib binding. Reroute to a new repository.
Binding renamed.

* Update webassembly.yml

* Add claw-raylib to BINDINGS.md (#3310)

* Add SetWindowMaxSize for desktop and web (#3309)

* Add SetWindowMaxSize for desktop and web

* Remove SizeInt and respective adjustments

* Update rtextures.c

* Reviewed parameters for consistency

* Rename windowM* to screenM* (#3312)

* Update BINDINGS.md (#3317)

Update TurboRaylib bindings

* Update rmodels.c

* Update BINDINGS.md with vaiorabbit/raylib-bindings (#3318)

* fixed spelling mistake

* put back parenthesis

* reverted major allignment changes

* reverted parser output changes

* reverted one more indentation change

---------

Co-authored-by: Brian-E <brian@intra.fo>
Co-authored-by: Ray <raysan5@gmail.com>
Co-authored-by: ubkp <118854183+ubkp@users.noreply.github.com>
Co-authored-by: ashn <60763262+ashn-dot-dev@users.noreply.github.com>
Co-authored-by: actondev (Christos) <chris.actondev@gmail.com>
Co-authored-by: vitopigno <103512727+VitusVeit@users.noreply.github.com>
Co-authored-by: Asdqwe <asdqwe@asdqwe.com>
Co-authored-by: Jeffery Myers <jeffm2501@gmail.com>
Co-authored-by: Ethan Simpson <ethansimpson@xtra.co.nz>
Co-authored-by: Nickolas McDonald <43690021+n77y@users.noreply.github.com>
Co-authored-by: Branimir Ričko <rickobranimir@gmail.com>
Co-authored-by: iacore <74560659+iacore@users.noreply.github.com>
Co-authored-by: Ethan Conneely <Econn50@outlook.com>
Co-authored-by: Johannes Barthelmes <615914+jbarthelmes@users.noreply.github.com>
Co-authored-by: bXi <bluepunk@gmail.com>
Co-authored-by: Ryan Roden-Corrent <ryan@rcorre.net>
Co-authored-by: Ikko Eltociear Ashimine <eltociear@gmail.com>
Co-authored-by: SuperUserNameMan <yoann@terminajones.com>
Co-authored-by: MichaelFiber <42419558+michaelfiber@users.noreply.github.com>
Co-authored-by: MichaelFiber <michael@cubeofb.org>
Co-authored-by: Dan Vu <danvu.hustle@gmail.com>
Co-authored-by: Gabriel dos Santos Sanches <gabrielssanches@gmail.com>
Co-authored-by: Rob Loach <robloach@gmail.com>
Co-authored-by: Peter0x44 <peter0x44@disroot.org>
Co-authored-by: Kenta <106167071+Its-Kenta@users.noreply.github.com>
Co-authored-by: bohonghuang <1281299809@qq.com>
Co-authored-by: turborium <45082001+turborium@users.noreply.github.com>
Co-authored-by: Wilson Silva <wilson.dsigns@gmail.com>
2023-09-17 20:16:14 +02:00
Ray
97ef81914c Reviewed parameters for consistency 2023-09-13 17:05:38 +02:00
ubkp
719365f209
Add SetWindowMaxSize for desktop and web (#3309)
* Add SetWindowMaxSize for desktop and web

* Remove SizeInt and respective adjustments
2023-09-13 16:37:11 +02:00
Ray
d6f3891009 REVIEWED: LoadImageSvg() 2023-09-02 13:16:44 +02:00
bXi
c03ab03627
Added rudimentary SVG support. (#2738)
* Added rudimentary SVG support. Added 2 functions ImageLoadSvg and ImageLoadSvgWithSize.

* Added an example on how to use ImageLoadSvgWithSize and adjusted Makefiles accordingly.

* Added actual correct example file.

* Reviewed the code to keep the raylib coding conventions in mind.
Moved the LoadImageSvg() code into LoadImage() guarded by SUPPORT_FILEFORMAT_SVG.
Renamed LoadImageSvgWithSize() to LoadImageSvg().
Added a LoadImageSvgFromString() function to parse the loaded SVG into an actual image. This does the bulk of the work.

* Fixed typo.

---------

Co-authored-by: Ray <raysan5@gmail.com>
2023-09-02 13:00:18 +02:00