Commit Graph

141 Commits

Author SHA1 Message Date
Rémi Verschelde
b2fb119c53
Merge pull request #36263 from Calinou/increase-default-2d-gravity 2021-05-18 10:54:47 +02:00
Pedro J. Estébanez
469fa47e06
Make all file access 64-bit (uint64_t)
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-17 15:06:19 +02:00
Rémi Verschelde
56100c2dd7
Tests: Don't assume translation map ordering
This lead to randomly failing the test as the insertion order is not
preserved by Map.

Follow-up to #48778.

Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
2021-05-17 12:40:15 +02:00
Hugo Locurcio
dd51fc77b5
Add a test suite for Translation 2021-05-17 02:02:17 +02:00
Hugo Locurcio
4a28f7e44f
Increase the default 2D gravity to 980.0
This makes 2D RigidBody physics feel less floaty out of the box.

This closes https://github.com/godotengine/godot-proposals/issues/98.
2021-05-05 22:49:06 -04:00
Hugo Locurcio
3f078c99f6
Rename IP_Unix, IP_Address and TCP_Server to remove underscores 2021-05-06 02:52:01 +02:00
bruvzg
b6a21f85a7
Fix url_decode with mixed percent-encoding/Unicode strings. Treat Unix drive names as UTF-8 encoded. 2021-04-30 21:22:39 +03:00
Rémi Verschelde
5b16020846
Replace remaining uses of NULL with nullptr
Follow-up to #38736 (these uses were likely added after this PR was merged).
2021-04-29 11:53:27 +02:00
rafallus
cfa06f0f76 Unexpose _direct_state_changed in PhysicsBody
Removed _direct_state_changed bindings
Affects 2D and 3D nodes
Callbacks now use Callable
Tests were changed accordingly
2021-04-22 23:20:58 -05:00
reduz
d3b49c416a Refactor GLSL shader compilation
-Used a more consistent set of keywords for the shader
-Remove all harcoded entry points
-Re-wrote the GLSL shader parser, new system is more flexible. Allows any entry point organization.
-Entry point for sky shaders is now sky().
-Entry point for particle shaders is now process().
2021-04-14 11:37:52 -03:00
Rémi Verschelde
43f89e7c2c
Merge pull request #47774 from DanielKriz/bugfix/CommandQueue
Fix includes in test_command_queue.h
2021-04-11 10:29:31 +02:00
Daniel Kříž
b9ccdd2bbd Fix includes in test_command_queue.h 2021-04-10 20:09:15 +02:00
Rémi Verschelde
4b6e9f3157
Merge pull request #46991 from madmiraal/rename-invert-reverse
Rename Array.invert() to Array.reverse()
2021-04-01 13:32:22 +02:00
Hugo Locurcio
217f1f891b
Add a test suite for Dictionary
Co-authored-by: Sarav Noor Singh <saravnoorsingh@Saravs-MBP.T-mobile.com>
2021-03-31 01:14:18 +02:00
Daniel Kříž
f07552ba92 add tests for path3d 2021-03-29 10:13:53 +02:00
Aaron Franke
10d7fccb54
Rename ButtonList enum and members to MouseButton 2021-03-23 07:13:23 -04:00
Rémi Verschelde
eeba8d63f8
Merge pull request #44398 from RevoluPowered/unit-tests-for-export-templates
Add unit tests for export templates
2021-03-23 00:42:29 +01:00
Gordon MacPherson
6b4ff3b44b Add unit tests for export templates 2021-03-22 18:57:08 +00:00
Marcel Admiraal
755c70b871 Rename Array.invert() to Array.reverse()
Does the same internally for List and Vector<>, which includes all
PackedArray types.
2021-03-21 10:20:08 +00:00
PouleyKetchoupp
7bbd545432 Disable backface collision with ConcavePolygonShape by default
Helps a lot with soft bodies and generally useful to avoid shapes to go
through the ground in certain cases.

Added an option in ConcavePolygonShape to re-enable backface collision
on specific bodies if needed.
2021-03-18 11:30:22 -07:00
Rémi Verschelde
83b1acdc60
Merge pull request #45545 from abaire/relaxes_gltf_name_sanitization
Relaxes node name sanitization in gltf documents.
2021-03-09 14:54:33 +01:00
Maximilian Mayer
f12d205c1f Add unit tests for HashingContext 2021-03-07 20:33:08 +01:00
Rémi Verschelde
8abc79e909
Merge pull request #46473 from angad-k/PathFollow2D-unit-test
Fix some initializations in PathFollow2D's unit test
2021-02-27 16:44:40 +01:00
Angad Kambli
eee850dd9e fix initializations of node Path2D unit tests 2021-02-27 20:59:11 +05:30
James Gordon
a26d4b1727 Added test file and test cases 2021-02-27 13:16:04 +00:00
abaire
61cc1c8624 Relaxes Node naming constraints in glTF documents to match the Editor. 2021-02-24 08:22:27 -08:00
Rémi Verschelde
5a10f52ee8
Merge pull request #45914 from HenryWConklin/45841-xml-entities
Add support for numeric XML entities to XMLParser
2021-02-24 13:03:46 +01:00
Rémi Verschelde
2bdbb0508b
Merge pull request #46341 from angad-k/PathFollow3D-unit-test
add PathFollow3D unit test
2021-02-24 10:52:45 +01:00
Angad Kambli
1d20280d55 add PathFollow3D unit test 2021-02-23 20:12:25 +05:30
Rémi Verschelde
c97437a8b3
Merge pull request #46277 from angad-k/PathFollow2D-unit-test
PathFollow2D unit test
2021-02-21 16:39:54 +01:00
Angad Kambli
eecfe4c981 set up PathFollow2D unit test 2021-02-21 19:47:49 +05:30
Hugo Locurcio
efd122a99a
Add a test suite for Resource 2021-02-20 19:47:20 +01:00
Sarav Noor Singh
dd9c8d85fa
Add a test suite for Array 2021-02-19 17:40:57 +01:00
Rémi Verschelde
8eaea1db53
Merge pull request #45032 from neikeq/classdb-tests-for-44856
Add ClassDB tests to look for core API deps on editor API
2021-02-18 15:16:52 +01:00
Aaron Franke
7d9ad2b845
Use Vector3.UP as a default value for look_at's up vector 2021-02-16 18:33:23 -05:00
Henry Conklin
c6a911f037 Add support for numeric XML entities to XMLParser
* Add support for decimal numeric entities to String::xml_unescape
* Add more error checks to String::xml_unescape
* Refactor XMLParser to use String::xml_unescape instead of an internal
implementation
2021-02-14 11:00:25 -06:00
sps1112
f71f8c8c0b Add Unit Tests for Variant Assignment 2021-02-11 17:27:24 +05:30
reduz
8b19ffd810 Make Servers truly Thread Safe
-Rendering server now uses a split RID allocate/initialize internally, this allows generating RIDs immediately but initialization to happen later on the proper thread (as rendering APIs generally requiere to call on the right thread).
-RenderingServerWrapMT is no more, multithreading is done in RenderingServerDefault.
-Some functions like texture or mesh creation, when renderer supports it, can register and return immediately (so no waiting for server API to flush, and saving staging and command buffer memory).
-3D physics server changed to be made multithread friendly.
-Added PhysicsServer3DWrapMT to use 3D physics server from multiple threads.
-Disablet Bullet (too much effort to make multithread friendly, this needs to be fixed eventually).
2021-02-10 13:21:46 -03:00
Manolis Papadeas
7a918bacca Add a test suite for the Image class 2021-02-06 01:09:02 +02:00
Rémi Verschelde
5525cd85c6
Merge pull request #45315 from RandomShaper/modernize_thread
Modernize Thread
2021-01-31 15:24:56 +01:00
Rémi Verschelde
46de553473
Merge pull request #45519 from aaronfranke/physics-real_t
Use real_t in physics code
2021-01-29 16:31:47 +01:00
Pedro J. Estébanez
99fe462452 Modernize Thread
- Based on C++11's `thread` and `thread_local`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed (except for the few cases of non-portable functions)
- Simpler for `NO_THREADS`
- Thread ids are now the same across platforms (main is 1; others follow)
2021-01-29 12:02:13 +01:00
Rémi Verschelde
fbb4742377
Merge pull request #45411 from a-ivanov/more-object-tests
Unit tests for Object creation and property getter/setter
2021-01-29 00:58:54 +01:00
Aaron Franke
cb9fc117d1
Use real_t in physics code 2021-01-28 18:15:42 -05:00
Anton Ivanov
db0f3da2c4
Unit tests for Object creation and property getter/setter 2021-01-29 01:53:28 +03:00
Aaron Franke
e829b7aee4
Unify URI encoding/decoding and add to C#
http_escape and percent_encode have been unified into uri_encode, and http_unescape and percent_decode have been unified into uri_decode.
2021-01-28 07:45:01 -05:00
Aaron Franke
a3e3bf8227
Make hex_to_int and bin_to_int handle the prefix automatically
Also add BinToInt to C#
2021-01-28 07:43:53 -05:00
Yuri Roubinsky
38a5d22079 Renamed String.ord_at to unicode_at 2021-01-26 20:36:12 +03:00
Rémi Verschelde
6ddfc8e718
Merge pull request #44797 from a-ivanov/marshall-core-unit-tests
Marshall core unit tests
2021-01-24 20:41:57 +01:00
Anton Ivanov
69b554e92d
Unit tests for encoding/decoding Variant 2021-01-24 17:15:07 +03:00