diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-01-21 22:27:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-21 22:27:50 +0100 |
commit | 5127afa812f80c02e6f9fada854d46482daafca4 (patch) | |
tree | 8e4bf30bde2e456fe430f97dd0139febf6a332a0 /servers | |
parent | 6190690757ca322393f13e44bc2ceed79b362b45 (diff) | |
parent | 4faaf6089a3880d673c5fc51a260128bfe59b351 (diff) |
Merge pull request #35413 from akien-mga/if-0-means-couperet
Remove unused #if 0'ed code
Diffstat (limited to 'servers')
-rw-r--r-- | servers/audio_server.h | 12 | ||||
-rw-r--r-- | servers/visual/visual_server_raster.h | 5 | ||||
-rw-r--r-- | servers/visual/visual_server_scene.cpp | 4 | ||||
-rw-r--r-- | servers/visual/visual_server_scene.h | 23 | ||||
-rw-r--r-- | servers/visual/visual_server_wrap_mt.h | 5 | ||||
-rw-r--r-- | servers/visual_server.h | 7 |
6 files changed, 13 insertions, 43 deletions
diff --git a/servers/audio_server.h b/servers/audio_server.h index 13d6abbc8d..815200c811 100644 --- a/servers/audio_server.h +++ b/servers/audio_server.h @@ -247,18 +247,6 @@ private: void _mix_step(); -#if 0 - struct AudioInBlock { - - Ref<AudioStreamSample> audio_stream; - int current_position; - bool loops; - }; - - Map<StringName, AudioInBlock *> audio_in_block_map; - Vector<AudioInBlock *> audio_in_blocks; -#endif - struct CallbackItem { AudioCallback callback; diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h index 1a1e86833e..9afcfc4648 100644 --- a/servers/visual/visual_server_raster.h +++ b/servers/visual/visual_server_raster.h @@ -531,11 +531,10 @@ public: BIND2(scenario_set_fallback_environment, RID, RID) /* INSTANCING API */ - // from can be mesh, light, area and portal so far. BIND0R(RID, instance_create) - BIND2(instance_set_base, RID, RID) // from can be mesh, light, poly, area and portal so far. - BIND2(instance_set_scenario, RID, RID) // from can be mesh, light, poly, area and portal so far. + BIND2(instance_set_base, RID, RID) + BIND2(instance_set_scenario, RID, RID) BIND2(instance_set_layer_mask, RID, uint32_t) BIND2(instance_set_transform, RID, const Transform &) BIND2(instance_attach_object_instance_id, RID, ObjectID) diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index bf9db616e4..409a814b3b 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -29,10 +29,13 @@ /*************************************************************************/ #include "visual_server_scene.h" + #include "core/os/os.h" #include "visual_server_globals.h" #include "visual_server_raster.h" + #include <new> + /* CAMERA API */ RID VisualServerScene::camera_create() { @@ -314,7 +317,6 @@ void VisualServerScene::_instance_queue_update(Instance *p_instance, bool p_upda _instance_update_list.add(&p_instance->update_item); } -// from can be mesh, light, area and portal so far. RID VisualServerScene::instance_create() { Instance *instance = memnew(Instance); diff --git a/servers/visual/visual_server_scene.h b/servers/visual/visual_server_scene.h index ad74250fe4..a174d9e616 100644 --- a/servers/visual/visual_server_scene.h +++ b/servers/visual/visual_server_scene.h @@ -55,22 +55,6 @@ public: static VisualServerScene *singleton; -// FIXME: Kept as reference for future implementation -#if 0 - struct Portal { - - bool enabled; - float disable_distance; - Color disable_color; - float connect_range; - Vector<Point2> shape; - Rect2 bounds; - - - Portal() { enabled=true; disable_distance=50; disable_color=Color(); connect_range=0.8; } - }; -#endif - /* CAMERA API */ struct Camera : public RID_Data { @@ -450,11 +434,10 @@ public: RID_Owner<Instance> instance_owner; - // from can be mesh, light, area and portal so far. - virtual RID instance_create(); // from can be mesh, light, poly, area and portal so far. + virtual RID instance_create(); - virtual void instance_set_base(RID p_instance, RID p_base); // from can be mesh, light, poly, area and portal so far. - 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_base(RID p_instance, RID p_base); + virtual void instance_set_scenario(RID p_instance, RID p_scenario); 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); diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h index b8f433d006..b1bbed24fd 100644 --- a/servers/visual/visual_server_wrap_mt.h +++ b/servers/visual/visual_server_wrap_mt.h @@ -453,11 +453,10 @@ public: FUNC2(scenario_set_fallback_environment, RID, RID) /* INSTANCING API */ - // from can be mesh, light, area and portal so far. FUNCRID(instance) - FUNC2(instance_set_base, RID, RID) // from can be mesh, light, poly, area and portal so far. - FUNC2(instance_set_scenario, RID, RID) // from can be mesh, light, poly, area and portal so far. + FUNC2(instance_set_base, RID, RID) + FUNC2(instance_set_scenario, RID, RID) FUNC2(instance_set_layer_mask, RID, uint32_t) FUNC2(instance_set_transform, RID, const Transform &) FUNC2(instance_attach_object_instance_id, RID, ObjectID) diff --git a/servers/visual_server.h b/servers/visual_server.h index 6f0659357c..e7662695a6 100644 --- a/servers/visual_server.h +++ b/servers/visual_server.h @@ -813,11 +813,10 @@ public: virtual RID instance_create2(RID p_base, RID p_scenario); - //virtual RID instance_create(RID p_base,RID p_scenario)=0; // from can be mesh, light, area and portal so far. - virtual RID instance_create() = 0; // from can be mesh, light, poly, area and portal so far. + virtual RID instance_create() = 0; - virtual void instance_set_base(RID p_instance, RID p_base) = 0; // from can be mesh, light, poly, area and portal so far. - 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_base(RID p_instance, RID p_base) = 0; + virtual void instance_set_scenario(RID p_instance, RID p_scenario) = 0; 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; |