Commit Graph

394 Commits (6ba31a1800c87844ec37e510f857e45cb673568b)

Author SHA1 Message Date
David Snopek 8269c0102a Explicitly refer to `godot` namespace in `GDREGISTER_*_CLASS()` macros
(cherry picked from commit 246a803954)
2024-06-14 10:31:04 -05:00
David Snopek 7b93607779 Fix NOTIFICATION_POSTINITIALIZE sent twice to native parent class
(cherry picked from commit 06373ce1cf)
2024-05-17 17:11:27 -05:00
Daylily-Zeleen 1ab42ec6c5 mark return value of `get_class_static` and `get_parent_class_static` as const
(cherry picked from commit 3db8549e19)
2024-05-17 16:58:32 -05:00
David Snopek 6328728dc2 Allow forwarding from `ClassDB` to `ClassDBSingleton` to support enumerations
(cherry picked from commit e1b3b32db5)
2024-05-17 16:57:33 -05:00
David Snopek 6123c86f06 Correctly handle `Object *` arguments that were encoded as `nullptr`
(cherry picked from commit 37542dc2ec)
2024-05-17 16:56:37 -05:00
David Snopek fff665e0f5 Give compile-time error if registering a class without its own `_bind_methods()` function
(cherry picked from commit ca46ef4d25)
2024-05-17 16:55:41 -05:00
pupil1337 82ea3f74a4 Add static_assert() for register_class
(cherry picked from commit 1fa7a9cb19)
2024-05-17 16:54:44 -05:00
A Thousand Ships 11cd9a0727 [Math] Add `is_finite` methods
(cherry picked from commit d389171905)
2024-05-17 16:54:00 -05:00
Chris Cranford a75e33c333 Implement to/from dict helpers for PropertyInfo/MethodInfo
(cherry picked from commit 2a041b5240)
2024-05-17 16:53:43 -05:00
David Snopek d24983d682 Backport miscellaneous changes that can't be cherry-picked
(cherry picked from commit 9afbdb9cf6)
2024-05-17 16:51:42 -05:00
Chris Cranford 30ebe5fdf9 Fix PropertyInfo to use hint/usage default constants
(cherry picked from commit e160966163)
2024-04-17 11:01:33 -05:00
A Thousand Ships c8fa4c0fd0 Fix incorrect utility call signature
(cherry picked from commit d055b575fb)
2024-04-08 11:40:05 -05:00
Thaddeus Crews 9e48c45bfc Enforce template syntax `typename` over `class`
(cherry picked from commit 87f5fb0691)
2024-04-08 11:39:21 -05:00
David Snopek 76d6ce7136 Avoid creating most objects that Godot is going to use placement new to initialize
(cherry picked from commit c4fde852e6)
2024-04-08 11:30:23 -05:00
A Thousand Ships 07e245e3e4 Fix invalid `void` return in `BitField`
(cherry picked from commit 7ed8ef7221)
2024-03-11 13:33:57 -05:00
Marc Gilleron ed576f8318 Fix explicit namespaces in macros
(cherry picked from commit e607790647)
2024-03-11 13:33:44 -05:00
David Snopek f7a9d32f32 Fix _notification with parent and child classes
(cherry picked from commit 23c010900c)
2024-03-11 13:31:19 -05:00
bruvzg 08da55cd0b [Core] Improve `CowData` and `Memory` metadata alignment.
(cherry picked from commit b173a4d935)
2024-03-11 13:11:26 -05:00
DaylilyZeleen 1ac8627b2e Fix object return value of builtin types' methods.
(cherry picked from commit 6a3753c076)
2024-03-11 12:59:32 -05:00
bruvzg 6202bf141e Switch to 64-bit ints.
(cherry picked from commit 59a5a8b104)
2024-03-11 12:59:19 -05:00
David Snopek 4b63d795e4
Merge pull request #1373 from dsnopek/4.1-cherrypicks-7
Cherry-picks for the godot-cpp 4.1 branch - 7th batch
2024-02-16 09:37:17 -06:00
A Thousand Ships 1c03aa7746 Add missing `OP_POWER` operator to `Variant`
(cherry picked from commit f037a697eb)
2024-01-22 15:53:49 -06:00
bruvzg b622b11df3 [iOS] Fix initialisation/termination of multiple statically linked extensions.
(cherry picked from commit adc9def046)
2024-01-22 15:53:49 -06:00
Thaddeus Crews e8b6887b36 Add missing int→Variant conversions
(cherry picked from commit bcac96c8c2)
2024-01-22 15:53:49 -06:00
Thaddeus Crews 805cdde0b7 GDCLASS synced by ending with "private:"
• Matches implementation used by modules and godot itself
• Apply same to GDEXTENSION_CLASS, setup with same diff-friendly spacers as GDCLASS

(cherry picked from commit 6eb5d450bd)
2023-11-13 13:00:24 -06:00
David Snopek 9d813310bb Add protections against registering classes that didn't use GDCLASS()
(cherry picked from commit a61cdc8860)
2023-10-23 10:11:04 -05:00
David Snopek f7ffc4fe4d Automatically register only engine classes whose header has been included
(cherry picked from commit b507b3e591)
2023-10-22 14:46:26 -05:00
Mikael Hermansson 03ea717742 Declare explicit specializations for `CharStringT`
(cherry picked from commit 6e05b978b8)
2023-10-22 14:03:10 -05:00
Matthew Murphy 857d8e3a56 Fix variant call compiler error
Co-authored-by: David Snopek <dsnopek@gmail.com>
(cherry picked from commit ca3e25de04)
2023-10-09 08:43:23 -05:00
A Thousand Ships 59ebcfd744 Fix allocation size overflow check in `CowData`
(cherry picked from commit 06ffc7e952)
2023-10-09 08:42:31 -05:00
A Thousand Ships 205beacc5b Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
(cherry picked from commit 1e5767693e)
2023-10-09 08:42:16 -05:00
David Snopek bc82ae8b0b Add static methods to `ClassDB` for the methods bound to the `ClassDB` singleton
(cherry picked from commit 6f913563d8)
2023-09-19 21:30:03 -05:00
David Snopek dcd7a69512 Ensure that PtrToArg specializations for native structs are used
(cherry picked from commit 3cd3f24150)
2023-09-19 21:22:54 -05:00
A Thousand Ships 014132d4c0 Ensure `const` correctness for wrappers
(cherry picked from commit f651df5e7a)
2023-09-19 21:21:20 -05:00
A Thousand Ships 170a691a7e Add remaining component-wise `min/max` functions to `Vector*`
(cherry picked from commit 52eb77efd4)
2023-09-01 17:07:18 -05:00
Adam Scott c7afd0f89a Fix forgotten not operator
(cherry picked from commit f5c8e5190f)
2023-09-01 17:06:51 -05:00
Adam Scott 6789b29b72 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.

(cherry picked from commit 5c262844ad)
2023-09-01 17:06:39 -05:00
David Snopek 011965d864 Attempt to fully implement CharString
(cherry picked from commit 4df112cd95)
2023-08-10 09:06:09 -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