Commit graph

864 commits

Author SHA1 Message Date
Elliott Sales de Andrade
45a9a680a3 Use BoolVariable for third-party options. 2017-09-25 14:36:30 -04:00
Elliott Sales de Andrade
ffab67b8da Use BoolVariable in target/component/advanced options. 2017-09-25 14:36:02 -04:00
Elliott Sales de Andrade
00c03bdd2b Add support for OpenSSL 1.1.0.
This release hides many struct members which provides easier forward
compatibility but is a break from previous releases. A few small macros
provide compatibility between both 1.1.0 and 1.0.x.

Fixes #8624.
2017-09-24 02:11:02 -04:00
Marcelo Fernandez
46af050e93 Rename get_position => get_playback_position and seek_pos => seek on audio classes 2017-09-23 16:55:00 +02:00
Rémi Verschelde
be60689812 Merge pull request #11461 from hpvb/add-likely-macros
Implement Linux-style likely()/unlikely() macros
2017-09-22 09:15:45 +02:00
Ross Hadden
1a97d6455d Fixed a bunch of typos, including an error code. 2017-09-21 23:58:29 -04:00
Hein-Pieter van Braam
22358babda Implement Linux-style likely()/unlikely() macros
This implement branch prediction macros likely() and unlikely() like in
Linux. When using these macros please ensure that when you use them the
condition in the branch really is very, very likely or unlikely. Think
90+% of the time. Primarily useful for error checking. (And I implement
these macros for all our error checking macros now)

See this article for more information:
https://kernelnewbies.org/FAQ/LikelyUnlikely

There are more places where these macros may make sense in renderer and
physics engine. Placing them will come in another commit down the line.
2017-09-21 18:28:28 +02:00
letheed
5ad9be4c24 Rename pos to position in user facing methods and variables
Rename user facing methods and variables as well as the corresponding
C++ methods according to the folloming changes:

* pos -> position
* rot -> rotation
* loc -> location

C++ variables are left as is.
2017-09-20 13:11:10 +02:00
Ruslan Mustakov
52cb4ec232 Do not compile Recast for Android
At least this makes Godot compile for Android until there is a better
solution.
2017-09-20 12:57:33 +07:00
Rémi Verschelde
752a116847 Merge pull request #11256 from djrm/pr_visual_improvements
Visual improvements and new look for VS
2017-09-19 23:44:09 +02:00
Hein-Pieter van Braam
833c3917b2 Allow booleanization of all types
We now allow booleanization of all types. This means that empty versions
of all types now evaluate to false. So a Vector2(0,0), Dictionary(),
etc.

This allows you to write GDScript like:
if not Dictionary():
  print("Empty dict")

Booleanization can now also no longer fail. There is no more valid flag,
this changes Variant and GDNative API.
2017-09-19 18:55:31 +02:00
Rémi Verschelde
33e1716f13 Merge pull request #11402 from hpvb/remove-gdscript-checks-on-release
Various GDScript performance tweaks
2017-09-19 15:48:14 +02:00
Rémi Verschelde
ba4439c491 Merge pull request #11386 from kosz78/fix-msvc-compile-errors
Fix MSVC compilation errors
2017-09-19 14:58:19 +02:00
Konstantin Zaitsev
28dc30cd59 Change structure order for godot nim compatibility 2017-09-19 11:35:51 +07:00
Konstantin Zaitsev
c386a02654 Fix MSVC compilation errors 2017-09-19 10:33:07 +07:00
Hein-Pieter van Braam
60790c8c5a Remove more GDScript runtime checks on release
As a preparation for other performance enhancements to GDScript:call()
start by removing more of the GDScript runtime checks on release.

This code has been tested with 2d/platformer, 3d/platformer,
3d/materials_test, and goltorus. No regressions were found.
2017-09-19 02:06:47 +02:00
Hein-Pieter van Braam
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
Thomas Herzog
259778ce8c Merge pull request #11296 from touilleMan/gdnative-api-struct
[GDnative] pass api as struct of function pointers to loaded gdnative modules
2017-09-17 20:59:46 +02:00
Emmanuel Leblond
8d57a3f3d5
[GDnative] Use X macro to define godot_gdnative_api_struct and it instantiation 2017-09-17 18:33:08 +02:00
Emmanuel Leblond
e4c9f8895e
[GDnative] create godot_gdnative_api_struct and pass it to godot_gdnative_init_options 2017-09-17 16:13:14 +02:00
Rémi Verschelde
c74bab66aa Merge pull request #11274 from Rubonnek/keep-argument-names-consistent
Renamed function arguments to keep them consistent between declaration and implementation
2017-09-17 12:53:48 +02:00
Rémi Verschelde
2d4f6ef0bf Apply clang-format again to recent changes
Also add missing copyright headers.

[ci skip]
2017-09-16 19:48:45 +02:00
Marcelo Fernandez
12a7f15bdc Fix compile error on gd_native_library_editor.cpp with tools=no 2017-09-15 13:29:29 -03:00
Thomas Herzog
7dffed485b Merge pull request #11230 from maxim-sheronov/fix_enum_bindings
Fix enums bindings
2017-09-15 08:43:35 +02:00
Thomas Herzog
5636ac526e Merge pull request #11237 from endragor/gdnative-variant-ref
Construct Variants from Reference properly in GDNative
2017-09-14 21:21:50 +02:00
Juan Linietsky
35ed1eef2a Added a menu to enable/disabled GDNative singletons in project settings 2017-09-14 15:02:51 -03:00
Wilson E. Alvarez
072e379ffe Renamed function arguments to keep them consistent between declaration and implementation 2017-09-14 13:49:15 -04:00
Daniel J. Ramirez
74d028729f Improved VisualScriptEditor 2017-09-14 12:45:42 -05:00
Ruslan Mustakov
f08bc0df7c Construct Variants from Reference properly in GDNative
Previously godot_variant_new_object constructed Variant without
accounting for the fact that the Object can be a Reference, so refcount
was not increased and References were destructed prematurely.

Also, Reference::init_ref did not propagate refcount increment to the
script instance, which led to desync of refcount info on the script
side and Godot side.
2017-09-14 19:40:36 +07:00
Jeroen
ca5abae1e7 Fix 2 typos 2017-09-14 10:31:43 +02:00
Maxim Sheronov
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
Rémi Verschelde
fe3bbaa9d0 Merge pull request #11076 from hpvb/fix-10935
Fix crash on wrong type drag into the vs editor
2017-09-13 19:28:13 +02:00
Rémi Verschelde
095ff6dda8 Merge pull request #11063 from toger5/svg_generation_optimization
optimized color conversion for svg generation
2017-09-13 19:27:21 +02:00
Rémi Verschelde
27ae3c839d Merge pull request #7908 from SaracenOne/recast
In-editor navmesh generation.
2017-09-13 19:22:29 +02:00
toger5
ee5dc05a09 optimized color conversion for svg generation 2017-09-12 23:33:51 +02:00
Juan Linietsky
4f929a0fdf Changed the doc class generation to individual files per class. It is also possible to save module files in module directories and the build system will
recognize them.
2017-09-12 17:45:41 -03:00
Daniel J. Ramirez
60f054d3ac Improved VS node coloring 2017-09-12 13:16:47 -05:00
Daniel J. Ramirez
1e8048dd45 Improved theme generation, and other fixes 2017-09-12 13:16:38 -05:00
William Taylor
8632408dbd Changed/Added descriptions in @GDScript. Added examples. Fixed return types of two … (#11146)
Doc: Improved descriptions in GDScript docs

Added examples and fixed return types of two methods.
2017-09-12 15:00:29 +02:00
Rémi Verschelde
4f51211dfb Merge pull request #11028 from mrawlingst/color-RGBA32
Change Color.to_32() to Color.to_rgba32() and lowercase other functions
2017-09-12 13:44:43 +02:00
Juan Linietsky
1c5376ae59 Many fixes to visual script, changed virtuals override for a proper selector. 2017-09-12 07:58:54 -03:00
Rémi Verschelde
aabbd00284 Merge pull request #10908 from hpvb/fix-unused-variables
Fix unused variable warnings
2017-09-12 12:55:53 +02:00
Rémi Verschelde
cf941fdc35 Merge pull request #11026 from hpvb/fix-assign-in-if
Remove assignment and declarations in if statements
2017-09-12 11:57:49 +02:00
Rémi Verschelde
2b50dc5d4f Merge pull request #11057 from hpvb/fix-various-warnings
Fix various assorted warnings
2017-09-12 11:39:47 +02:00
Poommetee Ketson
dccb37417c Implement String len() 2017-09-11 08:43:25 +07:00
bncastle
fc83821316 Fixed attempt to delete NULL pointer error
Fixed: Error cause by attemptng to delete a NULL pointer.
unregister_gdnative_types() now checks discoverer to see if it is NULL
before deleting. After selecting a godot project to edit (in Win10), the
discoverer_callback() wasn't called thus discoverer was NULL.
2017-09-10 17:39:42 -04:00
Hein-Pieter van Braam
2ec0bc4f80 Fix crash on wrong type drag into the vs editor
Don't allow drops of draggable items without a vs node type.

This fixes #10935
2017-09-09 00:34:53 +02:00
Hein-Pieter van Braam
b2a38854fd Fix unused variable warnings
The forth in my quest to make Godot 3.x compile with -Werror on GCC7
2017-09-08 15:03:53 +02:00
Hein-Pieter van Braam
8230bf0a2f Remove assignment and declarations in if statements
After discussing with @reduz and @akien-mga it was decided that we do
not allow assignments or declarations in if statements. This PR removes
the instances of this I could find by automated means.
2017-09-08 14:59:15 +02:00
Hein-Pieter van Braam
67a706fc1b Fix various assorted warnings
Fix various warnings that don't have enough instances to merit
individual commits. Also fixes a potential bug in audio_server.cpp.
2017-09-08 14:57:48 +02:00