summaryrefslogtreecommitdiff
path: root/servers/physics_2d
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-08-07 14:59:39 +0200
committerGitHub <noreply@github.com>2017-08-07 14:59:39 +0200
commit3121b3a4f4c01744184e952d79f9a56e01bdba41 (patch)
tree689fe41108d8d35c2aaace270c265085fac310d7 /servers/physics_2d
parentb0dfec77c27fb413eeaf3b9b2fdcb3777526c28f (diff)
parent5ae78fdf6adf4b3ab417d2b6fd5a41bfa6d5cfe2 (diff)
Merge pull request #10141 from ISylvox/lower_case_godot_api
Makes all Godot API's Methods lower_case
Diffstat (limited to 'servers/physics_2d')
-rw-r--r--servers/physics_2d/physics_2d_server_sw.cpp14
-rw-r--r--servers/physics_2d/physics_2d_server_sw.h8
-rw-r--r--servers/physics_2d/physics_2d_server_wrap_mt.cpp6
-rw-r--r--servers/physics_2d/physics_2d_server_wrap_mt.h18
4 files changed, 23 insertions, 23 deletions
diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp
index add376bfb2..debd38d43a 100644
--- a/servers/physics_2d/physics_2d_server_sw.cpp
+++ b/servers/physics_2d/physics_2d_server_sw.cpp
@@ -415,7 +415,7 @@ void Physics2DServerSW::area_clear_shapes(RID p_area) {
area->remove_shape(0);
}
-void Physics2DServerSW::area_attach_object_instance_ID(RID p_area, ObjectID p_ID) {
+void Physics2DServerSW::area_attach_object_instance_id(RID p_area, ObjectID p_ID) {
if (space_owner.owns(p_area)) {
Space2DSW *space = space_owner.get(p_area);
@@ -425,7 +425,7 @@ void Physics2DServerSW::area_attach_object_instance_ID(RID p_area, ObjectID p_ID
ERR_FAIL_COND(!area);
area->set_instance_id(p_ID);
}
-ObjectID Physics2DServerSW::area_get_object_instance_ID(RID p_area) const {
+ObjectID Physics2DServerSW::area_get_object_instance_id(RID p_area) const {
if (space_owner.owns(p_area)) {
Space2DSW *space = space_owner.get(p_area);
@@ -510,7 +510,7 @@ void Physics2DServerSW::area_set_monitor_callback(RID p_area, Object *p_receiver
Area2DSW *area = area_owner.get(p_area);
ERR_FAIL_COND(!area);
- area->set_monitor_callback(p_receiver ? p_receiver->get_instance_ID() : 0, p_method);
+ area->set_monitor_callback(p_receiver ? p_receiver->get_instance_id() : 0, p_method);
}
void Physics2DServerSW::area_set_area_monitor_callback(RID p_area, Object *p_receiver, const StringName &p_method) {
@@ -518,7 +518,7 @@ void Physics2DServerSW::area_set_area_monitor_callback(RID p_area, Object *p_rec
Area2DSW *area = area_owner.get(p_area);
ERR_FAIL_COND(!area);
- area->set_area_monitor_callback(p_receiver ? p_receiver->get_instance_ID() : 0, p_method);
+ area->set_area_monitor_callback(p_receiver ? p_receiver->get_instance_id() : 0, p_method);
}
/* BODY API */
@@ -706,7 +706,7 @@ Physics2DServerSW::CCDMode Physics2DServerSW::body_get_continuous_collision_dete
return body->get_continuous_collision_detection_mode();
}
-void Physics2DServerSW::body_attach_object_instance_ID(RID p_body, uint32_t p_ID) {
+void Physics2DServerSW::body_attach_object_instance_id(RID p_body, uint32_t p_ID) {
Body2DSW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body);
@@ -714,7 +714,7 @@ void Physics2DServerSW::body_attach_object_instance_ID(RID p_body, uint32_t p_ID
body->set_instance_id(p_ID);
};
-uint32_t Physics2DServerSW::body_get_object_instance_ID(RID p_body) const {
+uint32_t Physics2DServerSW::body_get_object_instance_id(RID p_body) const {
Body2DSW *body = body_owner.get(p_body);
ERR_FAIL_COND_V(!body, 0);
@@ -922,7 +922,7 @@ void Physics2DServerSW::body_set_force_integration_callback(RID p_body, Object *
Body2DSW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body);
- body->set_force_integration_callback(p_receiver ? p_receiver->get_instance_ID() : ObjectID(0), p_method, p_udata);
+ body->set_force_integration_callback(p_receiver ? p_receiver->get_instance_id() : ObjectID(0), p_method, p_udata);
}
bool Physics2DServerSW::body_collide_shape(RID p_body, int p_body_shape, RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, Vector2 *r_results, int p_result_max, int &r_result_count) {
diff --git a/servers/physics_2d/physics_2d_server_sw.h b/servers/physics_2d/physics_2d_server_sw.h
index da72784b6f..830ba91c98 100644
--- a/servers/physics_2d/physics_2d_server_sw.h
+++ b/servers/physics_2d/physics_2d_server_sw.h
@@ -128,8 +128,8 @@ public:
virtual void area_remove_shape(RID p_area, int p_shape_idx);
virtual void area_clear_shapes(RID p_area);
- virtual void area_attach_object_instance_ID(RID p_area, ObjectID p_ID);
- virtual ObjectID area_get_object_instance_ID(RID p_area) const;
+ virtual void area_attach_object_instance_id(RID p_area, ObjectID p_ID);
+ virtual ObjectID area_get_object_instance_id(RID p_area) const;
virtual void area_set_param(RID p_area, AreaParameter p_param, const Variant &p_value);
virtual void area_set_transform(RID p_area, const Transform2D &p_transform);
@@ -172,8 +172,8 @@ public:
virtual void body_set_shape_disabled(RID p_body, int p_shape, bool p_disabled);
virtual void body_set_shape_as_one_way_collision(RID p_body, int p_shape, bool p_enabled);
- virtual void body_attach_object_instance_ID(RID p_body, uint32_t p_ID);
- virtual uint32_t body_get_object_instance_ID(RID p_body) const;
+ virtual void body_attach_object_instance_id(RID p_body, uint32_t p_ID);
+ virtual uint32_t body_get_object_instance_id(RID p_body) const;
virtual void body_set_continuous_collision_detection_mode(RID p_body, CCDMode p_mode);
virtual CCDMode body_get_continuous_collision_detection_mode(RID p_body) const;
diff --git a/servers/physics_2d/physics_2d_server_wrap_mt.cpp b/servers/physics_2d/physics_2d_server_wrap_mt.cpp
index d39231b161..8d19153268 100644
--- a/servers/physics_2d/physics_2d_server_wrap_mt.cpp
+++ b/servers/physics_2d/physics_2d_server_wrap_mt.cpp
@@ -51,7 +51,7 @@ void Physics2DServerWrapMT::_thread_callback(void *_instance) {
void Physics2DServerWrapMT::thread_loop() {
- server_thread = Thread::get_caller_ID();
+ server_thread = Thread::get_caller_id();
OS::get_singleton()->make_rendering_thread();
@@ -169,12 +169,12 @@ Physics2DServerWrapMT::Physics2DServerWrapMT(Physics2DServer *p_contained, bool
damped_spring_joint_pool_max_size = GLOBAL_GET("memory/limits/multithreaded_server/rid_pool_prealloc");
if (!p_create_thread) {
- server_thread = Thread::get_caller_ID();
+ server_thread = Thread::get_caller_id();
} else {
server_thread = 0;
}
- main_thread = Thread::get_caller_ID();
+ main_thread = Thread::get_caller_id();
first_frame = true;
}
diff --git a/servers/physics_2d/physics_2d_server_wrap_mt.h b/servers/physics_2d/physics_2d_server_wrap_mt.h
index 8b6609d119..8058709c06 100644
--- a/servers/physics_2d/physics_2d_server_wrap_mt.h
+++ b/servers/physics_2d/physics_2d_server_wrap_mt.h
@@ -98,7 +98,7 @@ public:
//these work well, but should be used from the main thread only
bool shape_collide(RID p_shape_A, const Transform2D &p_xform_A, const Vector2 &p_motion_A, RID p_shape_B, const Transform2D &p_xform_B, const Vector2 &p_motion_B, Vector2 *r_results, int p_result_max, int &r_result_count) {
- ERR_FAIL_COND_V(main_thread != Thread::get_caller_ID(), false);
+ ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), false);
return physics_2d_server->shape_collide(p_shape_A, p_xform_A, p_motion_A, p_shape_B, p_xform_B, p_motion_B, r_results, p_result_max, r_result_count);
}
@@ -114,20 +114,20 @@ public:
// this function only works on fixed process, errors and returns null otherwise
Physics2DDirectSpaceState *space_get_direct_state(RID p_space) {
- ERR_FAIL_COND_V(main_thread != Thread::get_caller_ID(), NULL);
+ ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), NULL);
return physics_2d_server->space_get_direct_state(p_space);
}
FUNC2(space_set_debug_contacts, RID, int);
virtual Vector<Vector2> space_get_contacts(RID p_space) const {
- ERR_FAIL_COND_V(main_thread != Thread::get_caller_ID(), Vector<Vector2>());
+ ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), Vector<Vector2>());
return physics_2d_server->space_get_contacts(p_space);
}
virtual int space_get_contact_count(RID p_space) const {
- ERR_FAIL_COND_V(main_thread != Thread::get_caller_ID(), 0);
+ ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), 0);
return physics_2d_server->space_get_contact_count(p_space);
}
@@ -153,8 +153,8 @@ public:
FUNC2(area_remove_shape, RID, int);
FUNC1(area_clear_shapes, RID);
- FUNC2(area_attach_object_instance_ID, RID, ObjectID);
- FUNC1RC(ObjectID, area_get_object_instance_ID, RID);
+ FUNC2(area_attach_object_instance_id, RID, ObjectID);
+ FUNC1RC(ObjectID, area_get_object_instance_id, RID);
FUNC3(area_set_param, RID, AreaParameter, const Variant &);
FUNC2(area_set_transform, RID, const Transform2D &);
@@ -198,8 +198,8 @@ public:
FUNC2(body_remove_shape, RID, int);
FUNC1(body_clear_shapes, RID);
- FUNC2(body_attach_object_instance_ID, RID, uint32_t);
- FUNC1RC(uint32_t, body_get_object_instance_ID, RID);
+ FUNC2(body_attach_object_instance_id, RID, uint32_t);
+ FUNC1RC(uint32_t, body_get_object_instance_id, RID);
FUNC2(body_set_continuous_collision_detection_mode, RID, CCDMode);
FUNC1RC(CCDMode, body_get_continuous_collision_detection_mode, RID);
@@ -249,7 +249,7 @@ public:
bool body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, real_t p_margin = 0.001, MotionResult *r_result = NULL) {
- ERR_FAIL_COND_V(main_thread != Thread::get_caller_ID(), false);
+ ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), false);
return physics_2d_server->body_test_motion(p_body, p_from, p_motion, p_margin, r_result);
}