Commit Graph

331 Commits (1c625befa34339902361783383da2a510789398c)

Author SHA1 Message Date
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
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
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
Andy Maloney 5dd2928790 "Wrapped" has virtual functions so it should have a virtual destructor.
Deleting an object through a pointer to a base class is undefined behaviour unless the destructor in the base class is virtual.
2023-01-19 05:57:17 -05:00
Erik Abair d3f17c1dca
Change behavior of Math::sign to match Godot builtin
Fixes #551.
2023-01-19 09:47:13 +01:00
Rémi Verschelde cf3d995e8c
Merge pull request #997 from asmaloney/fix-shadow-eulerorder
Fix a shadowed enum (EulerOrder)
2023-01-18 18:36:21 +01:00
Rémi Verschelde 0dfe0d0166
Merge pull request #983 from rburing/variant_to_from_objectid
Add conversions between `Variant` and `ObjectID`
2023-01-18 11:41:57 +01:00
Andy Maloney dbd43ac107 Fix a shadowed enum (EulerOrder)
Use the global constants.
2023-01-17 18:38:24 -05:00
Дмитрий Сальников 0c6e26dabe Added property info for ptr and ref + ported the implementation of the `check` method 2023-01-13 15:56:51 +03:00
Rémi Verschelde 931f1a3f34
Sync license copyright with upstream GH-70885 2023-01-10 16:15:31 +01:00
Fabio Alessandrelli 9fd33b5cde Allow method binds to take Object subclasses as arguments
As done in upstream Godot via GH-57205.

Add a test that ensures it works also for "gdextended" objects.
2023-01-10 12:55:41 +01:00
Ricardo Buring d4e1dfe5dc Add conversions between Variant and ObjectID 2023-01-01 21:27:08 +01:00
Rackoon 72d537fd95 Fix GDCLASS needs explicit ClassDB fwd declaration 2022-12-16 13:49:10 +01:00
Jan Haller fce753c05d Extension header: amend const correctness of `p_args` parameters 2022-12-14 15:47:42 +01:00
Rémi Verschelde bab247dcb6
Rename godot-headers to gdextension, move header to top folder
Changes the `<godot/gdextension_interface.h>` include to simply
`<gdextension_interface.h>`.

Refactor and better document the SCons and CMake logic around setting
the paths to the header and API JSON file.
2022-12-14 12:36:59 +01:00
Rémi Verschelde 1e8eb1c1f2
Merge pull request #958 from BastiaanOlij/improve_gdextension_virtual_ref
Fix virtual GDExtension method Ref<T> conversion
2022-12-14 12:36:12 +01:00
Дмитрий Сальников b7eeddcf52 Use int64_t for BitField as in Godot itself 2022-12-13 13:36:16 +03:00
Bastiaan Olij 992d85e6f8 Fix virtual GDExtension method Ref<T> conversion 2022-12-13 10:41:55 +11:00
Gilles Roudière c02e644679 Rename GDNative to GDExtension
Non-exhaustive list of case-sensitive renames:

GDExtension -> GDNative
GDNATIVE -> GDEXTENSION
gdextension -> gdnative
ExtensionExtension -> Extension (for where there was GDNativeExtension)
EXTENSION_EXTENSION -> EXTENSION (for where there was GDNATIVE_EXTENSION)
gdnlib -> gdextension
gdn_interface -> gde_interface
gdni -> gde_interface
2022-12-12 11:06:38 +01:00
Emmanuel Leblond fe79449969
Fix cast on PtrToArg::convert 2022-12-05 03:30:50 +01:00
Emmanuel Leblond fe86a94dcf
Fix const qualifier for parameters in GDExtension api functions 2022-12-03 00:27:07 +01:00
Emmanuel Leblond fa405a8337
Fix lifetime of StringName objects returned by Wrapped::_get_property_list 2022-11-29 18:23:56 +01:00
Andy Maloney c7e34c2f9d Basic static analysis fixes
- remove extraneous semicolons
- use "nullptr" instead of "0"
- remove "break" after "return"
- use <cstdio> instead of <stdio.h>
2022-11-18 17:46:13 -05:00
Aaron Franke 1858e349c8
Update named colors to be in sync with the engine 2022-11-12 00:31:06 -06:00
Emmanuel Leblond 2745d341aa
Fix broken namespace isolation in GDCLASS macro 2022-11-11 16:45:42 +01:00
Emmanuel Leblond b6ba0dca13
StringName is working fine with demo \o/ 2022-11-08 21:44:33 +01:00
Emmanuel Leblond 3b82d5937b
Correct GDNativeExtensionScriptInstanceToString 2022-11-08 21:44:32 +01:00
Emmanuel Leblond d1963dc133
Correct __constant_get_bitfield_name with StringName 2022-11-08 21:44:32 +01:00
Emmanuel Leblond a706a9ceb9
Remove now useless `_alloc_and_copy_cstr` 2022-11-08 21:44:31 +01:00
Emmanuel Leblond e24b6b0e51
Use StringName in the whole GDExtension API instead of const char * 2022-11-08 21:44:31 +01:00
Emmanuel Leblond 0e81f89dd3
Uses `StringName` in GDExtension perf critical instance creation & method/properties setter/getter 2022-11-08 21:44:30 +01:00
Fabio Alessandrelli a9c341656d Add missing bindings for GDNativePtr<void>. 2022-10-20 18:08:15 +02:00
Ricardo Buring 01960ffc9f Add support for virtual and abstract classes 2022-10-15 13:15:05 +02:00
Emmanuel Leblond b21931c4a3
Type `GDNativePropertyInfo.type` field as `GDNativeVariantType` 2022-10-13 14:04:54 +02:00
Aaron Franke 592bd15c7a
Run scripts to format and make headers consistent 2022-10-09 01:47:07 -05:00
Rémi Verschelde db8679443f Merge pull request #885 from aaronfranke/core-data-structs
Update core data structures to match the engine
2022-10-07 22:25:54 +02:00
Rémi Verschelde 0eba81ef79 Merge pull request #876 from Daylily-Zeleen/Daylily-Zeleen/master
Add detail infos for binding error message.
2022-10-07 22:25:49 +02:00
Aaron Franke 65eeb94f75
Update core data structures to match the engine 2022-10-07 11:27:41 -05:00
Mikael Hermansson 40d181d2f3 Bind enums in built-in types and expose bindings for global constants 2022-10-06 11:16:17 +02:00
Rémi Verschelde 50a534bf55 Merge pull request #880 from aaronfranke/struct
Use `struct` instead of `class` for core structures
2022-10-05 10:35:59 +02:00
Rémi Verschelde 91afc08de1 Merge pull request #855 from Zylann/fix_issue854_virtual_methods
Fix deriving a custom class with virtual methods
2022-10-05 10:35:54 +02:00
Aaron Franke 0455f72ede
Use struct instead of class for core structures 2022-10-05 01:46:15 -05:00
Rémi Verschelde d25cae9b61 Merge pull request #859 from aaronfranke/basis-transform-quat
Update Basis/Transform3D/Quaternion to match the engine
2022-10-04 16:39:46 +02:00
Aaron Franke fc879c04c8
Update Vector4/4i to match the engine 2022-10-01 21:09:05 -05:00
Aaron Franke d479208a8f
Update Vector2/2i/3/3i to match the engine 2022-10-01 21:09:05 -05:00