Commit Graph

4424 Commits

Author SHA1 Message Date
Ray
2bdb45f280
Remove Travis CI badge 2020-12-23 12:30:00 +01:00
Victor Gallet
668b3e4cfb
[Math Feature]: Add two functions for Vector2 to know if two lines intersect and two segments intersect (#1466)
* Add a function to know if two lines intersect each other and if yes, get the intersection point

* Remove indents

* Rework the declaration of the 'Vector2LineIntersect' function, and add the 'Vector2SegmentIntersect' function

* Remove bad indents

* Fix compilation issues

* Fix compilation error

* Fix compilation error

* Replace keyword '_Bool' by 'bool'
2020-12-21 21:04:02 +01:00
Ray
51e75be9d1
Update CHANGELOG 2020-12-20 11:05:24 +01:00
Ray
976932e05e Set version for raylib 3.5 2020-12-19 20:38:49 +01:00
Ray
d82113ec34 Camera funcs, review params names
Just for a better consistency
2020-12-19 20:14:34 +01:00
Ray
9097d0b4ef REVIEW: CheckCollisionSpheres() params naming 2020-12-19 20:05:32 +01:00
Ray
f30354fc35 Minor tweak 2020-12-19 20:01:07 +01:00
Ray
d2d72b1dfb ADDED: MemAlloc() / MemFree() #1440
Exposing internal memory allocator/free, useful for advance users when required
2020-12-19 19:43:25 +01:00
Ray
cbf7369a3d Update raylib.h 2020-12-19 19:28:06 +01:00
Ray
2374281204 Avoid *Rec suffix in some variables
Pefixing/Suffixing some data type identifier in the variables is not a convention used in raylib, just reviewed it for consistency...

Still, I kept the *Rec suffix in some functions.
2020-12-19 19:27:31 +01:00
Ray
015e715278 Corrected DrawTextRecEx() bug 2020-12-19 19:12:51 +01:00
Ray
e404a18226 Support font chars padding on drawing #1432
Previous implementation did not consider any padding while drawing the characters on screen (despite being available on the font atlas), so, only minimum character area was drawn.

If some text effect shader was required (shadow, glow, outline...), there was no space in the drawn quad to draw that pixels effect.

This commit corrects that issue.
2020-12-19 12:16:23 +01:00
Ray
51e8f37688 Minimal tweak 2020-12-19 00:22:58 +01:00
Ray
c36a6f3d9f Update textures.c 2020-12-19 00:01:14 +01:00
Ray
e07bc372a1 WARNING: RENAMED several functions for consistency #1440
This is a BREAKING CHANGE!

To address the linked issue, several functions have been renamed and couterpart functions have been created to free loaded memory:
 - RENAMED: GetImageData() -> LoadImageColors()
 - RENAMED: GetImagePalette() -> LoadImagePalette()
 - RENAMED: GetWaveData() -> LoadWaveSamples()
 - ADDED: UnloadImageColors()
 - ADDED: UnloadImagePalette()
 - ADDED: UnloadWaveSamples()
2020-12-18 21:03:08 +01:00
Ray
5dd142beb6 Added some Web checks for missing GLFW functions 2020-12-18 19:32:52 +01:00
Ray
96542269d0 WARNING: GetKeyPressed() <-> GetCharPressed() #1336
Previous GetKeyPressed() method was actually returning unicode codepoints equivalent values instead of the key-code of the pressed key. So, it has been replaced by GetCharPressed(), returning unicode codepoints and GetKeyPressed() now returns key-codes.
2020-12-18 18:58:02 +01:00
Ray
893a64712e Support mouse input on example #1465 2020-12-18 18:36:04 +01:00
hristo
0987507ef5
Add headers to install cmake (#1462)
* Changed extension for web from .bc to .a

I did this to support vcpkg expectation. When using the library from vcpkg for web you would install it using vcpkg install raylib:wasm32-emscripten but also vcpkg expects the output lib to be with .a extension instead of .bc

Doesn't make a difference for standalone builds or when raylib is used as a subdirectory dependency.

* Added headers to install targets to fix vcpkg usage

Currently vcpkg works by installing the cmake target into its packages directory. The problem is that install only copies the public header at this point so we need to add the others to the install targets.
2020-12-16 19:11:21 +01:00
Andrea Fontana
ef0dcaabf9
Changing JPG compression (#1463)
Since I don't think the purpose of raylib is to save space compressing image, I think it could be a good idea to keep quality from 90 to 100.
2020-12-16 19:07:18 +01:00
Ray
f5b4656801 Added additional charsPadding initialization #1432 2020-12-14 23:51:55 +01:00
Ray
5f690819e7 REVIEWED: Font struct, added charsPadding #1432 -WIP-
Not implemented usage of this variable yet but already setup for the future... some functions require review to consider it on drawing...
2020-12-14 23:47:11 +01:00
Ray
e69f2f0c26 REVIEWED: DrawGrid(), issue with buffer limits check #1417 2020-12-14 23:39:12 +01:00
Ray
d360a49f36 ADDED: UnloadFileData() / UnloadFileText() #1440 2020-12-14 20:47:58 +01:00
Ray
cd3eb3d8bd Added some security checks on GenMesh*() #1454 2020-12-14 20:41:58 +01:00
Jeffery Myers
7a0e73331d
Add mesh collision function so we can check meshes directly instead of having to put them in a model. (#1459)
Make model collision function call the mesh function.
2020-12-14 19:26:32 +01:00
hristo
a840d8a77d
Changed extension for web from .bc to .a (#1461)
I did this to support vcpkg expectation. When using the library from vcpkg for web you would install it using vcpkg install raylib:wasm32-emscripten but also vcpkg expects the output lib to be with .a extension instead of .bc

Doesn't make a difference for standalone builds or when raylib is used as a subdirectory dependency.
2020-12-14 19:24:56 +01:00
hristo
3ec8ac52f8
Building examples by default only if raylib is standalone. (#1460)
This change only modifies the default value. In cmake you can have raylib as a subdirectory (dependency) and when you have it as dependency you wouldn't probably want to use the example by default. You can still use the option to enable them though.
2020-12-14 19:24:20 +01:00
hristo
6e79476650
Fixed the build for web using CMake. (#1452)
* Fixed the build for web using CMake.

I found that the build for me was failing and I added some if defined checks in the core.c file where the glfwSetWindowAttrib was used. (error: implicit declaration of function 'glfwSetWindowAttrib' is invalid in C99 [-Werror,-Wimplicit-function-declaration])

I also changed some values in the toolchain file so that it correctly uses the .bat files when on windows.

* Cleaned up the additional variables (they are not important)

* Added more improvements to cmakelists

Added the option to use the system provided Emscripten toolchain to be more uniform with other libraries.

Fixed and issue which prevented example being built from cmake and also building with html extensions properly.

* Fixed ENUM to STRING because of a missed warning
2020-12-13 20:29:47 +01:00
Jeffery Myers
11ebb54674
Don't put the obj and temp files for all the projects in the same place, it causes conflicts (#1458) 2020-12-13 16:08:22 +01:00
Alexander Buhl
a798fd401f
Fixed #1455 (#1456)
* Fixed #1455

Fixed writing out of array bounds
Adjusted FPS comment to match value
Deleted unused function at the end, which has never been in use in the history of this file

* Fixed #1455

Readded the function
2020-12-13 16:06:55 +01:00
Jeffery Myers
342d4faf14
Add options to set line width and aliasing to rlGL layer. (#1457)
* Add options to set line width and aliasing to rlGL layer.

* Don't do line smoothing in OpenGLES
2020-12-13 10:58:24 +01:00
Ray
e6ae4879f6 Added security check to pitch change #1450 2020-12-12 13:07:46 +01:00
Ray
459c4754dc Reviewed SetAudioBufferPitch() #1450 2020-12-12 13:01:31 +01:00
Jeffery Myers
039503e7c2
Add functions to enable/disable depth writes to go with functions for depth tests. (#1451) 2020-12-05 21:53:19 +01:00
Jeffery Myers
03df593263
Add function to get the position of a monitor (and fix some comments) (#1449) 2020-12-05 21:51:20 +01:00
Ray
62406259d7 Corrected minor windows flags issues 2020-12-03 20:33:46 +01:00
Ray
dd45d0ed64 Update VS2019 project 2020-12-03 20:22:06 +01:00
Ray
c4aee2d09a Add VS2019 project 2020-12-03 20:19:54 +01:00
Ray
7955381fb3 Update core_basic_window.c 2020-12-03 20:19:32 +01:00
Ray
7e9028ae08 Update user name 2020-12-03 20:17:50 +01:00
Ray
1c9726fd8c Update core_window_flags.c 2020-12-03 20:17:21 +01:00
Ray
d1119816d7 Review comment 2020-12-03 20:16:46 +01:00
Ray
0540f0ad32 Review window flags 2020-12-03 20:16:35 +01:00
Ray
84ab00d52e Merge branch 'master' of https://github.com/raysan5/raylib 2020-12-02 08:29:14 +01:00
Ray
63d33d7a7a Update CMakeLists.txt 2020-12-02 08:27:43 +01:00
Jeffery Myers
679a26a195
Two small quality of life changes to projects. (#1448)
1) use the latest windows SDK not a specific one.
2) use the project dir as the root for the include dir for raylib, to help if the project is ever included in some other solution.
2020-12-02 07:35:48 +01:00
Ray
60928ec82c ADDED: UnloadModelKeepMeshes() #1441 2020-12-01 23:44:10 +01:00
Ray
0481053dad Review for issue #1446 2020-12-01 23:23:30 +01:00
Ray
59be7b9c29 Update CMakeLists.txt 2020-12-01 23:21:35 +01:00