* 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'
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.
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.
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()
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.
* 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.
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.
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.
* 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
* 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
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.