bruvzg
a8cd21ac07
Fix "const" NativePtr binds.
2022-02-16 11:35:13 +02:00
bruvzg
bf8fc4c53d
Add `ptr()` / `ptrw()` to the arrays, add missing `String` methods, add missing `CharString` method implementations.
2022-02-14 23:17:21 +02:00
Rémi Verschelde
cfd3fa97d1
Merge pull request #668 from groud/fix_extension_instance_set
2022-01-06 17:44:29 +01:00
Bradley Clemetson
76c4adb7f8
Normalized additional macros to ensure that everything works without client code needing using
2021-12-18 15:16:14 -08:00
Bradley Clemetson
37938a1761
Fix namespace to be consistent with the previous ADD functions
2021-12-12 18:23:33 -08:00
Gilles Roudière
adbbf1a3a1
Fix object_set_instance being wrongly called for built-in wrapped classes
2021-12-06 15:40:19 +01:00
Gilles Roudière
3fcb8a4d1e
Make extension instances create the corresponding godot object in their constructor
2021-12-03 15:37:49 +01:00
Bastiaan Olij
94efe3d410
Fixing compiler warnings around implicit type casting loosing precision
2021-11-22 21:48:20 +11:00
Bastiaan Olij
957f86c3e3
Add Array:make macro
2021-11-02 00:20:19 +11: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
Rémi Verschelde
6a720e5c7c
Merge pull request #631 from Faless/ext/ref_casting_2
2021-09-28 16:14:45 +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
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
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
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
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
George Marques
aef0f1e248
Change initialization to allow custom level callbacks
...
Now it needs a callback for each level so custom logic (like loading
singletons) can be performed.
2021-09-27 23:08:10 +10:00
George Marques
dfa526ce16
Fix formatting of files
2021-09-27 23:08:10 +10:00
George Marques
f5858ef6c6
Fix calling of native functions that return object types
2021-09-27 23:08:10 +10:00
Bastiaan Olij
46c63af715
Re-introduce build-in type code for core types
2021-09-27 23:08:10 +10:00
Bastiaan Olij
b07559882c
Silence delete compile warning in memory.h/cpp on Windows
2021-09-27 23:08:09 +10:00
George Marques
a0634cca3f
Auto-bind virtual method overrides
2021-09-27 23:08:08 +10:00
George Marques
8bcf32a619
Fix issues with method calls
2021-09-27 23:08:08 +10:00
George Marques
e4ed48976a
Replace bindgins to work with extensions
2021-09-27 23:08:08 +10:00
Rémi Verschelde
4e8508ad53
Fixup style after #563
2021-09-27 12:26:32 +02:00
Rémi Verschelde
3de367920f
Merge pull request #563 from LinwoodCloud/master
2021-09-27 11:41:41 +02:00
Rémi Verschelde
055f3141f8
Merge pull request #588 from aaronfranke/signal-no-arg
2021-09-27 11:34:08 +02:00
Rémi Verschelde
7a693df988
Merge pull request #601 from colugomusic/fix-string-args-constness
2021-09-27 11:31:56 +02:00
Rémi Verschelde
0fba89df67
Merge pull request #595 from Calinou/add-license-headers
2021-09-27 11:31:31 +02:00
Colugo
bba8393af7
Fix argument constness in String::begins_with, String::ends_with
2021-08-22 16:02:14 +01:00
Hugo Locurcio
cf5428e103
Add license headers to all source and header files
...
This is consistent with the core Godot source code, and ensures the
license isn't detached from its original code when individual files
are distributed.
2021-08-02 18:34:58 +02:00
Hugo Locurcio
abab0715a0
Remove extraneous Error enum values that were removed in Godot 3.0
2021-08-02 18:23:41 +02:00
Mai Lavelle
2f534ddd88
Fix typo in CRASH_COND leading to unexpected continuation after fail
2021-08-01 17:20:39 -04:00
Aaron Franke
95ff72706d
Add ability to easily register signals with no arguments
2021-07-10 19:23:36 -04:00
Marc
fda7ddd158
Merge pull request #567 from DhruvMaroo/string
...
added String's move constructor and move assignment operator
2021-06-01 23:35:46 +01:00
DhruvMaroo
7a1890345b
edited according to clang-format
2021-06-01 23:16:09 +05:30
DhruvMaroo
b44b98a94c
removed _deleted class member
2021-05-31 09:10:59 +05:30
DhruvMaroo
cd05371ce8
added class member, safety check in the destructor
2021-05-31 00:52:36 +05:30
DhruvMaroo
492285f681
changed spaces to tabs
2021-05-30 22:29:41 +05:30
DhruvMaroo
6e662223aa
changed spaces to tabs
2021-05-30 22:15:37 +05:30
DhruvMaroo
bdc5674ace
added move assignment operator
2021-05-30 12:33:40 +05:30
DhruvMaroo
689b5fb98b
added mover constructor
2021-05-30 12:30:11 +05:30
DhruvMaroo
c296e9210b
Revert "Revert "added inverse trigonometric functions in Math.hpp""
...
This reverts commit 8ef2e4f139
.
2021-05-30 12:23:39 +05:30