Commit Graph

123 Commits

Author SHA1 Message Date
4090cb34d7 Backported helper classes to pair.h from Godot4. 2022-08-08 00:05:12 +02:00
37eb131c50 Uncommented hashing methods for the new types. 2022-08-07 23:31:58 +02:00
31603bec29 Added Vector4, Vector4i, and projection classes from Godot4. They are not yet handled via Variants. 2022-08-07 23:30:31 +02:00
705643310e Ported the improvements to the hash funcs from Godot4. 2022-08-07 23:22:21 +02:00
ef5f5f6da4 Fix more includes. 2022-08-07 22:45:50 +02:00
b31e09f884 Added RBMap and EBSet from godot4. 2022-08-07 21:38:22 +02:00
e15630d7f2 Added more helper methods to DirAccessRef and FileAccessRef. Also smaller cleanups. 2022-08-07 21:16:11 +02:00
10e87baee9 Added hash_set from godot4. 2022-08-07 21:08:37 +02:00
9e4ac41f4a Added a new templated WeakRef (WRef) class. 2022-08-04 14:31:00 +02:00
Rémi Verschelde
2ca1470010 File: Re-add support to skip CR (\r) in File::get_as_text
This was removed in #63481, and we confirmed that it's better like this,
but we add back the possibility to strip CR as an option, to optionally
restore the previous behavior.

For performance this is done directly in `String::parse_utf8`.

Also fixes Android `FileAccess::get_line()` as this one _should_ strip CR.

Supersedes #63717.

(cherry picked from commit 1418f97c70a5551bdbfeea853cbc479b32ea9e08)
2022-08-02 17:58:32 +02:00
0095078e25 Fixed an another warning on the pi. 2022-08-02 00:22:41 +02:00
c4e7bc1c45 Reused the old unused PROPERTY_HINT_SPRITE_FRAMES as PROPERTY_HINT_BUTTON. It allows you to add buttons to the inspectors. 2022-07-31 00:01:58 +02:00
9f5fb428ab Ported: Add error messages and docs to explain restrictions when calling NetworkedMultiplayerCustom.initialize()
- dsnopek
5eaf83f2d7
2022-07-30 00:49:12 +02:00
641c15f906 Ported: [3.x] HTML5: Add support for Input.vibrate_handheld() - pattlebass
fb7ecc748f
2022-07-30 00:29:14 +02:00
a917d1bed4 Ported: Address remaining scoped storage regressions
- Accelerate common path used to check the storage scope for a given path
- Update the logic for the `get_as_text()` method - previous logic loads the content of a text file one byte at a time
- m4gr3d
fc2c202312
2022-07-29 23:48:31 +02:00
Ricardo Buring
899a41e0d7 Fixup BVH debugging statements 2022-07-29 23:20:04 +02:00
Fredia Huya-Kouadio
361b5b23f7 Address slow copy performance when using the FileAccessFilesystemJAndroid implementation.
Read/write ops for this implementation are done through the java layer via jni, and so for good performance, it's key to avoid numerous repeated small read/write ops due the jni overhead.

The alternative is to allocate a (conversatively-sized) large buffer to reduce the number of read/write ops over the jni boundary.
2022-07-29 22:35:08 +02:00
7161d7bc29 Ported: Add NetworkedMultiplayerCustom so high-level multiplayer backends can be added from GDScript. - dsnopek
8ad5889c1a
2022-07-29 22:19:12 +02:00
fabriceci
dfd8e09953 Fix the calculation of the angular velocity when the rotation speed is not high.
(cherry picked from commit db7c91e0ada0c91ba48269cf3cc217631ca33bba)
2022-07-29 22:00:03 +02:00
Pedro J. Estébanez
a58186c82a Use the right memory ordering in SafeNumeric operations
(cherry picked from commit 02a584d8e68fad988fbbe43e05f8437284c00733)
2022-07-29 21:58:53 +02:00
9af3a7a709 Ported sort() for poolVectors from 7b8b91f505 . 2022-07-29 21:18:44 +02:00
88fe196e79 Ported: [3.x, macOS, Windows, X11] Add stylus inverted/eraser support to InputEventMouseMotion event.
- hansemro
193d5c11f3
2022-07-29 20:31:16 +02:00
Wilson E. Alvarez
756795a486 Add error messages to String::bin_to_int64, and accept capital B in prefix
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-07-29 19:56:15 +02:00
Wilson E. Alvarez
71fe78538f Add error messages String::hex_to_int functions, and accept capital X in prefix
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-07-29 19:55:58 +02:00
9d76074b58 Ported: Add full support for Android scoped storage.
This was done by refactoring directory and file access handling for the Android platform so that any general filesystem access type go through the Android layer.
This allows us to validate whether the access is unrestricted, or whether it falls under scoped storage and thus act appropriately.
- m4gr3d
24e3b3b88d
2022-07-29 19:24:07 +02:00
Haoyu Qiu
1d2b59b941 Check thread func in base scripts for argument info 2022-07-29 17:59:32 +02:00
Estelle Linkpy Reid
6c65c86669 Corrected InputEventKey::as_text to return a non-empty string for physical keys. 2022-07-29 16:42:10 +02:00
Rémi Verschelde
c2d36b2c34 Errors: Fallback to fprintf if OS singleton doesn't exist
Otherwise we would crash if something prints an error before init or
after destruction of the `OS` singleton which handles printing/logging.

(cherry picked from commit c83084fccb4cdc42d2ca324c974ace0cf974630d)
2022-07-29 16:31:28 +02:00
Marcel Admiraal
24d15ae3f7 Ensure AudioFrame variables l and r are always initialised
(cherry picked from commit d3f099457226ab833127ca66f5876855a9f2da0f)
2022-07-29 11:02:34 +02:00
8ca3043a28 Ported: ProjectSettings: Ensure 'editor/' settings aren't nested
Having a mix of settings with and without subcategory makes the 'Editor'
section stand out with a weird UX, as instead of simply being a foldable
section like the others, it also holds its own top-level settings and is
therefore selectable.
This wasn't the case in 3.4, and is fixed in 4.0 by refactoring, so for
3.5 we should preserve the 3.4 UX, even if it's not the best.
- akien-mga
acd4a01b8c
2022-07-29 10:45:12 +02:00
Theraot
375670222d Added missing p_bidirectional to AStar2D methods
The methods disconnect_points and are_points_connected  now have an optional p_bidirectional parameter matching AStar.

(cherry picked from commit 3590cdfd34eea8dda746d7db1c7e5a79af389026)
2022-07-29 09:13:46 +02:00
Yuri Rubinsky
1a68039fcf Fix wrapf to correct wrap values with 0.1 stepping
(cherry picked from commit 09418afbc0b5a5642448786751b590352ee6cf97)
2022-07-29 09:08:06 +02:00
bb5acfd745 Ported: [3.5] Update NavigationServer backport
Backports features and bugfixes from current Godot 4.0 to 3.5 and brings functions and codebase of both version largely in sync to make tutorials more compatible and future backports easier.
- smix8
8bd7c6188b
2022-07-28 22:34:28 +02:00
802779db24 Ported: Use ThreadWorkPool instead of thread_process_array in NavMap - adamscott
7749346f48
2022-07-28 22:33:00 +02:00
152f9728b0 Ported: [Windows, 3.x] Add support for handling network share paths. - bruvzg
11a7997a67
2022-07-28 19:33:43 +02:00
942b6d9938 Ported: Make Input mouse_mode and use_accumulated_input properties - fire-forge, timothyqiu
53c01540d9
2022-07-28 18:54:48 +02:00
kobewi
202fb33685 Add Dictionary.merge()
(cherry picked from commit a0915e6dee4e54563a98ca6adb8968dbdcea1af1)
2022-07-28 14:59:15 +02:00
sps1112
8e229841be Bind vararg method flag in core constants
(cherry picked from commit 1f361b03678893cd6328702383fce6dc062e7e57)
2022-07-28 14:56:33 +02:00
lawnjelly
693c503213 Optimized Mesh Merging
Changes from PoolVector to LocalVector and pre-reserving vectors rather than push_back.
2022-07-28 13:46:56 +02:00
lawnjelly
c0c72eed7b Force unsigned behaviour for bitfield enums
Some compilers (notably MSVC) were using signed values for bitfield enums. This was causing problems where 2 bits were used to store 4 or less enum values, where they were being treated as negative numbers.

This PR explicitly requests these enums to be treated as unsigned values.
2022-07-28 13:45:51 +02:00
Aaron Franke
9a35bce6cb Improve architectures in OS::has_feature and make it work on MSVC 2022-07-28 13:43:46 +02:00
Haoyu Qiu
98eb7db8b1 Fix String.http_escape on Windows 2022-07-28 13:36:49 +02:00
Univeous
e943c7c81c fix get_meta() with defalt value 2022-07-28 10:19:20 +02:00
Hugo Locurcio
0b8e21cf74 Tweak 64-bit integer overflow message to mention that it's a signed type
(cherry picked from commit 7b5bf3af192be83afab19bbfcd029d97af0da8cd)
2022-07-27 23:11:15 +02:00
e060783202 Fix mistake. 2022-07-27 19:35:50 +02:00
Hugo Locurcio
3395a3a727 Improve error messages when creating Images from code
The rationale behind the expected number of bytes is now displayed
in clear (width, height, format, number of mipmaps expected if any).

(cherry picked from commit 18e9e6a81a0aef27bbb78d3e52d52a4b009457bf)
2022-07-27 19:11:16 +02:00
kobewi
e4133904a2 Move Display settings higher in the list
(cherry picked from commit 739242dd04d16f85d542bcf9a29aa44402410481)
2022-07-27 18:44:38 +02:00
Haoyu Qiu
3886161d4e Fix invalid memory usage when using Image.convert
(cherry picked from commit 34c1a2beaa8ae92a445b85458d3681f60cd5216f)
2022-07-27 18:42:27 +02:00
24eccc4281 Ported: Fix warnings found by Emscripten 3.1.10
Fix `-Wunused-but-set-variable`, `-Wunqualified-std-cast-call`, and
`-Wliteral-range` warnings.
- akien-mga
5e693b6d84
2022-07-27 18:39:35 +02:00
Nicholas Huelin
c1010f7d1b Fix inconsistent naming in Time
(cherry picked from commit 8409d92282e71f8ad479f48d6b1f6d52eb73ae39)
2022-07-27 18:28:47 +02:00