summaryrefslogtreecommitdiffhomepage
path: root/src/utils.c
AgeCommit message (Collapse)Author
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
2019-01-21Review last PR formattingRay
2019-01-21Changing enums, now referenced as int.Marco Lizza
2019-01-20Adding function to control the "exit-on-error" behaviour.Marco Lizza
2019-01-20Fixing logging level configuration API.Marco Lizza
2019-01-20Fixing `TraceLog` function to work on levels.Marco Lizza
2019-01-15Update utils.cRay
2019-01-14Fixing `LOG_OTHER` missing.Marco Lizza
2019-01-14Adding MACRO constant to specify the internal buffer size.Marco Lizza
2018-12-29utils: declare funopen only on AndroidBasem Abughallya
funopen is only needed on Android, so declare it only there. This fixes following MinGW build failure: utils.c:50:7: error: conflicting types for ‘funopen’ FILE *funopen(const void *cookie, int (*readfn)(void *, char *, int), ^~~~~~~ In file included from utils.c:45:0: /usr/include/stdio.h:586:7: note: previous declaration of ‘funopen’ was here FILE *funopen (const void *__cookie, ^~~~~~~
2018-09-17Improved data export capabilities!Ray
REVIEWED: ExportImage() REVIEWED: ExportMesh() ADDED: ExportWave() REMOVED: Internal funcs: SavePNG(), SaveBMP() NOTE: These changes break the API (parameters order)
2018-07-26Add SetTraceLogCallback to enable users setting custom logging (#597)Pablo Marcos Oltra
2018-05-21cmake: Fix PLATFORM_WEB buildAhmad Fatoum
Did this ever work? Surely, doesn't look like it...
2018-05-21CMake: Fix (Add?) Android supportAhmad Fatoum
Not sure if this ever worked, but now it at least compiles.
2018-04-07Refactor all #define SUPPORT_* into a config.hAhmad Fatoum
That way, a user needs only to touch a single file to configure what features raylib is built with. Include guards are left out intentionally, because config.h should only be included in source files, not headers. Later on, config.h can also define the raylib version (#461).
2018-04-05Simplified some codeRay
2017-12-24Renamed function to SetTraceLog()raysan5
I think is clearer this way...
2017-12-24Added function SetTraceLogTypes()raysan5
Trace log messages could be configured with this function to select wich ones are shown
2017-12-20Updated copyright yearRay San
2017-12-11Remove rres supportRay
Let the user choose if using rres external library
2017-09-29Code tweaks and comments for AndroidRay San
2017-07-02Rename enum LogType names...raysan5
...to avoid possible conflicting symbols
2017-04-01Corrected TraceLog issueRay
2017-03-29Added IsFileExtension()Ray
Replaced old GetExtension() function Make IsFileExtension() public to the API
2017-03-26Work on configuration flagsRay