summaryrefslogtreecommitdiff
path: root/core
AgeCommit message (Collapse)Author
2020-06-06Crypto as a custom instance class.Fabio Alessandrelli
2020-06-06Fix editor crash when mbedtls is disabled.Fabio Alessandrelli
2020-06-05Merge pull request #39316 from Anutrix/remove-hashmap-reduntant-funcRémi Verschelde
Remove unused function get_key_value_ptr_array from hash_map.h and another tiny fix.
2020-06-05Remove unused function get_key_value_ptr_array from hash_map.h and also fix ↵unknown
parameter name in function get_key_list.
2020-06-04Sync controller mappings DB with SDL2 community repoRémi Verschelde
Synced with gabomdq/SDL_GameControllerDB@6191f6333bd66644c6a208fabb9fd5dabf0a5d43.
2020-06-03Fix docs generation for Vector2i/Vector3i/Rect2iYuri Roubinsky
2020-05-31Print errors when calling MIDI input methods on unsupported platformsHugo Locurcio
This partially addresses #32065.
2020-05-29Merge pull request #39051 from Xrayez/geometry-splitRémi Verschelde
Split `Geometry` singleton into `Geometry2D` and `Geometry3D`
2020-05-28Use translated docs in PropertySelectorRémi Verschelde
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.
2020-05-27Fix unsigned integer bug in LocalVector::eraseMaganty Rushyendra
`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
2020-05-27Split `Geometry` singleton into `Geometry2D` and `Geometry3D`Andrii Doroshenko (Xrayez)
Extra `_2d` suffixes are removed from 2D methods accoringly.
2020-05-25Improve documentation of ProjectSettings::setupRémi Verschelde
Subsequent PRs adding and fixing support for bundled PCKs did not update the documentation /o\
2020-05-25Merge pull request #38887 from AndreaCatania/oahash_impRémi Verschelde
OAHashMap crash fix and copy feature.
2020-05-25- Make sure it's impossible to initialize an OAHashMap with 0 capacity ↵Andrea Catania
(would cause division by 0) - Added possibility to copy an OAHashMap - Added unit tests This code is generously donated by IMVU.
2020-05-23Merge pull request #38396 from nekomatata/unexpose-sort-childrenRémi Verschelde
Fix Container sorting not working when overriding _sort_children in gdscript
2020-05-22Merge pull request #38886 from Xrayez/save-png-to-buffer-bindRémi Verschelde
Expose `Image.save_png_to_buffer` method
2020-05-20Docs: Fix order of variant constants.bruvzg
2020-05-20Expose `Image.save_png_to_buffer` methodAndrii Doroshenko (Xrayez)
2020-05-20[Windows] Add tablet driver selection.bruvzg
2020-05-19Style: Remove unnecessary semicolons from `core`Rémi Verschelde
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.
2020-05-19Style: Fix unnecessary semicolons that confused clang-formatRémi Verschelde
2020-05-19Merge pull request #38567 from AndreaCatania/AndreaCatania-patch-3Rémi Verschelde
Removed const from OAHashMap iterator value
2020-05-18Fix leaks and crashes in OAHashMapPedro J. Estébanez
This changes the way the lifespan of items is managed to be consistent. Bonus: Simplify cases of destroy-then-emplace.
2020-05-16Fix Container sorting not working when overriding _sort_children in gdscriptPouleyKetchoupp
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.
2020-05-16Remove HQ2X and the `Image.expand_2x_hq2x()` methodHugo Locurcio
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.
2020-05-15Merge pull request #38760 from akien-mga/error-macros-styleRémi Verschelde
Error macros: Improve style of error messages
2020-05-15Error macros: Improve style of error messagesRémi Verschelde
Document why the `if (1) {} else ((void)0)` construct is used.
2020-05-15Merge pull request #38717 from madmiraal/fix-image-uninitialized-warningRémi Verschelde
Silence 'w' may be used uninitialized in image.cpp warning.
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
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.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
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.
2020-05-14Style: Fix missing/invalid copyright headersRémi Verschelde
2020-05-14Silence 'w' may be used uninitialized in image.cpp warning.Marcel Admiraal
Rename `w` to the more meaningful `data_write`
2020-05-14Enforce use of bool literals instead of integersRémi Verschelde
Using clang-tidy's `modernize-use-bool-literals`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html
2020-05-14Modernize remaining uses of 0/NULL instead of nullptr (C++11)Rémi Verschelde
Using clang-tidy's `modernize-use-nullptr`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2020-05-14Port member initialization from constructor to declaration (C++11)Rémi Verschelde
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.
2020-05-13Implement half axis and inverted axis mapping.Marcel Admiraal
2020-05-13Update game controller enums.Marcel Admiraal
2020-05-13Parse SDL game controller half axis and inverted axis entries.Marcel Admiraal
2020-05-12Add support for multiple RemoteDebuggerPeer(s).Fabio Alessandrelli
It is now possible to register protocol handlers (default tcp://) to support additional debugging communication layers (e.g. websocket).
2020-05-12Rename SSL certificate bundle setting to clarify the "overriding" aspectHugo Locurcio
This closes https://github.com/godotengine/godot-docs/issues/2531.
2020-05-11thirdparty: Cleanup after #38386, document provenance and copyrightRémi Verschelde
Also renamed `delaunay.h` to `delaunay_2d.h` to match the class name.
2020-05-11Merge pull request #38386 from reduz/new-lightmapperRémi Verschelde
New GPU lightmapper
2020-05-11Input: Readd 'Default Android Gamepad' magic bindingRémi Verschelde
Removed by mistake in #38292 like the Windows `__XINPUT_DEVICE__`, this magic binding is referenced directly in our code.
2020-05-10New lightmapperJuan Linietsky
-Added LocalVector (needed it) -Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too) -Fixes and changes all around the place -Added library for 128 bits fixed point (required for Delaunay3D)
2020-05-10Merge pull request #38548 from kuruk-mm/add_string_join_to_gdscriptRémi Verschelde
GDScript: Add join method on String
2020-05-10Revert "Renamed plane's d to distance"Rémi Verschelde
This reverts commit ec7b481170dcd6a7b4cf0e6c1221e204ff7945f3. This was wrong, `d` is not a distance but the `d` constant in the parametric equation `ax + by + cz = d` describing the plane.
2020-05-10Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde
Part of #33027.
2020-05-10Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde
Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
2020-05-10Style: Add missing copyright headersRémi Verschelde