Commit Graph

2715 Commits

Author SHA1 Message Date
hbina085 8c2e10c393 Many fallthrough switch cases now have the FALLTHROUGH macro to tell the compiler that this is intended.
(cherry picked from commit 9f0c6a6009)
2019-09-24 09:00:45 +02:00
Rémi Verschelde fc18d637a8 Fix -Wimplicit-fallthrough warnings from GCC 8
Adds `FALLTHROUGH` macro to specify when a fallthrough is intentional.
Can be replaced by `[[fallthrough]]` if/when we switch to C++17.

The warning is now enabled by default for GCC on `extra` warnings level
(part of GCC's `-Wextra`). It's not enabled in Clang's `-Wextra` yet,
but we could enable it manually once we switch to C++11. There's no
equivalent feature in MSVC for now.

Fixes #26135.

(cherry picked from commit fc370b3feb)
2019-09-24 09:00:45 +02:00
qarmin 3b703d6707 Small fixes, mostly dupicated code
(cherry picked from commit 856a8226a5)
2019-09-24 09:00:45 +02:00
Aaron Franke 3a7aa3a0e4
[3.1] [Mono] Make all structs serializable
Manually cherrypicked from https://github.com/godotengine/godot/pull/31191
2019-08-19 19:23:18 -04:00
Aaron Franke 329817edad
[3.1] [Mono] Backport gitignore files
This avoids seeing files generated on master when switching to the 3.1 branch.
2019-08-19 19:19:21 -04:00
Rémi Verschelde a5082c010a doc: Fix invalid tags or properties introduced in recent cherry-picks 2019-07-29 17:55:20 +02:00
Michael Alexsander Silva Dias eef5dc98fa Update some dead links in the codebase
(cherry picked from commit 12ae7a4c02)
2019-07-29 17:47:46 +02:00
Remi Rampin 417f223e63 DOC: Fix spelling
See also https://github.com/godotengine/godot-docs/pull/2595

(cherry picked from commit ddfd67401f)
2019-07-29 17:47:46 +02:00
tree786 37e9ec842c doc: UPNP: Add example on how to open/close a port
I have added a small code sample to show how to automate the process of port forwarding (and closing after you are done).
Thanks to @mhilbrunner for explaining how to achieve t0his (see #18780)

(cherry picked from commit 2a63853720)
2019-07-29 17:47:46 +02:00
Rémi Verschelde 383c678a1e doc: Replace all [code]CONSTANT[/code] by new [constant CONSTANT] hyperlinks
(cherry picked from commit bc82781f7d)
2019-07-29 17:32:54 +02:00
Rémi Verschelde 7a97fd99c7 Properly expose all Error constants to scripting languages
(cherry picked from commit 1bf448dd87)
2019-07-29 17:32:54 +02:00
Rémi Verschelde 755896b036 doc: Complete and harmonize all _MAX constant descriptions
(cherry picked from commit 86ed7a9884)
2019-07-29 17:32:53 +02:00
Chaosus 67efb30f2a Extends wrapi/wrapf docs
(cherry picked from commit 4c137bebe8)
2019-07-29 16:17:43 +02:00
Rémi Verschelde 0893bb9a02 doc: Improve docs for Resource* classes
Also move module-specific classes to their own module's `doc_classes`
folder.

(cherry picked from commit 0764451dc5)
2019-07-29 16:05:01 +02:00
Tomasz Chabora dea5dafea5 Consistently wrap booleans in [code]
(cherry picked from commit b0846f60c9)
2019-07-29 14:54:32 +02:00
Rémi Verschelde df6a6a2004 doc: Sync classref with current source 2019-07-05 11:34:47 +02:00
Fabio Alessandrelli a24e681e1c Fix ENet incorrectly binding to wildcard.
Values were not properly initialized, and wildcard would evaluate to
true in most cases.

(cherry picked from commit abe2c22966)
2019-07-03 16:32:41 +02:00
hilfazer c7551515e3 autocomplete for enum values
(cherry picked from commit ca1932636f)
2019-06-27 09:59:58 +02:00
Aaron Franke a51257e2b7
[Mono] Change Atan2 arguments to Y X 2019-06-09 04:15:32 -04:00
Rémi Verschelde 5f683f7c17 SCons: Clean xatlas SCsub from thekla/poshlib defines
Those are not used in xatlas.

(cherry picked from commit eb155bc91a)
2019-06-04 11:11:21 +02:00
Fabio Alessandrelli 0e6a49a5bc Freetype clone env for no-SMID single file
Fix freetype build issue for javascript platform.
When disabling optimizations (SMID) in specific freetype, source files,
we need to make sure to copy all other CPPFLAGS, not just override them.

(cherry picked from commit 4f9408a0f8)
2019-06-04 11:08:40 +02:00
Fabio Alessandrelli 20a37529f5 Revert "Update libwebsockets to 3.1 (plus UWP patch)"
This reverts commit 90210c4862.

(cherry picked from commit be414e4476)
2019-06-04 11:05:33 +02:00
Rémi Verschelde f156b2e1cd doc: Make all tutorial links track "3.1" in 3.1 branch
See discussion in #29104.
2019-06-01 11:39:37 +02:00
Ryan Stein a31bbb4bd9 Add RegEx substitution testcase and fix relevant docs 2019-05-09 11:11:53 -04:00
Bastiaan Olij b2b112d703 Sort data exported to the api.json file for GDNative
(cherry picked from commit 0d2f3f4f50)
2019-05-02 14:40:03 +02:00
Ignacio Etcheverry 1c77481d3e Fix invalid mono log file name on Windows
(cherry picked from commit d93c354807)
2019-04-26 16:31:01 +02:00
Rémi Verschelde a24899ee25 Revert "Update freetype to 2.10.0"
This reverts commit 9e2cf9ef0b.

It caused this regression: 28335.
Fixes #28335.
2019-04-25 14:18:42 +02:00
Rémi Verschelde f7d5bee636 Revert "C#: Add DynamicGodotObject class"
This reverts commit 4c10a322d1.
2019-04-25 14:08:14 +02:00
Rémi Verschelde a485d862f1 doc: Sync classref with current source 2019-04-25 14:00:31 +02:00
Ignacio Etcheverry 39f1a110a1 Fix wrong method binds and registered class
(cherry picked from commit 2f3328a039)
2019-04-22 21:57:06 +02:00
Rémi Verschelde cab4921477 Revert "GDScript: Don't allow built-in scripts to use class_name"
This reverts commit 42514bfd80.

There is still an unsolved regression from this commit (#28002)
which needs to be addressed before cherry-picking this one.
2019-04-21 14:06:06 +02:00
Chaosus 6ab01490f5 Added smoothstep built-in function
(cherry picked from commit 514a3fb96a)
2019-04-20 23:30:56 +02:00
Chaosus 340bf6e80c Added direction_to method to vectors
(cherry picked from commit 55f3bd97a2)
2019-04-20 23:24:35 +02:00
Fabio Alessandrelli e0fe795433 Add object encoding param to serialization methods
Network peers get_var/put_var
File get_var/store_var
GDScript/Mono/VisualScript bytes2var/var2bytes
Add MultiplayerAPI.allow_object_decoding member which deprecates PacketPeer.allow_object_decoding.

Break ABI compatibaility (API compatibility for GDNative).

(cherry picked from commit 393e62b98a)
2019-04-20 23:15:02 +02:00
Ignacio Etcheverry 9b65bd18bc Fix memory leak introduced in bb6814a
(cherry picked from commit 0338e55a6e)
2019-04-20 23:10:55 +02:00
Ignacio Etcheverry 4c10a322d1 C#: Add DynamicGodotObject class
Expands to Object.call, Object.set and Object.get for accessing members. This means it can also access members from scripts written in other languages, like GDScript.

(cherry picked from commit bb6814aef0)
2019-04-20 23:10:43 +02:00
Ignacio Etcheverry 17cb8878c7 Workaround for syntax highlighting issue in GitHub
(cherry picked from commit 7a4cf6339d)
2019-04-20 23:01:08 +02:00
ForLoveOfCats 24ac1439e8 Mono: Convert all items to string before printing
(cherry picked from commit 25f563c4c8)
2019-04-20 23:00:21 +02:00
Nuno Cardoso fce901ce40 Fixes #17233 allowing C# to override _GetPropertyList
(cherry picked from commit d011c8e109)
2019-04-20 22:56:42 +02:00
Ignacio Etcheverry c7e5b371be Mono: Logging improvements
- The default log level in debug builds is now 'info' instead of 'debug'.
- Add option to specify a different log level with the 'GODOT_MONO_LOG_LEVEL' environment variable.
- The name of log files is now a readable date and time.
- Always print the log file path (previously it was printed only it in verbose mode).

(cherry picked from commit 20e5e2fec7)
2019-04-20 22:49:26 +02:00
volzhs 9e2cf9ef0b Update freetype to 2.10.0
(cherry picked from commit a6300b454d)
2019-04-20 22:42:45 +02:00
George Marques 42514bfd80 GDScript: Don't allow built-in scripts to use class_name
(cherry picked from commit e56f5d5c91)
2019-04-20 22:36:34 +02:00
Bojidar Marinov 667dc0b336 Check for subclasses when checking for name clashes
Fixes #27460

(cherry picked from commit ece09f9872)
2019-04-20 22:35:30 +02:00
Ignacio Etcheverry 852997e446 Mono: Use exit(status) instead of abort() in exception hook
(cherry picked from commit 8759c0e31a)
2019-04-20 20:30:06 +02:00
Bastiaan Olij 2020f43261 Added eye_height, changed description and fixed size of viewport issue
(cherry picked from commit e0b703e3fe)
2019-04-20 20:21:02 +02:00
Hendrikto 456eb53439 Remove unused imports
(cherry picked from commit 49a81308c0)
2019-04-20 20:15:44 +02:00
Ignacio Etcheverry 3445984901 Replace a few #if/#elif with #ifdef and "#elif defined"
(cherry picked from commit ad2127a3e8)
2019-04-20 20:13:07 +02:00
Hugo Locurcio bd2e707e2f Add support for type hints in non-default script editor templates
This also refactors template processing to avoid repetition.

This closes #27074.

(cherry picked from commit 00799fc8c2)
2019-04-20 20:12:53 +02:00
Vivatchai Kaveeta 59b2f02ac7 Fix import grayscale EXR
Fix #27299

(cherry picked from commit f0562a5ef6)
2019-04-20 20:08:09 +02:00
Timo Schwarzer e31d6367ea Allow whitespaces in warning-ignore comments
(cherry picked from commit 7a0dfc04aa)
2019-04-20 20:05:25 +02:00
Rémi Verschelde a29700e034 xatlas: Revert to unmodified upstream code, add to COPYRIGHT
Imported by @reduz from b8ec29b6b6
Custom changes will be remade properly in the next commit.

(cherry picked from commit 1e39fee140)
2019-04-19 13:11:58 +02:00
Rémi Verschelde def0820385 Drop unused thekla_atlas dependency
Since f12cb82 @reduz dropped the use of the thirdparty thekla_atlas
library, which is replaced by xatlas.

Fixes #28180.
Fixes #28182.

(cherry picked from commit 6640f397f1)
2019-04-19 13:11:13 +02:00
Rémi Verschelde 53d73f59eb doc: Drop unused <demos> tag
(cherry picked from commit 6af69f851a)
2019-04-19 13:10:25 +02:00
Bastiaan Olij 6226be9595 Fix where json exported empty types 2019-04-07 17:33:35 +10:00
Ignacio Etcheverry b836420fd8 Mono: Buildsystem support for finding MSBuild from VS2019
(cherry picked from commit e82b2def8e)
2019-04-06 21:20:19 +02:00
ForLoveOfCats 37e62939e0 Mono: Make missing default constructor error more foolproof
(cherry picked from commit 444242a080)
2019-04-06 21:19:57 +02:00
ForLoveOfCats 276cd771f9 Mono: Makes GD.Convert take Variant.Type instead of int
(cherry picked from commit 46e79e6fad)
2019-04-06 21:19:36 +02:00
Marc Gilleron c94e80a0a3 Fix wrong heights data used to compute min and max heights
(cherry picked from commit cdcdba704b)
2019-04-06 21:19:24 +02:00
Rémi Verschelde 2ad86122ac SCons: Fix OPUS_ARM_OPT flag applied for all android/iphone arches
The first 'if' always evaluated to true, as it evaluated values which are the default
ones for Android and iOS respectively, so even if one of them was overridden, the other
one would be true.

Fixes #27658.

(cherry picked from commit c2fb1c9f01)
2019-04-04 12:41:25 +02:00
Leonard 929e3595c8 Apply proper offset to CSGMesh material and smooth group
(cherry picked from commit 209c2d2c80)
2019-04-03 16:59:48 +02:00
marxin e3ae29e666 Enable warnings=extra on clang and GCC testers.
And remove 2 warnings from warnings=extra.

(cherry picked from commit e7f22ebdcd)
2019-04-03 16:52:01 +02:00
Daniel Spaniol 044ec35f62 Require `return` in all match branches
Before the parser only checked if the catch-all branch has a return in
order to determine if the entire match block has a return.

This code block was assumed to always return.

    match value:
        "test":
            print("test")
        _:
            return

Now as soon as one of the branches has no return, the entire match block
is marked to not have a return.

(cherry picked from commit 79176decd5)
2019-04-03 16:51:43 +02:00
Ignacio Etcheverry e3e33daeb9 C#: Bindings generator now translates BBCode docs to XML comments
(cherry picked from commit 1ad16b3d4a)
2019-04-01 11:24:49 +02:00
thomas.herzog 3e0fc6906e [GDNative] fix NativeScript leak in editor
(cherry picked from commit 5fff7f741a)
2019-04-01 11:23:31 +02:00
thomas.herzog cf8bd34941 [GDNative] remove spam at editor unfocus when using NativeScript
(cherry picked from commit 0e5b2b16ed)
2019-04-01 11:23:26 +02:00
Sebastian Hartte 08f3562fd1 Add support for new MSBuild directory naming introduced in VS 2019.
(cherry picked from commit 7440295ad1)
2019-04-01 11:22:47 +02:00
Sebastian Hartte c7c8c0700f Fix parsing of generic type declarations in C# source files.
(cherry picked from commit 34366bc27f)
2019-04-01 11:21:07 +02:00
karroffel 03d00ca36b fix GDNative binding generation for object types
(cherry picked from commit 197d642014)
2019-04-01 11:18:51 +02:00
Bojidar Marinov 08b685ab61 Add search box and size slider to GridMap (similar to TileMap's)
Closes #21536

(cherry picked from commit a9ac4c012c)
2019-04-01 11:07:50 +02:00
Bojidar Marinov 0d8492cf9e Fix duplicated lines in GDScript bytecode
Fixes #26789

(cherry picked from commit b64f9f03f8)
2019-03-16 10:42:28 -07:00
Ignacio Etcheverry 57f19fd8ee C#: Update exports only in the editor
(cherry picked from commit 5e354162f1)
2019-03-13 20:07:29 +01:00
Rémi Verschelde 4326fd5a7e Mono: Update welcome message with current state 2019-03-12 19:35:02 +01:00
Rémi Verschelde 6d86450a83
Merge pull request #26941 from JFonS/add_gizmos_priority
Add priority to gizmos and fix small issues
2019-03-12 01:19:39 +01:00
JFonS 2658e5d03d Add priority to gizmos and fix small issues
User defined gizmos will haave higher preference than editor gizmos by
default. Also fixed some inconsistencies in the gizmos menu when using
custom gizmos.
2019-03-12 00:30:50 +01:00
Anish bd22b1cbe6 Fixes segfault on opening incompatible files.
If a file cannot be opened by the plugin connected, the engine
would crash. This has been fixed by quitting the open_file() method
early.
2019-03-11 16:41:30 +05:30
Ignacio Etcheverry e9e7aab8eb Mono: Some assembly referencing changes and cleanup
Apparently we don't need to call mono_debug_close_image ourselves and we can call mono_image_close right away as it's not our duty to keep that reference.
2019-03-10 18:55:31 +01:00
Ignacio Etcheverry 4299332ecc Mono: Fix assemblies path String incorrectly constructed from utf8
Also fixed a wrong ifdef that was causing Mono to never be initialized if mscorlib was not found (which was the case with the utf8 assemblies path bug this commit fixes).
This condition was meant for exported projects only, not for the editor only.
2019-03-09 23:00:03 +01:00
karroffel 9786b51601 [GDNative] fix crash at shutdown when using singleton libraries and NativeScript
When a singleton library was exposing NativeScript functionality,
the NativeScriptLanguage would attempt to terminate the library at
shutdown.

Since the GDNative module itself handles singleton libraries,
it closes all singleton libraries at shutdown as well. This double free
could cause a crash, since the library referenced would no longer be alive.
2019-03-09 18:01:08 +01:00
Hugo Locurcio 5a574a4f29
Fix typo in GDScript narrowing conversion warning message
This closes #26790.
2019-03-08 14:28:33 +01:00
Ignacio Roldán Etcheverry 65487ed4ed
Merge pull request #26746 from shartte/godot-trace-listener
Add a custom TraceListener on Startup for Mono
2019-03-08 07:05:41 +01:00
Ignacio Etcheverry a4825c2f8b Fix CSharpInstance::set not working with base classes 2019-03-08 00:12:19 +01:00
Rémi Verschelde 6ee3002237
Merge pull request #26773 from neikeq/issue-26628
Mono: Fix crash with exported field of custom Reference derived type
2019-03-07 22:54:03 +01:00
Ignacio Etcheverry c5f8b0960a Mono: Fix crash with exported field of custom Reference derived type 2019-03-07 22:38:31 +01:00
Ignacio Etcheverry 17a55861f1
Merge pull request #26770 from neikeq/issue-26675
Mono: Partially implement some Godot debug api functions
2019-03-07 22:00:59 +01:00
Ignacio Etcheverry 47407ba2df
Merge pull request #26761 from Chaosus/fix_mono_wrap
Fix division by zero at wrap functions in mono
2019-03-07 21:34:03 +01:00
Ignacio Etcheverry 8e2e0795bb Mono: Partially implement some Godot debug api functions
Debug breaks sent with debug_break and debug_break_parse should display correctly in the Godot debugger now.
2019-03-07 21:02:57 +01:00
Sebastian Hartte 37d448fca7 Added a Godot TraceListener, which is automatically installed on startup. Fixes that Debug/Trace Assertions are simply swallowed by Godot. 2019-03-07 21:00:19 +01:00
Chaosus 752055ccba Fix division by zero at wrap functions in mono 2019-03-07 22:57:12 +03:00
Ignacio Etcheverry 4c0b0a6bdd
Merge pull request #26765 from neikeq/issue-25959
Mono: Fix crash when re-using script binding after domain reloading
2019-03-07 20:50:37 +01:00
Ignacio Etcheverry e904f814c8 Mono: Fix crash when re-using script binding after domain reloading 2019-03-07 19:55:40 +01:00
Sebastian Hartte f8a6a6c8a2 Update scripts exports even when normal script instances are created to better support tool scripts with exported variables. 2019-03-07 18:52:43 +01:00
Rémi Verschelde 8f5d9b6391 doc: Sync classref with current source 2019-03-07 10:54:42 +01:00
Anish 978c2a604a Fixed crash on loading GDNative videos.
Fixed issue with loading a resource supported by the gdnative videodecoders
that does not exist.
2019-03-06 22:56:36 +01:00
Rémi Verschelde 64923ff277
Merge pull request #26713 from neikeq/print-msbuild-command
Print MSBuild command if also printing output
2019-03-06 18:22:57 +01:00
Rémi Verschelde c67e9a4dd4
Merge pull request #26665 from bojidar-bg/19704-singleton-constants
Fix enums coming from other classes without preload
2019-03-06 18:20:48 +01:00
Ignacio Etcheverry 0b68677112 Print MSBuild command if also printing output 2019-03-06 17:10:14 +01:00
Ignacio Etcheverry db7928849b
Merge pull request #26712 from neikeq/issue-26681
Mono: Make 'Build' button generate solution if it doesn't exist
2019-03-06 16:54:51 +01:00
Ignacio Etcheverry c97db904a0 Mono: Make 'Build' button generate solution if it doesn't exist 2019-03-06 16:36:53 +01:00
Rémi Verschelde 97774f6f69
Merge pull request #26688 from Faless/net/lws_3.1
Update libwebsockets to 3.1, fix IPv6 issues
2019-03-06 14:47:37 +01:00
Fabio Alessandrelli 90210c4862 Update libwebsockets to 3.1 (plus UWP patch) 2019-03-06 02:02:52 +01:00