Commit graph

3923 commits

Author SHA1 Message Date
Ignacio Roldán Etcheverry 97efd33ada
Merge pull request #37145 from neikeq/issue-37128
C#: Fix uses of old Configuration names
2020-03-18 15:36:12 +01:00
Rémi Verschelde 4663625d11
Merge pull request #37112 from Xrayez/mono-generate-help
Generate command line help text for the `mono` module
2020-03-18 15:32:08 +01:00
Ignacio Etcheverry 40f8de4c1e Sync csproj when files are changed from the Godot FileSystem dock 2020-03-18 15:06:41 +01:00
Ignacio Etcheverry 66c0b7ce98 C#: Fix uses of old Configuration names 2020-03-18 14:50:49 +01:00
Rémi Verschelde 70e12d8615
Merge pull request #37139 from akien-mga/opus-vorbis-drop-audiostream-code
opus/vorbis: Remove dead code not used since 3.0
2020-03-18 14:42:13 +01:00
Ignacio Roldán Etcheverry f62fc10bb6
Merge pull request #37131 from van800/master
fix RiderPathLocator - searching for toolbox on Mac
2020-03-18 14:25:02 +01:00
Rémi Verschelde 7f6b62cef0 opus/vorbis: Remove dead code not used since 3.0
Since the new audio system in 3.0 we switched the OGG support to
stb_vorbis, and the Opus stream support was disabled as incompatible
(see #7496).

We still build the libraries as they are needed by the theora and webm
modules, but we don't need any Godot code apart from `register_types`.

Fixes #7496.
2020-03-18 12:41:21 +01:00
Ivan.Shakhov dc16b8742a fix RiderPathLocator - searching for toolbox on Mac 2020-03-18 09:23:29 +01:00
Ignacio Roldán Etcheverry ed298f5982
Merge pull request #36756 from aaronfranke/mono-vec2i3i
[Mono] Add Vector2i and Vector3i
2020-03-18 02:23:03 +01:00
Aaron Franke 9b322d46d3
[Mono] Marshaling for Vector2i, Vector3i, and Rect2i 2020-03-17 18:03:28 -04:00
Aaron Franke 22ba912d90
[Mono] Add Vector2i, Vector3i, and Rect2i
These have conversion operators between their non-integer equivalents. Vector2i to Vector2 is implicit, while Vector2 to Vector2i is explicit. All conversion code is done in the integer files, so Vector2.cs contains no reference to Vector2i etc.
2020-03-17 18:03:28 -04:00
Ignacio Etcheverry 0b814ea78d Mono/C#: Optimize the way we store GC handles for scripts
Don't store GC handles for C# script instances and instance bindings as 'Ref<MonoGCHandle>'; store the raw data instead. Initially this was not possible as we needed to store a Variant, but this had not been the case for a looong time yet the stored type was never updated.
2020-03-17 21:51:05 +01:00
Ignacio Etcheverry 6a85cdf640 Fix C# bindings after recent breaking changes
Implementation for new Variant types Callable, Signal, StringName.
Added support for PackedInt64Array and PackedFloat64Array.

Add generation of signal members as events, as well as support for
user created signals as events.
NOTE: As of now, raising such events will not emit the signal. As such,
one must use `EmitSignal` instead of raising the event directly.

Removed old ThreadLocal fallback class. It's safe to use thread_local now since
it's supported on all minimum versions of compilers we support.
2020-03-17 16:30:04 +01:00
Andrii Doroshenko (Xrayez) 94b6c1363c Generate command line help text for mono module 2020-03-17 17:26:09 +02:00
Rémi Verschelde cb282c6ef0 Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now
used instead of the C++03 compatible `A<A<int> >`.

Note: clang-format 10+ changed the `Standard` arguments to fully
specified `c++11`, `c++14`, etc. versions, but we can't use `c++17`
now if we want to preserve compatibility with clang-format 8 and 9.
`Cpp11` is still supported as deprecated alias for `Latest`.
2020-03-17 07:36:24 +01:00
simpuid 2584eb9c69 Changed default for p_validate_certs to true.
Fixes #37084
2020-03-17 02:18:57 +05:30
Ignacio Roldán Etcheverry ce3c319429
Merge pull request #36865 from van800/sol-conf2
Rename solution configurations (Debug and Release) and put Tools first
2020-03-14 19:38:53 +01:00
Ignacio Etcheverry 1b634785b5 C#: Replace uses of old Configuration and update old csprojs 2020-03-14 19:01:29 +01:00
Rémi Verschelde 5002f6de84
Merge pull request #36599 from AndreaCatania/gen_rpc_data_export
Generates the rpc and rset info for exported GDScript.
2020-03-13 10:19:30 +01:00
Rémi Verschelde e147be6031
Merge pull request #36723 from AndreaCatania/fix-rset
Fixed rset method for gdscript and visual script
2020-03-13 10:18:56 +01:00
luz.paz 7bf6e5f773 Fix various typos
Found via `codespell`
2020-03-11 13:59:18 -04:00
Ivan Shakhov ce01b83c4a reorder solution configurations + migration 2020-03-11 17:22:12 +01:00
Fabio Alessandrelli 87d50da9fc Fix basis_universal to not include tool main file.
Avoid build error due to duplicate `main` symbol definition.
2020-03-11 16:06:28 +01:00
Rémi Verschelde 05d9d1c0e7
Merge pull request #36905 from Faless/js/restore_and_ci
Resurrect HTML5 platform, add it to CI (no rendering yet)
2020-03-11 07:31:16 +01:00
Rémi Verschelde cdbf033290
Merge pull request #36704 from ThakeeNathees/gdscript-duplicate-args-fix
GDScript duplicate arguments bug fixed
2020-03-10 13:10:00 +01:00
Rémi Verschelde 57ab10ccf3
Merge pull request #36767 from ThakeeNathees/class-pass-fix
fix: Classes can't have pass
2020-03-10 13:08:27 +01:00
Rémi Verschelde 95c9345b63
Merge pull request #36859 from ThakeeNathees/logic-error-for-loop-range-parsing
Fix: logic error in gdscript_parser.cpp for-loop-range
2020-03-10 13:08:01 +01:00
Rémi Verschelde 478337c412
Merge pull request #36751 from Faless/debugger/threads_and_profilers
ScriptDebugger refactor, threading, profilers.
2020-03-09 19:08:07 +01:00
Pierre Caye f30f3f3deb change an exclamation mark to a dot 2020-03-09 14:44:12 +01:00
Rémi Verschelde d9524d8890
Merge pull request #36912 from Xrayez/resurrect-module-icons
Fix missing module editor icons
2020-03-09 12:15:44 +01:00
Andrii Doroshenko (Xrayez) 3acebdeecd Fix missing module editor icons
Module icons need to be renamed to PascalCase as well
for them to be registered in 4.0.

See godotengine/godot#36513.
2020-03-08 19:32:25 +02:00
lupoDharkael d63bf6dea5 Complete NavigationMeshInstance rename 2020-03-08 17:33:34 +01:00
Rémi Verschelde 7579a792be
Merge pull request #36683 from rafaeldelboni/master
Return only scenes for script owners on LSP completion
2020-03-08 16:19:31 +01:00
Fabio Alessandrelli b8ddaf9c33 Refactor ScriptDebugger.
EngineDebugger is the new interface to access the debugger.
It tries to be as agnostic as possible on the data that various
subsystems can expose.

It allows 2 types of interactions:

- Profilers:
  A subsystem can register a profiler, assigning it a unique name.
  That name can be used to activate the profiler or add data to it.
  The registered profiler can be composed of up to 3 functions:
    - Toggle: called when the profiler is activated/deactivated.
    - Add: called whenever data is added to the debugger
      (via `EngineDebugger::profiler_add_frame_data`)
    - Tick: called every frame (during idle), receives frame times.

- Captures: (Only relevant in remote debugger for now)
  A subsystem can register a capture, assigning it a unique name.
  When receiving a message, the remote debugger will check if it starts
  with `[prefix]:` and call the associated capture with name `prefix`.

Port MultiplayerAPI, Servers, Scripts, Visual, Performance to the new
profiler system.

Port SceneDebugger and RemoteDebugger to the new capture system.
The LocalDebugger also uses the new profiler system for scripts
profiling.
2020-03-08 12:36:39 +01:00
Fabio Alessandrelli 540ca05a80 Threaded networking for editor debugger. 2020-03-08 12:16:09 +01:00
Fabio Alessandrelli fd035c931d Fix Javascript platform after PoolVector removal.
Eval should be rechecked.
2020-03-08 03:35:13 +01:00
Rafael Delboni 2f08f4ef4e
fix: Return only scenes for script owners on LSP completion
Fix: #36680
2020-03-07 09:17:25 -03:00
Rémi Verschelde b9f2f77dba
Merge pull request #36814 from ThakeeNathees/typo-gdscript_workspace-fix
typo in gdscript_workspace.cpp fixed
2020-03-07 09:30:19 +01:00
Rémi Verschelde 6635e25b2c
Merge pull request #36842 from Phischermen/mono-resource-loader-extension-update
Mono/C#: Add missing parameters to 'ResourceLoader.Load<T>()'
2020-03-06 22:54:11 +01:00
Phischermen 1b0819bd59 Added parameters to Load() 2020-03-06 13:41:35 -08:00
Thakee Nathees bcbcf0f1ea logic error in gdscript_parser.cpp for-loop-range
there was a logic error in for loop range argument that
check if all of the argument were constants, fixed
2020-03-06 23:14:21 +05:30
Rémi Verschelde 62afc3c12c
Merge pull request #36852 from akien-mga/assimp-unbundle
assimp: Clean and document buildsystem, update to upstream 0201fc5
2020-03-06 16:01:33 +01:00
Thakee Nathees 5424b626f9 duplicate arguments in a function handled 2020-03-06 20:23:58 +05:30
Rémi Verschelde 54fa07e7f0
Merge pull request #36854 from AndreaCatania/AndreaCatania-patch-3
Added navigation mesh merging error.
2020-03-06 15:35:54 +01:00
Andrea Catania 38cfb79e6a
Added error to notify that the Navigation triangle merging failed due to incorrect parameter. 2020-03-06 15:08:39 +01:00
Rémi Verschelde 9d8a9ea826 assimp: Clean and document buildsystem, prepare for unbundling
- Improve the SCsub to allow unbundling and remove unnecessary code.
- Move files around to match upstream source.
- Re-sync with upstream commit 308db73d0b3c2d1870cd3e465eaa283692a4cf23
  to ensure we don't have local modifications.
- Doesn't actually build against current version 5.0.1 due to the lack
  of the new ArmaturePopulate API that Gordon authored. We'll have to
  wait for a public release with that API (5.1?) to enable unbundling.
2020-03-06 14:37:52 +01:00
Thakee Nathees 07c99340d1 typo in gdscript_workspace.cpp/remove_cache_parser() fixed 2020-03-05 20:51:02 +05:30
Thakee Nathees 63ce1fc438 pass keyword inside a class implemented 2020-03-05 16:19:06 +05:30
Rémi Verschelde 5b040ef2e8 Mono: Fix detection of Apple platforms in build script 2020-03-05 09:00:41 +01:00
Rémi Verschelde 30ff00d6c8
Merge pull request #36657 from van800/rpl3
On Windows find Rider installed for CurrentUser
2020-03-04 10:27:03 +01:00
Fabio Iotti 4f8d1c47b8 Fix OGG audio loops 2020-03-02 21:36:01 +00:00
Raul Santos 6b9c22542f
Fix missing null check in Mono Binding of GD.print 2020-03-02 16:26:29 +01:00
Andrea Catania e967a92c1b Fixed rset method for gdscript and visual script 2020-03-02 10:22:07 +01:00
Rémi Verschelde e2b66cacf7
Merge pull request #18020 from bruvzg/input_fix_non_latin_and_add_hw_scancodes
Fix non-latin layout scancodes on Linux, adds access to physical scancodes.
2020-03-01 23:00:42 +01:00
Rémi Verschelde 1ab695bf37
Merge pull request #36695 from clayjohn/ETC-mipmaps-4
Force mipmaps off when importing RGBA4444 textures
2020-03-01 08:29:42 +01:00
clayjohn 0c3af32d77 Force mipmaps off when importing RGBA4444 textures 2020-02-29 19:46:06 -08:00
Rémi Verschelde 8c3ec8c014
Merge pull request #36422 from madmiraal/fix-csg
Fix multiple issues with CSG module.
2020-02-29 12:10:36 +01:00
Ivan Shakhov c95e20a089 On Windows find Rider installed for CurrentUser 2020-02-28 21:34:20 +01:00
Rémi Verschelde 620030b600
Merge pull request #36640 from reduz/resource-loader-refactor
Removed ResourceInteractiveLoader, add built-in threaded loading.
2020-02-28 17:21:16 +01:00
Juan Linietsky 475e4ea67b Removed interactive loader, added proper thread loading. 2020-02-28 11:20:45 -03:00
Rémi Verschelde 09a6a2d8f8 Signals: Port more uses of connect_compat
Those were problematic as they call a method of their parent class,
but callable_mp does not allow that unless it's public.

To solve it, we declare a local class that calls the parent class'
method, which now needs to be protected to be accessible in the
derived class.
2020-02-28 14:24:09 +01:00
Rémi Verschelde f742dabafe Signals: Manually port most of remaining connect_compat uses
It's tedious work...

Some can't be ported as they depend on private or protected methods
of different classes, which is not supported by callable_mp (even if
it's a class inherited by the current one).
2020-02-28 14:24:09 +01:00
Rémi Verschelde 01afc442c7 Signals: Port connect calls to use callable_mp
Remove now unnecessary bindings of signal callbacks in the public API.
There might be some false positives that need rebinding if they were
meant to be public.

No regular expressions were harmed in the making of this commit.
(Nah, just kidding.)
2020-02-28 14:24:09 +01:00
Andrea Catania 33ae58710b Generates the rpc and rset info for exported GDScript.
Improved the send rpc log message when fail.

This work has been kindly sponsored by IMVU.
2020-02-28 12:39:18 +01:00
Rémi Verschelde 005a4b5581
Merge pull request #36622 from Calinou/doc-upnp-duration-unit
Mention the `duration` parameter unit in `UPNP.add_port_mapping()`
2020-02-28 10:05:32 +01:00
Rémi Verschelde 4f64f3401a
Merge pull request #36388 from AndreaCatania/some_renames
Rename Navigation{Mesh,Polygon}Instance and PlaneShape for clarity
2020-02-28 09:15:38 +01:00
Rémi Verschelde 498ab63934
Merge pull request #36623 from Calinou/doc-improve-regex
Improve the RegEx class documentation
2020-02-28 07:35:19 +01:00
Rémi Verschelde 807b511125
Merge pull request #36620 from Calinou/doc-linear2db-example
Add a practical example for `@GDScript.linear2db()`
2020-02-28 07:03:35 +01:00
Rémi Verschelde ec74664af1
Merge pull request #36619 from Calinou/doc-improve-inverse-lerp
Improve the `@GDScript.inverse_lerp()` documentation
2020-02-28 07:02:03 +01:00
Rémi Verschelde b7b3978684
Merge pull request #36556 from RandomShaper/rework_mutex
Reimplement `Mutex` with C++'s `<mutex>` (plus more)
2020-02-28 00:26:01 +01:00
Hugo Locurcio 5b78f5c464
Improve the RegEx class documentation
This closes https://github.com/godotengine/godot-docs/issues/2522.
2020-02-27 23:09:32 +01:00
Hugo Locurcio 810be27c78
Mention the duration parameter unit in UPNP.add_port_mapping() 2020-02-27 23:00:58 +01:00
Hugo Locurcio a6fd6b78dd
Add a practical example for @GDScript.linear2db()
One of its most common applications in games is for volume sliders.

See https://www.dr-lex.be/info-stuff/volumecontrols.html for
more information.
2020-02-27 22:52:21 +01:00
Hugo Locurcio 6b5573700b
Improve the @GDScript.inverse_lerp() documentation
This closes https://github.com/godotengine/godot-docs/issues/2589.
2020-02-27 22:49:05 +01:00
Rémi Verschelde 5c4878191a
Merge pull request #36602 from van800/jetbrains_msbuild
Allow using Rider MSBuild on Windows, when Rider is selected as external editor
2020-02-27 20:46:50 +01:00
Andrea Catania 2e0fb66c6f Renamed PlaneShape to WorldMarginShape 2020-02-27 17:45:16 +01:00
Andrea Catania 3b64ecbc4b Renamed NavigationMeshInstance to NavigationRegion 2020-02-27 17:42:53 +01:00
Ivan Shakhov a9c2ab81cf use Rider MSBuild on Windows, when Rider is selected as external editor 2020-02-27 15:32:35 +01:00
Ivan Shakhov 33af53c1a6 Support toolbox custom "Tools install location", by reading .settings.json 2020-02-27 15:22:12 +01:00
Rémi Verschelde ac446570d6
Merge pull request #36545 from nathanwfranke/syntax-highlight-int-types
Fix autocomplete and highlighting for new integer types
2020-02-27 14:20:10 +01:00
nathanwfranke 2dd498df70 Fix autocomplete and GDScript Highlighting for types
Types include new integer types and others
2020-02-26 16:13:28 -06:00
Rémi Verschelde fde1211771
Merge pull request #33690 from Phischermen/area-enhancement
Bullet: Fix detection of concave shape in Area
2020-02-26 21:51:37 +01:00
Pedro J. Estébanez 18fbdbb456 Reimplement Mutex with C++'s <mutex>
Main:
- It's now implemented thanks to `<mutex>`. No more platform-specific implementations.
- `BinaryMutex` (non-recursive) is added, as an alternative for special cases.
- Doesn't need allocation/deallocation anymore. It can live in the stack and be part of other classes.
- Because of that, it's methods are now `const` and the inner mutex is `mutable` so it can be easily used in `const` contexts.
- A no-op implementation is provided if `NO_THREADS` is defined. No more need to add `#ifdef NO_THREADS` just for this.
- `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`.
- Thread-safe utilities are therefore simpler now.

Misc.:
- `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same.
- Every case of lock, do-something, unlock is replaced by `MutexLock` (complex cases where it's not straightfoward are kept as as explicit lock and unlock).
- `ShaderRD` contained an `std::mutex`, which has been replaced by `Mutex`.
2020-02-26 20:40:10 +01:00
Yuri Roubinsky 9cfd2ed564 Fix resizer icon color in VisualScripts/Shaders when graph headers is on 2020-02-26 17:48:58 +03:00
Rémi Verschelde 3a4c128f07
Merge pull request #36551 from AndreaCatania/navigation_destruction_flush
Flushes commands just before the navigation server is destroyed
2020-02-26 10:09:43 +01:00
Andrea Catania c143b5c677 Flushes commands just before the navigation server is destroyed 2020-02-26 09:42:51 +01:00
Rémi Verschelde c1fe53a933
Merge pull request #36521 from rafaeldelboni/master
Improve LSP completion using scene owner
2020-02-26 08:24:59 +01:00
Rafael Delboni 06bce137e3
Improve LSP completion using scene owner
Fixes: #36473
2020-02-25 23:27:17 -03:00
Rémi Verschelde 2ead439370
Merge pull request #36512 from AndreaCatania/AndreaCatania-patch-2
Fixed remove region method.
2020-02-25 20:11:19 +01:00
Rémi Verschelde 6c8f2ae53a Update docs and bindings for new integer vector types 2020-02-25 15:27:29 +01:00
Juan Linietsky 33b5c57199 Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.
- Renames PackedIntArray to PackedInt32Array.
- Renames PackedFloatArray to PackedFloat32Array.
- Adds PackedInt64Array and PackedFloat64Array.
- Renames Variant::REAL to Variant::FLOAT for consistency.

Packed arrays are for storing large amount of data and creating stuff like
meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of
memory. That said, many users requested the ability to have 64 bits packed
arrays for their games, so this is just an optional added type.

For Variant, the float datatype is always 64 bits, and exposed as `float`.

We still have `real_t` which is the datatype that can change from 32 to 64
bits depending on a compile flag (not entirely working right now, but that's
the idea). It affects math related datatypes and code only.

Neither Variant nor PackedArray make use of real_t, which is only intended
for math precision, so the term is removed from there to keep only float.
2020-02-25 12:55:53 +01:00
bruvzg 1af06d3d46
Rename scancode to keycode.
Add `physical_keycode` (keyboard layout independent keycodes) to InputEventKey and InputMap.
Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes).
2020-02-25 12:30:33 +02:00
Andrea Catania c16711b155
Fixed remove region method. 2020-02-24 18:09:14 +01:00
Phischermen 2c01cf54f8 Enabled concave collision detection with Areas in Bullet. 2020-02-24 07:37:15 -08:00
Rémi Verschelde b9757545ca
Merge pull request #36488 from Chaosus/capsule_y
Changed default capsule axis to vertical
2020-02-24 00:19:21 +01:00
Yuri Roubinsky 3b0638fe1c Changed default capsule axis to vertical
Co-authored-by: Hugo Locurcio <https://hugo.pro>
2020-02-23 23:18:01 +03:00
Oliver Frank ed482f6167 Fix crash after closing a GDScript LSP session 2020-02-23 19:25:41 +00:00
Rémi Verschelde 223c5ef8a3
Merge pull request #36478 from qarmin/supsicious_operators_everywhere
Fix suspicious | and + operators
2020-02-23 10:30:06 +01:00
Rafał Mikrut d0621b954b Fix suspicious | and + operators 2020-02-23 09:28:54 +01:00
Rémi Verschelde bd10c70458
Merge pull request #36461 from akien-mga/c++17-fallthrough-attribute
Replace FALLTHROUGH macro by C++17 [[fallthrough]]
2020-02-23 08:43:18 +01:00