Commit Graph

176 Commits (20459da6768f0f6e3a74fea341f70f4e881e1946)

Author SHA1 Message Date
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 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
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
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
Karroffel cf30b0f39d rewrote binding generator in python 2017-05-12 21:53:07 +02:00
Karroffel ac51c7b141 moved includes out of namespace 2017-04-18 00:38:09 +02:00
Karroffel 005b9aa148 String.c_string() now returns char * 2017-04-11 15:48:26 +02:00
Karroffel 5e3b01f0f1 some NodePath fixes and better handling of Object type arguments 2017-04-06 02:32:24 +02:00
Karroffel 8aaef5a6a2 use pointers for objects, default arguments 2017-04-05 01:00:33 +02:00
Karroffel 7fa7f7b9c5 added operator overload for string 2017-03-18 15:23:28 +01:00
Karroffel 8d63048c6d Windows compatibility 2017-03-15 23:19:58 +01:00
Karroffel bce9ac109d mistakes were made. I undid them. 2017-03-15 18:13:29 +01:00
Karroffel 575bb7f339 reworked object system a little bit 2017-03-09 03:03:21 +01:00
Karroffel 632c953e42 buuunch of stuff 2017-03-06 08:49:24 +01:00
Karroffel 92e1f553ec properly implemented core types (c++ wise) 2017-03-06 03:30:46 +01:00
Karroffel a15e7b7189 I hate templates 2017-03-05 03:02:29 +01:00
Karroffel 5762c2f53f Added binding generator 2017-03-04 05:36:31 +01:00