Commit graph

107 commits

Author SHA1 Message Date
Ray
ac1ffbad1d REVIEWED: Data type to unsigned 2022-09-07 00:39:38 +02:00
Ray
fd191a32ea Remove trailing spaces 2022-08-02 00:36:31 +02:00
Ray
bf208decc0 REVIEWED: Compilation warnings 2022-06-07 10:04:24 +02:00
Daniel Nagy
19f88241ec
Flush stdout after trace messages (#2465)
This immediately shows log messages when stdout is not connected to a
tty.
2022-05-06 20:15:13 +02:00
Ray
ed29b4eedf Update utils.c 2022-05-06 00:46:43 +02:00
Ray
d9a30b8480 ADDED: ExportDataAsCode() 2022-05-06 00:14:28 +02:00
raysan5
a940f41b4b Update year to 2022 2021-12-31 20:06:22 +01:00
Ray
7158c80448 tweak 2021-11-10 13:26:50 +01:00
Ray
83b3478fe4 Reviewed some TODO 2021-10-13 23:45:57 +02:00
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