diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-07-19 17:00:46 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-07-19 17:06:03 -0300 |
commit | 25678b1876816b9ccb14b2c92aef62f3b009f88f (patch) | |
tree | 189f082d788f78e16f620b056d21249118883fc5 /servers | |
parent | 89588d43349e496a9e05756d42ae87323d31269e (diff) |
-Renamed GlobalConfig to ProjectSettings, makes more sense.
-Added system for feature overrides, it's pretty cool :)
Diffstat (limited to 'servers')
-rw-r--r-- | servers/audio/audio_driver_dummy.cpp | 2 | ||||
-rw-r--r-- | servers/audio_server.cpp | 2 | ||||
-rw-r--r-- | servers/physics/space_sw.cpp | 2 | ||||
-rw-r--r-- | servers/physics/space_sw.h | 2 | ||||
-rw-r--r-- | servers/physics_2d/broad_phase_2d_hash_grid.cpp | 2 | ||||
-rw-r--r-- | servers/physics_2d/physics_2d_server_sw.cpp | 4 | ||||
-rw-r--r-- | servers/physics_2d/physics_2d_server_wrap_mt.h | 2 | ||||
-rw-r--r-- | servers/physics_2d/space_2d_sw.h | 2 | ||||
-rw-r--r-- | servers/register_server_types.cpp | 10 | ||||
-rw-r--r-- | servers/visual/visual_server_raster.cpp | 2 | ||||
-rw-r--r-- | servers/visual/visual_server_viewport.cpp | 2 | ||||
-rw-r--r-- | servers/visual/visual_server_wrap_mt.cpp | 2 | ||||
-rw-r--r-- | servers/visual_server.cpp | 21 |
13 files changed, 32 insertions, 23 deletions
diff --git a/servers/audio/audio_driver_dummy.cpp b/servers/audio/audio_driver_dummy.cpp index 3aaf73df03..e20990cdce 100644 --- a/servers/audio/audio_driver_dummy.cpp +++ b/servers/audio/audio_driver_dummy.cpp @@ -29,7 +29,7 @@ /*************************************************************************/ #include "audio_driver_dummy.h" -#include "global_config.h" +#include "project_settings.h" #include "os/os.h" Error AudioDriverDummy::init() { diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index 195c02e22d..253bf6e2ee 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "audio_server.h" -#include "global_config.h" +#include "project_settings.h" #include "io/resource_loader.h" #include "os/file_access.h" #include "os/os.h" diff --git a/servers/physics/space_sw.cpp b/servers/physics/space_sw.cpp index 2d71fd6061..9e84fce000 100644 --- a/servers/physics/space_sw.cpp +++ b/servers/physics/space_sw.cpp @@ -29,7 +29,7 @@ /*************************************************************************/ #include "space_sw.h" #include "collision_solver_sw.h" -#include "global_config.h" +#include "project_settings.h" #include "physics_server_sw.h" _FORCE_INLINE_ static bool _match_object_type_query(CollisionObjectSW *p_object, uint32_t p_collision_layer, uint32_t p_type_mask) { diff --git a/servers/physics/space_sw.h b/servers/physics/space_sw.h index 6ef12dbeae..6c6c433230 100644 --- a/servers/physics/space_sw.h +++ b/servers/physics/space_sw.h @@ -36,7 +36,7 @@ #include "body_sw.h" #include "broad_phase_sw.h" #include "collision_object_sw.h" -#include "global_config.h" +#include "project_settings.h" #include "hash_map.h" #include "typedefs.h" diff --git a/servers/physics_2d/broad_phase_2d_hash_grid.cpp b/servers/physics_2d/broad_phase_2d_hash_grid.cpp index 29f3396a1d..5b6c7e2f38 100644 --- a/servers/physics_2d/broad_phase_2d_hash_grid.cpp +++ b/servers/physics_2d/broad_phase_2d_hash_grid.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "broad_phase_2d_hash_grid.h" -#include "global_config.h" +#include "project_settings.h" #define LARGE_ELEMENT_FI 1.01239812 diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp index fe016d4d0c..6eb1106de8 100644 --- a/servers/physics_2d/physics_2d_server_sw.cpp +++ b/servers/physics_2d/physics_2d_server_sw.cpp @@ -31,7 +31,7 @@ #include "broad_phase_2d_basic.h" #include "broad_phase_2d_hash_grid.h" #include "collision_solver_2d_sw.h" -#include "global_config.h" +#include "project_settings.h" #include "os/os.h" #include "script_language.h" @@ -1264,7 +1264,7 @@ Physics2DServerSW::Physics2DServerSW() { island_count = 0; active_objects = 0; collision_pairs = 0; - using_threads = int(GlobalConfig::get_singleton()->get("physics/2d/thread_model")) == 2; + using_threads = int(ProjectSettings::get_singleton()->get("physics/2d/thread_model")) == 2; }; Physics2DServerSW::~Physics2DServerSW(){ diff --git a/servers/physics_2d/physics_2d_server_wrap_mt.h b/servers/physics_2d/physics_2d_server_wrap_mt.h index ac9066582e..5b00416b61 100644 --- a/servers/physics_2d/physics_2d_server_wrap_mt.h +++ b/servers/physics_2d/physics_2d_server_wrap_mt.h @@ -31,7 +31,7 @@ #define PHYSICS2DSERVERWRAPMT_H #include "command_queue_mt.h" -#include "global_config.h" +#include "project_settings.h" #include "os/thread.h" #include "servers/physics_2d_server.h" diff --git a/servers/physics_2d/space_2d_sw.h b/servers/physics_2d/space_2d_sw.h index a28233a4a6..c5bdfa3323 100644 --- a/servers/physics_2d/space_2d_sw.h +++ b/servers/physics_2d/space_2d_sw.h @@ -36,7 +36,7 @@ #include "body_pair_2d_sw.h" #include "broad_phase_2d_sw.h" #include "collision_object_2d_sw.h" -#include "global_config.h" +#include "project_settings.h" #include "hash_map.h" #include "typedefs.h" diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp index 8ee431cc68..c5029d1e13 100644 --- a/servers/register_server_types.cpp +++ b/servers/register_server_types.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "register_server_types.h" -#include "global_config.h" +#include "project_settings.h" #include "audio/audio_effect.h" #include "audio/audio_stream.h" @@ -73,10 +73,10 @@ ShaderTypes *shader_types = NULL; void register_server_types() { - GlobalConfig::get_singleton()->add_singleton(GlobalConfig::Singleton("VisualServer", VisualServer::get_singleton())); - GlobalConfig::get_singleton()->add_singleton(GlobalConfig::Singleton("AudioServer", AudioServer::get_singleton())); - GlobalConfig::get_singleton()->add_singleton(GlobalConfig::Singleton("PhysicsServer", PhysicsServer::get_singleton())); - GlobalConfig::get_singleton()->add_singleton(GlobalConfig::Singleton("Physics2DServer", Physics2DServer::get_singleton())); + ProjectSettings::get_singleton()->add_singleton(ProjectSettings::Singleton("VisualServer", VisualServer::get_singleton())); + ProjectSettings::get_singleton()->add_singleton(ProjectSettings::Singleton("AudioServer", AudioServer::get_singleton())); + ProjectSettings::get_singleton()->add_singleton(ProjectSettings::Singleton("PhysicsServer", PhysicsServer::get_singleton())); + ProjectSettings::get_singleton()->add_singleton(ProjectSettings::Singleton("Physics2DServer", Physics2DServer::get_singleton())); shader_types = memnew(ShaderTypes); diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index 8d332b3e6c..da6174cd5c 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -29,7 +29,7 @@ /*************************************************************************/ #include "visual_server_raster.h" #include "default_mouse_cursor.xpm" -#include "global_config.h" +#include "project_settings.h" #include "io/marshalls.h" #include "os/os.h" #include "sort.h" diff --git a/servers/visual/visual_server_viewport.cpp b/servers/visual/visual_server_viewport.cpp index 4d53181b43..2a37b64759 100644 --- a/servers/visual/visual_server_viewport.cpp +++ b/servers/visual/visual_server_viewport.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "visual_server_viewport.h" -#include "global_config.h" +#include "project_settings.h" #include "visual_server_canvas.h" #include "visual_server_global.h" #include "visual_server_scene.h" diff --git a/servers/visual/visual_server_wrap_mt.cpp b/servers/visual/visual_server_wrap_mt.cpp index a358e99fb3..bdd41b0a57 100644 --- a/servers/visual/visual_server_wrap_mt.cpp +++ b/servers/visual/visual_server_wrap_mt.cpp @@ -27,7 +27,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "visual_server_wrap_mt.h" -#include "global_config.h" +#include "project_settings.h" #include "os/os.h" void VisualServerWrapMT::thread_exit() { diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index 1e217649ba..fc274fa8e1 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -28,8 +28,8 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "visual_server.h" -#include "global_config.h" #include "method_bind_ext.gen.inc" +#include "project_settings.h" VisualServer *VisualServer::singleton = NULL; VisualServer *(*VisualServer::create_func)() = NULL; @@ -1573,16 +1573,25 @@ VisualServer::VisualServer() { GLOBAL_DEF("rendering/vram_compression/import_pvrtc", false); GLOBAL_DEF("rendering/quality/directional_shadow/size", 4096); + GLOBAL_DEF("rendering/quality/directional_shadow/size.mobile", 2048); GLOBAL_DEF("rendering/quality/shadow_atlas/size", 4096); - GlobalConfig::get_singleton()->set_custom_property_info("rendering/shadow_atlas/size", PropertyInfo(Variant::INT, "rendering/shadow_atlas/size", PROPERTY_HINT_RANGE, "256,16384")); + GLOBAL_DEF("rendering/quality/shadow_atlas/size.mobile", 2048); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadow_atlas/size", PropertyInfo(Variant::INT, "rendering/shadow_atlas/size", PROPERTY_HINT_RANGE, "256,16384")); GLOBAL_DEF("rendering/quality/shadow_atlas/quadrant_0_subdiv", 1); GLOBAL_DEF("rendering/quality/shadow_atlas/quadrant_1_subdiv", 2); GLOBAL_DEF("rendering/quality/shadow_atlas/quadrant_2_subdiv", 3); GLOBAL_DEF("rendering/quality/shadow_atlas/quadrant_3_subdiv", 4); - GlobalConfig::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/quadrant_0_subdiv", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/quadrant_0_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows")); - GlobalConfig::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/quadrant_1_subdiv", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/quadrant_1_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows")); - GlobalConfig::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/quadrant_2_subdiv", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/quadrant_2_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows")); - GlobalConfig::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/quadrant_3_subdiv", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/quadrant_3_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows")); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/quadrant_0_subdiv", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/quadrant_0_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows")); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/quadrant_1_subdiv", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/quadrant_1_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows")); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/quadrant_2_subdiv", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/quadrant_2_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows")); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/quadrant_3_subdiv", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/quadrant_3_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows")); + + GLOBAL_DEF("rendering/quality/shadows/filter_mode", 1); + GLOBAL_DEF("rendering/quality/shadows/filter_mode.mobile", 0); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadows/filter_mode", PropertyInfo(Variant::INT, "rendering/quality/shadows/filter_mode", PROPERTY_HINT_ENUM, "Disabled,PCF5,PCF13")); + + GLOBAL_DEF("rendering/quality/reflections/texture_array_reflections", true); + GLOBAL_DEF("rendering/quality/reflections/texture_array_reflections.mobile", false); } VisualServer::~VisualServer() { |