George Marques
b3f452b1d2
Change template order in method_ptrcall.h
...
To be consistent with the enum in Variant so missing types can be more
easily spotted.
2020-12-15 17:02:50 -03:00
George Marques
35e7490c95
Add PtrConstruct template to use in Variant constructors
...
Since the PtrToArg::encode requires the value to be constructed
previously. With PtrConstruct this is not required.
2020-12-15 16:57:44 -03:00
Rémi Verschelde
94b15bfb89
Merge pull request #44275 from vnen/variant-function-arg-pointers
...
Use pointer parameters in Variant function pointers
2020-12-15 20:52:03 +01:00
Andy Savage
c65f097ebd
Quick fix to incorrect error messages when writing to compressed or encrypted files.
2020-12-15 17:00:39 +00:00
Hugo Locurcio
341b9cf15a
Add a project setting to enable stdout flushing in release builds
...
This can be used in server builds for journalctl compatibility.
2020-12-15 16:40:52 +01:00
EricEzaM
5c15461df2
Fixed mistakes in InputEvent as_text and to_string implementations.
2020-12-14 12:42:42 +10:00
Rémi Verschelde
2760f5d0b4
Merge pull request #44315 from madmiraal/fix-handles-baseexception
...
Don't handle BaseException in build scripts
2020-12-12 12:23:07 +01:00
Marcel Admiraal
8ef5e3201c
Don't handle BaseException in build scripts
2020-12-12 10:05:42 +00:00
Alf Kraus
68fdd753a7
wrong double quote output with .csv fixed
2020-12-11 11:42:43 +01:00
Rémi Verschelde
9263f8eb4b
Image: Rename PVRTC{2,4} to PVRTC1_{2,4}, drop COMPRESS_PVRTC2
...
We haven't had a proper implementation for COMPRESS_PVRTC2 (which is PVRTC1 2-bpp) in years,
so let's drop it instead of keeping a compress type which doesn't work.
The other enum values were renamed to clarify that our PVRTC2 and PVRTC4 are respectively
PVRTC1 2-bpp and PVRTC1 4-bpp. PVRTC2 2-bpp and 4-bpp are not implemented yet.
2020-12-10 23:14:04 +01:00
George Marques
0abacae2d3
Fix object check on Variant key checker
2020-12-10 18:18:52 -03:00
George Marques
e4e9231420
Use pointer parameters in Variant function pointers
...
Instead of references. This is needed because those function pointers
are used in GDNative which needs to work with plain C, which doesn't
support passing parameters by reference.
2020-12-10 18:18:47 -03:00
Andrii Doroshenko (Xrayez)
9aa06c3e65
Make property_list_changed_notify
protected in Object
...
Alternative to `_change_notify()` to be called from within C++ classes.
Achieves low-level consistency with scripting, where this method is
exposed for updating the editor (inspector) with new values.
2020-12-10 14:27:41 +02:00
Rémi Verschelde
114f97ff11
Merge pull request #44128 from KoBeWi/ 🧹
...
Cleanup unused engine code
2020-12-09 13:01:50 +01:00
Tomasz Chabora
2c048ea164
Cleanup unused engine code
2020-12-09 12:12:36 +01:00
Rémi Verschelde
92c001ef09
Merge pull request #43931 from bruvzg/ctl_comp_font
...
[Complex Text Layouts] Add compatibility for legacy Font resources.
2020-12-09 11:28:11 +01:00
Rémi Verschelde
0c5d3b838c
Merge pull request #44199 from bruvzg/pvs_fixes_1
...
PVS-Studio static analyzer fixes
2020-12-09 10:23:21 +01:00
bruvzg
644f739660
Static analyzer fixes:
...
Removes unused code in OS.
Fixes return types.
Fixes few typos.
2020-12-09 10:17:53 +02:00
Rémi Verschelde
e5e1277ecd
Merge pull request #44161 from Faless/fix/fa_buffered_remove
...
Remove unused FileAccessBuffered
2020-12-09 09:14:14 +01:00
Rémi Verschelde
2034a1cca0
Merge pull request #44089 from Xrayez/rng-state
...
Add ability to restore `RandomNumberGenerator` state
2020-12-08 21:40:38 +01:00
Rémi Verschelde
90bdba576a
Merge pull request #43742 from qarmin/editor_modules_default_values
...
Initialize class/struct variables with default values in platform/ and editor/
2020-12-08 15:53:42 +01:00
Emmanuel Leblond
a211812932
Constify ScriptLanguage.can_inherit_from_file
2020-12-08 13:06:15 +01:00
Rémi Verschelde
a834055c63
Merge pull request #44148 from Calinou/tweak-log-file-names
...
Tweak log file names for consistency between Mono and non-Mono logs
2020-12-08 09:42:54 +01:00
Andrii Doroshenko (Xrayez)
b5107715f1
Add ability to restore RandomNumberGenerator
state
...
- added `state` as a property to restore internal state of RNG;
- `get_seed()` returns last seed used to initialize the state rather than the current state.
Co-authored-by: MidZik <matt.idzik1@gmail.com>
2020-12-07 13:50:46 +02:00
Aaron Franke
5465e604bb
Improve argument names for core types
2020-12-07 05:01:33 -05:00
Hugo Locurcio
4d81776fc9
Tweak log file names for consistency between Mono and non-Mono logs
...
- Avoid spaces in Mono log file names.
- Use a `.log` extension for Mono logs, just like non-Mono logs.
- Use periods to separate hours/minutes/seconds for non-Mono logs.
2020-12-06 20:17:02 +01:00
Fabio Alessandrelli
781efc26e0
Remove now unused FileAccessBuffered.
2020-12-06 19:37:11 +01:00
Marcel Admiraal
a24c38d1a8
Rename Vector2.tangent() to Vector2.orthogonal()
2020-12-06 18:16:06 +00:00
Aaron Franke
1b348b3c17
Remove connect *_compat methods
2020-12-05 17:56:47 -05:00
Rémi Verschelde
1287ea63c1
Merge pull request #44084 from vnen/float-is-real
...
Rename TYPE_REAL to TYPE_FLOAT
2020-12-04 14:26:22 +01:00
George Marques
02f60812ed
Rename TYPE_REAL to TYPE_FLOAT
...
To be consistent with the naming everywhere else.
2020-12-04 09:47:26 -03:00
reduz
e93b2242c2
Reorganize rendering server.
...
-Made RenderingServerScene abstract, allowing reimplementation
-RenderingServerRaster -> RenderingServerDefault, but this class is going away soon.
2020-12-03 19:01:01 -03:00
Rémi Verschelde
9c30c83aee
Merge pull request #44011 from KoBeWi/red_roses_minus_blue_violets
...
Fix subtracting colors and quats
2020-12-03 14:44:52 +01:00
Tomasz Chabora
4c232e4222
Fix subtracting colors and quats
2020-12-03 14:22:12 +01:00
Rémi Verschelde
df53bf6397
Merge pull request #43660 from EricEzaM/PR/INP1-inputevent_as_text_and_to_string
...
InputEvent as_text now returns readable string. Added to_string for debug strings
2020-12-03 13:28:29 +01:00
Rémi Verschelde
1b37c522dc
Merge pull request #44061 from madmiraal/fix-44056
...
Ignore hint entries in game controller mapping
2020-12-03 13:27:28 +01:00
Fabio Alessandrelli
502ff74fee
Merge pull request #43536 from jonbonazza/hmac
...
feat: HMAC support in Crypto APIs
2020-12-03 11:08:16 +01:00
Marcel Admiraal
e887ebf817
Ignore hint entries in game controller mapping
2020-12-03 09:06:40 +00:00
bruvzg
3c3590522f
[Complex Text Layouts] Add compatibility for legacy Font resources.
2020-12-03 10:34:03 +02:00
reduz
70f5972905
Refactored Mesh internals and formats.
...
-Changed how mesh data is organized, hoping to make it more efficient on Vulkan and GLES.
-Removed compression, it now always uses the most efficient format.
-Added support for custom arrays (up to 8 custom formats)
-Added support for 8 weights in skeleton data.
-Added a simple optional versioning system for imported assets, to reimport if binary is newer
-Fixes #43979 (I needed to test)
WARNING:
-NOT backwards compatible with previous 4.x-devel, will most likely never be, but it will force reimport scenes due to version change.
-NOT backwards compatible with 3.x scenes, this will be eventually re-added.
-Skeletons not working any longer, will fix in next PR.
2020-12-02 13:07:59 -03:00
Rafał Mikrut
e1811b689b
Initialize class/struct variables with default values in platform/ and editor/
2020-12-02 16:09:11 +01:00
Rémi Verschelde
d1231be1c8
Merge pull request #41095 from ThakeeNathees/GDScript-Documentation
...
GDScript(2.0) Documentation generation system
2020-12-02 14:15:38 +01:00
bruvzg
7be8759991
Fix .pck lookup for extensionless binary in macOS resources.
2020-12-02 11:04:44 +02:00
Thakee Nathees
42bfa16996
Refactor DocData into core and editor (DocTools) parts
2020-12-02 00:48:39 +05:30
George Marques
029fd88adb
Fix VariantInternal initialization and setting of object
...
- Initialize Object pointer to nullptr so it's not used by mistake.
- When setting an Object check if it's a reference so refcounting works
as intended.
2020-11-30 14:49:52 -03:00
Thakee Nathees
d0e7d9b62f
Documentation generation for GDScript
...
- ClassDoc added to GDScript and property reflection data were extracted
from parse tree
- GDScript comments are collected from tokenizer for documentation and
applied to the ClassDoc by the GDScript compiler
- private docs were excluded (name with underscore prefix and doesn't
have any doc comments)
- default values (of non exported vars), arguments are extraced from the
parser
- Integrated with GDScript 2.0 and new enums were added.
- merge conflicts fixed
2020-11-29 19:45:36 +05:30
Rémi Verschelde
3b4fad435c
Merge pull request #43061 from qarmin/crash_when_prining_nodes
...
Fix crash when printing leaked nodes
2020-11-28 10:37:12 +01:00
Rémi Verschelde
a6751e6c58
Merge pull request #41100 from bruvzg/ctl_text_server_interface
...
[Complex Text Layouts] Implement TextServer interface.
2020-11-28 09:03:15 +01:00
Rémi Verschelde
bd84600132
Merge pull request #43903 from cptchuckles/fix-sign
...
Fix SGN macro
2020-11-28 09:01:47 +01:00
Hugo Locurcio
aa2344afe4
Mention lack of optional setter arguments in ClassDB::add.property()
2020-11-28 01:34:13 +01:00
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
Fabio Alessandrelli
828d1ea59e
Merge pull request #40136 from Jummit/multiplayer-root-node-getters
...
Add root_node as property of MultiplayerAPI
2020-11-27 18:36:07 +01:00
Fabio Alessandrelli
4b6a35c74a
Disable SO_REUSEADDR for UDP.
...
It allows binding multiple sockets to the same ADDR:PORT (unlike TCP,
which still requires different ADDR:PORT combinations).
2020-11-27 14:12:34 +01:00
Jon Bonazza
d5925fd522
feat: HMAC support in Crypto APIs
2020-11-26 18:39:56 -08:00
Eric M
dfe4c5f8e1
InputEvent as_text now returns readable string. Added to_string for debug strings
...
Made InputEvent as_text() return a readable and presentable string. Added to_string() overrides for each which returns a 'debug-friendly' version which is not as presentable but provides more information and in a more structured fashion. Use as_text() for UI display scenarions and to_string() for debug cases
2020-11-27 00:42:16 +10:00
bruvzg
99666de00f
[Complex Text Layouts] Refactor Font class, default themes and controls to use Text Server interface.
...
Implement interface mirroring.
Add TextLine and TextParagraph classes.
Handle UTF-16 input on macOS and Windows.
2020-11-26 14:25:48 +02:00
bruvzg
493da99269
[Complex Text Layouts] Implement TextServer interface. Implement Fallback TextServer.
2020-11-26 13:55:26 +02: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
Rafał Mikrut
03f89a4481
Fix crash when printing leaked nodes
2020-11-17 22:10:05 +01: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