Commit graph

952 commits

Author SHA1 Message Date
Thomas Herzog
454dec2f2f Merge pull request #11806 from touilleMan/gdnative-version-field
[GDnative] add api version field to godot_gdnative_api_struct
2017-10-04 11:57:53 +02:00
Emmanuel Leblond
3e29cb806c
[GDnative] add future-proof next field to godot_gdnative_api_struct (a la Vulkan) 2017-10-04 03:11:41 +02:00
Karroffel
2a4e2b5378 [GDNative] added API struct wrapper generator
Previously functions of the GDNative API were accessed by letting
the loader at load-time resolve the symbols. This causes troubles on
Windows (...sigh...), so now the GDNative API isn't exported anymore.

This means, that a library that wants to call a GDNative function
needs to access it via a struct of pointers that's passed to it at
right after the library was loaded. To make the usage easier, those
function pointers in the struct can be wrapped in actual function in
the global scope. This commit adds a generator for that wrapper code.
2017-10-03 23:26:39 +02:00
Andreas Haas
a848fa6cde Merge pull request #11789 from djrm/pr_visual_improvements
Added correct initialization for script editor theme.
2017-10-03 19:56:14 +02:00
Emmanuel Leblond
0d41be3790
[GDnative] add api version field to godot_gdnative_api_struct 2017-10-03 18:08:34 +02:00
Thomas Herzog
c5ab18f33e Merge pull request #11792 from touilleMan/gdnative-json-api
[GDnative] autogenerate gdnative_api_struct.h from a json
2017-10-03 14:37:04 +02:00
Nathan Lovato
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
Bojidar Marinov
10469c1962
Document some of the VisualScript classes. 2017-10-03 12:01:53 +03:00
Emmanuel Leblond
cdc29926af
[GDnative] replace gdnative_api_struct.h by a json-based autogenerated system 2017-10-03 09:48:52 +02:00
Daniel J. Ramirez
bb69855f1a VS now supports white themes. 2017-10-02 21:31:32 -05:00
Daniel J. Ramirez
6d874ea685 Added correct initialization for script editor theme.
Some style fixes for VS interface.
2017-10-02 18:33:42 -05:00
Ignacio Etcheverry
e36fb95c50 Added mono module 2017-10-03 00:01:26 +02:00
Andreas Haas
29b44801b2 Merge pull request #11658 from BastiaanOlij/mobile_vr
Reintroduce generic mobile vr interface
2017-10-02 23:13:21 +02:00
Andreas Haas
5303efb2fa Merge pull request #11659 from AndreaCatania/prephysics
Renamed fixed_process to physics_process
2017-10-02 23:10:36 +02:00
Poommetee Ketson
e8f0817eac Merge pull request #11724 from marcelofg55/visualscript_crashfix
VisualScript crashfix when returns are too few
2017-10-02 23:40:44 +07:00
Emmanuel Leblond
c55b8217ab
[GDnative] Add active_library_path to init options struct 2017-10-02 13:45:47 +02:00
Emmanuel Leblond
c11c951871
[GDnative] Add binding to GDNativeLibrary::get_active_library_path 2017-10-02 13:25:53 +02:00
Gilles Roudiere
d10e5eabed Merge pull request #11719 from toger5/svg_color_convert_alpha
keep alpha when converting svg colors fixes #11289
2017-10-01 22:38:57 +02:00
Hein-Pieter van Braam
6c15c23889 Replace a OPCODE_BREAK with break in opcode 31
This was a mistake made in 520d84e. There are no more other looping
structures left in this function.
2017-10-01 16:51:05 +02:00
AndreaCatania
4537977d6d Renamed fixed_process to physics_process 2017-09-30 16:19:07 +02:00
Marcelo Fernandez
57ef77376f VisualScript crashfix when returns are too few 2017-09-30 11:18:50 -03:00
toger5
b3826901c7 keep alpha when converting svg colors fixes #11289 2017-09-30 14:48:41 +02:00
Juan Linietsky
0a5799fb43 Properly allow completion on variable initializer arguments, closes #9359 2017-09-29 19:43:31 -03:00
BastiaanOlij
ca4f055db0 reintroduce generic mobile vr interface 2017-09-28 22:44:41 +10:00
Rémi Verschelde
da144fed4c Merge pull request #11617 from groud/fix_bad_display
Fixes bad display
2017-09-27 22:15:00 +02:00
Scayze
0722df4829 Fixed wrong break statement in GDFunction::call 2017-09-27 03:23:39 +02:00
Gilles Roudiere
6f185cc9f7 Remove unecessary anchors&margins set causing bad display (sons of containers) 2017-09-27 00:38:28 +02:00
Rémi Verschelde
f577efd47e Merge pull request #11424 from groud/control_node_presets
Implements set_margins_preset(...)
2017-09-26 00:11:46 +02:00
Rémi Verschelde
c79fc6716e Merge pull request #11518 from hpvb/gdscript-direct-dispatch
Some more GDScript performance optimizations
2017-09-25 23:25:42 +02:00
Rémi Verschelde
78aa7b382a Merge pull request #11567 from QuLogic/scons-var-types
Add types to scons command-line options
2017-09-25 22:44:05 +02:00
Rémi Verschelde
dae02a9041 Merge pull request #11580 from endragor/ios-export
Enhance iOS export
2017-09-25 22:23:49 +02:00
Juan Linietsky
c5da28f24c Fixed constness of variant functions, as well as visual script sequence ports. Closes #11258 2017-09-25 17:09:27 -03:00
Elliott Sales de Andrade
3e69d19116 Use BoolVariable in platform-specific options. 2017-09-25 14:36:30 -04:00
Elliott Sales de Andrade
5be675eb03 Use BoolVariable for module options. 2017-09-25 14:36:30 -04:00
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
Ruslan Mustakov
f5b3b24c22 Enhance iOS export
- The export process now builds complete .ipa on macOS, instead of just
   creating XCode project.

 - The project includes Capabilities games usually require: Game Center,
   Push Notifications, In-App Purchase.

 - Icons and launch screens can be specified in export preset.
2017-09-26 00:18:08 +07:00
Hein-Pieter van Braam
0a338a28d9 Remove several checks on DEBUG_RELEASE
These errors shouldn't be possible on a tested game. Remove the checks
on release. Shaves about 10% off of tight loops.
2017-09-25 18:29:18 +02:00
Hein-Pieter van Braam
520d84e042 Use computed goto to dispatch next opcode
On compulers that define __GNUC__ use computed goto to directly dispatch
the next instruction rather than going through another switch statement.
This saves a jump and some comparisons.

In tight loops this is is roughly 10% faster than the switch() method.
2017-09-25 18:29:13 +02: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
Gilles Roudiere
05bb8e0c10 Remove set_area_as_parent_rect and replace it by set_anchors_and_margins_preset(PRESET_WIDE) 2017-09-22 11:39:44 +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
mrawlingst
6aa5bc2347 Change Color.to_32() to to_rgba32() and format as RGBA 2017-09-07 16:19:44 -04:00
Juan Linietsky
5f0d367fef Mono vorbis support fixed, closes #10787 2017-09-06 23:13:57 -03:00
Rémi Verschelde
6efd777fae Merge pull request #10976 from saltares/issue-907
Fixes setting visibility on GridMap, issue #907
2017-09-06 11:49:35 +02:00
David Saltares
f43a0ef327 Setting visibility on GridMap now works. Closes #907.
Basically, `GridMap` wasn't reacting to the
`NOTIFICATION_VISIBILITY_CHANGED` event. This reacts to such events and
walks over the set of `Octants` and all of their `MultiMeshInstances` to
set their visibility on the `VisualServer`.
2017-09-05 22:44:19 +01:00
Ruslan Mustakov
269203a022 Provide NativeScript properties in definition order 2017-09-05 12:45:23 +07:00
Juan Linietsky
89e090edef Fix ETC2 import for luminance/lumalpha textures, fixes #10421 2017-09-04 18:45:41 -03:00
Saracen
92e77d5ff2 Recast integration. 2017-09-04 21:41:57 +01:00
Rémi Verschelde
e979e50b7d Merge pull request #10921 from karroffel/gdnative-MERGE-EVERYTHING
[GDNative] merge of NativeScript and GDNative, new GDNative singletons
2017-09-04 21:51:07 +02:00
Rémi Verschelde
b5d2d0a9a5 Merge pull request #10939 from neikeq/fix-overridden-external-editors
Fixes language overridden external editors
2017-09-04 08:12:29 +02:00
Rémi Verschelde
7040a390ad Merge pull request #10937 from djrm/pr_fix_typo
Fix. resizeable -> resizable.
2017-09-04 07:37:59 +02:00
Ignacio Etcheverry
52a7be4eef Fixes language overridden external editors 2017-09-03 21:23:36 +02:00
Daniel J. Ramirez
d6b664f671 Fix. resizeable -> resizable.
(not actually a typo, but the rest of the API uses resizable)
2017-09-03 13:12:52 -05:00