Commit graph raylib/src
Author SHA1 Message Date
Ray
3d9263062d Mouse offset and scaling must be considered also on web! 2023-09-16 22:00:04 +01:00
Ryan Roden-Corrent
4ed1caebe2 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.
2023-09-16 22:00:04 +01:00
Ray
224f0af429 Fix #3293 2023-09-16 22:00:04 +01:00
Ray
3ec569f287 Update config.h 2023-09-16 22:00:04 +01:00
Ray
a0922a2a92 Fix #3247 2023-09-16 22:00:04 +01:00
Ray
b29284eb37 Update rtextures.c 2023-09-16 22:00:04 +01:00
Ray
0a5c476b0a REVIEWED: LoadImageSvg() 2023-09-16 22:00:04 +01:00
Ray
7016f32d4e REVIEWED: LoadImageSvg() 2023-09-16 22:00:04 +01:00
bXi
6527f61d02 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-16 22:00:04 +01:00
Ray
d79ec5c431 Use internal default allocators, instead of user-exposed ones 2023-09-16 22:00:04 +01:00
Ray
b0986cbabb Some tweaks 2023-09-16 22:00:04 +01:00
Ray
98a02e13ea REVIEWED: Data size type consistency between functions #3168 2023-09-16 22:00:04 +01:00
Johannes Barthelmes
fc0c51d0c7 Fix uninitialized thread-locals in stbi #3282 (#3283) 2023-09-16 22:00:04 +01:00
Ray
bc39770f52 RENAMED: LoadFont*() parameter names for consistency and coherence 2023-09-16 22:00:04 +01:00
Ray
c197cac34c REVIEWED: GetFileLength(), added comment #3262 2023-09-16 22:00:04 +01:00
Ray
daeb2cceac Use type name instead of valid specifier
long long --> long long int
2023-09-16 22:00:04 +01:00
Ethan Conneely
c0038158f5 Remove e from secondes (#3270) 2023-09-16 22:00:04 +01:00
Ray
bfd9c4ef3c Formating review 2023-09-16 22:00:04 +01:00
Branimir Ričko
1814fd660d Fix bug where default shaders was not linking. (#3261) 2023-09-16 22:00:04 +01:00
Nickolas McDonald
22707987eb [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
2023-09-16 22:00:04 +01:00
Ethan Simpson
8744f45a1d Add Vector3 Projecting and Rejection to Raymath (#3263)
* Update raymath.h

* formatting
2023-09-16 22:00:04 +01:00
Jeffery Myers
81ec5f0a21 [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
2023-09-16 22:00:04 +01:00
ubkp
9760208993 Fix SetClipboardText for web (#3257) 2023-09-16 22:00:03 +01:00
vitopigno
acc4ecb48a Update rcore.c (#3255) 2023-09-16 22:00:03 +01:00
Ray
7190face1b Reviewed IsKeyPressedRepeat() #3248 2023-09-16 22:00:03 +01:00
actondev (Christos)
952ebb501a 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.
2023-09-16 22:00:03 +01:00
actondev (Christos)
62c20dfba6 add build.zig options for individual modules (#3254) 2023-09-16 22:00:03 +01:00
Ray
934cd6fa4d tweaks 2023-09-16 22:00:03 +01:00
Ray
90afcda9dc Revert "Fix #3246"
This reverts commit e4dcbd5180.
2023-09-16 22:00:03 +01:00
Ray
7e2c474c50 Fix #3246 2023-09-16 22:00:03 +01:00
ashn
565790e6d4 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
2023-09-16 22:00:03 +01:00
Brian-E
7b4d83ff0e removed a few useless parenthesis 2023-08-13 03:26:55 +01:00
Brian-E
10993c5939 I may have gotten overboard with indentation 2023-08-13 03:25:15 +01:00
Brian-E
f85f9d4c4f removed spacing around *, standardizing it. 2023-08-13 02:55:52 +01:00
Brian-E
c21d7b70a9 Prettied up indentation in a few places 2023-08-13 02:53:26 +01:00
Brian-E
03567d2b2e 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.
2023-08-13 02:43:19 +01:00
Brian-E
feaaf95db4 fixed broken indentation caused by another commit.
the commit renamed a bool to int and broke indentation: 233cf3970c
2023-08-13 02:40:29 +01:00
Brian-E
7f6239f849 Prettified a comment 2023-08-13 02:38:36 +01:00
Ray
bf705a63de REVIEWED: DrawLineCatmullRom() 2023-08-12 19:31:29 +02:00
Ray
d873d0f173 ISSUE: DrawLineCatmullRom(), needs review 2023-08-12 18:45:59 +02:00
Ray
9161c55d59 REVIEWED: Code formatting 2023-08-12 18:40:18 +02:00
Ray
fc88518067 ADDED: Spline drawing functions ->
- `DrawLineBSpline()`
 - `DrawLineCatmullRom()`
2023-08-12 14:00:50 +02:00
ubkp
c25b52b1b3
Fix rcamera.h issues (#3240) 2023-08-11 10:19:50 +02:00
Ray
93f59a6f59 Review tabs and trail-spaces 2023-08-10 22:47:17 +02:00
Ray
f1c31bee27 Fix #3177 #3109 2023-08-10 22:45:25 +02:00
RadsammyT
0959f6ebf6
fix typos in rmodels, rshapes, rtext modules (#3236) 2023-08-10 00:21:14 +02:00
ashn
90f1749965
Ignore unused function warnings from external headers when compiling with GCC and Clang (#3235) 2023-08-09 19:17:12 +02:00
Ray
42cfabc670 REVIEWED: Old pragma formating 2023-08-09 10:00:26 +02:00
RadsammyT
03ecf2202e
Fix typos in rcore.c comments (#3234)
* Fix typos in rcore.c comments

thought i corrected "dettach"
Fix typos in rcore.c comments

* 'fordward' > forward
2023-08-08 20:10:40 +02:00
Nikolas
bef818e210
Fix build for OpenGL 2.1, where half floats are part of an extension (#3233) 2023-08-08 20:09:22 +02:00