Added newer Variant types to typed_array.hpp - #1384
Conversation
c57f926 to
cd9089c
Compare
| MAKE_TYPED_ARRAY(PackedVector3Array, Variant::PACKED_VECTOR3_ARRAY) | ||
| MAKE_TYPED_ARRAY(PackedColorArray, Variant::PACKED_COLOR_ARRAY) | ||
| // If the IPAddress struct is added to godot-cpp, the following could also be added: | ||
| // MAKE_TYPED_ARRAY(IPAddress, Variant::STRING) |
There was a problem hiding this comment.
| // MAKE_TYPED_ARRAY(IPAddress, Variant::STRING) | |
| //MAKE_TYPED_ARRAY(IPAddress, Variant::STRING) |
No space before code
cd9089c to
480e397
Compare
Upon review of recent changes to godot's |
This is a companion commit to the godot PR godotengine/godot#87992 which fixes godotengine/godot#87991 Also undefines typed array templates after use to match Godot's typed_array.h
480e397 to
349b5a3
Compare
allenwp
left a comment
There was a problem hiding this comment.
Added MAKE_TYPED_ARRAY_INFO for new types.
|
That's still not all of the possible TypedArray types supported, see this or this Basically, whole https://github.com/allenwp/godot-cpp/blob/349b5a3146404ce32c3b6ef8f7427af99fd9dcee/include/godot_cpp/core/type_info.hpp#L354-L388 list should be a copy-paste of whole https://github.com/allenwp/godot-cpp/blob/349b5a3146404ce32c3b6ef8f7427af99fd9dcee/include/godot_cpp/variant/typed_array.hpp#L80C1-L123 list with |
|
They were already commented out and I think it's for a separate more involved fix as it's possibly not that simple (or it'd have been done already) |
This PR is just for syncing up godot-cpp with the main godot repo, specifically adding the new types like All of the other missing types were likely intentionally excluded from godot-cpp because they do exist in the file, but are commented out, as AThousandShips mentioned. It’s probably best to make a separate issue (and PR) in this repo regarding those missing |
|
Indeed, let's keep these separate, the other cases are an old issue and unsure why they are commented out, should be investigated and worked on separately |
dsnopek
left a comment
There was a problem hiding this comment.
Looks good to me! Thanks :-)
So how can I declare custom typed arrays now? |
This is a companion commit to the godot PR godotengine/godot#87992 which fixes godotengine/godot#87991
IPAddresswas added to Godot'styped_array.hrecently (April, 2023), so I've added a comment about whyIPAddressis not included and how it could be added in the future if this struct is ever added to godot-cpp.Also undefined typed array templates after use to match Godot's
typed_array.h.