Further changes in GDNative API
- Added new_copy to all types, since trivial copy won't work for all types. - Added functions to convert from String to char array types, which is not provided by the methods bound in Variant. - Added operator index to String. - Added missing cstring version of some Variant functions. They existed in the header but didn't have the implementation and were missing from the gdnative_api.json file. - Added support for static calls on Variant types.
This commit is contained in:
@@ -42,6 +42,10 @@ void GDAPI godot_transform2d_new(godot_transform2d *p_self) {
|
||||
memnew_placement(p_self, Transform2D);
|
||||
}
|
||||
|
||||
void GDAPI godot_transform2d_new_copy(godot_transform2d *r_dest, const godot_transform2d *p_src) {
|
||||
memnew_placement(r_dest, Transform2D(*(Transform2D *)p_src));
|
||||
}
|
||||
|
||||
godot_vector2 GDAPI *godot_transform2d_operator_index(godot_transform2d *p_self, godot_int p_index) {
|
||||
Transform2D *self = (Transform2D *)p_self;
|
||||
return (godot_vector2 *)&self->operator[](p_index);
|
||||
|
||||
Reference in New Issue
Block a user