112 Commits

Author SHA1 Message Date
91ca725f9b Add support for the TAU constant. Fixes #12094. 2017-11-12 13:32:35 +01:00
77dd6f37bd Gave a tooltip to the "In" logic node 2017-10-14 22:13:19 +02:00
61ddf52983 Add NIL_IS_VARIANT usage to few definitions
The missing usage flag led to GDNative API descriptions containting
arguments with "void" type.
2017-10-05 18:51:22 +07:00
cc40784728 Merge pull request #11653 from bojidar-bg/doc-vscript-1
[DOCS] Document some of the VisualScript classes
2017-10-03 11:58:06 +02:00
10469c1962 Document some of the VisualScript classes. 2017-10-03 12:01:53 +03:00
137f8a58a8 Move Variant::evaluate() switch to computed goto
In an effort to make GDScript a little faster replace the double
switch() with a computed goto on compilers that set __GNUC__. For
compilers that don't support computed goto it will fall back to regular
switch/case statements.

In addition disable using boolean values in a mathematical context. Now
boolean values can only be compared with other booleans. Booleans will
also no longer be coerced to integers.

This PR replaces #11308 and fixes #11291
2017-09-17 22:49:23 +02:00
7dffed485b Merge pull request #11230 from maxim-sheronov/fix_enum_bindings
Fix enums bindings
2017-09-15 08:43:35 +02:00
ca5abae1e7 Fix 2 typos 2017-09-14 10:31:43 +02:00
0fffa45158 Fix enums bindings
Add missed bindings for enums
Move some enums to class to have correct output of api.json
2017-09-13 20:57:07 +03:00
1c5376ae59 Many fixes to visual script, changed virtuals override for a proper selector. 2017-09-12 07:58:54 -03:00
c16d00591b DocData and type hints fixes
- Makes vararg methods automatically use PROPERTY_USAGE_NIL_IS_VARIANT on return types
- Completely removes the ":type" suffix for method names. Virtual methods must use the MethodInfo constructors that takes Variant::Type or PropertyHint as the first parameter for the return type (with CLASS_INFO as a helper to get the PropertyInfo). Parameters must use PROPERTY_HINT_RESOURCE_TYPE and hint string.
- PROPERTY_USAGE_NIL_IS_VARIANT is no longer needed for parameters, because parameters cannot be void.
- Adds missing PROPERTY_USAGE_NIL_IS_VARIANT to virtual and built-in methods that return Variant.
2017-08-29 19:40:21 +02:00
bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
7a07895920 Added/Fixed null pointer checks 2017-08-26 16:58:47 -04:00
cacced7e50 Convert Object::cast_to() to the static version
Currently we rely on some undefined behavior when Object->cast_to() gets
called with a Null pointer. This used to work fine with GCC < 6 but
newer versions of GCC remove all codepaths in which the this pointer is
Null. However, the non-static cast_to() was supposed to be null safe.

This patch makes cast_to() Null safe and removes the now redundant Null
checks where they existed.

It is explained in this article: https://www.viva64.com/en/b/0226/
2017-08-24 23:08:24 +02:00
32dd9a9f66 ClassDB: Provide the enum name of integer constants 2017-08-20 22:07:43 +02:00
428f03cf06 Updated function argument names 2017-08-12 15:12:49 -04:00
2f290038d6 Removes type information from method binds 2017-08-10 07:17:50 +02:00
1e74f27f8f Adds missing type information to virtual method binds 2017-08-10 07:17:50 +02:00
8a4bce6ebd Ability to set a function as sequenced, so when called you can choose not to use sequence ports. Fixes #6346 2017-08-08 13:14:36 -03:00
37adf936ab few bugs fixed thanks to explicit bool constructor and clang.
explicit bool constructor has thus now been removed, as it served it's mission!
2017-08-05 21:43:10 -03:00
374cffaa11 Merge pull request #9764 from Noshyaar/pr-fix2
Add object type hint for docs
2017-07-24 08:07:32 +02:00
2777f81d29 Add object type hint for docs 2017-07-23 18:57:03 +07:00
19ca9e7810 Update a VS custom node when its script changes 2017-07-21 23:45:57 -03:00
3fdf8663f7 Fix issues with custom nodes in visual script
- Doesn't crash anymore.
- Inputs are properly transferred.
2017-07-21 00:05:56 -03:00
25678b1876 -Renamed GlobalConfig to ProjectSettings, makes more sense.
-Added system for feature overrides, it's pretty cool :)
2017-07-19 17:06:03 -03:00
074801e7a9 [#7212] Fixed missing 'Variant' return values in documentation. 2017-07-11 13:25:51 +02:00
2a3e00c8c7 -Many fixes to VisualScript, fixed property names, etc.
-Added ability to set/get a field in GetSet, as well as assignment ops
-Added a Select node
-Fixed update bugs related to variable list and exported properties, closes #9458
2017-06-30 21:35:05 -03:00
3ce046ee0c -Fixed SCREEN_TEXTURE and other related 2D shader parameters.
-Fixded BackBuffercopy object
2017-06-26 22:58:46 -03:00
5b3709d309 Removal of InputEvent as built-in Variant type..
this might cause bugs I haven't found yet..
2017-05-20 17:05:38 -03:00
df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
5dbf1809c6 A Whole New World (clang-format edition)
I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?

I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon

A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format

A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
2017-03-05 16:44:50 +01:00
e1c1d7d1d7 Add a bunch of missing Godot headers in own files 2017-03-05 15:47:28 +01:00
5e938f0001 Inf and NaN support added to GDScript. 2017-02-28 21:52:33 +00:00
de0045cf1b -renamed globals.h to global_config.cpp (this seems to have caused a few modified files)
-.pck and .zip exporting redone, seems to be working..
2017-02-21 00:06:30 -03:00
411ee71b4d Rename the _MD macro to D_METHOD
This new name also makes its purpose a little clearer

This is a step towards fixing #56
2017-02-13 12:50:02 +01:00
0f687f0ccb Remove use of _SCS from ADD_METHOD
This saves typing and is a step towards fixing #56
2017-02-13 10:37:47 +01:00
f44ee891be Style: Fix statements ending with ';;' 2017-01-16 08:49:52 +01:00
e6583117df Both Array and Dictionary are always in shared mode (removed copy on write). 2017-01-11 08:54:17 -03:00
547a57777b renamed joystick to joypad everywhere around source code! 2017-01-08 17:06:33 -03:00
0f7af4ea51 -Changed most project settings in the engine, so they have major and minor categories.
-Changed SectionedPropertyEditor to support this
-Renamed Globals singleton to GlobalConfig, makes more sense.
-Changed the logic behind persisten global settings, instead of the persist checkbox, a revert button is now available
2017-01-05 09:16:00 -03:00
118eed485e ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant.
All usages of "type" to refer to classes were renamed to "class"
ClassDB has been exposed to GDScript.
OBJ_TYPE() macro is now GDCLASS()
2017-01-02 23:03:46 -03:00
fa327f886e Add "Positive" operator to VisualScript 2016-11-11 23:46:32 -02:00
9167cd45bb Added expression nodes to visual script, please test. 2016-09-04 10:34:40 -03:00
5028d7510d Connection hints when connecting to empty space. 2016-09-03 14:58:23 -03:00
89702d545b Basic type constants for visual script 2016-09-02 02:13:12 -03:00
5b96c3a552 -Modified Input and added is_action_just_pressed() as well as is_action_just_released() 2016-09-01 18:59:46 -03:00
fc70824f7c More improvements to visual script..
fixed a bug of not saving when sub-nodes changed.
2016-08-31 17:58:51 -03:00
5567350e1b -Reworked constant nodes better
-Added simple switch node, removed InputEventFilter
2016-08-31 12:50:46 -03:00
fb4d6d1db0 More visual script improvements
-Added anti-aliasing on lines
-Improved draw performance enormously
-Removed sequence ports for most nodes, current visual scripts will likely be broken now. Sorry!
2016-08-30 23:46:41 -03:00
a56e5c74f5 VisualScript: Fixed VariableGet vs VariableSet node names, fixes #6325 2016-08-30 16:42:39 +02:00