diff options
Diffstat (limited to 'servers')
-rw-r--r-- | servers/display_server.cpp | 4 | ||||
-rw-r--r-- | servers/display_server.h | 4 | ||||
-rw-r--r-- | servers/physics_server_2d.cpp | 4 | ||||
-rw-r--r-- | servers/physics_server_2d.h | 6 | ||||
-rw-r--r-- | servers/physics_server_3d.cpp | 4 | ||||
-rw-r--r-- | servers/physics_server_3d.h | 6 | ||||
-rw-r--r-- | servers/rendering/renderer_rd/storage_rd/material_storage.cpp | 2 |
7 files changed, 15 insertions, 15 deletions
diff --git a/servers/display_server.cpp b/servers/display_server.cpp index e68fcc184e..a7095d7242 100644 --- a/servers/display_server.cpp +++ b/servers/display_server.cpp @@ -421,7 +421,7 @@ DisplayServer::CursorShape DisplayServer::cursor_get_shape() const { return CURSOR_ARROW; } -void DisplayServer::cursor_set_custom_image(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { +void DisplayServer::cursor_set_custom_image(const Ref<Resource> &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { WARN_PRINT("Custom cursor shape not supported by this display server."); } @@ -832,7 +832,7 @@ Input::CursorShape DisplayServer::_input_get_current_cursor_shape() { return (Input::CursorShape)singleton->cursor_get_shape(); } -void DisplayServer::_input_set_custom_mouse_cursor_func(const RES &p_image, Input::CursorShape p_shape, const Vector2 &p_hostspot) { +void DisplayServer::_input_set_custom_mouse_cursor_func(const Ref<Resource> &p_image, Input::CursorShape p_shape, const Vector2 &p_hostspot) { singleton->cursor_set_custom_image(p_image, (CursorShape)p_shape, p_hostspot); } diff --git a/servers/display_server.h b/servers/display_server.h index 64340cff73..b926dd32e4 100644 --- a/servers/display_server.h +++ b/servers/display_server.h @@ -80,7 +80,7 @@ private: static Input::MouseMode _input_get_mouse_mode(); static void _input_warp(const Vector2 &p_to_pos); static Input::CursorShape _input_get_current_cursor_shape(); - static void _input_set_custom_mouse_cursor_func(const RES &, Input::CursorShape, const Vector2 &p_hostspot); + static void _input_set_custom_mouse_cursor_func(const Ref<Resource> &, Input::CursorShape, const Vector2 &p_hostspot); protected: static void _bind_methods(); @@ -409,7 +409,7 @@ public: }; virtual void cursor_set_shape(CursorShape p_shape); virtual CursorShape cursor_get_shape() const; - virtual void cursor_set_custom_image(const RES &p_cursor, CursorShape p_shape = CURSOR_ARROW, const Vector2 &p_hotspot = Vector2()); + virtual void cursor_set_custom_image(const Ref<Resource> &p_cursor, CursorShape p_shape = CURSOR_ARROW, const Vector2 &p_hotspot = Vector2()); virtual bool get_swap_cancel_ok(); diff --git a/servers/physics_server_2d.cpp b/servers/physics_server_2d.cpp index 45816e3244..d6d23f8310 100644 --- a/servers/physics_server_2d.cpp +++ b/servers/physics_server_2d.cpp @@ -243,7 +243,7 @@ void PhysicsPointQueryParameters2D::_bind_methods() { /////////////////////////////////////////////////////// -void PhysicsShapeQueryParameters2D::set_shape(const RES &p_shape_ref) { +void PhysicsShapeQueryParameters2D::set_shape(const Ref<Resource> &p_shape_ref) { ERR_FAIL_COND(p_shape_ref.is_null()); shape_ref = p_shape_ref; parameters.shape_rid = p_shape_ref->get_rid(); @@ -251,7 +251,7 @@ void PhysicsShapeQueryParameters2D::set_shape(const RES &p_shape_ref) { void PhysicsShapeQueryParameters2D::set_shape_rid(const RID &p_shape) { if (parameters.shape_rid != p_shape) { - shape_ref = RES(); + shape_ref = Ref<Resource>(); parameters.shape_rid = p_shape; } } diff --git a/servers/physics_server_2d.h b/servers/physics_server_2d.h index e9faf0a3bf..2f70b88e30 100644 --- a/servers/physics_server_2d.h +++ b/servers/physics_server_2d.h @@ -663,7 +663,7 @@ class PhysicsShapeQueryParameters2D : public RefCounted { PhysicsDirectSpaceState2D::ShapeParameters parameters; - RES shape_ref; + Ref<Resource> shape_ref; protected: static void _bind_methods(); @@ -671,8 +671,8 @@ protected: public: const PhysicsDirectSpaceState2D::ShapeParameters &get_parameters() const { return parameters; } - void set_shape(const RES &p_shape_ref); - RES get_shape() const { return shape_ref; } + void set_shape(const Ref<Resource> &p_shape_ref); + Ref<Resource> get_shape() const { return shape_ref; } void set_shape_rid(const RID &p_shape); RID get_shape_rid() const { return parameters.shape_rid; } diff --git a/servers/physics_server_3d.cpp b/servers/physics_server_3d.cpp index 17c94978d1..bfe93f0dfb 100644 --- a/servers/physics_server_3d.cpp +++ b/servers/physics_server_3d.cpp @@ -262,7 +262,7 @@ void PhysicsPointQueryParameters3D::_bind_methods() { /////////////////////////////////////////////////////// -void PhysicsShapeQueryParameters3D::set_shape(const RES &p_shape_ref) { +void PhysicsShapeQueryParameters3D::set_shape(const Ref<Resource> &p_shape_ref) { ERR_FAIL_COND(p_shape_ref.is_null()); shape_ref = p_shape_ref; parameters.shape_rid = p_shape_ref->get_rid(); @@ -270,7 +270,7 @@ void PhysicsShapeQueryParameters3D::set_shape(const RES &p_shape_ref) { void PhysicsShapeQueryParameters3D::set_shape_rid(const RID &p_shape) { if (parameters.shape_rid != p_shape) { - shape_ref = RES(); + shape_ref = Ref<Resource>(); parameters.shape_rid = p_shape; } } diff --git a/servers/physics_server_3d.h b/servers/physics_server_3d.h index 4811f7a039..47f3fc2027 100644 --- a/servers/physics_server_3d.h +++ b/servers/physics_server_3d.h @@ -874,7 +874,7 @@ class PhysicsShapeQueryParameters3D : public RefCounted { PhysicsDirectSpaceState3D::ShapeParameters parameters; - RES shape_ref; + Ref<Resource> shape_ref; protected: static void _bind_methods(); @@ -882,8 +882,8 @@ protected: public: const PhysicsDirectSpaceState3D::ShapeParameters &get_parameters() const { return parameters; } - void set_shape(const RES &p_shape_ref); - RES get_shape() const { return shape_ref; } + void set_shape(const Ref<Resource> &p_shape_ref); + Ref<Resource> get_shape() const { return shape_ref; } void set_shape_rid(const RID &p_shape); RID get_shape_rid() const { return parameters.shape_rid; } diff --git a/servers/rendering/renderer_rd/storage_rd/material_storage.cpp b/servers/rendering/renderer_rd/storage_rd/material_storage.cpp index c3747ffabc..3f177e553b 100644 --- a/servers/rendering/renderer_rd/storage_rd/material_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/material_storage.cpp @@ -2091,7 +2091,7 @@ void MaterialStorage::global_variables_load_settings(bool p_load_textures) { } String path = value; - RES resource = ResourceLoader::load(path); + Ref<Resource> resource = ResourceLoader::load(path); ERR_CONTINUE(resource.is_null()); value = resource; } |