Commit Graph

259 Commits

Author SHA1 Message Date
b6f4b647d6 Added the rest of the new container classes from godot4. They will likely not work as-is, this will be fixed later. 2023-01-16 00:40:55 +01:00
3c461a4660 Added more getters to the new HshMap, for more backwards compatibility. 2023-01-15 23:46:53 +01:00
fd7c2153a6 Replaced the HashMap's implementation with the one Godot4. Refactored it to work as a drop in replacement. Renamed the old one to OGHashMap. 2023-01-15 22:57:13 +01:00
2cd4e4d828 Renamed Set to RBSet. 2023-01-15 19:42:08 +01:00
1b0aac6028 Renamed Map to RBMap. 2023-01-15 19:12:50 +01:00
389052c51a Small cleanups for PooledList and PagedAllocator. 2023-01-15 18:00:34 +01:00
698c2e01f0 Backported the tight version of godot4's LocalVector as the new TightLocalVector class. 2023-01-15 17:30:08 +01:00
5972b6cc43 Removed the deprecated clamped() method from vector2. (The new method is limit_length().) 2023-01-15 14:05:45 +01:00
b240df7df6 Updated more copyright headers for 2023. 2022-12-31 21:07:05 +01:00
f70e207741 Added support for specifying a COPYRIGHT.txt file for modules. 2022-12-31 18:12:06 +01:00
3bf2b79d88 Added set_length helper method to String. 2022-12-22 21:10:04 +01:00
e756718326 Add _FORCE_INLINE_ to String's resize(). 2022-12-22 20:04:50 +01:00
4fb7856b5a Remove now superfluos check from String's operator[]. 2022-12-22 20:03:28 +01:00
91c50d4bea Never print an error message in Object::get_meta(). 2022-12-22 19:58:58 +01:00
213f393293 Fix typos with codespell. 2022-12-22 19:51:25 +01:00
b8009c85f4 Ported: Add vector value linking - KoBeWi and timothyqiu
9499ebecee
2022-12-22 18:50:17 +01:00
51ed526179 Ported: Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@adf7ec1
- akien-mga
84d2f884f8
2022-12-22 17:50:20 +01:00
91e598aa7b Ported: SCons: Cleanup DEBUG, _DEBUG and NDEBUG defines
- `_DEBUG` is MSVC specific so it didn't make much sense to define for
  Android and iOS builds.
- iOS was the only platform to define `DEBUG`. We don't use it anywhere
  outside thirdparty code, which we usually don't intend to debug, so it
  seems better to be consistent with other platforms.
- Consistently define `NDEBUG` to disable assert behavior in both `release`
  and `release_debug` targets. This used to be set for `release` for all
  platforms, and `release_debug` for Android and iOS only.
- Due to the above, I removed the only use we made of `assert()` in Godot
  code, which was only implemented for Unix anyway, should have been
  `DEV_ENABLED`, and is in PoolAllocator which we don't actually use.
- The denoise and recast modules keep defining `NDEBUG` even for the `debug`
  target as we don't want OIDN and Embree asserting all over the place.
- akien-mga
b0b759e6da
2022-12-22 17:42:54 +01:00
f42e413a51 Ported: [Web] Add PS3 gamepad mapping for FF+Linux. - Faless
41b880582e
2022-12-22 16:59:06 +01:00
Hugo Locurcio
fe010a1efe Silence Input.vibrate_handheld() warning as it's already documented
The warning causes messages to be spammed if you are calling this
method in a game that runs on both desktop and mobile platforms,
unless you guard all calls to `Input.vibrate_handheld()` with
`OS.has_feature("mobile") or OS.has_feature("web")`.

Since the limitation is already documented (and is obvious enough
given the method's name), the warning message is redundant.

(cherry picked from commit 4a991887bf3dd5fbb687fb379f06ac85aa4a6245)
2022-12-22 14:08:01 +01:00
lawnjelly
25c3232a77 VariantParser make readahead optional
It turns out some areas are independently moving / reading filepointers outside of the VariantParser, which can cause the readahead caching to get out of sync.

This PR makes the VariantParser readahead to be optional to allow for these use cases.
2022-12-22 13:52:51 +01:00
Emmanouil Papadeas
9524cb6a74 Fix InputEventAction's is_action method ignoring exact_match parameter
(cherry picked from commit 38b51942d6d346d19dd5d4cd1073389caf0152fc)
2022-12-12 12:12:30 +01:00
a7fb068ab4 Revert "Backported: RID: Change comparison operators to use RID_Data id instead of address. This should helps making sorting more deterministic in physics and rendering. The same change was done for 4.0 in 4f16397. - akien-mga - 797321fec4"
This reverts commit 185cfb3291.
2022-12-12 11:54:51 +01:00
lawnjelly
3d1640eb70 Add readahead to VariantParser
Adds a readahead buffer to VariantParser, to prevent large numbers of freads for single bytes, which is inefficient.
2022-12-11 19:17:15 +01:00
lawnjelly
60b6e83948 Fix array-bounds warning in BVH
Provides a workaround to prevent tripping a compiler warning.

(cherry picked from commit 91d252c69795cdfc53e71c553edcff665636ea16)
2022-12-11 19:15:04 +01:00
Rafał Mikrut
5d6b2de1f3 Fix exporting big templates
(cherry picked from commit 86fa3ba56015b0fb6f282277b37c211fe803c6f9)
2022-11-30 19:23:35 +01:00
dzil123
15f2a58915 Fix Image::bump_map_to_normal_map incorrectly keeping mipmap flag
(cherry picked from commit 1fa8b3dd420301dd5c2ad99b6bead6cffe1d4995)
2022-11-30 19:21:11 +01:00
3265fb9e1d Ported: Project Manager: Fix hacky code for project rename
Instantiating a new ProjectSettings is *not* the way to go.
ConfigFile works just fine to read/change a single value.
Fixes memory leaks as the instantiated ProjectSettings was never freed.
Forbid doing this to prevent such problems.
Fixes #25661.
- akien-mga
9a340a2868
2022-11-30 19:19:02 +01:00
voidshine
840c537d89 Fix MIDI note-on events being converted to note-off events
Update documentation with note about MIDI velocity interpretation

(cherry picked from commit f0f72b313236b3cd8793e6fe7487094d9a04694a)
2022-11-30 19:11:21 +01:00
91c53c41c2 Ported: Fix String::word_wrap() for long words
- timothyqiu
51fd1c27aa
2022-11-30 14:57:35 +01:00
dzil123
37c50b6f21 PCKPacker Fix error spam 2022-11-30 14:33:46 +01:00
5aa98e8955 Added Brenzenham's line algorithm found in the TileMapEditorPlugin to Geometry, and it's binder class. 2022-11-20 02:33:40 +01:00
b7d93e4525 Added clear() helper method to Image. 2022-11-19 19:25:04 +01:00
a3f2631d59 Ported: Add double_tap attribute to InputEventScreenTouch
This provides parity with the `InputEventMouseButton` allowing for proper conversion between the two events.
- m4gr3d
be4b07c3e4
2022-11-13 01:29:17 +01:00
9e43e62e3b Ported: [iOS] Fix build with warnings=extra. - bruvzg
987723b386
2022-11-13 00:39:09 +01:00
Jordan Schidlowsky
91624a7561 expose additional global enums in 3.x which are available in master 2022-11-13 00:32:18 +01:00
Micky
6ca2dc959b Rename set_indexed & get_child's params to be clearer
3.x backport of #67300 and #64463.
2022-11-13 00:27:45 +01:00
fbc6f9cf22 Added missing semicolons. 2022-10-09 10:17:16 +02:00
6f35d04ef3 Use FALLTHROUGH macro instead on [[fallthrough]]; 2022-10-09 10:14:12 +02:00
c43fda9fc8 Ported: Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@81ddc73
- akien-mga
7104647c65
2022-10-08 19:05:11 +02:00
42ff9cf8bc Ported: Improve %f formatting for inf and nan.
- MarcusElg
e9cbe9517b
2022-10-08 17:53:43 +02:00
Rémi Verschelde
43de2b9ecc Style: Ensure consistent formatting with clang-format 15 2022-10-08 16:48:59 +02:00
lawnjelly
98c32bb3e7 Improve signal already connected error message
The signal already connected message is improved to provide the names of the objects involved.
2022-10-08 16:34:51 +02:00
Hugo Locurcio
e315a93f87 Expose the "restart on exit" OS functionality
This can be used to restart a project with specific command line arguments
applied. This can work in tandem with `OS.get_cmdline_args()` to restart
with the same command line arguments as used to originally run the project.

Example use cases:

- Restart to apply an user setting change that requires a restart to work.
- Restart with a Godot command line argument to change the video driver,
  audio driver, etc.
2022-10-08 16:34:07 +02:00
808f157b26 Added nissing projection * projection Variant operator. 2022-10-07 03:09:38 +02:00
89cba992ba Now the target fps is customizable for ThreadPool when threading is not enabled. 2022-09-17 23:25:47 +02:00
099b05380e Fix race condition. 2022-09-17 22:35:42 +02:00
48d26e9400 Fix setter parameter types for ThreadPool. 2022-09-17 22:23:29 +02:00
Micky
d31fc4c13a Prevent HTTPRequest from polling invalid client
(cherry picked from commit 9e284f68ec79be745c2cb3d3a4eead3dfcca7cca)
2022-09-17 00:04:38 +02:00
dae3e671fb Ported: Updated gamecontrollerdb.txt to latest to include new mappings for various controllers, including Xbox One, Nintendo Switch, Steam Deck, and 8BitDo
- cybereality
477c7f9b74
2022-09-16 23:59:11 +02:00