Gilles Roudière
55ba2602db
Avoid crash in Variant constructor from nullptr Object*
2021-11-23 11:01:49 +01:00
Rémi Verschelde
adbc0bfe00
Merge pull request #656 from BastiaanOlij/dictionary_index
2021-11-23 10:07:07 +01:00
Bastiaan Olij
b008810c01
Implementing dictionary operators
2021-11-23 19:44:53 +11:00
Rémi Verschelde
5cacce7a26
Merge pull request #650 from BastiaanOlij/fix_compile_warnings
2021-11-22 12:22:24 +01:00
Bastiaan Olij
94efe3d410
Fixing compiler warnings around implicit type casting loosing precision
2021-11-22 21:48:20 +11:00
Rémi Verschelde
8d25e04d28
Merge pull request #627 from BastiaanOlij/array_operator
2021-11-17 11:04:32 +01:00
Bastiaan Olij
c2b690439f
Implement index operators for Arrays
2021-11-12 14:29:54 +11:00
Rémi Verschelde
271e33658d
Merge pull request #649 from RedwanFox/windows_fix_cmake_configuration
2021-11-11 13:58:26 +01:00
Nickolai Korshunov
5336c7e97b
synced windows compile definitions with scons configuration
...
df9164b9bd
2021-11-11 15:19:16 +03:00
Rémi Verschelde
fd76008f63
Merge pull request #646 from BastiaanOlij/add_array_make
2021-11-10 08:53:24 +01:00
Rémi Verschelde
7d01234211
headers: Sync with upstream commit 3abb5a9
2021-11-04 15:43:03 +01:00
Rémi Verschelde
b3c7581cf9
Add `.gitignore` for test, ignore potential log files
...
(cherry picked from commit 1070a29d77
)
2021-11-04 15:42:27 +01:00
Bastiaan Olij
957f86c3e3
Add Array:make macro
2021-11-02 00:20:19 +11:00
Rémi Verschelde
b1dbaad396
Merge pull request #644 from BastiaanOlij/rename_interface
2021-10-28 11:12:07 +02:00
Bastiaan Olij
ef528d3a86
Rename interface to gdn_interface because it's a defined keyword under windows
2021-10-28 19:44:20 +11:00
Bastiaan Olij
5148aad3d4
headers: Sync with upstream commit 92a2380
2021-10-25 20:27:03 +11:00
Rémi Verschelde
c7fc804112
headers: Sync with upstream commit a4e1a07
2021-10-16 17:36:37 +02:00
Rémi Verschelde
d9e643db2b
Merge pull request #639 from Shatur/rework-cmake-debug-flags
2021-10-04 09:14:18 +02:00
Hennadii Chernyshchyk
2f92b4a37d
Rework debug flags for CMake
...
* Attach debug flags to the target and mark as `PUBLIC`. This will allow all
projects that use bindings not to add the same defines manually.
* Use generator-expressions to support multiconfig generators (such as
MSVC).
* Remove excplitic `NDEBUG` and `_DEBUG` flags, CMake handles it
automatically.
2021-10-03 17:30:37 +03:00
Rémi Verschelde
230fd4bc08
Merge pull request #634 from Faless/osx/universal
2021-10-01 07:37:42 +02:00
Fabio Alessandrelli
480ad9ffed
[CI] Make OSX universal build instead 2 builds.
2021-09-29 22:35:09 +02:00
Fabio Alessandrelli
67f9109d1f
[OSX] Add universal build support.
2021-09-29 22:31:12 +02:00
Rémi Verschelde
ad11bbb584
Merge pull request #632 from BastiaanOlij/debug_and_release
2021-09-29 08:10:05 +02:00
Bastiaan Olij
0f47ba54ee
Setup for building both debug and release build for side by side deployment
2021-09-29 10:47:08 +10:00
Rémi Verschelde
6a720e5c7c
Merge pull request #631 from Faless/ext/ref_casting_2
2021-09-28 16:14:45 +02:00
Fabio Alessandrelli
3cebc33414
Merge pull request #625 from Faless/ext/pointers
...
Add pointers support for virtual methods.
2021-09-28 16:01:38 +02:00
Fabio Alessandrelli
b28853aff1
Add test for Reference passing/returning.
2021-09-28 15:49:53 +02:00
Fabio Alessandrelli
b90d0ac555
Add Ref<T> binding support.
...
Added PtrToArg and GetTypeInfo adapted from Godot.
2021-09-28 15:49:08 +02:00
Rémi Verschelde
5826fd5259
Merge pull request #626 from Shatur/use-default
2021-09-28 09:11:39 +02:00
Hennadii Chernyshchyk
1f96a0d16c
Use default destructor for Object
2021-09-28 09:59:17 +03:00
Fabio Alessandrelli
80fdb9146f
Add pointers support for virtual methods.
...
As introduced in godot for virtual methods.
Custom structs are not yet supported.
2021-09-27 16:13:24 +02:00
Bastiaan Olij
a44e9aa3f9
Merge pull request #602 from vnen/gdnative-extensions
...
Bindings for the new extension system
2021-09-27 23:26:31 +10:00
Bastiaan Olij
d5e0fc8e7c
Temporary fix for issue in JSON export with NIL in operators
2021-09-27 23:08:12 +10:00
Bastiaan Olij
92d25bcda6
Update readme to include new info
2021-09-27 23:08:12 +10:00
Bastiaan Olij
68ebc9b2a8
Changed over to proper godot-headers
2021-09-27 23:08:12 +10:00
Bastiaan Olij
cbf52c2764
Removed init.cpp that I overlooked in rebase
2021-09-27 23:08:12 +10:00
Bastiaan Olij
0e3bc393d5
Fully register class on register_class call
2021-09-27 23:08:12 +10:00
Bastiaan Olij
fad6329699
Implement Ref copy constructor
2021-09-27 23:08:12 +10:00
Fabio Alessandrelli
ea7324afe8
Fix encoding/decoding of null objects.
2021-09-27 23:08:12 +10:00
Fabio Alessandrelli
59d38a4119
Add test for extended object creation/deletion.
2021-09-27 23:08:12 +10:00
Fabio Alessandrelli
42dd64f22f
Fix binding of function that takes Object * parameters.
2021-09-27 23:08:11 +10:00
Fabio Alessandrelli
b4632e317d
Fix creation (and godot-side deletion) of extended objects.
...
Proper initialization for godot-cpp classes with memnew.
Extension classes (i.e. the `GDCLASS` macro) behave differently from
regular wrapped classes, and requires Godot to initialize them during
object construction.
This commit update the GDCLASS macro to not create/destroy the instance
during the bindings callback, but during the extension callbacks.
When setting the object instance, the bindings instance is set to the
pointer of the extension instance so that it can later be retrieved
normally via `object_get_instance_bindings`.
2021-09-27 23:08:11 +10:00
Fabio Alessandrelli
cc88df05e7
Fix PtrToArg encoding for `Object *`.
...
It didn't set the return value at all, changing the local value instead.
Now instead correctly sets it as a generic pointer type from `_owner`.
2021-09-27 23:08:11 +10:00
Hennadii Chernyshchyk
2b1100c878
Use default initialization
...
{ 0 } initializes only first element with zero explicitly and other
elements with their default value (zeros too). Technically it will work
the same, but will be more correct.
2021-09-27 23:08:11 +10:00
Bastiaan Olij
7a2a7ea9e4
Add virtual destructor to Object class
2021-09-27 23:08:11 +10:00
Bastiaan Olij
b21069c573
_err_print_error only output p_message so swapped parameters around
2021-09-27 23:08:11 +10:00
Bastiaan Olij
fab017c91a
Fix some clang format things
2021-09-27 23:08:11 +10:00
George Marques
38ee8bfcf7
Change constructor/destructor management of extension classes
...
This makes sure custom constructors are always called on extension
classes. However, note that constructors should not take any parameters,
since Godot doesn't support that. Parameters are ignore in memnew macro.
Use memnew(MyClass()) instead of memnew(MyClass) since it now needs a
value instead of a class name. This macro calls MyClass::_new() (define
in GDCLASS macro) which ultimately calls Godot to create the object,
ensuring that both the Godot and the extension instances are created.
Non Godot classes (that don't derive godot::Object) are constructed as
usual an can have parameters.
memdelete is also changed for the same reason, as it needs to destroy
the Godot object as well, and that automatically frees the bound
extension instance.
2021-09-27 23:08:11 +10:00
Bastiaan Olij
e839199848
Add support for property groups
2021-09-27 23:08:11 +10:00
Bastiaan Olij
02802b1d0e
Add in driver types and rejig code to make it easier to extend
2021-09-27 23:08:11 +10:00