summaryrefslogtreecommitdiffhomepage
path: root/src/core.c
AgeCommit message (Collapse)Author
2020-03-30Review formating and signegness issuesraysan5
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-27Review TRACELOG() messagesraysan5
2020-03-27[core] Review TRACELOG() messages, categorizedraysan5
2020-03-25Remove trail spacesraysan5
2020-03-25Minor tweaksraysan5
2020-03-25ADDED: IsWindowFullscreen()raysan5
2020-03-24Remove define not requiredraysan5
2020-03-24Android: Better track touch input returned from IsMouse*() (#1144)Doyle
* Android: Better track touch input returned from IsMouse*() Switch to actually tracking touch input to use for "mouse" input rather than the gestures system. The gesture system as an abstraction ontop of raw touch input loses some information needed to map to "mouse" input. Before, - IsMouseButtonReleased() triggers immediately after the initial touch (because GESTURE_TAP activates immediately on touch) instead of waiting for the touch to be released. - IsMouseButtonUp() returns false, when it should just be the opposite of IsMouseButtonDown(). - IsMouseButtonDown() returns true only after GESTURE_HOLD (which activates after some period of time after GESTURE_TAP), when instead it should just be true whenever there is touch input i.e. gesture != GESTURE_NONE or alternatively when any input is received on the screen. After this PR, touches map closer to mouse input. - IsMouseButtonReleased() triggers when touch is released (last frame was touched, this frame not touched). - IsMouseButtonUp() returns the opposite of IsMouseButtonDown() - IsMouseButtonDown() is true when (AMOTION_EVENT_ACTION_DOWN || AMOTION_EVENT_ACTION_MOVE) and false when (AMOTION_EVENT_ACTION_UP) * RPI: Include index check for RPI in GetTouchPosition()
2020-03-23Comment tweaksraysan5
2020-03-19Android: Track touch motion across screen (#1137)Doyle
This was working in 2.6 but no longer does in current git tree. It appears touch position is only tracked on AMOTION_EVENT_ACTION_[DOWN|UP], which only registers the initial touch on the screen. Subsequent movement is not tracked into CORE. Touch position and the Gesture System appears to be updated twice in AndroidInputCallback in what looks like perhaps a copy paste error (code is identical) with the exception of tracking AMOTION_EVENT_ACTION_UP in the 2nd copy of the code (but this is not necessary to track). If you need to track the first touch or release touch position, you can do so with checking IsMouseButton[Pressed|Released] on the same frame. This patch makes it so the touch position is always updated, and merges the duplicated code into 1 singular code path.
2020-03-17Replace external libraries custom allocators by raylib ones #1074raysan5
NOTE: Two libraries still use custom allocators: glfw and stb_vorbis
2020-03-15Android: Set display.[width, height] before screen size check (#1132)Doyle
In `InitGraphicsDevice(...)`, the Android section has a screen security check like other platforms- but CORE.display.width, CORE.display.height are not set yet, so the security check sets it to 0. So ensure we query the device's screen width and height before the screen size security check. This also gives you the ability to run a proper full-screen application on Android without any scaling and guess work on the target device by setting screen width and height to 0 in `InitWindow(...)` and using `GetScreen[Width|Height]()` to get the actual values.
2020-03-12Added note on transparent framebuffer w/o X11 on RPIRay
2020-03-09Minor tweaksRay
2020-03-09Address issue #1125Ray
2020-03-07Reviewed missing includeRay
2020-03-05Android: Support file saving to internal data storageRay
2020-03-03WARNING: Corrected issue with IsKeyDown() #1119Ray
2020-03-03Update core.cRay
2020-03-03REVIEWED: Mouse/Touch input systemRay
After several reviews, now it seems everything works as expected.
2020-03-02Support any mouse button for gesture detectionRay
2020-03-02Review some commentRay
2020-03-02Added comment on IsMouseButtonDown() issueRay
IsMouseButtonDown() does not process touch state down properly, state is reseted every frame...
2020-03-01Reviewed IsMouseButtonDown()Ray
2020-02-29REDESIGNED input system for better mouse/touch supportRay
2020-02-27Remove trail spaces and some tweaksRay
2020-02-27REDESIGN: LoadStorageValue()/SaveStorageValue()Ray
Using new file I/O ABI
2020-02-26Tweaks on fullsccreen detection...Ray
2020-02-26WARNING: RENAMED: Storage functionsRay
Renamed functions for consistency: - StorageLoadValue() > LoadStorageValue() - StorageSaveValue() > SaveStorageValue()
2020-02-24[core] SetWindowSize() try to support PLATFORM_WEB -WIP-Ray
2020-02-22Update to latest emscripten toolchainRay
Corrected issue on web compilation
2020-02-22Improve inputs on AndroidRay
2020-02-22Support ToggleFullscreen() on webRay
2020-02-21Support links on WebAssemblyRay
2020-02-20Removed TABSRay
2020-02-19Review mouse inputsRay
2020-02-19Improved GetFPS() calculation for averageRay
2020-02-18Remove spacesRay
2020-02-13Review some RPI issuesRay
2020-02-12[core] Avoid pixel bleeding issue on MSAARay
2020-02-12Reviewed Cppcheck issues #1098Ray
2020-02-11REVIEWED: GetDirectoryPath()Ray
Check if provided path is a full path containing system root letter: C:\
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-03Remove all trail spacesRay
2020-02-03Replace TraceLog() function by TRACELOG macroRay
Added SUPPORT_TRACELOG_DEBUG config
2020-02-03Develop branch integration (#1091)Ray
* [core] REDESIGNED: Implement global context * [rlgl] REDESIGNED: Implement global context * Reviewed globals for Android * Review Android globals usage * Update Android globals * Bump raylib version to 3.0 !!! * [raudio] REDESIGNED: Implement global context * [raudio] Reorder functions * [core] Tweaks on descriptions * Issues with SUPPORT_MOUSE_GESTURES * [camera] Use global context * REDESIGN: Move shapes drawing texture/rec to RLGL context * Review some issues on standalone mode * Update to use global context * [GAME] Upload RE-PAIR game from GGJ2020 -WIP- * Update game: RE-PAIR * [utils] TRACELOG macros proposal * Update config.h
2020-01-29Added comments related to #837Ray
2020-01-27Corrected issue with matrix order multiplication #1054Ray