Commit graph

2523 commits

Author SHA1 Message Date
marxin
66a43898d4 Make direct casting among Error and godot_error enums (#23015). 2019-02-18 10:26:22 +01:00
Rémi Verschelde
1ffd1bc8f3 doc: Sync classref with current source 2019-02-18 09:35:29 +01:00
Rémi Verschelde
fd60724c3d
Merge pull request #25715 from hpvb/fix-25598
Add a maximum recusion depth to _guess_expression_type
2019-02-16 14:39:57 +01:00
Ignacio Etcheverry
f5477ee36f
Merge pull request #25917 from neikeq/zz
Mono: Get rid of irrelevant error and fix export template build errors
2019-02-15 20:08:41 +01:00
Ignacio Etcheverry
a8dfe9ff7f Don't print 'Cannot find Mono in the registry' if bundled with Godot
Closes #24753
2019-02-15 19:52:32 +01:00
Ignacio Etcheverry
d17ba9a140 Mono: Fix export template build errors
Fixes #25903
2019-02-15 19:52:22 +01:00
Ignacio Etcheverry
b41a793592 Fix Godot.Reference marshalling from MonoObject* to Variant
Need to cast Ref<T> to Variant instead of constructing Variant from Object*, otherwise the Variant won't hold a reference.
2019-02-14 22:54:15 +01:00
Rémi Verschelde
89ca15693e
Merge pull request #25866 from neikeq/issue-25121
Fix exported property values being lost if base GDScript fails to parse
2019-02-14 09:21:19 +01:00
Ignacio Etcheverry
2f8d1a321a Fix exported property values being lost if base GDScript fails to parse 2019-02-14 02:36:19 +01:00
Rémi Verschelde
5fc86026ca Fix typos with codespell
Using codespell 1.14.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
doubleclick
lod
nd
numer
que
te
unselect
EOF
$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-02-13 09:23:29 +01:00
Rémi Verschelde
55ca2a7c88
Merge pull request #25821 from akien-mga/sync-class-and-filenames
Ensure classes match their header filename
2019-02-13 08:49:39 +01:00
Aaron Franke
f97eb6d881 [Mono] Fix Transform2D rotation and scale 2019-02-12 17:59:29 -05:00
Rémi Verschelde
322fad70bd Fix copyright year in VideoStreamGDNative 2019-02-12 23:05:30 +01:00
Rémi Verschelde
fe7e11e008 Modules: Ensure classes match their header filename
Renamed:
- `modules/mono/mono_gd/gd_mono_class_member.h` -> `i_mono_class_member.h`
- `modules/upnp/upnpdevice.h` -> `upnp_device.h`
- `modules/websocket/websocket_multiplayer.h` -> `websocket_multiplayer_peer.h`
2019-02-12 22:59:56 +01:00
Rémi Verschelde
c5dcbeb160 Scene: Ensure classes match their header filename
Also drop some unused files.

Renamed:
- `scene/2d/navigation2d.h` -> `navigation_2d.h`
- `scene/2d/screen_button.h` -> `touch_screen_button.h`
- `scene/3d/scenario_fx.h` -> `world_environment.h`
- `scene/audio/audio_player.h` -> `audio_stream_player.h`
- `scene/resources/bit_mask.h` -> `bit_map.h`
- `scene/resources/color_ramp.h` -> `gradient.h`
- `scene/resources/shape_line_2d.h` -> `line_shape_2d.h`
- `scene/resources/scene_format_text.h` -> `resource_format_text.h`
- `scene/resources/sky_box.h` -> `sky.h`

Dropped:
- `scene/resources/bounds.h`
2019-02-12 17:21:48 +01:00
Rémi Verschelde
c4835c4345
Merge pull request #25721 from neikeq/ww
Use script instance binding for objects constructed from C#
2019-02-12 15:29:25 +01:00
Rémi Verschelde
75dae1b9a9 Drivers, main, servers: Ensure classes match their header filename
Renamed:
- `drivers/alsamidi/alsa_midi.h` -> `midi_driver_alsamidi.h`
  (same for `coremidi` and `winmidi`)
- `main/timer_sync.h` -> `main_timer_sync.h`
- `servers/visual/visual_server_global.h` -> `visual_server_globals.h`
2019-02-12 14:39:47 +01:00
Rémi Verschelde
b7cc2bb1e2 Core: Ensure classes match their header filename
Also drop some unused files.

Renamed:
- `core/dvector.h` -> `pool_vector.h`
- `core/io/resource_import.h` -> `resource_importer.h`
- `core/sort.h` -> `sort_array.h`
- `core/string_db.h` -> `string_name.h`

Dropped:
- `core/allocators.h`
- `core/os/shell.h`
- `core/variant_construct_string.cpp`
2019-02-12 13:34:25 +01:00
Rémi Verschelde
13c50e8aa5
Merge pull request #25481 from hpvb/fix-ubsan-asan-reports
Fix many asan and ubsan reported issues
2019-02-12 12:21:01 +01:00
Rémi Verschelde
e40395669c
Merge pull request #25550 from DualMatrix/fix-25357
Fixed Null appearing inside export variables with type hints and no default value
2019-02-12 12:01:22 +01:00
Rémi Verschelde
f12b47b65e
Merge pull request #25783 from Xrayez/csg-shapes-visibility
Fix CSGShape not updating on changing visibility
2019-02-12 11:18:25 +01:00
Carter Anderson
22bf89e970 Use "origin" instead of "o" in Transform2D.Rotation 2019-02-11 23:46:55 -08:00
Ignacio Etcheverry
be98a6ebbc
Merge pull request #25724 from aaronfranke/mono-transform
[Mono] Fix Transform2D origin
2019-02-11 22:27:49 +01:00
Ignacio Etcheverry
9115c6ab15
Merge pull request #25803 from neikeq/yy
Windows: Default to system MSBuild and add VSCode hint path
2019-02-11 22:25:11 +01:00
Ignacio Etcheverry
da00c338a3 Add VSCode hint path for Windows 2019-02-11 22:03:51 +01:00
Ignacio Etcheverry
9a08b90472 Default to MSBuild from VS Build Tools instead of Mono's
Don't pass FrameworkPathOverride to MSBuild. It's causing issues with some nuget packages.
2019-02-11 22:03:37 +01:00
Andrii Doroshenko (Xrayez)
095f472a0b Fix CSGShape not updating on changing visibility
Hiding CSGShape should force the CSG operation to skip it which is intented
behaviour according to how CSGBrush is created for each shape.
2019-02-10 23:53:31 +02:00
Ignacio Etcheverry
eda4be193f
Merge pull request #25773 from neikeq/xx
Do not initialize Mono if 'res://.mono/' and mscorlib are missing
2019-02-10 19:08:28 +01:00
Ignacio Etcheverry
3afd9deded
Merge pull request #25774 from neikeq/fix-noreturn-attr-check
Fix check to determine if [[noreturn]] attribute is usable
2019-02-10 19:08:15 +01:00
Ignacio Etcheverry
b67955afca Fix check to determine if [[noreturn]] attribute is usable 2019-02-10 18:45:18 +01:00
Ignacio Etcheverry
7f596270f3 Fix exporting assemblies from wrong output path
This is the whole reason 'fill_search_dirs' was added for, yet somehow I forgot to pass the config parameter.
2019-02-10 18:37:42 +01:00
Ignacio Etcheverry
24a2ae7f3c Do not initialize Mono if 'res://.mono/' and mscorlib are missing
This is needed to avoid aborting due to missing mscorlib for projects that do not use C#.
If 'res://.mono/' exists, then we assume the project uses C#, in which case a missing mscorlib should still abort.
2019-02-10 18:34:37 +01:00
Rémi Verschelde
f614f15506 doc: Misc formatting fixes 2019-02-10 13:30:48 +01:00
Rémi Verschelde
74932b905e doc: Sync classref with current source 2019-02-10 13:01:03 +01:00
Aaron Franke
25a90bcf1a [Mono] Fix Transform2D origin 2019-02-09 14:56:14 -05:00
Aaron Franke
3f837d5cc5 [Core] Rename Matrix3 file to Basis
The code already referred to "Basis", it's just the file name that was different for some reason.
2019-02-09 14:42:23 -05:00
Rémi Verschelde
2a0c9faac2
Merge pull request #25614 from QbieShay/issue_25425
Fix generating GDNative API struct for 1.1
2019-02-09 13:09:13 +01:00
Rémi Verschelde
6c243326bd
Merge pull request #25650 from willnationsdev/script-icon
Fix script class icons looking for paths at runtime
2019-02-09 12:22:51 +01:00
Ignacio Etcheverry
9df44c2d2c Use script instance binding for objects constructed from C#
Only possible if the object class is a "native type". If the object class is a user class (that derives a "native type") then a script is needed.
Since CSharpLanguage does cleanup of script instance bindings when finished, cases like #25621 will no longer cause problems.

Fixed ~Object() trying to free script instance bindings after the language has already been removed, which would result in a NULL dereference.
2019-02-09 00:32:18 +01:00
Ignacio Etcheverry
5f8c30fbca Mono: Create player script metadata when building manually
Previously this was only done when building the script for running the game. This was a problem because the user could want to build the project manually with the "Build project" button, to then run the game from the command line or similar.
2019-02-08 22:49:27 +01:00
Hein-Pieter van Braam
e937e74b69 Add a maximum recusion depth to _guess_expression_type
When a recursive declaration ends up in a GDScript file the
_guess_expression_type function would start looping and eventually run
out of stack space.

We now cap recusion for this function to 100 frames.

This fixes #25598
2019-02-08 22:39:08 +01:00
Karroffel
682bc07035 Fix generating GDNative API struct for 1.1
Fixes #25425.
2019-02-08 19:28:40 +01:00
Rémi Verschelde
9dcbf961e5
Merge pull request #25500 from daniel-abbott/BT_Debug_disable
Disable BT_DEBUG, works around #25476 and #25431
2019-02-08 12:02:09 +01:00
Rémi Verschelde
7fcdadadf4
Merge pull request #25518 from bojidar-bg/25505-wrong-type-error-message
Fix wrong error messages for invalid arguments when calling functions through call
2019-02-08 11:18:30 +01:00
Daniel Abbott
b3c0cb08b0 Disable BT_DEBUG, works around #25476 and #25431 2019-02-08 11:11:01 +01:00
Will Nations
c4ff433b17 Fix script class icon filepath lookups at runtime. 2019-02-06 16:17:56 -06:00
Ignacio Etcheverry
4aa4916b11 Mono: Workaround to fix 'flushing' errors when building at editor startup 2019-02-05 18:51:24 +01:00
Ignacio Etcheverry
919fa75803
Merge pull request #25574 from neikeq/ss
Mono: Lifetime fixes for CSharpInstance and instance binding data
2019-02-03 07:36:33 +01:00
Ignacio Etcheverry
d8593747e0 Mono: Fix default debugger agent argument never being used 2019-02-03 06:51:07 +01:00
Ignacio Etcheverry
3233083f63 Mono: Lifetime fixes for CSharpInstance and instance binding data
Avoid CSharpInstance from accessing its state after self destructing (by deleting the Reference owner).
It's now safe to replace the script instance without leaking or crashing.

Also fixed godot_icall_Object_weakref return reference being freed before returning.
2019-02-03 06:47:25 +01:00
Ignacio Etcheverry
4e4e889c75
Merge pull request #25478 from neikeq/rr
Mono: Fix MonoPosixHelper not being found
2019-02-03 06:31:52 +01:00
Ignacio Etcheverry
065828d159 Mono: Fix MonoPosixHelper not being found 2019-02-03 05:38:47 +01:00
Ignacio Etcheverry
d3c51a5dfb Mono: Cleanup 2019-02-03 05:38:40 +01:00
DualMatrix
ff508dfede Fixed Null appearing inside export variables with type hints and no default value
The default value of the type is now used to initialise it.

export(int) A

Will now have A be 0 istead of Null even though it still showed as 0 before in the inspector, fixes #25357
2019-02-01 21:18:14 +01:00
Bojidar Marinov
d2e43475b5
Fix wrong error messages for invalid arguments when calling functions through call
Fixes #25505
2019-01-31 17:02:18 +02:00
Andrea Catania
5a26c7e0e5 Avoid inertia calculation for empty shape - Bullet 2019-01-30 10:33:33 +01:00
Hein-Pieter van Braam
d308eb091a Fix many asan and ubsan reported issues
This allows most demos to run without any ubsan or asan errors. There
are still some things in thirdpart/ and some things in AudioServer that
needs a look but this fixes a lot of issues. This should help debug less
obvious issues, hopefully.

This fixes #25217 and fixes #25218
2019-01-30 06:43:56 +01:00
Rémi Verschelde
cc0842f9a6 Prevent upscaled SVG from exceeding Image bounds
Also expose Image MAX_WIDTH and MAX_HEIGHT.

Fixes #24455.
2019-01-28 16:00:15 +01:00
Rémi Verschelde
7fe66bc70f
Merge pull request #25401 from capnm/capnm-cleanup
Cleanup unused header file
2019-01-28 09:53:16 +01:00
Rémi Verschelde
de1c3f3c89
Merge pull request #25379 from Faless/net/ws/mp_docs
Update docs and errors for WebSocket module
2019-01-28 09:35:05 +01:00
Andrea Catania
8d4617439c Fixed Rigidbody first frame center spawn 2019-01-28 08:30:26 +01:00
Martin Capitanio
e07e154ebf Cleanup unused header 2019-01-28 06:29:39 +01:00
Fabio Alessandrelli
14e59ff112 Update docs and errors for WebSocket module 2019-01-28 02:12:50 +01:00
Juan Linietsky
0d438c7b18 Make CSG Shape work with GIProbe, fixes #20465 2019-01-27 18:29:17 -03:00
Rémi Verschelde
d0f289b0d9
Merge pull request #25314 from marxin/fix-24417-class-memaccess
Fix class memaccess
2019-01-27 21:32:26 +01:00
Rémi Verschelde
57c0082533 Mono: Test Windows binaries with lowercase extension
To help users writing good cross-platform code, Godot's
`FileAccessWindows:open()` will issue a warning on case mismatch, which
happens here with capitalized extensions given by `PATHEXT` compared to
actual file extensions which are lowercase 99% of the time.

Fixes #25368.
2019-01-27 11:54:32 +01:00
Rémi Verschelde
3e78a55e14 Bullet: Enable BT_DEBUG on debug builds
Fixes #25301.
2019-01-27 11:08:01 +01:00
Rémi Verschelde
2211d73300 Workaround GCC 6 & 7 ICE on armv7hl
Fixes #16100.
2019-01-26 14:37:36 +01:00
Juan Linietsky
6504b88547 Ensure get script method list also checks base classes, fixes #23384 2019-01-25 10:09:44 -03:00
marxin
32713e60ab Use placement new in texture_loader_pvr.cpp (#24417).
Use constructor via placement new and swap colors directly.
2019-01-25 12:41:54 +01:00
George Marques
587c1c90cf GDScript: do second pass of parsing on release
Some construct (like match) actually depends on the second pass. This
adds some extra checks to not perform specific type-checks on release
since not all type information is available.
2019-01-23 18:45:33 -02:00
George Marques
8464cce857 GDScript: fix default value for autoexported typed vars 2019-01-23 18:06:58 -02:00
George Marques
f439397126 GDScript: read constants from parent scripts
This is needed to create export variables from enums defined in a parent
class.
2019-01-23 17:42:06 -02:00
George Marques
f4546fc0cd GDScript: don't allow calling non-static function from script 2019-01-23 17:42:06 -02:00
George Marques
ba13aae9af GDScript: allow local classes to be used as types 2019-01-23 17:42:06 -02:00
Allan Daemon
465842d8ea Fix #24895 (support for optional parameters in setters) 2019-01-23 14:01:49 -02:00
Ignacio Etcheverry
bc8b61bb06 Mono: Fix hot reload build errors and cleanup 2019-01-22 18:33:36 +01:00
Ignacio Etcheverry
077e489773 Mono: Add assembly reloading to running games
Add environment variable to specify a custom --debugger-agent for mono.
2019-01-21 22:44:09 +01:00
Rémi Verschelde
a0730652fc
Merge pull request #25180 from AndreaCatania/arov
Fixed area overlaps if not move
2019-01-21 10:39:41 +01:00
Andrea Catania
a9214bcee7 Fixed area overlaps if not move 2019-01-21 08:30:49 +01:00
Ignacio Etcheverry
0ac5be8368 Fix C# script metadata creation error due to missing directory 2019-01-21 00:57:03 +01:00
Ignacio Etcheverry
ca8100f29f Workaround for bug with Mono's MSBuild and BaseIntermediateOutputPath
BaseIntermediateOutputPath seems to be empty by default. The workaround is to explicitly set it.

Also fixed passing char instead of char[] to String.Split. Why was this even working with Mono?
2019-01-21 00:38:28 +01:00
Rémi Verschelde
d024979e84 GDScript: Fix return value of "lerp" builtin
Fixes #25082, fixes #24709.
2019-01-18 10:47:04 +01:00
Ignacio Etcheverry
ce36351065
Merge pull request #25080 from neikeq/mm-c
C# Bindings Generator: Fix vararg methods with custom return type
2019-01-18 01:30:43 +01:00
Ignacio Etcheverry
e8a1d4babd
Merge pull request #25079 from neikeq/mm-b
C#: Fix trying to build when there's no solution
2019-01-18 01:23:15 +01:00
Ignacio Etcheverry
938a2515cb
Merge pull request #25078 from neikeq/mm-a
C#: Fix crash due to missing gchandle ref null check
2019-01-18 01:19:51 +01:00
Ignacio Etcheverry
8f26c54c40 C# Bindings Generator: Fix vararg methods with custom return type 2019-01-18 01:03:44 +01:00
Ignacio Etcheverry
9cd24b4f6d C#: Fix trying to build when there's no solution
This would cause errors that shouldn't happen unless there was something to build.
2019-01-18 01:03:15 +01:00
Ignacio Etcheverry
b48dd1bdaf C#: Fix crash due to missing gchandle ref null check 2019-01-17 23:15:20 +01:00
Hein-Pieter van Braam
f958ba5abc
Merge pull request #25069 from vnen/gdscript-fixes
A bit more of GDScript fixes
2019-01-17 18:54:42 +01:00
George Marques
30f02dd421 GDScript compiler: check if subclass exists before comparison
Otherwise these checks might trigger the insertion of an empty value,
leading to crashes.
2019-01-17 14:38:28 -02:00
George Marques
ced9fcafd4 GDScript: clarify error message about cycles
They may happen with any cyclic dependency, not only with inheritance.
2019-01-16 16:39:44 -02:00
George Marques
20e6ff263a GDScript: fix type-check of indexed values 2019-01-16 16:02:56 -02:00
Rémi Verschelde
b910b22d74
Merge pull request #25001 from jlahman/gdscript-export-var-fix
Fixes export PackedScene "reset to default" throwing errors
2019-01-16 13:17:53 +01:00
Rémi Verschelde
7f4ee36469 Android: Add support for x86_64 architecture
Like arm64v8, this is only supported by API 21 and later,
so we enforce 21 as min API for x86_64.

Part of #25030.
2019-01-16 11:39:39 +01:00
Rémi Verschelde
f0893235a5
Merge pull request #25032 from akien-mga/static-analysis
Fix some errors found by static analysis
2019-01-16 11:18:53 +01:00
Rémi Verschelde
053d7f3765 Fix some errors found by static analysis
Fixes items 10, 16 and 19 from PVS-Studio blog post
in #24014.
2019-01-16 10:59:45 +01:00
jlahman
6661ceadcc Fixes export PackedScene "reset to default" throwing errors
When exporting variables from a gdscript, default values of uninitialized variables would never be set. This caused the default value to be Variant::NIL, and when a user tried to reset the variable through the editor, an error would be thrown because too few arguments would be counted(end of argument list for calls are detected by NIL values).

Fixed by simply setting default value to an empty variant of the proper type in gdscript parser.
2019-01-15 22:20:36 -05:00
George Marques
31433ae8e4 GDScript: check for underscore prefix when type-checking
Some classes are represented internally with an underscore prefix, so we
need to make sure we match this representation when type-checking,
otherwise the check might fail on a valid scenario.
2019-01-15 19:50:48 -02:00
George Marques
4f72c6be8a GDScript: consider constructors as always existing
There's always a constructor, even if implicit, especially for native
types.

Also don't check for signature match on function call, since this
information is not available in release builds.
2019-01-15 19:15:19 -02:00