summaryrefslogtreecommitdiff
path: root/core
AgeCommit message (Collapse)Author
2021-05-29Increase String::num default decimal precisionHeikki Simojoki
Fixes #34541 Renamed MAX_DIGITS to MAX_DECIMALS, since it only changes the amount of digits after the decimal point. Increased MAX_DECIMALS to 32, and made String::num use MAX_DECIMALS consistently. If -1 is passed as decimal precision to String::num, it now gets changed to the correct precision based on the number's magnitude, instead of using printf default(which is 6) String::num_real also calculates the correct precision now. Also made the types used in floating-point math more consistent in a few places.
2021-05-25Return error when decompressing empty PoolByteArrayPaweł Fertyk
2021-05-25Rename File::get_len() get_length()Marcel Admiraal
2021-05-24Merge pull request #48939 from Calinou/screen-orientation-use-enumRémi Verschelde
Use an enum to represent screen orientation in the Project Settings
2021-05-24Merge pull request #49037 from vnen/fix-callable-freed-crashRémi Verschelde
2021-05-24Make Callable not crash on call when the object has been freedGeorge Marques
Also add a GDScript test for this case.
2021-05-24Use an enum to represent screen orientation in the Project SettingsHugo Locurcio
- Tweak the setting property hint to be more informative. - Make the setting a "basic" setting so it appears when Advanced Settings is disabled. - Remove redundant orientation setting in the iOS export preset. The project setting is now used (like on Android). Projects upgrading from a previous version will have to set the screen orientation again in the Project Settings if it wasn't set to the default value ("landscape").
2021-05-24Merge pull request #49023 from akien-mga/fix-OS-get_unix_time_from_datetimeRémi Verschelde
OS: Better validation of invalid input for get_unix_time_from_datetime
2021-05-24Merge pull request #46866 from bruvzg/symlinks_and_macos_gdn_framework_export_4Rémi Verschelde
2021-05-24OS: Better validation of invalid input for get_unix_time_from_datetimeRémi Verschelde
Default missing keys to Unix time 0 (1970-01-01 at 00:00:00 UTC). Abort if year <= 0, this is not supported by the current algorithm. Prevents an infinite loop further down. Fixes #49022.
2021-05-24Fix duplicate close files when deconstructing ZipArchiveZae
2021-05-22Add a keyboard shortcut to select the word under cursor in TextEditHugo Locurcio
This also acts as a general-purpose "deselect" shortcut since pressing it a second time will deselect text. This is available both in the script editor and in TextEdit fields in use, both in the editor and projects. The Duplicate Line script editor shortcut was moved to Ctrl + Shift + D since it conflicts with the new shortcut (Ctrl + D). The rationale for doing so is that Duplicate Line is a less commonly used action, and its behavior can be replicated by copying and pasting the current line anyway. (With no selection active, the whole line will be copied.)
2021-05-22Merge pull request #48916 from mortarroad/master-convex-hull-portedRémi Verschelde
Replace QuickHull with Bullet's convex hull computer.
2021-05-22Replace QuickHull with Bullet's convex hull computer.Morris Tabor
The code is based on the current version of thirdparty/vhacd and modified to use Godot's types and code style. Additional changes: - extended PagedAllocator to allow leaked objects - applied patch from https://github.com/bulletphysics/bullet3/pull/3037
2021-05-22Add symlink API to the DirAccess (on macOS and Linux).bruvzg
2021-05-22Merge pull request #48927 from KoBeWi/I_fixed_your_leftRémi Verschelde
Fix usage of String.left()
2021-05-21Fix usage of String.left()kobewi
2021-05-21Remove alloca from loop and use a single fixed size array declarationMarcel Admiraal
2021-05-21Merge pull request #48806 from timothyqiu/xml-parser-fixesRémi Verschelde
Fix XMLParser behavior for comments and premature endings
2021-05-21Merge pull request #48903 from Calinou/math-funcs-remove-old-msvc-ifdefRémi Verschelde
2021-05-20Merge pull request #36180 from KoBeWi/I_broke_your_rightRémi Verschelde
Change behavior of String.right
2021-05-20Remove `#ifdef` catering to MSVC 2012 and earlier in `math_funcs.h`Hugo Locurcio
For the `master` branch, the minimum supported MSVC version is now MSVC 2017 (with MSVC 2019 being recommended).
2021-05-20Change behavior of String.rightTomasz Chabora
2021-05-20Merge pull request #48887 from aaronfranke/roundRémi Verschelde
Use global scope round method for rounding
2021-05-20Merge pull request #48882 from aaronfranke/approx-use-doubleRémi Verschelde
Make is_equal_approx have explicit float and double versions
2021-05-20Merge pull request #48860 from JohnM666/fix-basis-variant-initializationRémi Verschelde
Fix RigidBody3D.get_inverse_inertia_tensor() crash
2021-05-20Use global scope round method for roundingAaron Franke
2021-05-20Fix typos with codespellRémi Verschelde
Using codespell 2.0.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear dof doubleclick fave findn GIRD leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
2021-05-20Make is_equal_approx have explicit float and double versionsAaron Franke
2021-05-20Fix #46282 Executing RigidBody3D.get_inverse_inertia_tensor() crashes GodotJohnM666
2021-05-19Fix Quat includesMarcel Admiraal
2021-05-18Fix XMLParser behavior for comments and premature endingsHaoyu Qiu
2021-05-17Merge pull request #48168 from LightningAA/control-to-ctrl-4.0Rémi Verschelde
2021-05-17Merge pull request #48792 from foxydevloper/fix-inputeventmidi-typoRémi Verschelde
Fix typo in InputEventMIDI string
2021-05-17Fix typo in InputEventMIDI stringfox
2021-05-17Make all file access 64-bit (uint64_t)Pedro J. Estébanez
This changes the types of a big number of variables. General rules: - Using `uint64_t` in general. We also considered `int64_t` but eventually settled on keeping it unsigned, which is also closer to what one would expect with `size_t`/`off_t`. - We only keep `int64_t` for `seek_end` (takes a negative offset from the end) and for the `Variant` bindings, since `Variant::INT` is `int64_t`. This means we only need to guard against passing negative values in `core_bind.cpp`. - Using `uint32_t` integers for concepts not needing such a huge range, like pages, blocks, etc. In addition: - Improve usage of integer types in some related places; namely, `DirAccess`, core binds. Note: - On Windows, `_ftelli64` reports invalid values when using 32-bit MinGW with version < 8.0. This was an upstream bug fixed in 8.0. It breaks support for big files on 32-bit Windows builds made with that toolchain. We might add a workaround. Fixes #44363. Fixes godotengine/godot-proposals#400. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2021-05-15Make printing of InputEvents consistentMarcel Admiraal
- Removes the undesired spaces before the colon - Adds missing commas between parameters - Adds quotes or brackets to strings - Removes brackets around single values
2021-05-14Fixed build with SCRIPT_AES256_ENCRYPTION_KEY setMarcus Brummer
2021-05-14Merge pull request #42337 from zaevi/fix-zip-open-twiceRémi Verschelde
Fix zip file opening twice
2021-05-14SCons: Abort if SCRIPT_AES256_ENCRYPTION_KEY is invalidRémi Verschelde
Helps users figure out that something is wrong if they did define this environment variable and it turns out being ignored.
2021-05-14Fix zip file opening twiceZae
2021-05-11GDNative: Fix size mismatch on 32-bit platforms for Signal and CallableRémi Verschelde
Fixes #48645.
2021-05-10Dynamic BVH broadphase in 2D & 3D Godot PhysicsPouleyKetchoupp
Port lawnjelly's dynamic BVH implementation from 3.x to be used in both 2D and 3D broadphases. Removed alternative broadphase implementations which are not meant to be used anymore since they are much slower. Includes changes in Rect2, Vector2, Vector3 that help with the template implementation of the dynamic BVH by uniformizing the interface between 2D and 3D math. Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2021-05-07Rename "Control" key to "Ctrl" and add "_pressed" suffix to all ↵Lightning_A
InputEventWithModifiers properties/methods
2021-05-07Merge pull request #48535 from groud/tiles_squashedRémi Verschelde
TileSet and TileMap rework (squashed)
2021-05-07Rework the TileSet resource and TileMap nodes:Gilles Roudière
- Move most properties from TileMap to TileSet, - Make TileSet more flexible, supporting more feature (several collision layers, etc...), - Fusion both the TileMap and TileSet editor, - Implement TileSetSources, and thus a new way to index tiles in the TileSet, - Rework the TileSet and TileMap editors completely, - Implement an editor zoom widget (and use it in several places)
2021-05-07Merge pull request #45144 from dalexeev/color-constsRémi Verschelde
Rename color constants (alternative)
2021-05-07Merge pull request #33577 from Calinou/highlight-control-flow-keywordsRémi Verschelde
Highlight control flow keywords with a different color
2021-05-07Implement the `%command%` placeholder in the Main Run Args settingHugo Locurcio
This can be used to tell Godot to run an executable that will run Godot rather than running Godot directly. This is useful to make Godot start on the dedicated GPU when using a NVIDIA Optimus setup on Linux: `prime-run %command%` The `editor/run/main_run_args` setting declaration was moved to make it visible in the ProjectSettings documentation.
2021-05-06Merge pull request #38645 from KoBeWi/FMRRémi Verschelde
Add filter, map and reduce to Array