Commit graph

74 commits

Author SHA1 Message Date
Sergey Minakov 9086599ae6 GDNative: support dynamic loading of iOS frameworks 2020-07-02 12:55:49 +03:00
Rémi Verschelde 0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
Rémi Verschelde 0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
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.
2020-05-14 16:54:55 +02:00
Juan Linietsky ae09b55a19 Exposed RenderingDevice to script API
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.
2020-04-20 21:21:58 -03:00
lupoDharkael 95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Rémi Verschelde cb282c6ef0 Style: Set clang-format Standard to Cpp11
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`.
2020-03-17 07:36:24 +01:00
Juan Linietsky 475e4ea67b Removed interactive loader, added proper thread loading. 2020-02-28 11:20:45 -03:00
Marcel Admiraal 5af3b4ca27 Remove duplicate ERR_PRINT macro. 2020-02-05 11:13:24 +01:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
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.
2020-01-01 11:16:22 +01:00
Hugo Locurcio 9499eef4da
Document the GDNative singleton method prefix being changeable
This also tweaks error messages to remove hardcoded references to
the default `godot_` prefix.
2019-10-07 15:59:57 +02:00
Robin Hübner 6ab118c464 Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", "modules/gdnative", "modules/gdscript" directories. 2019-08-09 11:13:24 +02:00
Bojidar Marinov f7dad789e9
Fix various memory leaks and errors 2019-07-02 17:23:54 +03:00
Rémi Verschelde e0574e1d98 Fix typos with codespell
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
```
2019-05-19 13:10:35 +02:00
Fabio Alessandrelli aecbb330f3 Fix GDNative library resource loading.
Store general properties in ConfigFile too when modifying them.
Additionally set config_file property as internal as it's not editable
from inspector. It also does not appear to get saved in a meaningful way
(saved as Object(ConfigFile, ...))
2019-05-12 21:26:22 +02:00
karroffel 9786b51601 [GDNative] fix crash at shutdown when using singleton libraries and NativeScript
When a singleton library was exposing NativeScript functionality,
the NativeScriptLanguage would attempt to terminate the library at
shutdown.

Since the GDNative module itself handles singleton libraries,
it closes all singleton libraries at shutdown as well. This double free
could cause a crash, since the library referenced would no longer be alive.
2019-03-09 18:01:08 +01:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Juan Linietsky f2e54057ae -Moved EditorDefaultValue to ClassDB, made it core
-Removed one and zero hints for properties, replaced by default value
2018-11-08 11:30:59 -03:00
Naoto Kondo 63cba9ba62 GDNative: Fixes a problem that active_library_path is wrong after exporting app for mac 2018-10-28 23:57:51 +09:00
Rémi Verschelde 1a16dabfb5
Merge pull request #21982 from luzpaz/misc-typos
Misc. typos
2018-09-13 10:59:00 +02:00
luz.paz 08bde5b2de Misc. typos
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-12 21:39:17 -04:00
Rémi Verschelde 277b24dfb7 Make core/ includes absolute, remove subfolders from include path
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.
2018-09-12 09:52:22 +02:00
Hein-Pieter van Braam 0e29f7974b Reduce unnecessary COW on Vector by make writing explicit
This commit makes operator[] on Vector const and adds a write proxy to it.  From
now on writes to Vectors need to happen through the .write proxy. So for
instance:

Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;

Failing to use the .write proxy will cause a compilation error.

In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.

_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
Pedro J. Estébanez 474eda9e30 Fix Variant leak in call_native 2018-05-08 21:27:33 +02:00
karroffel f29139f3cf [GDNative] enable saving GDNativeLibrary as sub resource 2018-04-04 13:07:43 +02:00
karroffel 57c0339d9f [GDNative] easier GDNativeLib handling 2018-04-04 12:24:10 +02:00
karroffel ee8ee463c3 [GDNative] cache API hashes 2018-01-13 21:21:05 +01:00
Juan Linietsky 50b975548d Removed PBM bitmap loader, added abiliy to importi mages as bitmap. Fixes #14828 2018-01-06 16:38:36 -03:00
karroffel 34cdcf5cd0 [GDNative] added reload property 2018-01-06 12:31:30 +01:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
George Marques c9005ca7fd
Merge pull request #15246 from vnen/uwp-gdnative
Make GDNative DLLs work on UWP
2018-01-01 22:47:22 -02:00
George Marques 2a023a425d
Make GDNative DLLs work on UWP 2018-01-01 13:59:14 -02:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Rémi Verschelde d5ca9e2f6f Style: Apply clang-format again on all files
Fixes issues introduced by newer clang-format versions or commits
pushed directly without using the clang-format pre-commit hook.
2017-12-07 08:02:00 +01:00
Juan Linietsky 9678231b10 Changed the dynamic library open function to allow setting the path of the library to open extra libraries. 2017-11-30 10:00:55 -03:00
Ruslan Mustakov ebf9b80a47 Proper GDNative export on Android 2017-11-21 20:40:31 +07:00
Ruslan Mustakov 8f0f327f02 Allow configuring iOS export
- EditorExportPlugin's _export_begin accepts all the arguments related
   to the current export (is_debug, path, flags).

 - EditorExportPlugin API is extended with methods allowing to configure
   iOS export: add_ios_framework, add_ios_plist_content,
   add_ios_linker_flags, add_ios_bundle_file.

 - iOS export template now contains Godot as a static library so that
   it can be linked with third-party Frameworks and GDNative static
   libraries.

 - Adds method to DirAccess for recursive copying of a directory.

 - Fixes iOS export to work with Xcode 9 (released recently).
2017-11-21 01:16:49 +07:00
Karroffel 7388a1e115 [GDNative] removed static linking fields 2017-11-20 14:28:52 +01:00
Karroffel 0865365e21 [GDNative] loading error and version error procs 2017-11-20 11:09:55 +01:00
Thomas Herzog bd2b1a62d9
Merge pull request #12586 from karroffel/gdnative-gdnlibrary-changes
[GDNative] use feature tags, added load once option
2017-11-14 15:34:07 +01:00
Karroffel 7ae2de8997 [GDNative] better API struct versioning 2017-11-10 12:08:09 +01:00
Karroffel d82942e1c5 [GDNative] removed anchors 2017-11-03 15:17:50 +01:00
Karroffel ffc2669298 [GDNative] use feature tags, added load once option 2017-11-03 15:17:44 +01:00
Karroffel e568f80e6e [GDNative] removed native_raw_call 2017-10-14 15:50:55 +02:00
Emmanuel Leblond cdc29926af
[GDnative] replace gdnative_api_struct.h by a json-based autogenerated system 2017-10-03 09:48:52 +02: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
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
Konstantin Zaitsev c386a02654 Fix MSVC compilation errors 2017-09-19 10:33:07 +07: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