Commit Graph

205 Commits (ca3e25de040c87de1a9bb332c62cfaef0d44fe75)

Author SHA1 Message Date
Matthew Murphy ca3e25de04 Fix variant call compiler error
Co-authored-by: David Snopek <dsnopek@gmail.com>
2023-09-09 11:30:29 -05:00
A Thousand Ships f651df5e7a Ensure `const` correctness for wrappers 2023-09-06 19:33:03 +02:00
David Snopek 0db95a92a6
Merge pull request #1228 from Bromeon/bugfix/yet-another-bool
GDExtension: fix `bool` unknown in C
2023-09-02 16:13:51 -05:00
David Snopek 8990d5a40e
Merge pull request #1091 from Daylily-Zeleen/daylily-zeleen/implement_builtin_classes_vararg_methods
Implement vararg methods of builtin classes.
2023-09-02 08:04:29 -05:00
Jan Haller 54092861f1 GDExtension: fix `bool` unknown in C 2023-09-02 13:19:14 +02:00
Markus Sauermann c2d99fd519 Fix `Object::notification` order
For the notification-order to work correctly, it is necessary to
allow the `p_reversed` argument to be used within cpp.
This PR changes the necessary bindings.
2023-08-30 00:07:28 +02:00
David Snopek f0405f18a3 Add support for placeholder_script_instance_create/update 2023-08-28 17:02:13 -05:00
A Thousand Ships 52eb77efd4 Add remaining component-wise `min/max` functions to `Vector*` 2023-08-16 13:52:51 +02:00
Adam Scott f5c8e5190f
Fix forgotten not operator 2023-08-16 05:30:40 -04:00
Adam Scott 5c262844ad
Fix Clang deprecated builtins
It seems that Clang and GCC have different interpretations of certain
builtins. So this PR uses std <type_traits> functions just as cowdata.h
does in the godot project.
2023-08-15 18:50:47 -04:00
David Snopek 8bc1c1dbeb Implement `String::resize()` 2023-07-31 15:14:10 -05:00
David Snopek 1d49bef096
Merge pull request #1184 from Zylann/fix_get_property_list_calling_parent
Don't call parent _get_property_list when a class doesn't define it (for internal binding).
2023-07-26 15:31:15 -05:00
David Snopek d15550fdee
Merge pull request #1186 from mihe/indexed-properties
Add support for indexed properties
2023-07-26 14:22:34 -05:00
Marc Gilleron baf0b9e0f7 Don't call parent _get_property_list when a class doesn't define it.
Godot is already supposed to call _get_property_list of parent classes,
so this binding function must really only return procedural properties of
the class it belongs to, and not parent or child classes.
2023-07-26 20:12:25 +01:00
Mikael Hermansson 7d8cb7c155 Add support for indexed properties 2023-07-26 00:31:53 +02:00
Daylily-Zeleen 3536803e9e Implement vararg methods of builtin classes. 2023-07-03 17:30:42 +08:00
David Snopek 4df112cd95 Attempt to fully implement CharString 2023-06-22 21:03:30 -05:00
Kehom 20be441026 Unregister custom classes in reverse registration order 2023-06-19 11:04:11 -03:00
Andy Maloney db2394dbe7 Identifiers containing double underscore are reserved according to the C++ standard
Rename __* to _gde_*

https://timsong-cpp.github.io/cppwp/n3337/global.names

https://en.cppreference.com/w/cpp/language/identifiers

Identifiers appearing as a token or preprocessing token (i.e., not in user-defined-string-literal like operator ""id) (since C++11) of one of the following forms are reserved:
 - identifiers with a double underscore anywhere;
 - identifiers that begin with an underscore followed by an uppercase letter;
 - in the global namespace, identifiers that begin with an underscore.
2023-06-15 20:45:01 -04:00
David Snopek ad726015e7 Revert the changes from PR #1044 and #1045 and standardize on `Object **` encoding in ptrcall 2023-06-07 08:30:33 -05:00
Rémi Verschelde 2078c00bab
Merge pull request #1114 from dsnopek/editor-plugins
Add support for adding/removing editor plugins
2023-05-26 11:04:35 +02:00
David Snopek 0d0d5a670b
Merge pull request #1116 from saki7/Ref-allow-non-const-access
Change Ref<T> to allow non const access to ptr
2023-05-24 21:17:25 -05:00
Nana Sakisaka 48635729b9 Change Ref<T> to allow non const access to ptr 2023-05-17 19:24:09 +09:00
David Snopek e75ebffb70 Add support for adding/removing editor plugins 2023-05-16 22:02:35 -05:00
David Snopek 431e30bc32 Ensure GDExtension class is the correct type for the Godot engine class 2023-05-16 15:18:48 -05:00
David Snopek a5c6ca5920 Update to load function pointers for GDExtension interface 2023-05-09 21:45:48 -05:00
Rémi Verschelde feaba551b5
Merge pull request #1045 from zhehangd/fix_ref_crash
Fix crash using Ref<T> as parameter
2023-04-04 11:30:08 +02:00
Rémi Verschelde e9942db502
Merge pull request #1044 from zhehangd/fix_obj_ptr_crash
Fix crash using Object* as parameter
2023-04-01 11:36:17 +02:00
Zhehang Ding 093f0673f5 Fix PtrToArg<Object*> crash 2023-03-30 19:38:12 -07:00
bruvzg ba4b50118d
Fix incorrect memory allocation in release builds.
Co-authored-by: lightyears <lightyears1998@hotmail.com>
2023-02-21 15:32:26 +02:00
David Snopek 964c515d75 Revert "Fix Object::cast_to<T>() for custom classes"
This reverts commit 75af9003dc.
2023-02-16 06:58:32 -06:00
Zhehang Ding 517db6686a Fix PtrToArg<Ref<T>> crash 2023-02-15 22:36:29 -08:00
David Snopek 75af9003dc Fix Object::cast_to<T>() for custom classes 2023-02-11 17:16:59 -06:00
Rémi Verschelde fccceb8736
Merge pull request #1011 from mihe/error-macros
Update error macros to match core
2023-02-07 13:47:51 +01:00
bruvzg 37f6e35974
Update typed array API to match "GDScript: Fix typed arrays". 2023-01-31 11:28:55 +02:00
Rémi Verschelde d177752be1
Merge pull request #982 from WildRackoon/templates-add-LocalVector
Add missing local_vector.hpp template
2023-01-30 12:32:13 +01:00
Rémi Verschelde c1d4fb2b68
Merge pull request #1023 from mashumafi/fix-alloc-order
Move DefaultTypedAllocator after memdelete
2023-01-30 12:32:07 +01:00
Rackoon 1df83331de
Add missing LocalVector template
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-01-30 12:30:34 +01:00
Rémi Verschelde 2ef10f9754
Merge pull request #956 from DmitriySalnikov/enum_bitfield_cast
Fixed `VARIANT_ENUM/BITFIELD_CAST` to show the correct names
2023-01-30 12:07:15 +01:00
mashumafi a8be6aa8dd Move allocator to after memdelete 2023-01-29 23:29:31 -05:00
George Marques 64be8c1507
Use std type traits instead of intrinsics
This removes warnings and mimics what has been done in Godot itself.
2023-01-28 13:59:34 -03:00
Mikael Hermansson d174b47e51 Update error macros to match core 2023-01-22 14:24:57 +01:00
Rémi Verschelde 00b29630ba
Merge pull request #1003 from akien-mga/fix-sign-0
Change behavior of Math::sign to match Godot builtin
2023-01-20 23:02:13 +01:00
Дмитрий Сальников 6528c7177f Fixed variant casting for enum and bitfield 2023-01-20 21:10:03 +03:00
Andy Maloney e6b636cc51 Fix sign comparison warnings in method_bind.hpp
Part of #999
2023-01-19 08:26:02 -05:00
Rémi Verschelde 2a9b21e46a
Merge pull request #1004 from asmaloney/remove-unused-ucaps
Remove unused ucaps header
2023-01-19 13:55:29 +01:00
Rémi Verschelde 07e2e20f7b
Merge pull request #939 from bruvzg/gde_low_level_funcs_cpp
Expose some low level functions and String operators.
2023-01-19 13:55:24 +01:00
Rémi Verschelde 04731d2b78
Merge pull request #965 from WildRackoon/fix-GDCLASS-fwddeclaration
Fix GDCLASS needs explicit ClassDB fwd declaration
2023-01-19 13:55:14 +01:00
Andy Maloney 67be0c95e1 Remove unused ucaps header
These static structs were being included in every file string.hpp was included in...

Part of #999
2023-01-19 07:15:40 -05:00
bruvzg abca497b72
Expose some low level functions and String operators. 2023-01-19 13:12:21 +02:00