summaryrefslogtreecommitdiffhomepage
path: root/src/utils.c
AgeCommit message (Collapse)Author
2021-10-13Reviewed some TODORay
2021-07-30REVERTED: Removed the need for `rlMatrix`raysan5
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-29WARNING: BREAKING CHANGE: rlgl complete decoupling from raylib -WIP-raysan5
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-26Remove unused UWP defines (#1894)Uneven Prankster
* Unused UWP define removal * Further removal of unusued UWP defines
2021-06-26Minor tweaks to follow code conventionsRay
2021-06-10Review some commentsRay
2021-05-30REVIEWED: exit() on LOG_FATAL instead of LOG_ERROR #1796Ray
2021-05-22Some code tweaks for consistencyRay
2021-04-16Minor tweaksRay
2021-04-03Make SaveFile* callbacks return a boolean (#1697)Rob Loach
2021-04-01Remove trailing spacesraysan5
2021-03-08ADDED: Required callbacksRay
Removed memory allocation callbacks
2021-03-04ADDED: Config flag: SUPPORT_STANDARD_FILEIORay
This new flag allows omitting stdio.h library in case of a custom implementation is used.
2021-03-04Some naming tweaksRay
2021-03-04FEATURE: Several callbacks added -WIP- #1523 #1329Ray
NOTE: This feature is still under consideration and not complete.
2021-02-05REMOVED: SetTraceLogExit()raysan5
I feel nobody has ever used this function...
2021-01-02Update year to 2021raysan5
2020-12-23Remove trailing spacesraysan5
2020-12-19ADDED: MemAlloc() / MemFree() #1440Ray
Exposing internal memory allocator/free, useful for advance users when required
2020-12-14ADDED: UnloadFileData() / UnloadFileText() #1440Ray
2020-11-22Exposing some file access results to user layer #1420Ray
2020-11-03Remove trailing spacesRay
2020-11-01REVIEWED: SaveFileText() error checkingRay
2020-05-23Review usage of sizeof(), unify conventionsraysan5
All functions requiring sizeof() now follow the same convention: NUM_ELEMENTS*NUM_SUBELEMENTS*sizeof()
2020-05-06Avoid all MSVC compile warningsraysan5
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-01Review exposed #defines and allow user re-definingraysan5
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-04-30UWP rework (#1231)Reece Mackie
* 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-05Review android_fopen() to support SDCard accessraysan5
2020-03-30[cppcheck] Improvements in SaveStorageValue() in core.c (#1160)Dani Martin
* [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-27[utils] Review TRACELOG() messages, categorizedraysan5
2020-03-25Remove trail spacesraysan5
2020-03-05Android: Support file saving to internal data storageRay
2020-03-04ADDED: LoadFileText() and SaveFileText()Ray
Improved file access checks
2020-02-27Remove trail spaces and some tweaksRay
2020-02-27REDESIGN: LoadStorageValue()/SaveStorageValue()Ray
Using new file I/O ABI
2020-02-26ADDED: LoadFileData(), SaveFileData()Ray
2020-02-09Review some libc dependency commentsraysan5
2020-02-04Review libc dependencies and remove when possibleRay
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-03Replace TraceLog() function by TRACELOG macroRay
Added SUPPORT_TRACELOG_DEBUG config
2020-01-08Reviewed some commentsRay
2020-01-05Update year to 2020raysan5
2019-06-19Define some globalsRay
2019-04-28Some formatting reviewraysan5
2019-04-27Review UWP implementationraysan5
Basically, formating review and some variables naming to follow raylib conventions.
2019-04-27UWP Support Overhaul (#819)Reece Mackie
* 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-23Support custom memory management macrosRay
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-07Happy new year 2019ChillerDragon
2019-03-12Support external config flagsRay
2019-01-29Update utils.cRay
2019-01-29Corrected log namingRay