Commit graph

612 commits

Author SHA1 Message Date
Karroffel 11e496d99a [GDNative] fixed a reload bug
When there was no terminate function defined in the library the exported variables would not update.
This fixes that.
2017-05-13 14:37:57 +02:00
Rémi Verschelde 88d5c943e7 Merge pull request #8696 from bojidar-bg/fix-path-autocomplete
Fix gdscript autocomplete showing only paths
2017-05-12 18:17:20 +02:00
Thomas Herzog 0f8a17b0cb Merge pull request #8720 from karroffel/gdnative-methodbind-varcall
[GDNative] added varcall and print
2017-05-11 23:53:46 +02:00
Karroffel d137e83c60 [GDNative] added varcall and print 2017-05-11 23:06:11 +02:00
Karroffel 15bce7f75f removed multiscript
removes MultiScript which was re-added in #8502 (aka 4c14700).
This feature didn't turn out to be as useful as most expected. It causes more troubles than it does good.
2017-05-11 21:23:19 +02:00
sheepandshepherd 99e07448d1 Add error printing functions to GDNative 2017-05-10 00:19:38 +02:00
Rémi Verschelde 32afcbc482 Put brave old bb10 platform to a well-deserved rest
Add some 🔥 to appease @reduz. Fixes #8692.
2017-05-08 22:22:20 +02:00
Bojidar Marinov 837a667225
Fix #8674, and rename a few things for clarity 2017-05-08 22:39:27 +03:00
toger5 304a1f5b5a Implemented scrolling factor for smooth trackpad scrolling
Working platforms platform: OSX, Windows.
Support for almost all ui elements, including project list.
2017-05-07 14:23:56 +02:00
volzhs 17e8e343fb Revert "Add new editor and default theme (WIP)"
This reverts commit f045efe007.
2017-05-03 06:19:15 +09:00
Rémi Verschelde 9a40b92b8a Merge pull request #8571 from tagcup/squish_sse
Detect SSE/SSE2 for libsquish.
2017-05-02 11:29:16 +02:00
Rémi Verschelde d4029aa51a Move other lone thirdparty files to thirdparty/misc
Also move Box2D ConvexDecomposition contrib code to
thirdparty/b2d_convexdecomp.
2017-04-28 21:19:25 +02:00
Ferenc Arn b6259661ce Detect SSE/SSE2 for libsquish. 2017-04-28 12:47:35 -05:00
Daniel J. Ramirez f045efe007 Add new editor and default theme (WIP) 2017-04-27 08:04:57 +02:00
Paulb23 c4ffe89204 Changed indent type settings 2017-04-26 12:14:03 +01:00
Rémi Verschelde cdf0fbd8e8 Merge pull request #8522 from NNesh/mus
Fix AudioPlayer bugs with OGG
2017-04-26 08:13:30 +02:00
NNesh 6cf0c62221 Fix AudioPlayer.get_pos() always returns 0 2017-04-25 17:02:45 +05:00
Ramesh Ravone 924bccdbd1
Honoring the Indent setting for gdscript 2017-04-25 06:57:49 +05:30
NNesh 0edc3d7208 Fix AudioPlayer.play() bug when music always starts from 0 pos 2017-04-25 01:57:05 +05:00
Karroffel 67886bab1e fixed a bug where saving a GDScript file crashed the editor
I changed the loop in #8502, turns out it fixed the error I was facing but introduced a new one. This fixes both
2017-04-24 19:26:32 +02:00
Rémi Verschelde 9acfb0782c Merge pull request #8444 from magyar123/pr-complete-paths
Script editor now automatically completes file paths in GDScript
2017-04-24 11:37:57 +02:00
Rémi Verschelde 68870af214 Merge pull request #8420 from magyar123/pr-script-files-as-base
Added the ability to select files as base when creating scripts
2017-04-24 11:28:36 +02:00
Rémi Verschelde d7578792ca Merge pull request #8496 from akien-mga/stdout-cleanup
Fix property warnings and hide some debug prints
2017-04-24 11:04:16 +02:00
Karroffel 885239fb09 re-added MultiScript
The very first Godot version (when it was open sourced) had "MultiScript" which lets you use multiple scripts on one object.
With the addition of mulitple new scripting languages (VisualScript, soon C# and GDNative) it can be of use to combine scripts rather than delegating (with huge maintainance cost) or creating child nodes
which could impact performance.

I used the code from 0b806ee as the base and made it work with the current master.
2017-04-24 01:49:40 +02:00
Rémi Verschelde 515f92d03b Fix property warnings and hide some debug prints
"ALL IS GOOD" was a lie.

In particular, removes verbose "path not recognized" false positive.

The actual logic is to (somewhat naively) check all ResourceFormatLoaders
and to pick the first good match, so no need to warn about the formats
that do not match the type hint.
2017-04-23 11:17:32 +02:00
Karroffel a6e75c9437 [GDNative] fixed msvc build 2017-04-20 13:15:45 +02:00
Rémi Verschelde 22b9c0207b Merge pull request #8417 from neikeq/hello-there
External editor improvements and fixes
2017-04-20 02:20:04 +02:00
Karroffel d4f4f14c68 [GDNative] explicit calling convention 2017-04-19 15:51:33 +02:00
mbalint12 71978685f9 Added autocomplete for file paths in the script editor 2017-04-18 17:22:01 +02:00
Rémi Verschelde 5237bc952d Merge pull request #8424 from Paulb23/convert_indent
Support for space indentation
2017-04-18 14:16:58 +02:00
Paulb23 c59bd79e02 Convert indent on save 2017-04-18 12:30:52 +01:00
Paulb23 84bca4e72f Added support for space indentation 2017-04-18 12:30:46 +01:00
Thomas Herzog 68d79b21c3 Merge pull request #8440 from karroffel/gdnative-new-method
[GDNative] added "new" method and fixed headers
2017-04-17 20:41:32 +02:00
Thomas Herzog a88c20f0ca Merge pull request #8439 from touilleMan/correct_gdnative_signatures
Correct gdnative signatures
2017-04-17 19:55:42 +02:00
Karroffel f4261c8868 [GDNative] added "new" method and fixed headers 2017-04-17 19:52:18 +02:00
Emmanuel Leblond e7134ce283
gdnative: Implement missing function for godot_basis. 2017-04-17 19:05:00 +02:00
Emmanuel Leblond 707eedfa85
gdnative: modify vector2&vector3 functions signature to use value passing instead of ptr. 2017-04-17 16:43:43 +02:00
Emmanuel Leblond 8400de76a7
Add godot_string_unicode_str to GDnative 2017-04-17 15:48:26 +02:00
Ignacio Etcheverry 4b8568006d External editor improvements and fixes
Notable changes:

- Now ScriptLanguages have the option to override the global external editor setting.
If `ScriptLanguage::open_in_external_editor()` returns `ERR_UNAVAILABLE` (which it does by default), then the global external editor option will be used.
- Added formatting to the external editor execution arguments. Now it's possible to write something like this: `{project} -g {file}:{line}:{col}`.
- `VisualScript::get_member_line()` now can return the line of functions (well, it returns the id of the _Function_ node of the function). I guess there is nothing else we can get a "line" from.

Fixes:

- Fixes a bug where `ScriptEditor::script_goto_method()` would not work if the script is not already open in the built-in editor.
- Fixes wrong DEFVAL for `cursor_set_column` and `cursor_set_line` in TextEdit.
- `Script::get_member_line()` now returns -1 ("found nothing") by default.
2017-04-17 01:51:30 +02:00
mbalint12 a3afec588c Added the ability to select files as base when creating scripts 2017-04-15 23:29:09 +02:00
Emmanuel Leblond 7013cd984b
Correct indentation in gdnative vector2/3 2017-04-15 01:06:42 +02:00
Emmanuel Leblond e5f7f656d6
Implement missing functions in gdnative vector2 and vector3 bindings 2017-04-15 00:29:43 +02:00
Karroffel be2ad4f155 [GDNative] made string functions more C-friendly 2017-04-11 14:58:59 +02:00
Karroffel 544940c175 [GDNative] C API and generator fixes 2017-04-11 01:45:58 +02:00
Karroffel 7919ec6d89 [GDNative] re-enabled some init options 2017-04-11 01:45:58 +02:00
Thomas Herzog 2ac0cf568d Merge pull request #8350 from karroffel/gdnative-api-reference-field
[GDNative] added is_reference filed to api.json
2017-04-10 22:30:57 +02:00
Karroffel c562cc9ea0 [GDNative] added is_reference filed to api.json 2017-04-10 21:32:20 +02:00
Karroffel cf45f3ab4b [GDNative] function to get class constructor 2017-04-10 19:56:12 +02:00
Rémi Verschelde 5598040e43 Merge pull request #8339 from karroffel/gdnative-reload-fix
[GDNative] Didn't iterate over all scripts
2017-04-10 08:53:49 +02:00
Sergey Pusnei 8589ca3903 Rename [gs]et_pos to [gs]et_position for Controls
Control set_pos -> set_position
Control set_global_pos -> set_global_position
[gs]et_mouse_pos -> [gs]et_mouse_position
[gs]et_global_mouse_pos -> [gs]et_global_mouse_position
fixes #8005
2017-04-10 08:27:34 +02:00
Karroffel 0486645c39 [GDNative] Didn't iterate over all scripts 2017-04-10 04:30:08 +02:00
Karroffel c7f8b22ba0 renamed dlscript module to gdnative 2017-04-09 21:07:53 +02:00
Rémi Verschelde 0198d2e03c Merge pull request #8329 from touilleMan/dlscript-godot_get_global_constants
GlobalConstants support in DLScript & api.json
2017-04-09 19:40:54 +02:00
Emmanuel Leblond b423529481
Change dlscript's godot_get_global_constants signature to return godot_dictionary 2017-04-09 19:04:10 +02:00
Emmanuel Leblond d48aabcec1
Add GlobalConstants entry to the dlscript's api.json generator 2017-04-09 11:47:53 +02:00
Bojidar Marinov 7cc561fe0e
Fixup #8123, seems like I forgot a few things
Should close #8315
Please test, I'm still unsure I did it correctly...
2017-04-08 19:42:37 +03:00
Emmanuel Leblond 68ae50ecc2
Add godot_get_global_constants function to dlscript 2017-04-08 17:16:58 +02:00
Rémi Verschelde fce779a4ef Merge pull request #8301 from karroffel/dlscript-refactor
[DLScript] refactoring and in-editor reloading
2017-04-08 16:49:46 +02:00
Andreas Haas fe4336f165
DLScript: Fix llvm compilation error.
`Ordered comparison between pointer and zero`
2017-04-08 12:18:20 +02:00
Karroffel 5695d9892e [DLScript] in-editor reloading 2017-04-08 01:28:14 +02:00
Rémi Verschelde df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Juan Linietsky 74808ac4d9 New particle system, mostly working, some small features missing. 2017-04-06 23:49:27 -03:00
Karroffel 8cd3f81886 [DLScript] refactored loading of libraries
I also enabled DLSCRIPT_EDITOR_FEATURES as the default.
It might not be the most usable because of the lack of a reloading functionality,
but as Zylann pointed out "It's better to see something than nothing at all"
2017-04-07 04:47:58 +02:00
Karroffel 741800f5cc [DLScript] fixed android builds now
... really.
2017-04-06 14:00:54 +02:00
Rémi Verschelde ab02206f18 Merge pull request #8280 from karroffel/dlscript-inheritance
[DLScript] inheritance fixes
2017-04-06 08:09:16 +02:00
Rémi Verschelde f5f9b220f9 Merge pull request #8276 from karroffel/dlscript-stl
[DLScript] API fixed and removed STL imports
2017-04-06 08:08:54 +02:00
curtisxk38 d35fab7382 Fix typo in Parser Error message 2017-04-05 23:11:05 -04:00
Karroffel 12514cfebc [DLScript] inheritance fixes
This properly implements script inheritance for DLScripts.
2017-04-06 03:39:06 +02:00
Karroffel 7d914a289c [DLScript] more API fixes 2017-04-06 01:49:09 +02:00
Karroffel 71a99d5517 [DLScript] removed STL imports 2017-04-06 00:22:37 +02:00
Karroffel fa7e167a92 [DLScript] fixed virtual method export 2017-04-05 17:08:23 +02:00
Karroffel c6645d6a40 [DLScript] removed unused import
This hopefully fixes android builds
2017-04-05 14:08:26 +02:00
Karroffel 6c49fe9c62 [DLScript] added variant constructor and a function to get userdata of a script
The godot_dlinstance_get_userdata() function can be used to get the DLScript userdata pointer of any object that has a DLScript attached to it.
This is particularly useful and even required for language bindings to work properly.

This also fixes non-tool builds.
2017-04-04 23:02:46 +02:00
Rémi Verschelde 46bc14e66f Merge pull request #8246 from GodotNativeTools/dlscript-module
DLScript module
2017-04-04 00:25:03 +02:00
Karroffel fd55308786 added dlscript module
This module was written by bojidar-bg and me, with the help of ClikCode and touilleMan.

This adds a module to Godot that enables the use of dynamic libraries as a source for scripts.
That also allows third party libraries to be linked to Godot more easily and without creating modules.

For a readme see https://github.com/GodotNativeTools/godot_headers/blob/master/README.md
2017-04-03 17:20:11 +02:00
Saggi Mizrahi c464609bda Add '$' to token names
It was missing from this array and would cause godot to crash or report
bad errors.

Signed-off-by: Saggi Mizrahi <saggi@mizrahi.cc>
2017-04-01 03:20:23 +03:00
Rémi Verschelde d8f32637be SCons: Add option to toggle warnings (on by default)
All the warnings are factored out of the platform-specific files and moved to
SConstruct. Will have to check that it does not introduce regressions on some
platforms/compilers.

(cherry picked from commit 31107daa1a)
2017-03-26 21:58:37 +02:00
Rémi Verschelde 495710c3d6 Merge pull request #8123 from bojidar-bg/gdscript-inline-block-indent
Make inline blocks in GDScript more (or less) pythonic
2017-03-24 22:52:09 +01:00
Rémi Verschelde 296ece2c6a Merge pull request #7985 from Faless/enet_godot_sock_squash
Update ENet to use Godot sockets.
2017-03-24 22:47:18 +01:00
Rémi Verschelde debeee56f7 Fix typos in source code using codespell
From https://github.com/lucasdemarchi/codespell
2017-03-24 21:45:31 +01:00
Fabio Alessandrelli 0450e6539e ENet code cleanup and changes from review. 2017-03-24 02:30:11 +01:00
Fabio Alessandrelli 38d457170a Update ENet module to support custom ENet lib
Keep compatibility with upstream enet libraries
2017-03-24 02:30:05 +01:00
Bojidar Marinov 18ab88b3f1
Make inline blocks in GDScript more pythonic
Fixes #8001
2017-03-23 20:07:02 +02:00
Rémi Verschelde 33a2c5def0 Merge pull request #8095 from RandomShaper/fix-yield-crash
Fix random crashes when using yield()
2017-03-21 11:07:07 +01:00
Pedro J. Estébanez 0664a9ef8e Fix random crashes when using yield() 2017-03-21 02:53:06 +01:00
Rémi Verschelde 26c6c2b01a Fix linking order for builtin freetype
Before this change the libfreetype_builtin.a lib would be appended
at the very end of the linking flags, after system libs such as -lX11
or -lkernel32.
2017-03-19 15:19:31 +01:00
Rémi Verschelde 00c4782910 Merge pull request #8051 from RayKoopa/resizable_new_node_dialog
Make Create New Node dialog resizable and burninate old dialog
2017-03-18 14:52:34 +01:00
Ray Koopa c0c4ba4e94 Make Create New Node dialog resizable and burninate old dialog 2017-03-18 11:21:50 +01:00
mbalint12 edaf77abd6 Fixed typo in gdscript autocompletion.
There was a missing '!' sign, but autocompletion shows parent script members too.
2017-03-17 23:27:44 +01:00
Pedro J. Estébanez 31af5a31fb Skip asserts on non-debug builds at compiler level 2017-03-13 00:25:29 +01:00
Rémi Verschelde 6163343118 Make that Whole New World great again
Fix regression from 5dbf180 that broke Windows build.
2017-03-05 19:12:22 +01:00
Rémi Verschelde 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
Rémi Verschelde e1c1d7d1d7 Add a bunch of missing Godot headers in own files 2017-03-05 15:47:28 +01:00
Rémi Verschelde 49c065d29c Refactoring: rename tools/editor/ to editor/
The other subfolders of tools/ had already been moved to either
editor/, misc/ or thirdparty/, so the hiding the editor code that
deep was no longer meaningful.
2017-03-05 14:21:25 +01:00
Ferenc Arn 790611ef26 Added missing FIXMEs in PR #7878 2017-03-02 16:13:01 -06:00
Rémi Verschelde a1cbe8e22b Merge pull request #7878 from RebelliousX/else
Bunch of missing `else` statements and general logic
2017-02-28 23:03:10 +01:00
Saracen 5e938f0001 Inf and NaN support added to GDScript. 2017-02-28 21:52:33 +00:00
Thaer Razeq f50488a361 Various fixes detected using PVS-Studio static analyzer.
- Add FIXME tags comments to some unfixed potential bugs
- Remove some checks (always false: unsigned never < 0)
- Fix some if statements based on reviews.
- Bunch of missing `else` statements
2017-02-28 07:52:02 -06:00
Rémi Verschelde 1ec8b9fb7d Merge pull request #7851 from shlomif/fix-some-compilation-warnings
Get rid of some compilation warnings.
2017-02-26 20:22:48 +01:00
Rémi Verschelde 0f12d0a924 Merge pull request #7827 from volzhs/libwebp-0.6.0
Update libwebp to 0.6.0
2017-02-26 20:13:31 +01:00