Commit Graph

3827 Commits

Author SHA1 Message Date
Paweł 0426e2b407
Fix Windows StringFileInfo structure
(cherry picked from commit e15a086bb9)
2023-08-28 17:27:14 +02:00
Bartłomiej T. Listwon 4d8510f9b9
Fix moving position indicator out of bounds in FileAccessMemory
(cherry picked from commit bff0c71e2e)
2023-08-28 17:27:14 +02:00
Rémi Verschelde 47e64671f6
Merge pull request #81026 from Razoric480/raz/use_resource_cache
[3.x] Make binary resource loader utilize loaded external resources
2023-08-28 14:49:13 +02:00
Francois Belair 17d8c09a8c Actually use loaded resource cache 2023-08-27 09:22:32 -04:00
Danil Alexeev 68e8c1bb8f
[3.x] Core: Add recursion level check for `Array` and `Dictionary` hashing 2023-08-22 15:07:53 +03:00
Rémi Verschelde 9435c38b95
Merge pull request #80400 from timothyqiu/eof-debugger
[3.x] Fix infinite loop on EOF in the command line debugger
2023-08-08 14:29:07 +02:00
Rémi Verschelde 08832a00bf
Merge pull request #80072 from RedworkDE/3x-localize-win-path
[3.x] Fix `ProjectSettings::localize_path` for Windows paths
2023-08-08 14:26:53 +02:00
Simon Barkehanai d1dcea79d4 Fix infinite loop on EOF in the command line debugger
When using the command line debugger (godot -d) on Unix systems, when
entering an EOF (ctrl+D), the debugger enters an infinite loop.

Adding a check for EOF in the debugger loop exits the debugger when EOF
is entered.

Fixes #50170.

(cherry picked from commit 4ecad8dea3)
2023-08-08 11:27:17 +08:00
Rémi Verschelde dfed698ee3
Merge pull request #79706 from puzzud/3.x
[3.x] Prevent double input events on gamepad when running through steam input
2023-08-02 17:29:55 +02:00
Rémi Verschelde c8295720e4
Merge pull request #76252 from lawnjelly/fti_2d
[3.x] 2D Fixed Timestep Interpolation
2023-08-02 17:26:50 +02:00
Rémi Verschelde 91e3a53518
Merge pull request #69101 from marcinn/3.x-backport-proposal-5748-loading-dds-at-runtime
[3.x] Backport implement loading DDS textures at run-time
2023-08-02 17:26:26 +02:00
lawnjelly 5162efbfe9 2D Fixed Timestep Interpolation
Adds support to canvas items and Camera2D.
2023-08-01 16:07:48 +01:00
RedworkDE 0c12e26ae1 Fix `ProjectSettings::localize_path` for Windows paths 2023-07-30 22:26:43 +02:00
puzzud 140440ee82 [3.x] Prevent double input events on gamepad when running through steam input #79706
Co-authored-by: Eoin O'Neill <eoinoneill1991@gmail.com>
2023-07-20 16:35:44 -04:00
lawnjelly 43e181a00a Single Compilation Unit build.
Adds support for simple SCU build.
This speeds up compilation by compiling multiple cpp files within a single translation unit.
2023-07-02 20:13:16 +01:00
fabriceci 8245fd3275
Test, refactor and fix a bug in Basis.get_axis_angle
Backport of #63428.

Co-authored-by: juanFdS <juan9794@gmail.com>
2023-06-07 13:47:47 +02:00
bruvzg 18ee8da7d6
Add audio/general/text_to_speech project setting to enable/disable TTS. 2023-05-26 20:57:29 +03:00
Rémi Verschelde 1538b870f1
Merge pull request #76715 from m4gr3d/add_input_event_cancelled_state_3x
[3.x] Augment the `InputEvent` class with a `CANCELED` state
2023-05-17 18:21:42 +02:00
Rémi Verschelde 4cc2229a52
Merge pull request #72251 from RandomShaper/robust_sync_3.x
[3.x] Backport some multi-threading goodies
2023-05-16 13:16:25 +02:00
Fredia Huya-Kouadio 94d6c3dcc6 Augment the `InputEvent` class with a `CANCELED` state
The `InputEvent` class currently supports the `pressed` and `released` states, which given the binary nature, is represented by a `bool` field.
This commit introduced the `CANCELED` state, which signals that an ongoing input event has been canceled.
To represent all the states, the `InputEventState` enum is added and the `InputEvent` logic is refactored accordingly.
2023-05-12 15:22:54 -07:00
lawnjelly 6f8e632848 Make acos and asin safe
A common bug with using acos and asin is that input outside -1 to 1 range will result in Nan output. This can occur due to floating point error in the input.

The standard solution is to provide safe_acos function with clamped input. For Godot it may make more sense to make the standard functions safe.
2023-05-11 09:51:44 +01:00
lawnjelly cc60359a6c MessageQueue - Fix max usage performance statistic
Fixes to keep track of the maximum usage over time, rather than current usage.
2023-04-28 09:02:11 +01:00
Rémi Verschelde 83e91ab818
Merge pull request #76323 from aaronfranke/3.x-t2d-basis-det
[3.x] Expose `determinant` in Transform2D, rename internal method
2023-04-26 12:17:00 +02:00
Fredia Huya-Kouadio 3943de2e6c
Merge pull request #71875 from m4gr3d/editor_optimization_3x
[3.x] Add benchmark logic
2023-04-22 20:18:45 -07:00
Aaron Franke 141783d90f
[3.x] Expose `determinant` in Transform2D, rename internal method 2023-04-22 13:47:47 -05:00
Rémi Verschelde 78739f7266
Merge pull request #76016 from AThousandShips/image_compress
[3.x] Expose more compression formats in Image
2023-04-17 17:25:37 +02:00
Rémi Verschelde 4c5a934408
Merge pull request #68960 from lawnjelly/multirect
Batching - Add MultiRect command
2023-04-17 17:25:20 +02:00
Ninni Pipping 2ca86ef449 [3.x] Expose more compression formats in Image 2023-04-13 09:49:16 +02:00
Rémi Verschelde 632a544c6e
Merge pull request #75527 from lawnjelly/growable_message_queue3
[3.x] Make MessageQueue growable
2023-04-11 22:01:32 +02:00
lawnjelly 5f1e7e6fbc Make MessageQueue growable
* Uses simple vector resizing (po2)
* Uses pair of read and write buffers
2023-03-31 10:07:56 +01:00
Fredia Huya-Kouadio f3cdff46fc Add benchmark logic
Add benchmarking measuring methods to `OS` to allow for platform specific overrides (e.g: can be used to hook into platform specific benchmarking and tracing capabilities).
2023-03-20 23:29:36 -07:00
Haoyu Qiu 3544cd1dad Add Color + alpha constructor for Color 2023-03-16 14:51:40 +08:00
lawnjelly 910ddd13c4 Batching - Add MultiRect command
Large groups of similar rects can be processed more efficiently using the MultiRect command. Processing common to the group can be done as a one off, instead of per rect.

Adds the new API to VisualServerCanvas, and uses the new functionality from Font, BitmapFont, DynamicFont and TileMap, via the VisualServerCanvasHelper class.
2023-03-10 10:58:04 +00:00
Rémi Verschelde 5faa423944
Math: Prevent division by zero in posmod
Fixes #43932.

Co-authored-by: David Hoppenbrouwers <david@salt-inc.org>
(cherry picked from commit f011d8ca9c)
2023-03-06 13:48:13 +01:00
lawnjelly 5639be5f4f BVH - fix lockguards for multithread mode
Due to a lack of variable name, the BVH lock guards lifetimes previously did not cover the whole function call.
2023-02-20 15:43:19 +00:00
Pedro J. Estébanez 32a9227f5b Robustify multi-threading primitives 2023-02-17 19:16:10 +01:00
Marcin Nowak 22468ea1d3
Backport implement loading DDS textures at run-time 2023-02-17 11:27:47 +01:00
Pedro J. Estébanez 7d135cb962 Fix code style and consistency of RWLock and Semaphore 2023-01-28 14:17:51 +01:00
Hugo Locurcio badcfa2523
Expose `OS.read_string_from_stdin()` to the scripting API
This can be used in scripts to read user input in a blocking manner.

This also removes the unused `block` argument, which is always `true`.
2023-01-16 11:39:53 +01:00
heppocogne aa8d6c5633
Fix `get_path()` is not working when files are opend with `open_compressed`
And also fixed `get_absolute_path()` in the same way

(cherry picked from commit ea11ffc88c)
2023-01-11 14:34:51 +01:00
Rémi Verschelde 1426cd3b3a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".

Backported from #70885.
2023-01-10 15:26:54 +01:00
Rémi Verschelde 111de09c03
Merge pull request #71103 from AThousandShips/array_find_fix_3_x
[3.x] Fix for comparisons with PoolArrays
2023-01-09 14:19:18 +01:00
Ninni Pipping f26069e94d Fix for PoolArray comparison 2023-01-09 10:24:08 +01:00
Hugo Locurcio be3017114f 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 4a991887bf)
2022-12-18 10:32:04 +08:00
kobewi 9499ebecee Add vector value linking
Co-authored-by: redlamp <244062+redlamp@users.noreply.github.com>
(cherry picked from commit 5553e27fe8)
2022-12-18 10:32:04 +08:00
Rémi Verschelde 5d5f0a3958
Merge pull request #69963 from lawnjelly/variant_parser_optional_readahead_3
VariantParser make readahead optional [3.x]
2022-12-12 19:02:17 +01:00
lawnjelly 776c9d0579 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-12 15:44:39 +00:00
Rémi Verschelde b0b759e6da
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.

(cherry picked from commit 26e9145c26)
2022-12-12 14:49:21 +01:00
Rémi Verschelde c404cc0e58
Revert "RID: Change comparison operators to use RID_Data id instead of address" 2022-12-12 09:10:37 +01:00
Pedro J. Estébanez 0873cf0656 Keep a single, portable implementation of `OS::get_processor_count()`
(cherry picked from commit 6bf02c0162)
2022-12-12 14:47:37 +08:00