Commit graph

3839 commits

Author SHA1 Message Date
Rémi Verschelde
bfc4baa289
Merge pull request #84934 from Faless/fix/file_get_buffer
[3.x] [Core] Fix `File.get_buffer` returning wrong length
2023-12-08 15:41:39 +01:00
Fabio Alessandrelli
d8ea68d3dd [Core] Fix File.get_buffer returning wrong length
File.get_buffer always returned as many bytes as requested (even when
EOF was reached), this resulted in random bytes being returned when
overflowing.
2023-11-15 12:49:01 +01:00
Angad Kambli
fe79dc90fc
Check parameter validity in Object::set_script
Fixes #46120.

(cherry picked from commit 9c6c2f09e0)
2023-10-30 14:51:07 +01:00
Rémi Verschelde
fe7ed984b5
Merge pull request #82512 from Rindbee/fix-axis-being-mixed-up-in-3.x
[3.x] BVH - fix axis getting mixed up when split leaf
2023-10-01 22:51:46 +02:00
风青山
ab76395144 [3.x] BVH - fix axis getting mixed up when split leaf
Split preferentially on longest axis, rather than shortest axis.
2023-09-29 14:35:33 +08:00
风青山
01c60dc9ee [3.x] BVH - fix not refitting upward from leaf nodes
Fix leaf node possibly not updating aabb due to wrong node id.

Additionally, when requesting a new leaf, mark `dirty` as `false` in `clear()`.
2023-09-29 05:54:47 +08:00
Rémi Verschelde
5279566a1b
Merge pull request #81117 from AThousandShips/object_register_fix_3_x
[3.x] Add check to ensure registered classes are declared
2023-09-06 13:04:46 +02:00
Rémi Verschelde
2a6c7fc9f0
Merge pull request #81114 from dalexeev/3.x-core-add-recursion-check-for-variant-writer
[3.x] Core: Add recursion level check for `VariantWriter::write()`
2023-09-06 13:04:23 +02:00
Rémi Verschelde
54738d3195
Revert "Backport implement loading DDS textures at run-time"
This reverts commit 22468ea1d3.
See #81126 for rationale.
2023-09-01 08:47:25 +02:00
A Thousand Ships
4b205afd3d Add check to ensure registered classes are declared
Checks that all classes registered to `ClassDB` have been properly declared with `GDCLASS`
2023-08-29 13:13:42 +02:00
Danil Alexeev
0213cbbf20
[3.x] Core: Add recursion level check for VariantWriter::write() 2023-08-29 14:10:11 +03:00
Yuri Rubinsky
c269e9243b
Fix crash when calling fill method on an empty Image
(cherry picked from commit adec51cde8)
2023-08-29 12:03:30 +02:00
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