summaryrefslogtreecommitdiffstats
path: root/core
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #39409 from akien-mga/astar-get_closest_point-deterministicRémi Verschelde2020-06-101-5/+9
|\ | | | | AStar: Make get_closest_point() deterministic for equidistant points
| * AStar: Make get_closest_point() deterministic for equidistant pointsRémi Verschelde2020-06-091-5/+9
| | | | | | | | | | Closes godotengine/godot-docs#3667. Supersedes #39405.
* | Core: Add hints to run with --verbose when leaking nodes/resources at exitRémi Verschelde2020-06-082-10/+12
|/
* VariantParser: Fix crash on malformed vectorsRémi Verschelde2020-06-081-64/+15
| | | | | | | | | Each time `r_err_str` is set, we should return a parse error. Removed redundant `return OK;` which were already handled after the big `if`/`else if`/`else` for `TK_IDENTIFIER`. Part of #17372.
* Merge pull request #39200 from azagaya/fix-blend-2Rémi Verschelde2020-06-071-12/+10
|\ | | | | Fixing wrong blending rect methods
| * Fixing wrong blending rect methodsazagaya2020-05-311-12/+10
| | | | | | | | | | | | | | | | Using Color.blend function instead of custom code Fixed clang_format Removed unnecessary help
* | Crypto as a custom instance class.Fabio Alessandrelli2020-06-062-16/+4
| |
* | Fix editor crash when mbedtls is disabled.Fabio Alessandrelli2020-06-062-2/+8
| |
* | Merge pull request #39316 from Anutrix/remove-hashmap-reduntant-funcRémi Verschelde2020-06-051-16/+2
|\ \ | | | | | | Remove unused function get_key_value_ptr_array from hash_map.h and another tiny fix.
| * | Remove unused function get_key_value_ptr_array from hash_map.h and also fix ↵unknown2020-06-051-16/+2
| | | | | | | | | | | | parameter name in function get_key_list.
* | | Sync controller mappings DB with SDL2 community repoRémi Verschelde2020-06-041-16/+41
|/ / | | | | | | Synced with gabomdq/SDL_GameControllerDB@6191f6333bd66644c6a208fabb9fd5dabf0a5d43.
* | Fix docs generation for Vector2i/Vector3i/Rect2iYuri Roubinsky2020-06-031-0/+6
| |
* | Print errors when calling MIDI input methods on unsupported platformsHugo Locurcio2020-05-311-1/+5
| | | | | | | | This partially addresses #32065.
* | Merge pull request #39051 from Xrayez/geometry-splitRémi Verschelde2020-05-2912-986/+1082
|\ \ | | | | | | Split `Geometry` singleton into `Geometry2D` and `Geometry3D`
| * | Split `Geometry` singleton into `Geometry2D` and `Geometry3D`Andrii Doroshenko (Xrayez)2020-05-2712-986/+1082
| | | | | | | | | | | | Extra `_2d` suffixes are removed from 2D methods accoringly.
* | | Use translated docs in PropertySelectorRémi Verschelde2020-05-281-3/+4
| | | | | | | | | | | | | | | | | | And do the dedent and stripping for both translated and non-translated strings for consistency, and so that we don't need to do it at the call site.
* | | Fix unsigned integer bug in LocalVector::eraseMaganty Rushyendra2020-05-271-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `erase()` calls `find()` to get the index of the element to remove, if any. https://github.com/godotengine/godot/blob/c2151e18135817c9f926a5a00341016ac77301d4/core/local_vector.h#L77-L81 `find()` returns a signed integer. In particular, it returns -1 if no element is found. Since `erase()` converts this to an unsigned type, the wrong element may be erroneously removed from the vector. Other ways to fix this would involve changing function signatures, so this seemed to be the least disruptive change. Fixes #38884
* | Improve documentation of ProjectSettings::setupRémi Verschelde2020-05-251-29/+38
| | | | | | | | | | Subsequent PRs adding and fixing support for bundled PCKs did not update the documentation /o\
* | Merge pull request #38887 from AndreaCatania/oahash_impRémi Verschelde2020-05-251-9/+33
|\ \ | | | | | | OAHashMap crash fix and copy feature.
| * | - Make sure it's impossible to initialize an OAHashMap with 0 capacity ↵Andrea Catania2020-05-251-9/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | (would cause division by 0) - Added possibility to copy an OAHashMap - Added unit tests This code is generously donated by IMVU.
* | | Merge pull request #38396 from nekomatata/unexpose-sort-childrenRémi Verschelde2020-05-233-2/+50
|\ \ \ | | | | | | | | Fix Container sorting not working when overriding _sort_children in gdscript
| * | | Fix Container sorting not working when overriding _sort_children in gdscriptPouleyKetchoupp2020-05-163-2/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove _sort_children from script bindings: _sort_children is an internal method which shouldn't be exposed to scripts. Added support for non-bound methods in MessageQueue: So we can use deferred calls without exposing internal methods to scripts. Added debug checks in CallableCustomMethodPointer: Adding method pointer callables to the message queue was causing crashes in case an object was destroyed and the same memory was allocated for another one. The new object had a valid object id but the call was erroneous. Release will be fixed later, along with Variant which has the same problem and is also fixed for debug only.
* | | | Merge pull request #38886 from Xrayez/save-png-to-buffer-bindRémi Verschelde2020-05-221-0/+1
|\ \ \ \ | | | | | | | | | | Expose `Image.save_png_to_buffer` method
| * | | | Expose `Image.save_png_to_buffer` methodAndrii Doroshenko (Xrayez)2020-05-201-0/+1
| | |/ / | |/| |
* | | | Docs: Fix order of variant constants.bruvzg2020-05-201-0/+11
| | | |
* | | | [Windows] Add tablet driver selection.bruvzg2020-05-203-2/+32
|/ / /
* | | Style: Remove unnecessary semicolons from `core`Rémi Verschelde2020-05-1949-392/+348
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Semicolons are not necessary after function definitions or control flow blocks, and having some code use them makes things inconsistent (and occasionally can mess up `clang-format`'s formatting). Removing them is tedious work though, I had to do this manually (regex + manual review) as I couldn't find a tool for that. All other code folders would need to get the same treatment.
* | | Style: Fix unnecessary semicolons that confused clang-formatRémi Verschelde2020-05-192-19/+18
| | |
* | | Merge pull request #38567 from AndreaCatania/AndreaCatania-patch-3Rémi Verschelde2020-05-191-1/+1
|\ \ \ | | | | | | | | Removed const from OAHashMap iterator value
| * | | Removed const from OAHashMap iterator value Andrea Catania2020-05-081-1/+1
| | | | | | | | | | | | to allows to mutate the value while iterating over it.
* | | | Fix leaks and crashes in OAHashMapPedro J. Estébanez2020-05-181-16/+29
| | | | | | | | | | | | | | | | | | | | | | | | This changes the way the lifespan of items is managed to be consistent. Bonus: Simplify cases of destroy-then-emplace.
* | | | Remove HQ2X and the `Image.expand_2x_hq2x()` methodHugo Locurcio2020-05-163-46/+0
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of Godot 3.0, HQ2X is no longer used to upscale the editor theme and icons on hiDPI displays, which limited its effective uses. HQ2X was also used to upscale the project theme when the "Use Hidpi" project setting was enabled, but results were often less than ideal. The new StyleBoxFlat and SVG support also make HQ2X less important to have as a core feature. This decreases binary sizes slightly (-150 KB on most platforms, -212 KB on WebAssembly release). This partially addresses #12419.
* | | Merge pull request #38760 from akien-mga/error-macros-styleRémi Verschelde2020-05-151-16/+21
|\ \ \ | | | | | | | | Error macros: Improve style of error messages
| * | | Error macros: Improve style of error messagesRémi Verschelde2020-05-151-16/+21
| | | | | | | | | | | | | | | | Document why the `if (1) {} else ((void)0)` construct is used.
* | | | Merge pull request #38717 from madmiraal/fix-image-uninitialized-warningRémi Verschelde2020-05-151-3/+3
|\ \ \ \ | |/ / / |/| | | Silence 'w' may be used uninitialized in image.cpp warning.
| * | | Silence 'w' may be used uninitialized in image.cpp warning.Marcel Admiraal2020-05-141-3/+3
| | | | | | | | | | | | | | | | Rename `w` to the more meaningful `data_write`
* | | | Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-14149-2396/+4433
| | | | | | | | | | | | | | | | | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* | | | Style: Enforce separation line between function definitionsRémi Verschelde2020-05-1461-0/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* | | | Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-14237-5751/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* | | | Style: Fix missing/invalid copyright headersRémi Verschelde2020-05-141-0/+30
|/ / /
* | | Enforce use of bool literals instead of integersRémi Verschelde2020-05-143-10/+10
| | | | | | | | | | | | | | | Using clang-tidy's `modernize-use-bool-literals`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html
* | | Modernize remaining uses of 0/NULL instead of nullptr (C++11)Rémi Verschelde2020-05-1410-23/+23
| | | | | | | | | | | | | | | Using clang-tidy's `modernize-use-nullptr`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
* | | Port member initialization from constructor to declaration (C++11)Rémi Verschelde2020-05-14163-1705/+682
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
* | | Implement half axis and inverted axis mapping.Marcel Admiraal2020-05-132-22/+52
| | |
* | | Update game controller enums.Marcel Admiraal2020-05-135-332/+282
| | |
* | | Parse SDL game controller half axis and inverted axis entries.Marcel Admiraal2020-05-133-121/+288
| | |
* | | Add support for multiple RemoteDebuggerPeer(s).Fabio Alessandrelli2020-05-126-31/+50
| | | | | | | | | | | | | | | It is now possible to register protocol handlers (default tcp://) to support additional debugging communication layers (e.g. websocket).
* | | Rename SSL certificate bundle setting to clarify the "overriding" aspectHugo Locurcio2020-05-121-2/+2
| | | | | | | | | | | | This closes https://github.com/godotengine/godot-docs/issues/2531.
* | | thirdparty: Cleanup after #38386, document provenance and copyrightRémi Verschelde2020-05-116-10/+10
| | | | | | | | | | | | Also renamed `delaunay.h` to `delaunay_2d.h` to match the class name.
* | | Merge pull request #38386 from reduz/new-lightmapperRémi Verschelde2020-05-1121-36/+1267
|\ \ \ | | | | | | | | New GPU lightmapper