summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-03-16 20:14:15 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-03-16 20:14:15 +0200
commit6079e14396cd09e6f8a58ff2b8d6eb9bf4f895f8 (patch)
tree6066098a96410a10883205c3f85401ae3a14f961
parent5c7971d8560cacc7efa06fc35eb90080dcaea9a8 (diff)
Cleanup and fix native struct definitions.
-rw-r--r--servers/register_server_types.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp
index b001b7aa2a..f73407ad34 100644
--- a/servers/register_server_types.cpp
+++ b/servers/register_server_types.cpp
@@ -114,8 +114,8 @@ void preregister_server_types() {
GDREGISTER_ABSTRACT_CLASS(TextServer);
GDREGISTER_CLASS(TextServerExtension);
- GDREGISTER_NATIVE_STRUCT(Glyph, "int start;int end;uint8_t count;uint8_t repeat;uint16_t flags;float x_off;float y_off;float advance;RID font_rid;int font_size;int32_t index");
- GDREGISTER_NATIVE_STRUCT(CaretInfo, "int start;int end;uint8_t count;uint8_t repeat;uint16_t flags;float x_off;float y_off;float advance;RID font_rid;int font_size;int32_t index");
+ GDREGISTER_NATIVE_STRUCT(Glyph, "int start = -1;int end = -1;uint8_t count = 0;uint8_t repeat = 1;uint16_t flags = 0;float x_off = 0.f;float y_off = 0.f;float advance = 0.f;RID font_rid;int font_size = 0;int32_t index = 0");
+ GDREGISTER_NATIVE_STRUCT(CaretInfo, "Rect2 leading_caret;Rect2 trailing_caret;TextServer::Direction leading_direction;TextServer::Direction trailing_direction");
Engine::get_singleton()->add_singleton(Engine::Singleton("TextServerManager", TextServerManager::get_singleton(), "TextServerManager"));
}
@@ -134,11 +134,11 @@ void register_server_types() {
GDREGISTER_VIRTUAL_CLASS(PhysicsDirectSpaceState3DExtension)
GDREGISTER_VIRTUAL_CLASS(PhysicsServer3DRenderingServerHandler)
- GDREGISTER_NATIVE_STRUCT(PhysicsServer3DExtensionRayResult, "Vector3 position;Vector3 normal;RID rid;ObjectID collider_id;Object*collider;int shape");
- GDREGISTER_NATIVE_STRUCT(PhysicsServer3DExtensionShapeResult, "RID rid;ObjectID collider_id;Object*collider;int shape");
- GDREGISTER_NATIVE_STRUCT(PhysicsServer3DExtensionShapeRestInfo, "Vector3 point;Vector3 normal;RID rid;ObjectID collider_id;int shape;Vector3 linear_velocity;");
- GDREGISTER_NATIVE_STRUCT(PhysicsServer3DExtensionMotionCollision, "Vector3 position;Vector3 normal;Vector3 collider_velocity;real_t depth;int local_shape;ObjectID collider_id;RID collider;int collider_shape;");
- GDREGISTER_NATIVE_STRUCT(PhysicsServer3DExtensionMotionResult, "Vector3 travel;Vector3 remainder;real_t collision_safe_fraction;real_t collision_unsafe_fraction;MotionCollision collisions[32];int collision_count");
+ GDREGISTER_NATIVE_STRUCT(PhysicsServer3DExtensionRayResult, "Vector3 position;Vector3 normal;RID rid;ObjectID collider_id;Object *collider;int shape");
+ GDREGISTER_NATIVE_STRUCT(PhysicsServer3DExtensionShapeResult, "RID rid;ObjectID collider_id;Object *collider;int shape");
+ GDREGISTER_NATIVE_STRUCT(PhysicsServer3DExtensionShapeRestInfo, "Vector3 point;Vector3 normal;RID rid;ObjectID collider_id;int shape;Vector3 linear_velocity");
+ GDREGISTER_NATIVE_STRUCT(PhysicsServer3DExtensionMotionCollision, "Vector3 position;Vector3 normal;Vector3 collider_velocity;real_t depth;int local_shape;ObjectID collider_id;RID collider;int collider_shape");
+ GDREGISTER_NATIVE_STRUCT(PhysicsServer3DExtensionMotionResult, "Vector3 travel;Vector3 remainder;real_t collision_safe_fraction;real_t collision_unsafe_fraction;PhysicsServer3DExtensionMotionCollision collisions[32];int collision_count");
GDREGISTER_NATIVE_STRUCT(PhysicsServer3DExtensionStateCallback, "void *instance;void (*callback)(void *p_instance, PhysicsDirectBodyState3D *p_state)");
GDREGISTER_ABSTRACT_CLASS(NavigationServer2D);