Commit Graph

8 Commits (7adc5360d79d06f296347e2247a115f60bc7ece4)

Author SHA1 Message Date
bruvzg e3119e7d05
Sync containers with new HashMap/HashSet, sync API headers. 2022-06-06 12:18:07 +03:00
Rémi Verschelde 1632322ce0 Update copyright year 2022-03-15 10:17:53 +01:00
bruvzg e36180f377
Port a bunch of Godot container templates to GDExtension. 2022-02-18 21:07:53 +02: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 ef528d3a86 Rename interface to gdn_interface because it's a defined keyword under windows 2021-10-28 19:44:20 +11: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 b07559882c Silence delete compile warning in memory.h/cpp on Windows 2021-09-27 23:08:09 +10:00
George Marques e4ed48976a Replace bindgins to work with extensions 2021-09-27 23:08:08 +10:00