diff options
Diffstat (limited to 'servers')
24 files changed, 210 insertions, 247 deletions
diff --git a/servers/arvr_server.cpp b/servers/arvr_server.cpp index 78b3e514e6..6398d87007 100644 --- a/servers/arvr_server.cpp +++ b/servers/arvr_server.cpp @@ -48,10 +48,10 @@ void ARVRServer::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::REAL, "world_scale"), "set_world_scale", "get_world_scale"); ClassDB::bind_method(D_METHOD("get_interface_count"), &ARVRServer::get_interface_count); - ClassDB::bind_method(D_METHOD("get_interface:ARVRInterface", "idx"), &ARVRServer::get_interface); - ClassDB::bind_method(D_METHOD("find_interface:ARVRInterface", "name"), &ARVRServer::find_interface); + ClassDB::bind_method(D_METHOD("get_interface", "idx"), &ARVRServer::get_interface); + ClassDB::bind_method(D_METHOD("find_interface", "name"), &ARVRServer::find_interface); ClassDB::bind_method(D_METHOD("get_tracker_count"), &ARVRServer::get_tracker_count); - ClassDB::bind_method(D_METHOD("get_tracker:ARVRPositionalTracker", "idx"), &ARVRServer::get_tracker); + ClassDB::bind_method(D_METHOD("get_tracker", "idx"), &ARVRServer::get_tracker); ClassDB::bind_method(D_METHOD("set_primary_interface"), &ARVRServer::set_primary_interface); diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index 0d2550e53b..3547f86eb3 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -772,10 +772,11 @@ void AudioServer::finish() { buses.clear(); - if (AudioDriver::get_singleton()) { - AudioDriver::get_singleton()->finish(); + for (int i = 0; i < AudioDriverManager::get_driver_count(); i++) { + AudioDriverManager::get_driver(i)->finish(); } } + void AudioServer::update() { } @@ -985,11 +986,11 @@ void AudioServer::_bind_methods() { ClassDB::bind_method(D_METHOD("set_bus_bypass_effects", "bus_idx", "enable"), &AudioServer::set_bus_bypass_effects); ClassDB::bind_method(D_METHOD("is_bus_bypassing_effects", "bus_idx"), &AudioServer::is_bus_bypassing_effects); - ClassDB::bind_method(D_METHOD("add_bus_effect", "bus_idx", "effect:AudioEffect", "at_pos"), &AudioServer::add_bus_effect, DEFVAL(-1)); + ClassDB::bind_method(D_METHOD("add_bus_effect", "bus_idx", "effect", "at_pos"), &AudioServer::add_bus_effect, DEFVAL(-1)); ClassDB::bind_method(D_METHOD("remove_bus_effect", "bus_idx", "effect_idx"), &AudioServer::remove_bus_effect); ClassDB::bind_method(D_METHOD("get_bus_effect_count", "bus_idx"), &AudioServer::get_bus_effect_count); - ClassDB::bind_method(D_METHOD("get_bus_effect:AudioEffect", "bus_idx", "effect_idx"), &AudioServer::get_bus_effect); + ClassDB::bind_method(D_METHOD("get_bus_effect", "bus_idx", "effect_idx"), &AudioServer::get_bus_effect); ClassDB::bind_method(D_METHOD("swap_bus_effects", "bus_idx", "effect_idx", "by_effect_idx"), &AudioServer::swap_bus_effects); ClassDB::bind_method(D_METHOD("set_bus_effect_enabled", "bus_idx", "effect_idx", "enabled"), &AudioServer::set_bus_effect_enabled); @@ -1004,8 +1005,8 @@ void AudioServer::_bind_methods() { ClassDB::bind_method(D_METHOD("get_speaker_mode"), &AudioServer::get_speaker_mode); ClassDB::bind_method(D_METHOD("get_mix_rate"), &AudioServer::get_mix_rate); - ClassDB::bind_method(D_METHOD("set_bus_layout", "bus_layout:AudioBusLayout"), &AudioServer::set_bus_layout); - ClassDB::bind_method(D_METHOD("generate_bus_layout:AudioBusLayout"), &AudioServer::generate_bus_layout); + ClassDB::bind_method(D_METHOD("set_bus_layout", "bus_layout"), &AudioServer::set_bus_layout); + ClassDB::bind_method(D_METHOD("generate_bus_layout"), &AudioServer::generate_bus_layout); ADD_SIGNAL(MethodInfo("bus_layout_changed")); } diff --git a/servers/physics/joints/pin_joint_sw.h b/servers/physics/joints/pin_joint_sw.h index 644c204066..1d580b6c21 100644 --- a/servers/physics/joints/pin_joint_sw.h +++ b/servers/physics/joints/pin_joint_sw.h @@ -83,11 +83,11 @@ public: void set_param(PhysicsServer::PinJointParam p_param, real_t p_value); real_t get_param(PhysicsServer::PinJointParam p_param) const; - void set_pos_A(const Vector3 &p_pos) { m_pivotInA = p_pos; } - void set_pos_B(const Vector3 &p_pos) { m_pivotInB = p_pos; } + void set_pos_a(const Vector3 &p_pos) { m_pivotInA = p_pos; } + void set_pos_b(const Vector3 &p_pos) { m_pivotInB = p_pos; } - Vector3 get_pos_A() { return m_pivotInB; } - Vector3 get_pos_B() { return m_pivotInA; } + Vector3 get_pos_a() { return m_pivotInB; } + Vector3 get_pos_b() { return m_pivotInA; } PinJointSW(BodySW *p_body_a, const Vector3 &p_pos_a, BodySW *p_body_b, const Vector3 &p_pos_b); ~PinJointSW(); diff --git a/servers/physics/physics_server_sw.cpp b/servers/physics/physics_server_sw.cpp index 833c77216e..c40503c426 100644 --- a/servers/physics/physics_server_sw.cpp +++ b/servers/physics/physics_server_sw.cpp @@ -350,7 +350,7 @@ void PhysicsServerSW::area_set_shape_disabled(RID p_area, int p_shape_idx, bool area->set_shape_as_disabled(p_shape_idx, p_disabled); } -void PhysicsServerSW::area_attach_object_instance_ID(RID p_area, ObjectID p_ID) { +void PhysicsServerSW::area_attach_object_instance_id(RID p_area, ObjectID p_ID) { if (space_owner.owns(p_area)) { SpaceSW *space = space_owner.get(p_area); @@ -360,7 +360,7 @@ void PhysicsServerSW::area_attach_object_instance_ID(RID p_area, ObjectID p_ID) ERR_FAIL_COND(!area); area->set_instance_id(p_ID); } -ObjectID PhysicsServerSW::area_get_object_instance_ID(RID p_area) const { +ObjectID PhysicsServerSW::area_get_object_instance_id(RID p_area) const { if (space_owner.owns(p_area)) { SpaceSW *space = space_owner.get(p_area); @@ -438,7 +438,7 @@ void PhysicsServerSW::area_set_monitor_callback(RID p_area, Object *p_receiver, AreaSW *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 PhysicsServerSW::area_set_ray_pickable(RID p_area, bool p_enable) { @@ -462,7 +462,7 @@ void PhysicsServerSW::area_set_area_monitor_callback(RID p_area, Object *p_recei AreaSW *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 */ @@ -662,7 +662,7 @@ uint32_t PhysicsServerSW::body_get_collision_mask(RID p_body) const { return body->get_collision_mask(); } -void PhysicsServerSW::body_attach_object_instance_ID(RID p_body, uint32_t p_ID) { +void PhysicsServerSW::body_attach_object_instance_id(RID p_body, uint32_t p_ID) { BodySW *body = body_owner.get(p_body); ERR_FAIL_COND(!body); @@ -670,7 +670,7 @@ void PhysicsServerSW::body_attach_object_instance_ID(RID p_body, uint32_t p_ID) body->set_instance_id(p_ID); }; -uint32_t PhysicsServerSW::body_get_object_instance_ID(RID p_body) const { +uint32_t PhysicsServerSW::body_get_object_instance_id(RID p_body) const { BodySW *body = body_owner.get(p_body); ERR_FAIL_COND_V(!body, 0); @@ -877,7 +877,7 @@ void PhysicsServerSW::body_set_force_integration_callback(RID p_body, Object *p_ BodySW *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); } void PhysicsServerSW::body_set_ray_pickable(RID p_body, bool p_enable) { @@ -944,38 +944,38 @@ real_t PhysicsServerSW::pin_joint_get_param(RID p_joint, PinJointParam p_param) return pin_joint->get_param(p_param); } -void PhysicsServerSW::pin_joint_set_local_A(RID p_joint, const Vector3 &p_A) { +void PhysicsServerSW::pin_joint_set_local_a(RID p_joint, const Vector3 &p_A) { JointSW *joint = joint_owner.get(p_joint); ERR_FAIL_COND(!joint); ERR_FAIL_COND(joint->get_type() != JOINT_PIN); PinJointSW *pin_joint = static_cast<PinJointSW *>(joint); - pin_joint->set_pos_A(p_A); + pin_joint->set_pos_a(p_A); } -Vector3 PhysicsServerSW::pin_joint_get_local_A(RID p_joint) const { +Vector3 PhysicsServerSW::pin_joint_get_local_a(RID p_joint) const { JointSW *joint = joint_owner.get(p_joint); ERR_FAIL_COND_V(!joint, Vector3()); ERR_FAIL_COND_V(joint->get_type() != JOINT_PIN, Vector3()); PinJointSW *pin_joint = static_cast<PinJointSW *>(joint); - return pin_joint->get_pos_A(); + return pin_joint->get_pos_a(); } -void PhysicsServerSW::pin_joint_set_local_B(RID p_joint, const Vector3 &p_B) { +void PhysicsServerSW::pin_joint_set_local_b(RID p_joint, const Vector3 &p_B) { JointSW *joint = joint_owner.get(p_joint); ERR_FAIL_COND(!joint); ERR_FAIL_COND(joint->get_type() != JOINT_PIN); PinJointSW *pin_joint = static_cast<PinJointSW *>(joint); - pin_joint->set_pos_B(p_B); + pin_joint->set_pos_b(p_B); } -Vector3 PhysicsServerSW::pin_joint_get_local_B(RID p_joint) const { +Vector3 PhysicsServerSW::pin_joint_get_local_b(RID p_joint) const { JointSW *joint = joint_owner.get(p_joint); ERR_FAIL_COND_V(!joint, Vector3()); ERR_FAIL_COND_V(joint->get_type() != JOINT_PIN, Vector3()); PinJointSW *pin_joint = static_cast<PinJointSW *>(joint); - return pin_joint->get_pos_B(); + return pin_joint->get_pos_b(); } RID PhysicsServerSW::joint_create_hinge(RID p_body_A, const Transform &p_frame_A, RID p_body_B, const Transform &p_frame_B) { diff --git a/servers/physics/physics_server_sw.h b/servers/physics/physics_server_sw.h index 591fe4af46..bae2839b71 100644 --- a/servers/physics/physics_server_sw.h +++ b/servers/physics/physics_server_sw.h @@ -121,8 +121,8 @@ public: virtual void area_set_shape_disabled(RID p_area, int p_shape_idx, bool p_disabled); - 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 Transform &p_transform); @@ -165,8 +165,8 @@ public: virtual void body_remove_shape(RID p_body, int p_shape_idx); virtual void body_clear_shapes(RID p_body); - 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_enable_continuous_collision_detection(RID p_body, bool p_enable); virtual bool body_is_continuous_collision_detection_enabled(RID p_body) const; @@ -226,11 +226,11 @@ public: virtual void pin_joint_set_param(RID p_joint, PinJointParam p_param, real_t p_value); virtual real_t pin_joint_get_param(RID p_joint, PinJointParam p_param) const; - virtual void pin_joint_set_local_A(RID p_joint, const Vector3 &p_A); - virtual Vector3 pin_joint_get_local_A(RID p_joint) const; + virtual void pin_joint_set_local_a(RID p_joint, const Vector3 &p_A); + virtual Vector3 pin_joint_get_local_a(RID p_joint) const; - virtual void pin_joint_set_local_B(RID p_joint, const Vector3 &p_B); - virtual Vector3 pin_joint_get_local_B(RID p_joint) const; + virtual void pin_joint_set_local_b(RID p_joint, const Vector3 &p_B); + virtual Vector3 pin_joint_get_local_b(RID p_joint) const; virtual RID joint_create_hinge(RID p_body_A, const Transform &p_frame_A, RID p_body_B, const Transform &p_frame_B); virtual RID joint_create_hinge_simple(RID p_body_A, const Vector3 &p_pivot_A, const Vector3 &p_axis_A, RID p_body_B, const Vector3 &p_pivot_B, const Vector3 &p_axis_B); 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); } diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp index fb7e89bd9e..7b0e5ab445 100644 --- a/servers/physics_2d_server.cpp +++ b/servers/physics_2d_server.cpp @@ -100,11 +100,11 @@ void Physics2DDirectBodyState::_bind_methods() { ClassDB::bind_method(D_METHOD("get_contact_collider_id", "contact_idx"), &Physics2DDirectBodyState::get_contact_collider_id); ClassDB::bind_method(D_METHOD("get_contact_collider_object", "contact_idx"), &Physics2DDirectBodyState::get_contact_collider_object); ClassDB::bind_method(D_METHOD("get_contact_collider_shape", "contact_idx"), &Physics2DDirectBodyState::get_contact_collider_shape); - ClassDB::bind_method(D_METHOD("get_contact_collider_shape_metadata:Variant", "contact_idx"), &Physics2DDirectBodyState::get_contact_collider_shape_metadata); + ClassDB::bind_method(D_METHOD("get_contact_collider_shape_metadata", "contact_idx"), &Physics2DDirectBodyState::get_contact_collider_shape_metadata); ClassDB::bind_method(D_METHOD("get_contact_collider_velocity_at_pos", "contact_idx"), &Physics2DDirectBodyState::get_contact_collider_velocity_at_pos); ClassDB::bind_method(D_METHOD("get_step"), &Physics2DDirectBodyState::get_step); ClassDB::bind_method(D_METHOD("integrate_forces"), &Physics2DDirectBodyState::integrate_forces); - ClassDB::bind_method(D_METHOD("get_space_state:Physics2DDirectSpaceState"), &Physics2DDirectBodyState::get_space_state); + ClassDB::bind_method(D_METHOD("get_space_state"), &Physics2DDirectBodyState::get_space_state); } Physics2DDirectBodyState::Physics2DDirectBodyState() {} @@ -191,7 +191,7 @@ Vector<RID> Physics2DShapeQueryParameters::get_exclude() const { void Physics2DShapeQueryParameters::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_shape", "shape:Shape2D"), &Physics2DShapeQueryParameters::set_shape); + ClassDB::bind_method(D_METHOD("set_shape", "shape"), &Physics2DShapeQueryParameters::set_shape); ClassDB::bind_method(D_METHOD("set_shape_rid", "shape"), &Physics2DShapeQueryParameters::set_shape_rid); ClassDB::bind_method(D_METHOD("get_shape_rid"), &Physics2DShapeQueryParameters::get_shape_rid); @@ -347,11 +347,11 @@ Physics2DDirectSpaceState::Physics2DDirectSpaceState() { void Physics2DDirectSpaceState::_bind_methods() { ClassDB::bind_method(D_METHOD("intersect_point", "point", "max_results", "exclude", "collision_layer", "type_mask"), &Physics2DDirectSpaceState::_intersect_point, DEFVAL(32), DEFVAL(Array()), DEFVAL(0x7FFFFFFF), DEFVAL(TYPE_MASK_COLLISION)); - ClassDB::bind_method(D_METHOD("intersect_ray:Dictionary", "from", "to", "exclude", "collision_layer", "type_mask"), &Physics2DDirectSpaceState::_intersect_ray, DEFVAL(Array()), DEFVAL(0x7FFFFFFF), DEFVAL(TYPE_MASK_COLLISION)); - ClassDB::bind_method(D_METHOD("intersect_shape", "shape:Physics2DShapeQueryParameters", "max_results"), &Physics2DDirectSpaceState::_intersect_shape, DEFVAL(32)); - ClassDB::bind_method(D_METHOD("cast_motion", "shape:Physics2DShapeQueryParameters"), &Physics2DDirectSpaceState::_cast_motion); - ClassDB::bind_method(D_METHOD("collide_shape", "shape:Physics2DShapeQueryParameters", "max_results"), &Physics2DDirectSpaceState::_collide_shape, DEFVAL(32)); - ClassDB::bind_method(D_METHOD("get_rest_info", "shape:Physics2DShapeQueryParameters"), &Physics2DDirectSpaceState::_get_rest_info); + ClassDB::bind_method(D_METHOD("intersect_ray", "from", "to", "exclude", "collision_layer", "type_mask"), &Physics2DDirectSpaceState::_intersect_ray, DEFVAL(Array()), DEFVAL(0x7FFFFFFF), DEFVAL(TYPE_MASK_COLLISION)); + ClassDB::bind_method(D_METHOD("intersect_shape", "shape", "max_results"), &Physics2DDirectSpaceState::_intersect_shape, DEFVAL(32)); + ClassDB::bind_method(D_METHOD("cast_motion", "shape"), &Physics2DDirectSpaceState::_cast_motion); + ClassDB::bind_method(D_METHOD("collide_shape", "shape", "max_results"), &Physics2DDirectSpaceState::_collide_shape, DEFVAL(32)); + ClassDB::bind_method(D_METHOD("get_rest_info", "shape"), &Physics2DDirectSpaceState::_get_rest_info); //ClassDB::bind_method(D_METHOD("cast_motion","shape","xform","motion","exclude","umask"),&Physics2DDirectSpaceState::_intersect_shape,DEFVAL(Array()),DEFVAL(0)); BIND_CONSTANT(TYPE_MASK_STATIC_BODY); @@ -484,7 +484,7 @@ void Physics2DServer::_bind_methods() { ClassDB::bind_method(D_METHOD("space_is_active", "space"), &Physics2DServer::space_is_active); ClassDB::bind_method(D_METHOD("space_set_param", "space", "param", "value"), &Physics2DServer::space_set_param); ClassDB::bind_method(D_METHOD("space_get_param", "space", "param"), &Physics2DServer::space_get_param); - ClassDB::bind_method(D_METHOD("space_get_direct_state:Physics2DDirectSpaceState", "space"), &Physics2DServer::space_get_direct_state); + ClassDB::bind_method(D_METHOD("space_get_direct_state", "space"), &Physics2DServer::space_get_direct_state); ClassDB::bind_method(D_METHOD("area_create"), &Physics2DServer::area_create); ClassDB::bind_method(D_METHOD("area_set_space", "area", "space"), &Physics2DServer::area_set_space); @@ -514,8 +514,8 @@ void Physics2DServer::_bind_methods() { ClassDB::bind_method(D_METHOD("area_get_param", "area", "param"), &Physics2DServer::area_get_param); ClassDB::bind_method(D_METHOD("area_get_transform", "area"), &Physics2DServer::area_get_transform); - ClassDB::bind_method(D_METHOD("area_attach_object_instance_ID", "area", "id"), &Physics2DServer::area_attach_object_instance_ID); - ClassDB::bind_method(D_METHOD("area_get_object_instance_ID", "area"), &Physics2DServer::area_get_object_instance_ID); + ClassDB::bind_method(D_METHOD("area_attach_object_instance_id", "area", "id"), &Physics2DServer::area_attach_object_instance_id); + ClassDB::bind_method(D_METHOD("area_get_object_instance_id", "area"), &Physics2DServer::area_get_object_instance_id); ClassDB::bind_method(D_METHOD("area_set_monitor_callback", "area", "receiver", "method"), &Physics2DServer::area_set_monitor_callback); @@ -543,8 +543,8 @@ void Physics2DServer::_bind_methods() { ClassDB::bind_method(D_METHOD("body_set_shape_disabled", "body", "shape_idx", "disable"), &Physics2DServer::body_set_shape_disabled); ClassDB::bind_method(D_METHOD("body_set_shape_as_one_way_collision", "body", "shape_idx", "enable"), &Physics2DServer::body_set_shape_as_one_way_collision); - ClassDB::bind_method(D_METHOD("body_attach_object_instance_ID", "body", "id"), &Physics2DServer::body_attach_object_instance_ID); - ClassDB::bind_method(D_METHOD("body_get_object_instance_ID", "body"), &Physics2DServer::body_get_object_instance_ID); + ClassDB::bind_method(D_METHOD("body_attach_object_instance_id", "body", "id"), &Physics2DServer::body_attach_object_instance_id); + ClassDB::bind_method(D_METHOD("body_get_object_instance_id", "body"), &Physics2DServer::body_get_object_instance_id); ClassDB::bind_method(D_METHOD("body_set_continuous_collision_detection_mode", "body", "mode"), &Physics2DServer::body_set_continuous_collision_detection_mode); ClassDB::bind_method(D_METHOD("body_get_continuous_collision_detection_mode", "body"), &Physics2DServer::body_get_continuous_collision_detection_mode); @@ -577,7 +577,7 @@ void Physics2DServer::_bind_methods() { ClassDB::bind_method(D_METHOD("body_set_force_integration_callback", "body", "receiver", "method", "userdata"), &Physics2DServer::body_set_force_integration_callback, DEFVAL(Variant())); - ClassDB::bind_method(D_METHOD("body_test_motion", "body", "from", "motion", "margin", "result:Physics2DTestMotionResult"), &Physics2DServer::_body_test_motion, DEFVAL(0.08), DEFVAL(Variant())); + ClassDB::bind_method(D_METHOD("body_test_motion", "body", "from", "motion", "margin", "result"), &Physics2DServer::_body_test_motion, DEFVAL(0.08), DEFVAL(Variant())); /* JOINT API */ diff --git a/servers/physics_2d_server.h b/servers/physics_2d_server.h index e396424707..f3acd8df18 100644 --- a/servers/physics_2d_server.h +++ b/servers/physics_2d_server.h @@ -334,8 +334,8 @@ public: virtual void area_set_shape_disabled(RID p_area, int p_shape, bool p_disabled) = 0; - virtual void area_attach_object_instance_ID(RID p_area, ObjectID p_ID) = 0; - virtual ObjectID area_get_object_instance_ID(RID p_area) const = 0; + virtual void area_attach_object_instance_id(RID p_area, ObjectID p_ID) = 0; + virtual ObjectID area_get_object_instance_id(RID p_area) const = 0; virtual void area_set_param(RID p_area, AreaParameter p_param, const Variant &p_value) = 0; virtual void area_set_transform(RID p_area, const Transform2D &p_transform) = 0; @@ -388,8 +388,8 @@ public: virtual void body_remove_shape(RID p_body, int p_shape_idx) = 0; virtual void body_clear_shapes(RID p_body) = 0; - virtual void body_attach_object_instance_ID(RID p_body, uint32_t p_ID) = 0; - virtual uint32_t body_get_object_instance_ID(RID p_body) const = 0; + virtual void body_attach_object_instance_id(RID p_body, uint32_t p_ID) = 0; + virtual uint32_t body_get_object_instance_id(RID p_body) const = 0; enum CCDMode { CCD_MODE_DISABLED, diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp index 6b6db1ff8c..fbf104c6ac 100644 --- a/servers/physics_server.cpp +++ b/servers/physics_server.cpp @@ -109,7 +109,7 @@ void PhysicsDirectBodyState::_bind_methods() { ClassDB::bind_method(D_METHOD("get_contact_collider_velocity_at_pos", "contact_idx"), &PhysicsDirectBodyState::get_contact_collider_velocity_at_pos); ClassDB::bind_method(D_METHOD("get_step"), &PhysicsDirectBodyState::get_step); ClassDB::bind_method(D_METHOD("integrate_forces"), &PhysicsDirectBodyState::integrate_forces); - ClassDB::bind_method(D_METHOD("get_space_state:PhysicsDirectSpaceState"), &PhysicsDirectBodyState::get_space_state); + ClassDB::bind_method(D_METHOD("get_space_state"), &PhysicsDirectBodyState::get_space_state); } PhysicsDirectBodyState::PhysicsDirectBodyState() {} @@ -188,7 +188,7 @@ Vector<RID> PhysicsShapeQueryParameters::get_exclude() const { void PhysicsShapeQueryParameters::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_shape", "shape:Shape"), &PhysicsShapeQueryParameters::set_shape); + ClassDB::bind_method(D_METHOD("set_shape", "shape"), &PhysicsShapeQueryParameters::set_shape); ClassDB::bind_method(D_METHOD("set_shape_rid", "shape"), &PhysicsShapeQueryParameters::set_shape_rid); ClassDB::bind_method(D_METHOD("get_shape_rid"), &PhysicsShapeQueryParameters::get_shape_rid); @@ -341,13 +341,13 @@ PhysicsDirectSpaceState::PhysicsDirectSpaceState() { void PhysicsDirectSpaceState::_bind_methods() { //ClassDB::bind_method(D_METHOD("intersect_ray","from","to","exclude","umask"),&PhysicsDirectSpaceState::_intersect_ray,DEFVAL(Array()),DEFVAL(0)); - //ClassDB::bind_method(D_METHOD("intersect_shape:PhysicsShapeQueryResult","shape","xform","result_max","exclude","umask"),&PhysicsDirectSpaceState::_intersect_shape,DEFVAL(Array()),DEFVAL(0)); + //ClassDB::bind_method(D_METHOD("intersect_shape","shape","xform","result_max","exclude","umask"),&PhysicsDirectSpaceState::_intersect_shape,DEFVAL(Array()),DEFVAL(0)); - ClassDB::bind_method(D_METHOD("intersect_ray:Dictionary", "from", "to", "exclude", "collision_layer", "type_mask"), &PhysicsDirectSpaceState::_intersect_ray, DEFVAL(Array()), DEFVAL(0x7FFFFFFF), DEFVAL(TYPE_MASK_COLLISION)); - ClassDB::bind_method(D_METHOD("intersect_shape", "shape:PhysicsShapeQueryParameters", "max_results"), &PhysicsDirectSpaceState::_intersect_shape, DEFVAL(32)); - ClassDB::bind_method(D_METHOD("cast_motion", "shape:PhysicsShapeQueryParameters", "motion"), &PhysicsDirectSpaceState::_cast_motion); - ClassDB::bind_method(D_METHOD("collide_shape", "shape:PhysicsShapeQueryParameters", "max_results"), &PhysicsDirectSpaceState::_collide_shape, DEFVAL(32)); - ClassDB::bind_method(D_METHOD("get_rest_info", "shape:PhysicsShapeQueryParameters"), &PhysicsDirectSpaceState::_get_rest_info); + ClassDB::bind_method(D_METHOD("intersect_ray", "from", "to", "exclude", "collision_layer", "type_mask"), &PhysicsDirectSpaceState::_intersect_ray, DEFVAL(Array()), DEFVAL(0x7FFFFFFF), DEFVAL(TYPE_MASK_COLLISION)); + ClassDB::bind_method(D_METHOD("intersect_shape", "shape", "max_results"), &PhysicsDirectSpaceState::_intersect_shape, DEFVAL(32)); + ClassDB::bind_method(D_METHOD("cast_motion", "shape", "motion"), &PhysicsDirectSpaceState::_cast_motion); + ClassDB::bind_method(D_METHOD("collide_shape", "shape", "max_results"), &PhysicsDirectSpaceState::_collide_shape, DEFVAL(32)); + ClassDB::bind_method(D_METHOD("get_rest_info", "shape"), &PhysicsDirectSpaceState::_get_rest_info); BIND_CONSTANT(TYPE_MASK_STATIC_BODY); BIND_CONSTANT(TYPE_MASK_KINEMATIC_BODY); @@ -405,7 +405,7 @@ void PhysicsServer::_bind_methods() { ClassDB::bind_method(D_METHOD("space_is_active", "space"), &PhysicsServer::space_is_active); ClassDB::bind_method(D_METHOD("space_set_param", "space", "param", "value"), &PhysicsServer::space_set_param); ClassDB::bind_method(D_METHOD("space_get_param", "space", "param"), &PhysicsServer::space_get_param); - ClassDB::bind_method(D_METHOD("space_get_direct_state:PhysicsDirectSpaceState", "space"), &PhysicsServer::space_get_direct_state); + ClassDB::bind_method(D_METHOD("space_get_direct_state", "space"), &PhysicsServer::space_get_direct_state); ClassDB::bind_method(D_METHOD("area_create"), &PhysicsServer::area_create); ClassDB::bind_method(D_METHOD("area_set_space", "area", "space"), &PhysicsServer::area_set_space); @@ -434,8 +434,8 @@ void PhysicsServer::_bind_methods() { ClassDB::bind_method(D_METHOD("area_get_param", "area", "param"), &PhysicsServer::area_get_param); ClassDB::bind_method(D_METHOD("area_get_transform", "area"), &PhysicsServer::area_get_transform); - ClassDB::bind_method(D_METHOD("area_attach_object_instance_ID", "area", "id"), &PhysicsServer::area_attach_object_instance_ID); - ClassDB::bind_method(D_METHOD("area_get_object_instance_ID", "area"), &PhysicsServer::area_get_object_instance_ID); + ClassDB::bind_method(D_METHOD("area_attach_object_instance_id", "area", "id"), &PhysicsServer::area_attach_object_instance_id); + ClassDB::bind_method(D_METHOD("area_get_object_instance_id", "area"), &PhysicsServer::area_get_object_instance_id); ClassDB::bind_method(D_METHOD("area_set_monitor_callback", "area", "receiver", "method"), &PhysicsServer::area_set_monitor_callback); @@ -467,8 +467,8 @@ void PhysicsServer::_bind_methods() { ClassDB::bind_method(D_METHOD("body_remove_shape", "body", "shape_idx"), &PhysicsServer::body_remove_shape); ClassDB::bind_method(D_METHOD("body_clear_shapes", "body"), &PhysicsServer::body_clear_shapes); - ClassDB::bind_method(D_METHOD("body_attach_object_instance_ID", "body", "id"), &PhysicsServer::body_attach_object_instance_ID); - ClassDB::bind_method(D_METHOD("body_get_object_instance_ID", "body"), &PhysicsServer::body_get_object_instance_ID); + ClassDB::bind_method(D_METHOD("body_attach_object_instance_id", "body", "id"), &PhysicsServer::body_attach_object_instance_id); + ClassDB::bind_method(D_METHOD("body_get_object_instance_id", "body"), &PhysicsServer::body_get_object_instance_id); ClassDB::bind_method(D_METHOD("body_set_enable_continuous_collision_detection", "body", "enable"), &PhysicsServer::body_set_enable_continuous_collision_detection); ClassDB::bind_method(D_METHOD("body_is_continuous_collision_detection_enabled", "body"), &PhysicsServer::body_is_continuous_collision_detection_enabled); @@ -516,11 +516,11 @@ void PhysicsServer::_bind_methods() { ClassDB::bind_method(D_METHOD("pin_joint_set_param", "joint", "param", "value"), &PhysicsServer::pin_joint_set_param); ClassDB::bind_method(D_METHOD("pin_joint_get_param", "joint", "param"), &PhysicsServer::pin_joint_get_param); - ClassDB::bind_method(D_METHOD("pin_joint_set_local_A", "joint", "local_A"), &PhysicsServer::pin_joint_set_local_A); - ClassDB::bind_method(D_METHOD("pin_joint_get_local_A", "joint"), &PhysicsServer::pin_joint_get_local_A); + ClassDB::bind_method(D_METHOD("pin_joint_set_local_a", "joint", "local_A"), &PhysicsServer::pin_joint_set_local_a); + ClassDB::bind_method(D_METHOD("pin_joint_get_local_a", "joint"), &PhysicsServer::pin_joint_get_local_a); - ClassDB::bind_method(D_METHOD("pin_joint_set_local_B", "joint", "local_B"), &PhysicsServer::pin_joint_set_local_B); - ClassDB::bind_method(D_METHOD("pin_joint_get_local_B", "joint"), &PhysicsServer::pin_joint_get_local_B); + ClassDB::bind_method(D_METHOD("pin_joint_set_local_b", "joint", "local_B"), &PhysicsServer::pin_joint_set_local_b); + ClassDB::bind_method(D_METHOD("pin_joint_get_local_b", "joint"), &PhysicsServer::pin_joint_get_local_b); BIND_CONSTANT(PIN_JOINT_BIAS); BIND_CONSTANT(PIN_JOINT_DAMPING); diff --git a/servers/physics_server.h b/servers/physics_server.h index 0f07fca637..b38e14eb0c 100644 --- a/servers/physics_server.h +++ b/servers/physics_server.h @@ -328,8 +328,8 @@ public: virtual void area_set_shape_disabled(RID p_area, int p_shape_idx, bool p_disabled) = 0; - virtual void area_attach_object_instance_ID(RID p_area, ObjectID p_ID) = 0; - virtual ObjectID area_get_object_instance_ID(RID p_area) const = 0; + virtual void area_attach_object_instance_id(RID p_area, ObjectID p_ID) = 0; + virtual ObjectID area_get_object_instance_id(RID p_area) const = 0; virtual void area_set_param(RID p_area, AreaParameter p_param, const Variant &p_value) = 0; virtual void area_set_transform(RID p_area, const Transform &p_transform) = 0; @@ -381,8 +381,8 @@ public: virtual void body_set_shape_disabled(RID p_body, int p_shape_idx, bool p_disabled) = 0; - virtual void body_attach_object_instance_ID(RID p_body, uint32_t p_ID) = 0; - virtual uint32_t body_get_object_instance_ID(RID p_body) const = 0; + virtual void body_attach_object_instance_id(RID p_body, uint32_t p_ID) = 0; + virtual uint32_t body_get_object_instance_id(RID p_body) const = 0; virtual void body_set_enable_continuous_collision_detection(RID p_body, bool p_enable) = 0; virtual bool body_is_continuous_collision_detection_enabled(RID p_body) const = 0; @@ -508,11 +508,11 @@ public: virtual void pin_joint_set_param(RID p_joint, PinJointParam p_param, float p_value) = 0; virtual float pin_joint_get_param(RID p_joint, PinJointParam p_param) const = 0; - virtual void pin_joint_set_local_A(RID p_joint, const Vector3 &p_A) = 0; - virtual Vector3 pin_joint_get_local_A(RID p_joint) const = 0; + virtual void pin_joint_set_local_a(RID p_joint, const Vector3 &p_A) = 0; + virtual Vector3 pin_joint_get_local_a(RID p_joint) const = 0; - virtual void pin_joint_set_local_B(RID p_joint, const Vector3 &p_B) = 0; - virtual Vector3 pin_joint_get_local_B(RID p_joint) const = 0; + virtual void pin_joint_set_local_b(RID p_joint, const Vector3 &p_B) = 0; + virtual Vector3 pin_joint_get_local_b(RID p_joint) const = 0; enum HingeJointParam { diff --git a/servers/server_wrap_mt_common.h b/servers/server_wrap_mt_common.h index e285483e2b..1ffa5ad14c 100644 --- a/servers/server_wrap_mt_common.h +++ b/servers/server_wrap_mt_common.h @@ -30,7 +30,7 @@ #define FUNC0R(m_r, m_type) \ virtual m_r m_type() { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ m_r ret; \ command_queue.push_and_ret(server_name, &ServerName::m_type, &ret); \ SYNC_DEBUG \ @@ -55,7 +55,7 @@ } \ } \ virtual RID m_type##_create() { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ RID rid; \ alloc_mutex->lock(); \ if (m_type##_id_pool.size() == 0) { \ @@ -85,7 +85,7 @@ } \ } \ virtual RID m_type##_create(m_arg1 p1) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ RID rid; \ alloc_mutex->lock(); \ if (m_type##_id_pool.size() == 0) { \ @@ -115,7 +115,7 @@ } \ } \ virtual RID m_type##_create(m_arg1 p1, m_arg2 p2) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ RID rid; \ alloc_mutex->lock(); \ if (m_type##_id_pool.size() == 0) { \ @@ -145,7 +145,7 @@ } \ } \ virtual RID m_type##_create(m_arg1 p1, m_arg2 p2, m_arg3 p3) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ RID rid; \ alloc_mutex->lock(); \ if (m_type##_id_pool.size() == 0) { \ @@ -175,7 +175,7 @@ } \ } \ virtual RID m_type##_create(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ RID rid; \ alloc_mutex->lock(); \ if (m_type##_id_pool.size() == 0) { \ @@ -205,7 +205,7 @@ } \ } \ virtual RID m_type##_create(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ RID rid; \ alloc_mutex->lock(); \ if (m_type##_id_pool.size() == 0) { \ @@ -223,7 +223,7 @@ #define FUNC0RC(m_r, m_type) \ virtual m_r m_type() const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ m_r ret; \ command_queue.push_and_ret(server_name, &ServerName::m_type, &ret); \ SYNC_DEBUG \ @@ -235,7 +235,7 @@ #define FUNC0(m_type) \ virtual void m_type() { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push(server_name, &ServerName::m_type); \ } else { \ server_name->m_type(); \ @@ -244,7 +244,7 @@ #define FUNC0C(m_type) \ virtual void m_type() const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push(server_name, &ServerName::m_type); \ } else { \ server_name->m_type(); \ @@ -253,7 +253,7 @@ #define FUNC0S(m_type) \ virtual void m_type() { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push_and_sync(server_name, &ServerName::m_type); \ } else { \ server_name->m_type(); \ @@ -262,7 +262,7 @@ #define FUNC0SC(m_type) \ virtual void m_type() const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push_and_sync(server_name, &ServerName::m_type); \ } else { \ server_name->m_type(); \ @@ -273,7 +273,7 @@ #define FUNC1R(m_r, m_type, m_arg1) \ virtual m_r m_type(m_arg1 p1) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ m_r ret; \ command_queue.push_and_ret(server_name, &ServerName::m_type, p1, &ret); \ SYNC_DEBUG \ @@ -285,7 +285,7 @@ #define FUNC1RC(m_r, m_type, m_arg1) \ virtual m_r m_type(m_arg1 p1) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ m_r ret; \ command_queue.push_and_ret(server_name, &ServerName::m_type, p1, &ret); \ SYNC_DEBUG \ @@ -297,7 +297,7 @@ #define FUNC1S(m_type, m_arg1) \ virtual void m_type(m_arg1 p1) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push_and_sync(server_name, &ServerName::m_type, p1); \ } else { \ server_name->m_type(p1); \ @@ -306,7 +306,7 @@ #define FUNC1SC(m_type, m_arg1) \ virtual void m_type(m_arg1 p1) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push_and_sync(server_name, &ServerName::m_type, p1); \ } else { \ server_name->m_type(p1); \ @@ -315,7 +315,7 @@ #define FUNC1(m_type, m_arg1) \ virtual void m_type(m_arg1 p1) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push(server_name, &ServerName::m_type, p1); \ } else { \ server_name->m_type(p1); \ @@ -324,7 +324,7 @@ #define FUNC1C(m_type, m_arg1) \ virtual void m_type(m_arg1 p1) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push(server_name, &ServerName::m_type, p1); \ } else { \ server_name->m_type(p1); \ @@ -333,7 +333,7 @@ #define FUNC2R(m_r, m_type, m_arg1, m_arg2) \ virtual m_r m_type(m_arg1 p1, m_arg2 p2) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ m_r ret; \ command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, &ret); \ SYNC_DEBUG \ @@ -345,7 +345,7 @@ #define FUNC2RC(m_r, m_type, m_arg1, m_arg2) \ virtual m_r m_type(m_arg1 p1, m_arg2 p2) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ m_r ret; \ command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, &ret); \ SYNC_DEBUG \ @@ -357,7 +357,7 @@ #define FUNC2S(m_type, m_arg1, m_arg2) \ virtual void m_type(m_arg1 p1, m_arg2 p2) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2); \ } else { \ server_name->m_type(p1, p2); \ @@ -366,7 +366,7 @@ #define FUNC2SC(m_type, m_arg1, m_arg2) \ virtual void m_type(m_arg1 p1, m_arg2 p2) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2); \ } else { \ server_name->m_type(p1, p2); \ @@ -375,7 +375,7 @@ #define FUNC2(m_type, m_arg1, m_arg2) \ virtual void m_type(m_arg1 p1, m_arg2 p2) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push(server_name, &ServerName::m_type, p1, p2); \ } else { \ server_name->m_type(p1, p2); \ @@ -384,7 +384,7 @@ #define FUNC2C(m_type, m_arg1, m_arg2) \ virtual void m_type(m_arg1 p1, m_arg2 p2) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push(server_name, &ServerName::m_type, p1, p2); \ } else { \ server_name->m_type(p1, p2); \ @@ -393,7 +393,7 @@ #define FUNC3R(m_r, m_type, m_arg1, m_arg2, m_arg3) \ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ m_r ret; \ command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, &ret); \ SYNC_DEBUG \ @@ -405,7 +405,7 @@ #define FUNC3RC(m_r, m_type, m_arg1, m_arg2, m_arg3) \ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ m_r ret; \ command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, &ret); \ return ret; \ @@ -416,7 +416,7 @@ #define FUNC3S(m_type, m_arg1, m_arg2, m_arg3) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3); \ } else { \ server_name->m_type(p1, p2, p3); \ @@ -425,7 +425,7 @@ #define FUNC3SC(m_type, m_arg1, m_arg2, m_arg3) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3); \ } else { \ server_name->m_type(p1, p2, p3); \ @@ -434,7 +434,7 @@ #define FUNC3(m_type, m_arg1, m_arg2, m_arg3) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3); \ } else { \ server_name->m_type(p1, p2, p3); \ @@ -443,7 +443,7 @@ #define FUNC3C(m_type, m_arg1, m_arg2, m_arg3) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3); \ } else { \ server_name->m_type(p1, p2, p3); \ @@ -452,7 +452,7 @@ #define FUNC4R(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4) \ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ m_r ret; \ command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, &ret); \ SYNC_DEBUG \ @@ -464,7 +464,7 @@ #define FUNC4RC(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4) \ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ m_r ret; \ command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, &ret); \ SYNC_DEBUG \ @@ -476,7 +476,7 @@ #define FUNC4S(m_type, m_arg1, m_arg2, m_arg3, m_arg4) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4); \ } else { \ server_name->m_type(p1, p2, p3, p4); \ @@ -485,7 +485,7 @@ #define FUNC4SC(m_type, m_arg1, m_arg2, m_arg3, m_arg4) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4); \ } else { \ server_name->m_type(p1, p2, p3, p4); \ @@ -494,7 +494,7 @@ #define FUNC4(m_type, m_arg1, m_arg2, m_arg3, m_arg4) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4); \ } else { \ server_name->m_type(p1, p2, p3, p4); \ @@ -503,7 +503,7 @@ #define FUNC4C(m_type, m_arg1, m_arg2, m_arg3, m_arg4) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4); \ } else { \ server_name->m_type(p1, p2, p3, p4); \ @@ -512,7 +512,7 @@ #define FUNC5R(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ m_r ret; \ command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, &ret); \ SYNC_DEBUG \ @@ -524,7 +524,7 @@ #define FUNC5RC(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ m_r ret; \ command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, &ret); \ SYNC_DEBUG \ @@ -536,7 +536,7 @@ #define FUNC5S(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5); \ } else { \ server_name->m_type(p1, p2, p3, p4, p5); \ @@ -545,7 +545,7 @@ #define FUNC5SC(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5); \ } else { \ server_name->m_type(p1, p2, p3, p4, p5); \ @@ -554,7 +554,7 @@ #define FUNC5(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5); \ } else { \ server_name->m_type(p1, p2, p3, p4, p5); \ @@ -563,7 +563,7 @@ #define FUNC5C(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5); \ } else { \ server_name->m_type(p1, p2, p3, p4, p5); \ @@ -572,7 +572,7 @@ #define FUNC6R(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ m_r ret; \ command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, &ret); \ SYNC_DEBUG \ @@ -584,7 +584,7 @@ #define FUNC6RC(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ m_r ret; \ command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, &ret); \ return ret; \ @@ -595,7 +595,7 @@ #define FUNC6S(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6); \ } else { \ server_name->m_type(p1, p2, p3, p4, p5, p6); \ @@ -604,7 +604,7 @@ #define FUNC6SC(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6); \ } else { \ server_name->m_type(p1, p2, p3, p4, p5, p6); \ @@ -613,7 +613,7 @@ #define FUNC6(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6); \ } else { \ server_name->m_type(p1, p2, p3, p4, p5, p6); \ @@ -622,7 +622,7 @@ #define FUNC6C(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6); \ } else { \ server_name->m_type(p1, p2, p3, p4, p5, p6); \ @@ -631,7 +631,7 @@ #define FUNC7R(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ m_r ret; \ command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, &ret); \ SYNC_DEBUG \ @@ -643,7 +643,7 @@ #define FUNC7RC(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ m_r ret; \ command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, &ret); \ SYNC_DEBUG \ @@ -655,7 +655,7 @@ #define FUNC7S(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7); \ } else { \ server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \ @@ -664,7 +664,7 @@ #define FUNC7SC(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7); \ } else { \ server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \ @@ -673,7 +673,7 @@ #define FUNC7(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7); \ } else { \ server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \ @@ -682,7 +682,7 @@ #define FUNC7C(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7); \ } else { \ server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \ @@ -691,7 +691,7 @@ #define FUNC8R(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ m_r ret; \ command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, &ret); \ SYNC_DEBUG \ @@ -703,7 +703,7 @@ #define FUNC8RC(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ m_r ret; \ command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, &ret); \ SYNC_DEBUG \ @@ -715,7 +715,7 @@ #define FUNC8S(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8); \ } else { \ server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \ @@ -724,7 +724,7 @@ #define FUNC8SC(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8); \ } else { \ server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \ @@ -733,7 +733,7 @@ #define FUNC8(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8); \ } else { \ server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \ @@ -742,7 +742,7 @@ #define FUNC8C(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) const { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8); \ } else { \ server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \ @@ -751,7 +751,7 @@ #define FUNC9(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8, m_arg9) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8, m_arg9 p9) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, p9); \ } else { \ server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8, p9); \ @@ -760,7 +760,7 @@ #define FUNC10(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8, m_arg9, m_arg10) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8, m_arg9 p9, m_arg10 p10) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); \ } else { \ server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); \ @@ -769,7 +769,7 @@ #define FUNC11(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8, m_arg9, m_arg10, m_arg11) \ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8, m_arg9 p9, m_arg10 p10, m_arg11 p11) { \ - if (Thread::get_caller_ID() != server_thread) { \ + if (Thread::get_caller_id() != server_thread) { \ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); \ } else { \ server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); \ diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h index 9c264ead49..9405f6e012 100644 --- a/servers/visual/rasterizer.h +++ b/servers/visual/rasterizer.h @@ -1014,6 +1014,8 @@ public: virtual void reset_canvas() = 0; + virtual void draw_window_margins(int *p_margins, RID *p_margin_textures) = 0; + virtual ~RasterizerCanvas() {} }; diff --git a/servers/visual/shader_types.cpp b/servers/visual/shader_types.cpp index 3de0841f2a..3f1403d532 100644 --- a/servers/visual/shader_types.cpp +++ b/servers/visual/shader_types.cpp @@ -109,6 +109,7 @@ ShaderTypes::ShaderTypes() { shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["SCREEN_UV"] = ShaderLanguage::TYPE_VEC2; shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["POINT_COORD"] = ShaderLanguage::TYPE_VEC2; shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["SIDE"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["ALPHA_SCISSOR"] = ShaderLanguage::TYPE_FLOAT; shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["WORLD_MATRIX"] = ShaderLanguage::TYPE_MAT4; shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["INV_CAMERA_MATRIX"] = ShaderLanguage::TYPE_MAT4; diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index f17411f11a..cc4fe0809d 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -41,23 +41,29 @@ int VisualServerRaster::changes = 0; -/* CURSOR */ -void VisualServerRaster::cursor_set_rotation(float p_rotation, int p_cursor) { -} -void VisualServerRaster::cursor_set_texture(RID p_texture, const Point2 &p_center_offset, int p_cursor, const Rect2 &p_region) { -} -void VisualServerRaster::cursor_set_visible(bool p_visible, int p_cursor) { -} -void VisualServerRaster::cursor_set_pos(const Point2 &p_pos, int p_cursor) { -} - /* BLACK BARS */ void VisualServerRaster::black_bars_set_margins(int p_left, int p_top, int p_right, int p_bottom) { + + black_margin[MARGIN_LEFT] = p_left; + black_margin[MARGIN_TOP] = p_top; + black_margin[MARGIN_RIGHT] = p_right; + black_margin[MARGIN_BOTTOM] = p_bottom; } + void VisualServerRaster::black_bars_set_images(RID p_left, RID p_top, RID p_right, RID p_bottom) { + + black_image[MARGIN_LEFT] = p_left; + black_image[MARGIN_TOP] = p_top; + black_image[MARGIN_RIGHT] = p_right; + black_image[MARGIN_BOTTOM] = p_bottom; } +void VisualServerRaster::_draw_margins() { + + VSG::canvas_render->draw_window_margins(black_margin, black_image); +}; + /* FREE */ void VisualServerRaster::free(RID p_rid) { @@ -78,7 +84,7 @@ void VisualServerRaster::request_frame_drawn_callback(Object *p_where, const Str ERR_FAIL_NULL(p_where); FrameDrawnCallbacks fdc; - fdc.object = p_where->get_instance_ID(); + fdc.object = p_where->get_instance_id(); fdc.method = p_method; fdc.param = p_userdata; @@ -121,6 +127,8 @@ void VisualServerRaster::draw() { frame_drawn_callbacks.pop_front(); } + + _draw_margins(); } void VisualServerRaster::sync() { } @@ -189,6 +197,9 @@ VisualServerRaster::VisualServerRaster() { VSG::storage = VSG::rasterizer->get_storage(); VSG::canvas_render = VSG::rasterizer->get_canvas(); VSG::scene_render = VSG::rasterizer->get_scene(); + + for (int i = 0; i < 4; i++) + black_margin[i] = 0; } VisualServerRaster::~VisualServerRaster() { @@ -2626,14 +2637,14 @@ AABB VisualServerRaster::instance_get_base_aabb(RID p_instance) const { } -void VisualServerRaster::instance_attach_object_instance_ID(RID p_instance,uint32_t p_ID) { +void VisualServerRaster::instance_attach_object_instance_id(RID p_instance,uint32_t p_ID) { VS_CHANGED; Instance *instance = instance_owner.get( p_instance ); ERR_FAIL_COND( !instance ); instance->object_ID=p_ID; } -uint32_t VisualServerRaster::instance_get_object_instance_ID(RID p_instance) const { +uint32_t VisualServerRaster::instance_get_object_instance_id(RID p_instance) const { Instance *instance = instance_owner.get( p_instance ); ERR_FAIL_COND_V( !instance, 0 ); diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h index b13bb904ab..596dd5c10e 100644 --- a/servers/visual/visual_server_raster.h +++ b/servers/visual/visual_server_raster.h @@ -61,6 +61,9 @@ class VisualServerRaster : public VisualServer { bool draw_extra_frame; RID test_cube; + int black_margin[4]; + RID black_image[4]; + struct FrameDrawnCallbacks { ObjectID object; @@ -584,6 +587,8 @@ class VisualServerRaster : public VisualServer { #endif + void _draw_margins(); + public: _FORCE_INLINE_ static void redraw_request() { changes++; } @@ -998,7 +1003,7 @@ public: BIND2(instance_set_scenario, RID, RID) // from can be mesh, light, poly, area and portal so far. BIND2(instance_set_layer_mask, RID, uint32_t) BIND2(instance_set_transform, RID, const Transform &) - BIND2(instance_attach_object_instance_ID, RID, ObjectID) + BIND2(instance_attach_object_instance_id, RID, ObjectID) BIND3(instance_set_blend_shape_weight, RID, int, float) BIND3(instance_set_surface_material, RID, int, RID) BIND2(instance_set_visible, RID, bool) @@ -1110,12 +1115,6 @@ public: BIND2(canvas_occluder_polygon_set_cull_mode, RID, CanvasOccluderPolygonCullMode) - /* CURSOR */ - virtual void cursor_set_rotation(float p_rotation, int p_cursor = 0); // radians - virtual void cursor_set_texture(RID p_texture, const Point2 &p_center_offset = Point2(0, 0), int p_cursor = 0, const Rect2 &p_region = Rect2()); - virtual void cursor_set_visible(bool p_visible, int p_cursor = 0); - virtual void cursor_set_pos(const Point2 &p_pos, int p_cursor = 0); - /* BLACK BARS */ virtual void black_bars_set_margins(int p_left, int p_top, int p_right, int p_bottom); diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index 87431a2ce4..11a9c8c9c1 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -797,7 +797,7 @@ void VisualServerScene::instance_set_transform(RID p_instance, const Transform & instance->transform = p_transform; _instance_queue_update(instance, true); } -void VisualServerScene::instance_attach_object_instance_ID(RID p_instance, ObjectID p_ID) { +void VisualServerScene::instance_attach_object_instance_id(RID p_instance, ObjectID p_ID) { Instance *instance = instance_owner.get(p_instance); ERR_FAIL_COND(!instance); @@ -880,13 +880,13 @@ void VisualServerScene::instance_attach_skeleton(RID p_instance, RID p_skeleton) return; if (instance->skeleton.is_valid()) { - VSG::storage->instance_remove_skeleton(p_skeleton, instance); + VSG::storage->instance_remove_skeleton(instance->skeleton, instance); } instance->skeleton = p_skeleton; if (instance->skeleton.is_valid()) { - VSG::storage->instance_add_skeleton(p_skeleton, instance); + VSG::storage->instance_add_skeleton(instance->skeleton, instance); } _instance_queue_update(instance, true); diff --git a/servers/visual/visual_server_scene.h b/servers/visual/visual_server_scene.h index 17b95946b3..a4895382a4 100644 --- a/servers/visual/visual_server_scene.h +++ b/servers/visual/visual_server_scene.h @@ -489,7 +489,7 @@ public: virtual void instance_set_scenario(RID p_instance, RID p_scenario); // from can be mesh, light, poly, area and portal so far. virtual void instance_set_layer_mask(RID p_instance, uint32_t p_mask); virtual void instance_set_transform(RID p_instance, const Transform &p_transform); - virtual void instance_attach_object_instance_ID(RID p_instance, ObjectID p_ID); + virtual void instance_attach_object_instance_id(RID p_instance, ObjectID p_ID); virtual void instance_set_blend_shape_weight(RID p_instance, int p_shape, float p_weight); virtual void instance_set_surface_material(RID p_instance, int p_surface, RID p_material); virtual void instance_set_visible(RID p_instance, bool p_visible); diff --git a/servers/visual/visual_server_wrap_mt.cpp b/servers/visual/visual_server_wrap_mt.cpp index 525e3dc2f9..827f47a16e 100644 --- a/servers/visual/visual_server_wrap_mt.cpp +++ b/servers/visual/visual_server_wrap_mt.cpp @@ -68,7 +68,7 @@ void VisualServerWrapMT::_thread_callback(void *_instance) { void VisualServerWrapMT::thread_loop() { - server_thread = Thread::get_caller_ID(); + server_thread = Thread::get_caller_id(); OS::get_singleton()->make_rendering_thread(); @@ -179,7 +179,7 @@ VisualServerWrapMT::VisualServerWrapMT(VisualServer *p_contained, bool p_create_ 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; } diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h index e6ce3f6a54..20223f9651 100644 --- a/servers/visual/visual_server_wrap_mt.h +++ b/servers/visual/visual_server_wrap_mt.h @@ -430,7 +430,7 @@ public: FUNC2(instance_set_scenario, RID, RID) // from can be mesh, light, poly, area and portal so far. FUNC2(instance_set_layer_mask, RID, uint32_t) FUNC2(instance_set_transform, RID, const Transform &) - FUNC2(instance_attach_object_instance_ID, RID, ObjectID) + FUNC2(instance_attach_object_instance_id, RID, ObjectID) FUNC3(instance_set_blend_shape_weight, RID, int, float) FUNC3(instance_set_surface_material, RID, int, RID) FUNC2(instance_set_visible, RID, bool) @@ -538,12 +538,6 @@ public: FUNC2(canvas_occluder_polygon_set_cull_mode, RID, CanvasOccluderPolygonCullMode) - /* CURSOR */ - FUNC2(cursor_set_rotation, float, int) // radians - FUNC4(cursor_set_texture, RID, const Point2 &, int, const Rect2 &) - FUNC2(cursor_set_visible, bool, int) - FUNC2(cursor_set_pos, const Point2 &, int) - /* BLACK BARS */ FUNC4(black_bars_set_margins, int, int, int, int) diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index 307f4107eb..65dd4d7661 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -136,11 +136,6 @@ void VisualServer::_free_internal_rids() { free(white_texture); if (test_material.is_valid()) free(test_material); - - for (int i = 0; i < 32; i++) { - if (material_2d[i].is_valid()) - free(material_2d[i]); - } } RID VisualServer::_make_test_cube() { @@ -284,37 +279,6 @@ RID VisualServer::make_sphere_mesh(int p_lats, int p_lons, float p_radius) { return mesh; } -RID VisualServer::material_2d_get(bool p_shaded, bool p_transparent, bool p_double_sided, bool p_cut_alpha, bool p_opaque_prepass) { - - int version = 0; - if (p_shaded) - version = 1; - if (p_transparent) - version |= 2; - if (p_cut_alpha) - version |= 4; - if (p_opaque_prepass) - version |= 8; - if (p_double_sided) - version |= 16; - if (material_2d[version].is_valid()) - return material_2d[version]; - - //not valid, make - - /* material_2d[version]=fixed_material_create(); - fixed_material_set_flag(material_2d[version],FIXED_MATERIAL_FLAG_USE_ALPHA,p_transparent); - fixed_material_set_flag(material_2d[version],FIXED_MATERIAL_FLAG_USE_COLOR_ARRAY,true); - fixed_material_set_flag(material_2d[version],FIXED_MATERIAL_FLAG_DISCARD_ALPHA,p_cut_alpha); - material_set_flag(material_2d[version],MATERIAL_FLAG_UNSHADED,!p_shaded); - material_set_flag(material_2d[version], MATERIAL_FLAG_DOUBLE_SIDED, p_double_sided); - material_set_depth_draw_mode(material_2d[version],p_opaque_prepass?MATERIAL_DEPTH_DRAW_OPAQUE_PRE_PASS_ALPHA:MATERIAL_DEPTH_DRAW_OPAQUE_ONLY); - fixed_material_set_texture(material_2d[version],FIXED_MATERIAL_PARAM_DIFFUSE,get_white_texture()); - //material cut alpha?*/ - - return material_2d[version]; -} - RID VisualServer::get_white_texture() { if (white_texture.is_valid()) @@ -1475,12 +1439,12 @@ Array VisualServer::mesh_surface_get_arrays(RID p_mesh, int p_surface) const { void VisualServer::_bind_methods() { ClassDB::bind_method(D_METHOD("texture_create"), &VisualServer::texture_create); - ClassDB::bind_method(D_METHOD("texture_create_from_image", "image:Image", "flags"), &VisualServer::texture_create_from_image, DEFVAL(TEXTURE_FLAGS_DEFAULT)); + ClassDB::bind_method(D_METHOD("texture_create_from_image", "image", "flags"), &VisualServer::texture_create_from_image, DEFVAL(TEXTURE_FLAGS_DEFAULT)); //ClassDB::bind_method(D_METHOD("texture_allocate"),&VisualServer::texture_allocate,DEFVAL( TEXTURE_FLAGS_DEFAULT ) ); //ClassDB::bind_method(D_METHOD("texture_set_data"),&VisualServer::texture_blit_rect,DEFVAL( CUBEMAP_LEFT ) ); //ClassDB::bind_method(D_METHOD("texture_get_rect"),&VisualServer::texture_get_rect ); - ClassDB::bind_method(D_METHOD("texture_set_flags", "texture"), &VisualServer::texture_set_flags); - ClassDB::bind_method(D_METHOD("texture_get_flags", "texture", "flags"), &VisualServer::texture_get_flags); + ClassDB::bind_method(D_METHOD("texture_set_flags", "texture", "flags"), &VisualServer::texture_set_flags); + ClassDB::bind_method(D_METHOD("texture_get_flags", "texture"), &VisualServer::texture_get_flags); ClassDB::bind_method(D_METHOD("texture_get_width", "texture"), &VisualServer::texture_get_width); ClassDB::bind_method(D_METHOD("texture_get_height", "texture"), &VisualServer::texture_get_height); diff --git a/servers/visual_server.h b/servers/visual_server.h index 5c9f4202f9..ddf32a9ea1 100644 --- a/servers/visual_server.h +++ b/servers/visual_server.h @@ -60,7 +60,6 @@ protected: RID test_texture; RID white_texture; RID test_material; - RID material_2d[32]; Error _surface_set_data(Array p_arrays, uint32_t p_format, uint32_t *p_offsets, uint32_t p_stride, PoolVector<uint8_t> &r_vertex_array, int p_vertex_array_len, PoolVector<uint8_t> &r_index_array, int p_index_array_len, Rect3 &r_aabb, Vector<Rect3> r_bone_aabb); @@ -727,7 +726,7 @@ public: virtual void instance_set_scenario(RID p_instance, RID p_scenario) = 0; // from can be mesh, light, poly, area and portal so far. virtual void instance_set_layer_mask(RID p_instance, uint32_t p_mask) = 0; virtual void instance_set_transform(RID p_instance, const Transform &p_transform) = 0; - virtual void instance_attach_object_instance_ID(RID p_instance, ObjectID p_ID) = 0; + virtual void instance_attach_object_instance_id(RID p_instance, ObjectID p_ID) = 0; virtual void instance_set_blend_shape_weight(RID p_instance, int p_shape, float p_weight) = 0; virtual void instance_set_surface_material(RID p_instance, int p_surface, RID p_material) = 0; virtual void instance_set_visible(RID p_instance, bool p_visible) = 0; @@ -875,12 +874,6 @@ public: }; virtual void canvas_occluder_polygon_set_cull_mode(RID p_occluder_polygon, CanvasOccluderPolygonCullMode p_mode) = 0; - /* CURSOR */ - virtual void cursor_set_rotation(float p_rotation, int p_cursor = 0) = 0; // radians - virtual void cursor_set_texture(RID p_texture, const Point2 &p_center_offset = Point2(0, 0), int p_cursor = 0, const Rect2 &p_region = Rect2()) = 0; - virtual void cursor_set_visible(bool p_visible, int p_cursor = 0) = 0; - virtual void cursor_set_pos(const Point2 &p_pos, int p_cursor = 0) = 0; - /* BLACK BARS */ virtual void black_bars_set_margins(int p_left, int p_top, int p_right, int p_bottom) = 0; @@ -920,8 +913,6 @@ public: /* Materials for 2D on 3D */ - RID material_2d_get(bool p_shaded, bool p_transparent, bool p_double_sided, bool p_cut_alpha, bool p_opaque_prepass); - /* TESTING */ virtual RID get_test_cube() = 0; |