98 Commits

Author SHA1 Message Date
raysan5
aeb1a0da84 REVERTED: Removed the need for rlMatrix
Now rlgl uses the `Matrix` type, just make sure it has been previously defined somewhere... I don't like this approach but it's probably the easier one for the users... still looking for a better solution... maybe using something like
`#define MATRIX_TYPE`, so it can be checked in other modules.
2021-07-30 12:54:54 +02:00
raysan5
8b7f43f89b WARNING: BREAKING CHANGE: rlgl complete decoupling from raylib -WIP-
rlgl has been redesigned to avoid any dependency to `raylib` or `raymath`, all functions using some of those libs have been reviewed.
 - REMOVED: `Texture2D`, `Shader` structs dependency
 - REMOVED: `Vector3`, `Matrix` structs dependency
 - REMOVED: raymath functions dependency, all required math is implemented in rlgl
 - ADDED: `rlMatrix` custom rlgl type
 - ADDED: `utils.c`: `rlMatrixFromMatrix()` and `rlMatrixToMatrix()` for a safe conversion between raylib<->rlgl matrix types
 - ADDED: `rl` prefix to all `rlgl` structs
 - Other small tweaks here and there
2021-07-29 21:57:50 +02:00
Uneven Prankster
4e363b5479
Remove unused UWP defines (#1894)
* Unused UWP define removal

* Further removal of unusued UWP defines
2021-07-26 17:40:10 +02:00
Ray
00c8795385 Minor tweaks to follow code conventions 2021-06-26 13:45:39 +02:00
Ray
7bc2e922c9 Review some comments 2021-06-10 17:49:55 +02:00
Ray
71995d52b3 REVIEWED: exit() on LOG_FATAL instead of LOG_ERROR #1796 2021-05-30 18:02:06 +02:00
Ray
03710c9d8e Some code tweaks for consistency 2021-05-22 16:54:04 +02:00
Ray
640fc4d0a0 Minor tweaks 2021-04-16 21:19:28 +02:00
Rob Loach
d58b7b509e
Make SaveFile* callbacks return a boolean (#1697) 2021-04-03 08:56:42 +02:00
raysan5
aed0fee2ca Remove trailing spaces 2021-04-01 20:24:33 +02:00
Ray
8a30a2408c ADDED: Required callbacks
Removed memory allocation callbacks
2021-03-08 18:48:27 +01:00
Ray
b084552808 ADDED: Config flag: SUPPORT_STANDARD_FILEIO
This new flag allows omitting stdio.h library in case of a custom implementation is used.
2021-03-04 20:36:04 +01:00
Ray
7ad1370193 Some naming tweaks 2021-03-04 20:22:58 +01:00
Ray
c4a7c702b4 FEATURE: Several callbacks added -WIP- #1523 #1329
NOTE: This feature is still under consideration and not complete.
2021-03-04 12:06:28 +01:00
raysan5
62ccec0ac5 REMOVED: SetTraceLogExit()
I feel nobody has ever used this function...
2021-02-05 14:36:28 +01:00
raysan5
d7b4b9e485 Update year to 2021 2021-01-02 18:15:13 +01:00
raysan5
0a9e080998 Remove trailing spaces 2020-12-23 15:03:26 +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
d360a49f36 ADDED: UnloadFileData() / UnloadFileText() #1440 2020-12-14 20:47:58 +01:00
Ray
bb9d734f69 Exposing some file access results to user layer #1420 2020-11-22 00:10:16 +01:00
Ray
3e1cd487df Remove trailing spaces 2020-11-03 23:47:33 +01:00
Ray
05ab39ed9f REVIEWED: SaveFileText() error checking 2020-11-01 19:42:50 +01:00
raysan5
94789dd24a Review usage of sizeof(), unify conventions
All functions requiring sizeof() now follow the same convention:

NUM_ELEMENTS*NUM_SUBELEMENTS*sizeof()
2020-05-23 19:23:40 +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
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
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
90fb53bccc Review android_fopen() to support SDCard access 2020-04-05 17:51:27 +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
raysan5
28da2522fe [utils] Review TRACELOG() messages, categorized 2020-03-27 17:15:26 +01:00
raysan5
7ae7a87f8a Remove trail spaces 2020-03-25 19:41:51 +01:00
Ray
fb2ed693e4 Android: Support file saving to internal data storage 2020-03-05 18:12:41 +01:00
Ray
74c486201d ADDED: LoadFileText() and SaveFileText()
Improved file access checks
2020-03-04 00:21:46 +01:00
Ray
5ff0776235 Remove trail spaces and some tweaks 2020-02-27 13:33:09 +01:00
Ray
23bde477e5 REDESIGN: LoadStorageValue()/SaveStorageValue()
Using new file I/O ABI
2020-02-27 13:18:15 +01:00
Ray
1046449339 ADDED: LoadFileData(), SaveFileData() 2020-02-26 20:29:33 +01:00
raysan5
90c129fd61 Review some libc dependency comments 2020-02-09 16:11:11 +01:00
Ray
b5fe41f41a Review libc dependencies and remove when possible
Just for clarification, no plans to remove libc dependency, just did some code analysis to see how much raylib depend on stardard C library. My conclusions:

 - stdlib.h: primary dependency is for malloc() and free()
 - stdio.h: primary dependency is for FILE access, maybe it could go through a custom ABI?
 - string.h: just around 8 functions required
 - math.h: just around 8 functions required
 - others: 1-2 functions required for some other headers
2020-02-04 16:55:24 +01:00
Ray
cde26c743c Replace TraceLog() function by TRACELOG macro
Added SUPPORT_TRACELOG_DEBUG config
2020-02-03 19:13:24 +01:00
Ray
4211056354 Reviewed some comments 2020-01-08 18:21:08 +01:00
raysan5
21c30f43d4 Update year to 2020 2020-01-05 20:01:54 +01:00
Ray
1b249ac1e1 Define some globals 2019-06-19 15:43:35 +02:00
raysan5
40940f4398 Some formatting review 2019-04-28 16:45:23 +02:00
raysan5
e8c413b7cd Review UWP implementation
Basically, formating review and some variables naming to follow raylib conventions.
2019-04-27 22:47:03 +02:00
Reece Mackie
2de1f31821 UWP Support Overhaul (#819)
* Working build

* Fix build again, stop deleting files

* Hotfix crash, needs investigating

* Remove VS2015.UWP, I cannot update the project

* Lots of UWP work, added keyboard and mouse press support. Still need to finish scroll wheel, mouse position and cursor hiding, plus other stuff that I haven't seen yet.

* Implemented a ton more things, added BaseApp.h to provide common code to UWP apps.

* Remove constant window dimensions

* Enable and Disable cursor support.

* Actually use mouse delta

* Gamepad Support

* Cleaning and small tweaks

* Restore original example.

* Update comment

* Use 'Messages' to handle the cursor functions so code is more portable.

* Comment

* Comment unused message fields and use vector for mouse pos instead.

* Move messages to utils.h and use messages for everything. No more plat-specific code in raylib.h

* Working build

* Fix build again, stop deleting files

* Hotfix crash, needs investigating

* Remove VS2015.UWP, I cannot update the project

* Lots of UWP work, added keyboard and mouse press support. Still need to finish scroll wheel, mouse position and cursor hiding, plus other stuff that I haven't seen yet.

* Implemented a ton more things, added BaseApp.h to provide common code to UWP apps.

* Remove constant window dimensions

* Enable and Disable cursor support.

* Actually use mouse delta

* Gamepad Support

* Cleaning and small tweaks

* Restore original example.

* Update comment

* Use 'Messages' to handle the cursor functions so code is more portable.

* Comment

* Comment unused message fields and use vector for mouse pos instead.

* Move messages to utils.h and use messages for everything. No more plat-specific code in raylib.h

* Tested some desktop stuff and added projection matrix updates for window resizing.

* Fixed big bad mouse bug

* Fix alt buttons and add hack to combat flickery key presses (far from perfect)

* Remove debug code

* Final commit

* Well, so I thought

* Wow, i am bad

* Remove packages folder

* Remove useless include

* Apply requested changes and fix linux build

* Try to stop packages folder

* Have we fixed the formatting properly?

* Third time's the charm?

* Where did this come from?

* Re-fix

* Autoformat is gonna kill

* Fixed XBOX ONE Support

* Fix tabs
2019-04-27 20:33:51 +02:00
Ray
e67ebabb02 Support custom memory management macros
Users can define their custom memory management macros.

NOTE: Most external libraries support custom macros in the same way, raylib should redefine those macros to raylib ones, to unify custom memory loading. That redefinition is only implemented as example for stb_image.h in [textures] module.
2019-04-23 14:55:35 +02:00
ChillerDragon
f21761fbbb Happy new year 2019 2019-04-07 17:49:12 +02:00
Ray
477ea4d660 Support external config flags 2019-03-12 16:00:26 +01:00
Ray
9740e5d3ed Update utils.c 2019-01-29 12:45:10 +01:00
Ray
3363cfa61a Corrected log naming 2019-01-29 12:33:08 +01:00
Ray
4467292a2d Review last PR formatting 2019-01-21 10:32:14 +01:00