Commit Graph

1073 Commits

Author SHA1 Message Date
Ray c6241b91a2 REVIEWED: IsFileExtension() to avoid other modules dependency #5071 2025-08-08 23:01:04 +02:00
Ray c2f2878575 Merge pull request #5099 from JohnnyCena123/raysan-typo
fix typo in 'Ramon Santamaria'
2025-08-08 07:16:07 +02:00
JohnnyCena123 c25e9f641d fix typo in 'Ramon Santamaria' 2025-08-08 03:04:33 +03:00
Ray 570082deba WARNING: **NEW** raylib code CONVENTION: Comments do not end with '.' 2025-08-07 18:23:20 +02:00
Ray 1c8eef9b0b Update raylib and generate ARM64 libraries for Windows, Linux, macOS 2025-08-02 17:59:34 +02:00
Ray 234f4b2b10 Update raylib.h 2025-08-01 19:38:02 +02:00
Amy Wilder 205b6a0926 Merge branch 'raysan5:master' into safety-comments 2025-07-07 21:52:54 -04:00
Amy Wilder d4f09984ac Add safety notes to 'Update_' functions 2025-07-07 21:51:27 -04:00
Ray 714de02a88 Merge pull request #4980 from williewillus/pr4980
[rshapes] Fix incorrect parameter names in DrawRectangleGradientEx
2025-06-02 18:37:34 +02:00
Vincent Lee 19ae6f2c2d [rshapes] Fix incorrect parameter names in DrawRectangleGradientEx
Examining the code shows that the rectangle is drawn winding counterclockwise, starting
with the top left. Therefore the colors used should be in the order: topLeft, bottomLeft,
bottomRight, topRight.

However, the variables actually being used are topLeft, bottomLeft, topRight,
bottomRight. I was confused by this as I was getting striping where I didn't expect any.
Put another way, the last two parameters are misnamed.

This diff swaps the parameter names and their usages. The result is that no runtime
behaviour changes: the same parameter order yields the same visual result both before and
after this change, but the parameter names now correctly reflect what they are actually
used for.

You can actually see this in the implementation of DrawRectangleGradientV, which
(correctly) passes top, bottom, bottom, top to DrawRectangleGradientEx.
2025-05-31 23:00:40 -07:00
jestarray 296e3af470 add const qualifier to ImageDrawTriangleFan and ImageDrawTriangleStrip arguments 2025-05-31 14:24:56 -07:00
Ray 20c0c92bdb Merge pull request #4963 from meowstr/master
[rshapes] Add DrawEllipseV and DrawEllipseLinesV
2025-05-31 20:41:37 +02:00
M374LX 3418172617 Update comments 2025-05-29 23:01:48 -03:00
Meowster 6d5aedbd38 Add DrawEllipseV and DrawEllipseLinesV 2025-05-29 07:10:52 -04:00
Ray d7148f5f9d REDESIGNED: Base64 encoding/decoding functions
Found some issues with output size when padding required, just re-implemented both functions from scratch.
2025-05-28 17:19:19 +02:00
Ray afb52b19a4 WARNING: REDESIGNED: EncodeDataBase64(), NULL terminated string returned
Note that returned output size considers the NULL terminator as an additional byte.
2025-05-22 17:06:55 +02:00
Jeffery Myers aa684a33de make save file callback match const correctness of calling function 2025-05-12 19:54:34 -07:00
Ray f7d03efb49 REVIEWED: DecodeDataBase64(), follow convention:
- All `char *` refer to text strings
- All `unsigned char *` refer to generic byte arrays
2025-05-11 11:05:25 +02:00
Ray 3083f0cd43 REVIEWED: SaveFileText(), const input text 2025-05-11 11:03:49 +02:00
Jonathan Marler af16f7823a Improve description of RestoreWindow
Restore window currently says it sets the window state to:

   "not minimized/maximized"

However, if a window is maximized and then minimized, it's typical that
it would restore back to being maximized, which is what seems to happen
from my testing. I've reworded the description to better reflect
this behavior.
2025-03-28 10:39:22 -06:00
Brian E 11090ab6cb [raylib.h] Added space after comma (#4774)
args for ImageResizeNN were missing a space in the arguments after a comma, i just added one.
2025-02-17 12:12:59 +01:00
goto40 6a644b48f0 doc: audio stream processor, number of channels (#4753)
* doc: audio stream processor

* fixed accidental encoding effect
2025-02-08 11:22:34 +01:00
Chris 09272e2e11 Updted the comment for SetShaderValueTexture to reflect the difference between SetShaderValue using sampler2d and SetShaderValueTexture is the automatic bind of the texture. (#4703) 2025-01-18 20:24:48 +01:00
Ray 896ff68540 REVIEWED: Text functions usage notes #4704 2025-01-18 20:19:11 +01:00
Ray e227371265 REVIEWED: TextJoin(), convert const char ** to char**
It generates multiple issues: https://c-faq.com/ansi/constmismatch.html
2025-01-11 23:38:21 +01:00
Ray bf8962dbc7 REVIEWED: Remove some const from text buffer return values
Lately got some compilation `errors` related, it seems GCC 14 interprets some `const`-missmatch as errors instead of warnings (as previous versions).

But in any case, I don't see why an user won't be able to operate directly over of those returned buffers; `const` adds a restriction (for security reasons?) that in my opinion is useless.

From an expert on compilers (w64devkit creator), here there are some notes I agree with:

```
No const. It serves no practical role in optimization, and I cannot recall an instance where it caught, or would have caught, a mistake. I held out for awhile as prototype documentation, but on reflection I found that good parameter names were sufficient. Dropping const has made me noticeably more productive by reducing cognitive load and eliminating visual clutter. I now believe its inclusion in C was a costly mistake.

(One small exception: I still like it as a hint to place static tables in read-only memory closer to the code. I’ll cast away the const if needed. This is only of minor importance.)
```

Ref: https://nullprogram.com/blog/2023/10/08/
2025-01-10 13:06:28 +01:00
Ray fa0eada61a Update year to 2025 2025-01-01 00:02:52 +01:00
__hexmaster111 8a5a95c13a Removed inaccurate comment about negitves not being supported with TextToFloat And TextToInt Methods (#4596) 2024-12-13 09:21:13 +01:00
Ray 1f704be4e4 Review comments spacing for better alignment 2024-12-12 12:13:38 +01:00
Rico P 2a2acff2d5 Make sure ShaderUniformDataType matches rlShaderUniformDataType (#4577)
* Make sure ShaderUniformDataType matches rlShaderUniformDataType

* Update raylib_api.* by CI

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ray <raysan5@gmail.com>
2024-12-08 12:52:06 +01:00
Michael d2cd2a0152 [rlgl][rmodels] Add instranceTransform shader location index #4538 (#4579) 2024-12-08 12:48:54 +01:00
Ray dd26df0be8 REVIEWED: Parser issue with comment #4558 2024-12-01 23:25:12 +01:00
Mossieur-Patate 2c4c6e6201 GetKeyName prototype (#4544)
* Update raylib.h: GeyKeyName prototype

Prototype for GetKeyName, which is already implemented elsewhere.

* Update raylib_to_parse.h: GetKeyName prototype
2024-11-28 22:50:00 +01:00
Anthony Carbajal 79188f570b fixed spacing in sha1 comment (#4540) 2024-11-25 20:17:22 +01:00
Ray 50a2afff9e Update raylib version to 5.6-dev to avoid confusions with release 2024-11-22 11:01:10 +01:00
Ray 938b805bfb Update raylib.h 2024-11-16 18:45:16 +01:00
Everton Jr. 00396e3436 [rcore] Clipboard Image Support (#4459)
* [rcore] add 'GetClipboardImage' for windows

* [rcore] GetClipboardImage removed some unneeded defines

* [rcore] PLATFORM_SDL: create a compatility layer for SDL3

* external: add win32_clipboard.h header only lib

* [rcore] using win32_clipboard on platforms rlfw and rgfw

* [rcore] fix warnings in SDL3 compatibility layer

* Makefile: Allow specifying SDL_LIBRARIES to link, this helps with SDL3

* Makefile: examples makefile now compile others/rlgl_standalone only when TARGET_PLATFORM is PLATFORM_DESKTOP_GFLW

* Makefile: examples makefile now compile others/rlgl_standalone only when TARGET_PLATFORM is PLATFORM_DESKTOP_GFLW

* [rcore]: PLATFORM_SDL: improve clipboard data retrieval

* external: remove unused function from win32_clipboard.h

* Makefile: allow for extra flags necessary when compiling for SDL3

* [rcore]: fix string typo

* [rcore]: Properly handle NULL dpi passing. As is allowed in SDL2

* external: fix arch finding on win32_clipboard.h to allow compilation on msvc cmake CI

* [rcore]: PLATFORM_SDL: Treat monitor as an ID in SDL3 as opposed to an index as in SDL2

* [rcore]: typo
2024-11-09 19:40:41 +01:00
Ray be360d2ad1 RENAMED: UpdateModelAnimationBoneMatrices() to UpdateModelAnimationBones()
Still, not fully convinced of those functions naming, despite quite descriptive, sounds a bit confusing to me...
2024-11-03 13:12:01 +01:00
Ray 6ff0b03629 REVIEWED: UpdateModelAnimationBoneMatrices() comments 2024-10-24 12:46:02 +02:00
Ray 3483a4d9cb Update raylib.h 2024-10-24 11:57:36 +02:00
Ray d85c6fe2c0 Update raylib.h 2024-10-24 11:50:30 +02:00
Ray 2072b4fa04 Update raylib.h 2024-10-24 09:59:54 +02:00
Jeffery Myers 0b650f62a6 [RTEXTURES] Remove the panorama cubemap layout option (#4425)
* Remove the panorama cubemap layout, it was not implemented.
Left a todo in the code for some aspiring developer to finish.

* Update raylib_api.* by CI

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-24 09:06:24 +02:00
Ray 4b60ce700f Update raylib.h 2024-10-23 00:21:14 +02:00
Asdqwe f8f6aa0907 [rcore] Adds implementation to SetGamepadVibration() on PLATFORM_WEB and updates it on PLATFORM_DESKTOP_SDL to handle duration (#4410)
* Updates SetGamepadVibration()

* Handle MAX_GAMEPAD_VIBRATION_TIME

* Revert low/high parameters back to left/rightMotor

* Fix missin semicolon

* Convert duration to seconds

* Add SetGamepadVibration() implementation to PLATFORM_WEB
2024-10-22 00:06:37 +02:00
Ray f4cbc1fbae REVIEWED: GetGestureHoldDuration() comments 2024-10-21 20:47:08 +02:00
Anthony Carbajal 80393c0fb6 [rcore] added sha1 implementation (#4390)
* added sha1 implementation

* added missing part

* fixed issue

* fix to match other implementations
2024-10-18 01:15:19 +02:00
Ray 8cbf34ddc4 WARNING: BREAKING: Renamed several functions for data validation #3930 2024-10-16 19:26:12 +02:00
Ray 361b0e85c1 ADDED: Utility functions: ComputeCRC32() and ComputeMD5() 2024-10-16 16:49:50 +02:00
Ray d29eb34cfb REMOVED: LoadImageSvg() 2024-10-10 21:17:31 +02:00