Commit graph

3551 commits

Author SHA1 Message Date
jcgollnick
3347cc25b8 Fix SGN macro
This version behaves the way the documentation states: 0 values will resolve to 0 instead of +1
2020-11-27 13:02:12 -06:00
Eric M
3528b29669 Removed references to 'registering_order', as it was unused. 2020-11-26 15:37:40 +10:00
Rémi Verschelde
ff790796af
Merge pull request #43864 from vnen/fix-print-utilities
Fix prints and printt functions printing as errors
2020-11-25 23:07:52 +01:00
George Marques
40b683f8bb
Fix prints and printt functions printing as errors 2020-11-25 16:18:41 -03:00
Rémi Verschelde
d76806d322
Core: Always enable ptrcall, remove PTRCALL_ENABLED define
ptrcall is now also used to optimize calls in GDScript, on top of the existing
use by the GDNative and Mono modules.

It no longer makes sense to make it optional.
2020-11-25 14:08:17 +01:00
Rémi Verschelde
32b31a5fa4
Merge pull request #43730 from qarmin/core_drivers_default_values
Initialize class/struct variables with default values in core/ and drivers/
2020-11-24 13:00:27 +01:00
Rafał Mikrut
7bd03b7188 Initialize class/struct variables with default values in core/ and drivers/ 2020-11-23 17:38:46 +01:00
PouleyKetchoupp
d346c30269 Fix DebuggerMarshalls errors while profiling
Fixed check for array size before func_size: when func_size is 0 there's
only 1 entry left and not 3.
2020-11-23 07:59:56 -07:00
Pedro J. Estébanez
e79162ec4e Make warning about Reference singletons more accurate 2020-11-23 10:42:44 +01:00
Rémi Verschelde
ba989a1d39
Merge pull request #43627 from aaronfranke/pixelvi
Use Vector2i instead of Vector2 for Image get_pixelv and set_pixelv
2020-11-23 10:04:49 +01:00
Rémi Verschelde
4ed42bfc29
Merge pull request #43725 from vnen/gdscript-typed-vm-2
GDScript: Typed VM Take 2
2020-11-23 09:59:20 +01:00
George Marques
15b085e8db
Add extra functions to VariantInternal
- Allow getting an opaque pointer, no matter the type (for ptrcall).
- Allow setting object pointer and id directly.
- Allow initializing the data given a type, to allow properly setting
  return types on ptrcalls.
2020-11-21 13:24:49 -03:00
Aaron Franke
2c53e8b0e9
Use Vector2i instead of Vector2 for Image get_pixelv and set_pixelv
Co-authored-by: Andrii Doroshenko <xrayez@gmail.com>
2020-11-21 02:42:29 -05:00
George Marques
c8e3fb8b05
Variant: Merge get() and validated_get()
Since they do pretty much the same thing. The validated_get() was
renamed to get() since that is more performant.
2020-11-20 17:26:19 -03:00
George Marques
8a9e3524a9
Fix variant getters not setting return type
The validated getters were only setting the value without changing the
type, leading to wrong results. This uses the same path used for
methods to the same purpose.
2020-11-20 15:55:17 -03:00
Rémi Verschelde
6a683f8016
Merge pull request #43591 from madmiraal/fix-43520
Update joy button and stick names, enums and documentation
2020-11-19 20:43:44 +01:00
Marcel Admiraal
20f2b71e21 Update joy button and stick names, enums and documentation 2020-11-19 15:28:31 +00:00
Rémi Verschelde
b4f81e7b88
Merge pull request #43662 from EricEzaM/PR/INP3-command_serialization_optional
Made serialization of Command toggleable when saving InputEvents.
2020-11-19 13:38:55 +01:00
Rémi Verschelde
8cc01be213
Merge pull request #43682 from RandomShaper/warn_reference_singleton
Warn about singleton being a Reference
2020-11-19 13:37:45 +01:00
Eric M
c92f83d3ca Made serialization of Command toggleable when saving InputEvents.
Made serialization of Command optional. If command is serialized, Control (On Win/Linux) or Meta (on Mac) are not.
Example use case: You are on Windows and you set a shortcut to be Control + E. This would serialize as Command=true and Control=true. If you then run this project on Mac, you would need to press Command AND Control to activate the shortcut - which is not what is intended. Now, you can set store_command to true, and it will only serialize to Command = true (no Control serialized). On Windows, this means Control. On Mac, it means only command.
2020-11-19 21:05:45 +10:00
Pedro J. Estébanez
e1150bd912 Warn about singleton being a Reference 2020-11-19 12:01:54 +01:00
Rémi Verschelde
2ca1c17a5c
Merge pull request #43661 from EricEzaM/PR/INP2-rename_load_from_globals
load_from_globals() -> load_from_project_settings()
2020-11-19 07:40:21 +01:00
Eric M
e5376fb129 load_from_globals() -> load_from_project_settings() 2020-11-19 09:21:21 +10:00
Pedro J. Estébanez
e99cf6bfe5 Fix crash duplicating local-to-scene resources 2020-11-18 23:45:30 +01:00
George Marques
bd93547c83
Fix return type on builtin validated calls
Before it was being set to the base type instead of the actual return
type.
2020-11-18 10:35:16 -03:00
Rémi Verschelde
408effa688
Merge pull request #43612 from akien-mga/variant-utils-doc
doc: Sync classref with Variant utility methods
2020-11-17 13:50:08 +01:00
Rémi Verschelde
c6dcf3310d
doc: Sync classref with Variant utility methods
Copied relevant documentation from the original `@GDScript` built-ins,
which will likely be removed in a future commit.

Various fixups to `variant_utility.cpp` while working on this.
2020-11-17 11:26:24 +01:00
Rémi Verschelde
386ee52978
Merge pull request #43610 from RandomShaper/fix_res_duplicate
Fix crash in resoure duplicate
2020-11-17 11:21:53 +01:00
Pedro J. Estébanez
9450717571 Fix crash in resoure duplicate 2020-11-17 10:13:41 +01:00
Aaron Franke
02161aad5a
Remove empty lines around braces with the formatting script 2020-11-16 23:38:11 -05:00
Rémi Verschelde
fbe0386c65
Merge pull request #43233 from madmiraal/fix-42876
Remove unneeded filter on joy_axis()
2020-11-16 22:41:14 +01:00
Fabio Alessandrelli
efe3eaf6a4
Merge pull request #43493 from timothyqiu/request-absolute-authority
Allow HTTPClient to talk to a proxy server
2020-11-16 16:00:26 +01:00
Rémi Verschelde
6c2db73937
Merge pull request #43566 from Calinou/remove-pause-mode-script-property-groups
Remove property groups for Pause Mode and Script
2020-11-16 12:53:31 +01:00
Rémi Verschelde
19f27ab486
Merge pull request #42976 from aaronfranke/input-get-axis
Allow getting Input "axis" and "vector" values by specifying multiple actions
2020-11-16 09:30:34 +01:00
Rémi Verschelde
a6150eb267
Merge pull request #43289 from KoBeWi/removelease_action
Release pressed action if event is removed
2020-11-16 09:29:04 +01:00
Hugo Locurcio
5770e08c2a
Remove property groups for Pause Mode and Script
Each of those only grouped 1 property, making them useless.

This closes https://github.com/godotengine/godot-proposals/issues/1840.
2020-11-15 16:01:10 +01:00
Zae
fa3e0bdd73 fix custom loader/saver broken 2020-11-15 22:14:06 +08:00
Haoyu Qiu
d92ca6fbb1 Allows HTTPClient to talk to proxy server
* Makes request uri accept absolute URL and authority
* Adds Host header only when missing
2020-11-14 21:25:15 +08:00
Tomasz Chabora
b7c612bd54 Release pressed action if event is removed 2020-11-12 16:54:16 +01:00
reduz
635d33dc6c Refactor variant built-in methods yet again.
* Using C-style function pointers now, InternalMethod is gone.
* This ensures much better performance in typed code.
* Renamed builtin_funcs to utility_funcs, to avoid naming confusion
2020-11-11 16:36:36 -03:00
Rémi Verschelde
fb2151089c
Merge pull request #43372 from aaronfranke/clamp-fixes
Minor clamp and float fixes
2020-11-11 13:20:19 +01:00
Aaron Franke
4abf189e36
Allow getting Input axis/vector values by specifying multiple actions
For get_vector, use raw values and handle deadzones appropriately
2020-11-11 06:02:44 -05:00
Aaron Franke
195d58be0f
Add raw strength value for internal use 2020-11-11 05:58:21 -05:00
reduz
5288ff538d Create Variant built-in functions.
-Moved Expression to use this, removed its own.
-Eventually GDScript/VisualScript/GDNative need to be moved to this.
-Given the JSON functions were hacked-in, removed them and created a new JSONParser class
-Made sure these functions appear properly in documentation, since they will be removed from GDScript
2020-11-10 19:31:10 -03:00
Aaron Franke
ee79fc627c
Minor clamp and float fixes 2020-11-10 14:30:07 -05:00
Rémi Verschelde
03ae26bb74
Merge pull request #43398 from KoBeWi/add_an_array_to_another_array_but_with_a_method
Add append_array() method to Array class
2020-11-10 13:53:58 +01:00
Rémi Verschelde
32464e569f
Merge pull request #40748 from RandomShaper/improve_packed_fs_api
Improve/fix packed data API
2020-11-10 10:59:34 +01:00
Rémi Verschelde
0f249f5c0a
Variant: Sync docs with new constructors, fixups after #43403
Change DocData comparators for MethodDoc and ArgumentDoc to get a better
ordering of constructors.
2020-11-09 23:39:53 +01:00
reduz
9979abce74 Change how no-arg constructor is handled internally in Variant. 2020-11-09 16:28:15 -03:00
Rémi Verschelde
b4a0661885
Merge pull request #43419 from reduz/document-operators
Make sure operators appear in the docs too
2020-11-09 19:54:34 +01:00