Commit Graph

2417 Commits

Author SHA1 Message Date
raysan5
b3eea3d322 Avoid loading texcoords and normasl from model if not existent 2020-05-18 18:35:47 +02:00
raysan5
6acb7bcfe4 Avoid glGetStringi() on OpenGL 2.1 2020-05-18 13:24:21 +02:00
Random
d9a96c4ca0
added BLEND_SET (#1251)
* added BLEND_SET

* renamed BLEND_SET to BLEND_ADD_COLORS
2020-05-16 13:39:38 +02:00
Noor Wachid
abb94bd2ff
Adding Normalize and Remap functions (#1247)
* Adding Norm and Remap functions

// Normalize input value within input range
// Remap input value within input range to output range

* Rename Norm to Normalize

To make it uniforms with Raylib's functions

* Calculate Remap without other functions
2020-05-15 13:08:28 +02:00
ThePituLegend
d14c51aa2a
Introduced Vector2 and Vector3 Square Lenght. (#1248)
* Introduced Vector2 and Vector3 Square Lenght.

* Square length functions renamed
2020-05-14 22:31:58 +02:00
raysan5
7b001164ef Review formatting GetPRevDirectoryPath() 2020-05-14 17:37:54 +02:00
raysan5
64d44d131d Emscripten fullscreen -WIP- 2020-05-14 17:35:26 +02:00
ivn
730375faf7
fix bug in GetPrevDirectoryPath on Unix-like systems (#1246) 2020-05-14 17:30:32 +02:00
raysan5
257f232d41 WARNING: BREAKING CHANGE: Review audio looping system
Current looping system was broken, `loopCount` has been converted to `bool looping` and user can enable/disable with `music.looping = false`. `SetMusicLoopCount()` has been removed.
2020-05-14 14:00:37 +02:00
raysan5
3a33fe0fd9 Avoid LoadImageEx() usage internally
At this point LoadImageEx() could be removed from raylib... still thinking about it...
2020-05-14 13:37:52 +02:00
raysan5
65b7047111 Remove some [textures] function dependencies
- LoadFontDefault() -> Some code simplifications
 - LoadFontFromImage() -> Avoid LoadImageEx()
 - LoadFontData() -> Avoid GenImageColor(), ImageFormat()
 - LoadBMFont() -> Avoid ImageCopy(), ImageFormat()
2020-05-14 13:36:22 +02:00
raysan5
ca6016cc71 TextToInteger() always exposed 2020-05-14 13:32:57 +02:00
raysan5
4ec40e720c GenMeshCubicmap() added comments and simplification 2020-05-11 17:54:23 +02:00
GoldenThumbs
763aa5b8a2
Fixed Generated Normals for GenMeshCubicmap (#1244)
Just flipped the signs of `n5` and `n6` at lines `2021` and `2022`.
2020-05-11 11:41:21 +02:00
raysan5
4e3ab8f27d Update config.h.in 2020-05-09 17:37:02 +02:00
raysan5
3a4e3d8747 Update CMakeOptions.txt 2020-05-09 17:36:16 +02:00
raysan5
3a6af2cc57 Remove SUPPORT_IMAGE_DRAWING flag
ImageDraw() is actually used in multiple functions and it aslo depends on several functions...
2020-05-09 17:17:54 +02:00
raysan5
913ef1d56f Misc code reviews 2020-05-09 13:05:54 +02:00
Mickaël Malécot
0bd64b7975
Gamepad axis bug fixes and improvement (#1228)
* Fix gamepad axis count

* Fix Xbox axis drawing

* Ignore low axis values

* Revert "Fix gamepad axis count"

This reverts commit f08ae4bf

* Fix GamepadAxis API

* Fix conflict with master

* Revert Gamepad MAX definitions

* Revert MAX_GAMEPAD_AXIS update
2020-05-09 12:39:41 +02:00
raysan5
7efed56b66 Added [text] flag: SUPPORT_TEXT_MANIPULATION 2020-05-09 12:38:33 +02:00
raysan5
7a1d3d807f WARNING: RENAMED: ImageExtractPalette() -> GetImagePalette() 2020-05-09 12:07:18 +02:00
raysan5
cb3bdf09c6 Merge branch 'master' of https://github.com/raysan5/raylib 2020-05-09 12:05:08 +02:00
raysan5
959447d8ed Reorganized texture functions
Removed ImageAlphaMask() dependency on [text] LoadBMFont()
2020-05-09 12:05:00 +02:00
sikor666
db4a618c6f
Fix materials loading for IQM models (#1227) 2020-05-08 20:27:10 +02:00
armageddon421
df5c522049
Update CMakeLists.txt to fix CMake build for Raspberry Pi (#1229) 2020-05-07 22:22:09 +02:00
raysan5
d357b116fe Reviewed missing check for JPG 2020-05-07 18:08:35 +02:00
raysan5
6fa6757a8b Comment tweak 2020-05-07 13:39:41 +02:00
raysan5
f6ca045735 ADDED: DrawTriangle3D() and DrawTriangleStrip3D()
Those functions could be very useful for custom triangle data drawing, using internal batch system.
2020-05-07 12:46:45 +02:00
raysan5
2e8299742b Comments review 2020-05-07 12:45:44 +02:00
raysan5
67d8b43b0e Review first person movement Y waving
Some comments added
2020-05-07 12:45:23 +02:00
raysan5
fdad1f023b Avoid all MSVC compile warnings
Most warning were related to types conversion (casting required) and unsigned/signed types comparisons.

Added preprocessor directives (_CRT_SECURE_NO_DEPRECATE; _CRT_NONSTDC_NO_DEPRECATE) to avoid warnings about unsafe functions, those functions are safe while used properly and recommended alternatives are MS only.

Some external libraries still generate warnings.
2020-05-06 19:12:09 +02:00
raysan5
526c85773f Replace deprectared usleep() calls 2020-05-06 11:33:08 +02:00
raysan5
b8055925bf Update raymath.h 2020-05-01 18:19:54 +02:00
raysan5
af744b07c3 Review latest PR formatting 2020-05-01 18:04:47 +02:00
Anata
4583987fb9
Add Vector2MoveTowards function (#1233) 2020-05-01 17:50:41 +02:00
raysan5
c83477ffca WARNING: Big internal redesign!
Created RenderBatch type and related functions to allow rlgl users creating custom and separate render batches and not only rely on one internal render batch.

This feature has not been exposed on raylib yet because it implies some breaking changes. Right now a custom RenderBatch is just used internally in rlgl.
2020-05-01 17:34:43 +02:00
raysan5
51c3bef497 Review exposed #defines and allow user re-defining
There are multiple #define values around raylib, usually not exposed for redefinition, just reviewed all of them to allow users redefining them on compile time if required.

Also, multiple #define have been renamed and commented.
2020-05-01 17:31:44 +02:00
raysan5
1c15dc7292 Reviewed UWP update
Mostly code formatting tweaks
2020-04-30 21:00:09 +02:00
raysan5
0981dde9d4 Remove strcmp() requirement 2020-04-30 20:17:16 +02:00
raysan5
4ca4326bf9 Review LoadGLTF() to read from memory buffer 2020-04-30 19:51:57 +02:00
Reece Mackie
4b03860810
UWP rework (#1231)
* First draft of UWP rework.

* Read desc

- Moved UWP specific functions to uwp_events.h
- Removed BaseApp.
- Implemented example UWP lifecycle.

* Added GIF recording and screenshot support.

* Character inputs and filesystem stuff

* Fix game closing on Xbox when B is pressed.

* Fix the gamepad binding hack

* Add as many keys as I believe are possible.

* Implemented mouse locking of a sort.

* Remove rogue todo, the rest are for a game dev using this example.

* Implemented touch how I "think" it should work. I cant test this.

* Review.
2020-04-30 19:48:39 +02:00
raysan5
ac8f436c3b Init CORE.Window.focused 2020-04-29 20:55:17 +02:00
raysan5
94ab5e2aab Review issue with vertex batch overflow #1223 2020-04-27 18:02:54 +02:00
raysan5
6e2d39c51b ADDED: IsWindowFocused() 2020-04-27 17:41:29 +02:00
raysan5
72cc3e0530 Corrected issue #1203 2020-04-26 13:23:03 +02:00
raysan5
8e59ecb50c ADDED: GetWindowScaleDPI() 2020-04-24 23:17:32 +02:00
Kevin Yonan
dd7dd1ac8b
Mempool and other Allocators Optimization (#1211)
Optimizations of allocators.
Renamed 'Stack' to 'Arena'.
Replaced certain define constants with an anonymous enum.
Refactored MemPool to no longer require active or deferred defragging.
2020-04-22 13:11:45 +02:00
flashback-fx
596499416f
Update easings.h (#1210)
Make easings.h use powf and sqrtf instead of pow and sqrt.
2020-04-21 21:17:58 +02:00
raysan5
baf5e02f43 Remove comment 2020-04-16 13:48:47 +02:00
raysan5
8d51ad567f Review UWP project -WIP- 2020-04-13 16:40:04 +02:00
G3bE
32387317bf
Make raymath more consistent (#1197)
* Make raymath naming and functions more consistent

* Minor fixes

* Fix examples

* Fix Physac

* New naming rules

* Apply naming to Quaternion functions

* Apply to models.c

* Remove *MulitplyValue / *DivideValue
2020-04-13 16:32:45 +02:00
raysan5
cc816345bf WARNING: API BREAK: Removed LoadImagePro()
Actually this function is useless and potentially dangerous, internally, a shallow copy of data was done. Same could be accomplished accesing image.data directly.
2020-04-10 19:26:36 +02:00
raysan5
b132da0ac2 WARNING: API BREAK: Reviewed ImageDrawText*() params order
To unify with DrawText*() equivalent functions
2020-04-10 19:10:15 +02:00
raysan5
d419602c99 Review display size init for RPI 2020-04-09 23:50:00 +02:00
raysan5
926651b708 Optimized ImageDrawPixel()
Now it's blazing fast. It modifies image.data directly.

Previous version could take up to 3-4 seconds to draw a line... now it takes some nanoseconds...
2020-04-09 22:44:10 +02:00
raysan5
0abe557af1 Fixed issue with ImageDrawLine() 2020-04-08 12:37:52 +02:00
Ahmad Fatoum
6c9f6cf084 Revert "CMake: Don't create symlinks on unsupporting file systems (#539)"
As noted in #539, the symlink check was to support compiling raylib on
VirtualBox vboxfs as no symlinks are supported there.

With me using Linux as daily driver outside VirtualBox now, this 'feature'
is most likely unused by anyone, but still annoys other users (#791).
Just revert it and be done with it. If there are really others building
raylib on vboxfs or a similarly crippled file system under Linux, they
should now step forward when their build breaks.

This reverts commit b8ca51fd01.
2020-04-08 11:01:26 +02:00
raysan5
42f09eb2b8 Delete .gitignore 2020-04-07 18:52:07 +02:00
raysan5
ef9e9bfa7d Review Android piepline
- Removed generate_android_toolchain, since version r21 AndroidNDK it's the toolchain
 - Removed external lib native_app_glue, provided by AndroidNDK
2020-04-07 17:54:08 +02:00
raysan5
f31b87fae8 Remove ANGLE project
Actually, project just adds 50MB of ANGLE libraries not related to raylib.
Also reviewed UWP project to consume ANGLE from the NuGet package.
2020-04-07 17:43:21 +02:00
raysan5
62b7064e90 Corrected issue with depth initialization #1179 2020-04-06 19:58:28 +02:00
Louis Johnson
4f40f8bc47
added log warning for unsupported file extension for music stream (#1176)
* added log warning for unsupported file extension for music stream

* updated error log message for music stream when file format isn't supported
2020-04-06 11:26:09 +02:00
Benjamin Stigsen
2d6303e9fe
Allow for empty replacement string (#1178) 2020-04-05 22:42:59 +02:00
raysan5
90fb53bccc Review android_fopen() to support SDCard access 2020-04-05 17:51:27 +02:00
raysan5
4ceb4d3bf3 Some code tweaks, comments and defines 2020-04-05 17:50:37 +02:00
Benjamin Stigsen
9c280bc7af
TextReplace changes (#1172)
- Added NULL return if the replacement string (`by`) is empty
- Reordered sanity checks since there's no need to initialize variables if the strings are invalid.
2020-04-04 14:25:57 +02:00
SasLuca
8444c3f705
Fixed offset check in GenImageFontAtlas (#1171)
* Fixed offset check in GenImageFontAtlas

* Fixed code formatting to follow raylib notation rules
2020-04-02 23:53:29 +02:00
raysan5
adb20569be Review shared library building 2020-04-01 11:06:05 +02:00
Ray
6a8b1079c1 Update project version for release 2020-03-30 23:42:17 +02:00
raysan5
8da6307456 Get icons back on shell.html
It seems there is some related issue on emscripten side... but I'll keep the icons here despite not displayed properly for the moment.
2020-03-30 21:34:45 +02:00
raysan5
e469f4ebf7 Update config.h, enable some file-formats by default 2020-03-30 17:42:42 +02:00
raysan5
8941cf3e66 Update textures.c 2020-03-30 17:42:19 +02:00
raysan5
fc7ec5e907 Update raylib.h 2020-03-30 17:11:35 +02:00
Dani Martin
1a948849f3
[cppcheck] Fix minor warnings in models.c and raudio.c (#1162)
Errores fixes:
models.c,2843 Either the condition 'fileData!=NULL' is redundant or there is possible null pointer dereference: fileData.
raudio.c,805, 806, 807, 808, %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
2020-03-30 17:08:01 +02:00
raysan5
e8a8d544c5 Review formating and signegness issues 2020-03-30 14:38:16 +02:00
Dani Martin
62cdb2299b
[cppcheck] Improvements in SaveStorageValue() in core.c (#1160)
* [cppcheck] Improvements in SaveStorageValue() in core.c

in file core.c cppcheck shows errors only in function SaveStorageValue():

* Common realloc mistake: 'fileData' nulled but not freed upon failure
* Memory pointed to by 'fileData' is freed twice.

Validation:
* Tested examples/core/core_storage_values.c
* Launched Unit Test for this function
* Rerun CPPCHECK afer fix

* [cppcheck] Change functions header to accept only positive position in files

Changes:
* Functions SaveStorageValue(), LoadStorageValue() (core.c)
* Functions LoadFileData(), SaveFileData() (utils.c)
* Headers in raylib.h

Validation:
* Tested examples/core/core_storage_values.c
* Launched Unit Test for these functions
* Rerun CPPCHECK afer fix
2020-03-30 13:51:36 +02:00
Valentin Lemière
41582f0448
Fix "variable is reassigned before use" linter warning on raymath.h (#1158) 2020-03-29 22:03:10 +02:00
raysan5
733ed972f7 Reorganize image functions 2020-03-29 13:37:33 +02:00
raysan5
5d7050bdf9 Reorganize image/texture functions for consistency 2020-03-29 13:31:12 +02:00
Rob Loach
a025636fa1
Update ImageDraw*() functions to match arguments of Draw*() (#1156)
* Update ImageDraw*() functions to match arguments of Draw*()

Updated draw functions:
ImageDrawPixel()
ImageDrawPixelV()
ImageDrawCircle()
ImageDrawCircleV()
ImageDrawLine()
ImageDrawLineV()
ImageDrawRectangle()
ImageDrawRectangleV()
ImageDrawRectangleRec()

* [nodepadpp] Update Notepad++ ImageDraw defintions

This updates the Notepad++ definitions with the updated ImageDraw methods.

* [examples] Add ImageDraw calls to textures_image_drawing

* Update ImageDraw*() methods
2020-03-29 12:43:34 +02:00
raysan5
66e0d774bd Revert "Update compilation warning flags (#1151)"
This reverts commit 2528854664.
2020-03-28 18:39:56 +01:00
raysan5
e333eb415b Update window rc 2020-03-28 18:27:56 +01:00
raysan5
d28e73849b Review TRACELOG() messages 2020-03-27 18:49:21 +01:00
raysan5
d7b15ac1cf Review TRACELOG() categories 2020-03-27 18:45:37 +01:00
raysan5
c0c775e45d [rlgl] Review TRACELOG() messages, categorized 2020-03-27 18:31:36 +01:00
raysan5
b5842434c2 Corrected missing semicolon 2020-03-27 18:31:16 +01:00
raysan5
c7e9951795 [core] Review TRACELOG() messages, categorized 2020-03-27 18:06:09 +01:00
raysan5
70ed975b99 [models] Review TRACELOG() messages, categorized 2020-03-27 17:43:51 +01:00
raysan5
7e2b1b4ff0 [textures] Review TRACELOG() messages 2020-03-27 17:43:38 +01:00
raysan5
915b5f370b [raudio] Review TRACELOG() messages, categorized 2020-03-27 17:43:24 +01:00
raysan5
0c6c421508 [raudio] Review TRACELOG() messages, categorized 2020-03-27 17:16:30 +01:00
raysan5
bc2c6251f8 [text] Review TRACELOG() messages, categorized 2020-03-27 17:16:07 +01:00
raysan5
b9dd459d5a [textures] Review TRACELOG() messages, categorized 2020-03-27 17:15:44 +01:00
raysan5
28da2522fe [utils] Review TRACELOG() messages, categorized 2020-03-27 17:15:26 +01:00
Dani Martin
2528854664
Update compilation warning flags (#1151)
* Update compilation warning flags

Removed the -Wall flag that allow many warnings and added manually all the warning flags that don't generate warnings in the src/external folder.
Specifically, these are some of the flags reporting errors in src/external:

-Wmissing-prototypes
-Wunused-variable
-Wunused-value
-Wunused-parameter
-Wunused-function

* Uptade compilation flags in examples with missing -std=c99
2020-03-26 18:48:34 +01:00
raysan5
7ae7a87f8a Remove trail spaces 2020-03-25 19:41:51 +01:00
raysan5
3d41c1b6cd Minor tweaks 2020-03-25 19:38:55 +01:00
raysan5
96005f2566 ADDED: IsWindowFullscreen() 2020-03-25 18:52:38 +01:00
raysan5
e37d021cd3 Enable IQM models support on config.h 2020-03-25 18:51:46 +01:00
raysan5
133a882556 Update config.h 2020-03-25 18:39:28 +01:00