summaryrefslogtreecommitdiffstats
path: root/modules/gdnative/pluginscript
Commit message (Collapse)AuthorAgeFilesLines
* Remove multilevel callsGeorge Marques2020-07-241-6/+0
| | | | | | In general they are more confusing to users because they expect inheritance to fully override parent methods. This behavior can be enabled by script writers using a simple super() call.
* Add override keywords.Marcel Admiraal2020-07-101-33/+33
|
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-142-15/+27
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-144-10/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Port member initialization from constructor to declaration (C++11)Rémi Verschelde2020-05-142-10/+5
| | | | | | | | | | Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
* Add ability to bind typed arrays to script APIJuan Linietsky2020-04-212-0/+9
| | | | | | | Note: Only replaced 2 instances to test, Node.get_children and TileMap.get_used_cells Note: Will do a mass replace on later PRs of whathever I can find, but probably need a tool to grep through doc. Warning: Mono will break, needs to be fixed (and so do TypeScript and NativeScript, need to ask respective maintainers)
* Exposed RenderingDevice to script APIJuan Linietsky2020-04-202-2/+2
| | | | | | | | | | | | | Also added an easier way to load native GLSL shaders. Extras: Had to fix no-cache for subresources in resource loader, it was not properly working, making shaders not properly reload. Note: The precommit hooks are broken because they don't seem to support enums from one class being used in another. Feel free to fix this after merging this PR.
* Replace NULL with nullptrlupoDharkael2020-04-026-21/+21
|
* SCons: Format buildsystem files with psf/blackRémi Verschelde2020-03-301-3/+3
| | | | | | | | | | | | | | | | | | | | | Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
* Adding missing include guards to header files identified by LGTM.Rajat Goswami2020-03-231-0/+5
| | | | This addresses the issue godotengine/godot#37143
* Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-172-2/+2
| | | | | | | | | | For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
* Refactor ScriptDebugger.Fabio Alessandrelli2020-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | EngineDebugger is the new interface to access the debugger. It tries to be as agnostic as possible on the data that various subsystems can expose. It allows 2 types of interactions: - Profilers: A subsystem can register a profiler, assigning it a unique name. That name can be used to activate the profiler or add data to it. The registered profiler can be composed of up to 3 functions: - Toggle: called when the profiler is activated/deactivated. - Add: called whenever data is added to the debugger (via `EngineDebugger::profiler_add_frame_data`) - Tick: called every frame (during idle), receives frame times. - Captures: (Only relevant in remote debugger for now) A subsystem can register a capture, assigning it a unique name. When receiving a message, the remote debugger will check if it starts with `[prefix]:` and call the associated capture with name `prefix`. Port MultiplayerAPI, Servers, Scripts, Visual, Performance to the new profiler system. Port SceneDebugger and RemoteDebugger to the new capture system. The LocalDebugger also uses the new profiler system for scripts profiling.
* Removed interactive loader, added proper thread loading.Juan Linietsky2020-02-282-2/+2
|
* Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez2020-02-262-24/+3
| | | | | | | | | | | | | | | | Main: - It's now implemented thanks to `<mutex>`. No more platform-specific implementations. - `BinaryMutex` (non-recursive) is added, as an alternative for special cases. - Doesn't need allocation/deallocation anymore. It can live in the stack and be part of other classes. - Because of that, it's methods are now `const` and the inner mutex is `mutable` so it can be easily used in `const` contexts. - A no-op implementation is provided if `NO_THREADS` is defined. No more need to add `#ifdef NO_THREADS` just for this. - `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`. - Thread-safe utilities are therefore simpler now. Misc.: - `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same. - Every case of lock, do-something, unlock is replaced by `MutexLock` (complex cases where it's not straightfoward are kept as as explicit lock and unlock). - `ShaderRD` contained an `std::mutex`, which has been replaced by `Mutex`.
* Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky2020-02-204-12/+12
| | | | objects and made them default.
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-183-15/+15
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Optmized data sent during RPC and RSet calls.Andrea Catania2020-02-124-23/+140
| | | | | | | | | | - Now is sent the method ID rather the full function name. - The passed IDs (Node and Method) are compressed so to use less possible space. - The variant (INT and BOOL) is now encoded and compressed so to use much less data. - Optimized RPCMode retrieval for GDScript functions. - Added checksum to assert the methods are the same across peers. This work has been kindly sponsored by IMVU.
* Use StringName in pluginscript's set/get_prop and add_global_constantEmmanuel Leblond2020-02-012-6/+3
|
* Remove unused #if 0'ed codeRémi Verschelde2020-01-212-53/+10
|
* Update copyright statements to 2020Rémi Verschelde2020-01-0110-20/+20
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* Add missing on error manifest struct destroy in pluginscript script initEmmanuel Leblond2019-12-011-7/+16
|
* Merge pull request #32051 from qarmin/some_error_explanationRémi Verschelde2019-09-251-3/+1
|\ | | | | Added some obvious errors explanations
| * Added some obvious errors explanationsqarmin2019-09-251-3/+1
| |
* | Fix misc. source comment typosluz.paz2019-09-191-2/+2
|/ | | Found using `codespell -q 3 -S ./thirdparty,*.po -L ang,ba,cas,dof,doubleclick,fave,hist,leapyear,lod,nd,numer,ois,paket,seeked,sinc,switchs,te,uint -D ~/Projects/codespell/codespell_lib/data/dictionary.txt `
* Make VarArg methods return types show up as Variant in API jsontoasteater2019-08-261-1/+1
| | | | | | | | | | | | VarArg methods have the return type Object in the API json for GDNative. This can cause undefined behavior in some language bindings due to lack of documentation on VarArg methods' behavior. This changes the MethodInfo of: - CSharpScript::_new - GDScript::_new - PluginScript::_new
* Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", ↵Robin Hübner2019-08-091-15/+10
| | | | "modules/gdnative", "modules/gdscript" directories.
* Remove added pluginscript resource format loaders and savers on cleanupIvan Hilaire2019-07-191-0/+2
| | | | | Properly release added resource loader and save references. Otherwise PluginScript API may cause "ObjectDB Instances still exist!" warnings and segmentation faults on exit.
* Parse more informations for code completionGeequlim2019-07-042-3/+4
|
* Remove bogus nulls from generated default valuesBojidar Marinov2019-06-291-4/+12
| | | | Also, fix crash in PluginScript destructor.
* Fixed cases of unsupported pointers being used to construct variantsAndrettin2019-06-292-2/+2
|
* Unexpose subclasses of ResourceFormatLoader and -SaverRémi Verschelde2019-06-181-4/+0
| | | | | | | | | | | | | | ResourceFormatLoader and ResourceFormatSaver are meant to be overridden to add support for different formats in ResourceLoader and ResourceSaver. Those should be exposed as they can be overridden in plugins. On the other hand, all predefined subclasses of those two base classes are only meant to register support for new file and resource types, but should not and cannot be used directly from script, so they should not be exposed. Also unexposed ResourceImporterOGGVorbis (and thus its base class ResourceImporter) which are editor-only.
* Fix error macro calls not ending with semicolonRémi Verschelde2019-06-111-6/+6
| | | | | | | It's not necessary, but the vast majority of calls of error macros do have an ending semicolon, so it's best to be consistent. Most WARN_DEPRECATED calls did *not* have a semicolon, but there's no reason for them to be treated differently.
* Merge pull request #28099 from lupoDharkael/fix-completionRémi Verschelde2019-06-032-3/+3
|\ | | | | Fix code completion not working with class_name
| * Fix code completion not working with class_namelupoDharkael2019-04-162-3/+3
| |
* | Fix typos with codespellRémi Verschelde2019-05-191-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using codespell 1.15.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear doubleclick leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
* Replace a few #if/#elif with #ifdef and "#elif defined"Ignacio Etcheverry2019-04-051-1/+1
|
* Make direct casting among Error and godot_error enums (#23015).marxin2019-02-181-2/+1
|
* Update copyright statements to 2019Rémi Verschelde2019-01-0110-20/+20
| | | | Happy new year to the wonderful Godot community!
* Merge pull request #23615 from buresu/pluginscript-newRémi Verschelde2018-12-182-13/+78
|\ | | | | PluginScript: Add support for the new() method
| * PluginScript: Add support for the new() methodNaoto Kondo2018-11-102-13/+78
| |
* | Added basic support for custom resource savers and loadersMarc Gilleron2018-12-153-8/+12
| |
* | Allow signal connecting even if script is invalid (only when compiled with ↵Juan Linietsky2018-11-271-0/+1
|/ | | | tools), fixes #17070
* SCons: Build thirdparty code in own env, disable warningsRémi Verschelde2018-09-281-5/+2
| | | | | Also remove unnecessary `Export('env')` in other SCsubs, Export should only be used when exporting *new* objects.
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-123-7/+7
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Added system for GDScript warningsGeorge Marques2018-08-102-2/+2
| | | | | | | - Count and panel per script. - Ability to disable warnings per script using special comments. - Ability to disable warnings globally using Project Settings. - Option to treat enabled warnings as errors.
* Add editor highlight for type-safe linesGeorge Marques2018-07-202-2/+2
| | | | | The line number is hightlighted to indicate that the line contains only type-safe code.
* [Pluginscript] Fix not working exports in editorEmmanuel Leblond2018-06-151-19/+4
|
* Refactor RPCMode enum and checksFabio Alessandrelli2018-05-294-20/+20
|
* Revert "RPCMode refactor, more sync modes"Max Hilbrunner2018-05-294-20/+20
|
* Refactor RPCMode enum and checksFabio Alessandrelli2018-05-264-20/+20
|