diff options
Diffstat (limited to 'servers')
-rw-r--r-- | servers/audio/audio_server_sw.cpp | 2 | ||||
-rw-r--r-- | servers/physics/space_sw.cpp | 6 | ||||
-rw-r--r-- | servers/physics_2d/broad_phase_2d_hash_grid.cpp | 6 | ||||
-rw-r--r-- | servers/physics_2d/physics_2d_server_sw.cpp | 2 | ||||
-rw-r--r-- | servers/physics_2d/physics_2d_server_wrap_mt.cpp | 12 | ||||
-rw-r--r-- | servers/physics_2d/physics_2d_server_wrap_mt.h | 2 | ||||
-rw-r--r-- | servers/physics_2d/space_2d_sw.cpp | 6 | ||||
-rw-r--r-- | servers/register_server_types.cpp | 26 | ||||
-rw-r--r-- | servers/visual/visual_server_viewport.cpp | 2 |
9 files changed, 33 insertions, 31 deletions
diff --git a/servers/audio/audio_server_sw.cpp b/servers/audio/audio_server_sw.cpp index b786d9d532..edf8143eb5 100644 --- a/servers/audio/audio_server_sw.cpp +++ b/servers/audio/audio_server_sw.cpp @@ -943,7 +943,7 @@ AudioServerSW::AudioServerSW(SampleManagerSW *p_sample_manager) { sample_manager=p_sample_manager; String interp = GLOBAL_DEF("audio/mixer_interp","linear"); - Globals::get_singleton()->set_custom_property_info("audio/mixer_interp",PropertyInfo(Variant::STRING,"audio/mixer_interp",PROPERTY_HINT_ENUM,"raw,linear,cubic")); + GlobalConfig::get_singleton()->set_custom_property_info("audio/mixer_interp",PropertyInfo(Variant::STRING,"audio/mixer_interp",PROPERTY_HINT_ENUM,"raw,linear,cubic")); if (interp=="raw") mixer_interp=AudioMixerSW::INTERPOLATION_RAW; else if (interp=="cubic") diff --git a/servers/physics/space_sw.cpp b/servers/physics/space_sw.cpp index 237b6a7ce2..596c7af214 100644 --- a/servers/physics/space_sw.cpp +++ b/servers/physics/space_sw.cpp @@ -719,9 +719,9 @@ SpaceSW::SpaceSW() { contact_max_allowed_penetration= 0.01; constraint_bias = 0.01; - body_linear_velocity_sleep_threshold=GLOBAL_DEF("physics/sleep_threshold_linear",0.1); - body_angular_velocity_sleep_threshold=GLOBAL_DEF("physics/sleep_threshold_angular", (8.0 / 180.0 * Math_PI) ); - body_time_to_sleep=GLOBAL_DEF("physics/time_before_sleep",0.5); + body_linear_velocity_sleep_threshold=GLOBAL_DEF("physics/3d/sleep_threshold_linear",0.1); + body_angular_velocity_sleep_threshold=GLOBAL_DEF("physics/3d/sleep_threshold_angular", (8.0 / 180.0 * Math_PI) ); + body_time_to_sleep=GLOBAL_DEF("physics/3d/time_before_sleep",0.5); body_angular_velocity_damp_ratio=10; diff --git a/servers/physics_2d/broad_phase_2d_hash_grid.cpp b/servers/physics_2d/broad_phase_2d_hash_grid.cpp index 82d7773574..efa12c37cb 100644 --- a/servers/physics_2d/broad_phase_2d_hash_grid.cpp +++ b/servers/physics_2d/broad_phase_2d_hash_grid.cpp @@ -683,12 +683,12 @@ BroadPhase2DSW *BroadPhase2DHashGrid::_create() { BroadPhase2DHashGrid::BroadPhase2DHashGrid() { - hash_table_size = GLOBAL_DEF("physics_2d/bp_hash_table_size",4096); + hash_table_size = GLOBAL_DEF("physics/2d/bp_hash_table_size",4096); hash_table_size = Math::larger_prime(hash_table_size); hash_table = memnew_arr( PosBin*, hash_table_size); - cell_size = GLOBAL_DEF("physics_2d/cell_size",128); - large_object_min_surface = GLOBAL_DEF("physics_2d/large_object_surface_treshold_in_cells",512); + cell_size = GLOBAL_DEF("physics/2d/cell_size",128); + large_object_min_surface = GLOBAL_DEF("physics/2d/large_object_surface_treshold_in_cells",512); for(int i=0;i<hash_table_size;i++) hash_table[i]=NULL; diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp index bb55a616e2..abd83c0346 100644 --- a/servers/physics_2d/physics_2d_server_sw.cpp +++ b/servers/physics_2d/physics_2d_server_sw.cpp @@ -1386,7 +1386,7 @@ Physics2DServerSW::Physics2DServerSW() { island_count=0; active_objects=0; collision_pairs=0; - using_threads=int(Globals::get_singleton()->get("physics_2d/thread_model"))==2; + using_threads=int(GlobalConfig::get_singleton()->get("physics/2d/thread_model"))==2; }; diff --git a/servers/physics_2d/physics_2d_server_wrap_mt.cpp b/servers/physics_2d/physics_2d_server_wrap_mt.cpp index 8a60af725f..8730bb9ee8 100644 --- a/servers/physics_2d/physics_2d_server_wrap_mt.cpp +++ b/servers/physics_2d/physics_2d_server_wrap_mt.cpp @@ -168,12 +168,12 @@ Physics2DServerWrapMT::Physics2DServerWrapMT(Physics2DServer* p_contained,bool p step_thread_up=false; alloc_mutex=Mutex::create(); - shape_pool_max_size=GLOBAL_DEF("core/thread_rid_pool_prealloc",20); - area_pool_max_size=GLOBAL_DEF("core/thread_rid_pool_prealloc",20); - body_pool_max_size=GLOBAL_DEF("core/thread_rid_pool_prealloc",20); - pin_joint_pool_max_size=GLOBAL_DEF("core/thread_rid_pool_prealloc",20); - groove_joint_pool_max_size=GLOBAL_DEF("core/thread_rid_pool_prealloc",20); - damped_spring_joint_pool_max_size=GLOBAL_DEF("core/thread_rid_pool_prealloc",20); + shape_pool_max_size=GLOBAL_GET("memory/multithread/thread_rid_pool_prealloc"); + area_pool_max_size=GLOBAL_GET("memory/multithread/thread_rid_pool_prealloc"); + body_pool_max_size=GLOBAL_GET("memory/multithread/thread_rid_pool_prealloc"); + pin_joint_pool_max_size=GLOBAL_GET("memory/multithread/thread_rid_pool_prealloc"); + groove_joint_pool_max_size=GLOBAL_GET("memory/multithread/thread_rid_pool_prealloc"); + damped_spring_joint_pool_max_size=GLOBAL_GET("memory/multithread/thread_rid_pool_prealloc"); if (!p_create_thread) { server_thread=Thread::get_caller_ID(); diff --git a/servers/physics_2d/physics_2d_server_wrap_mt.h b/servers/physics_2d/physics_2d_server_wrap_mt.h index 71928d77a6..a8e150d8f2 100644 --- a/servers/physics_2d/physics_2d_server_wrap_mt.h +++ b/servers/physics_2d/physics_2d_server_wrap_mt.h @@ -320,7 +320,7 @@ public: template<class T> static Physics2DServer* init_server() { - int tm = GLOBAL_DEF("physics_2d/thread_model",1); + int tm = GLOBAL_DEF("physics/2d/thread_model",1); if (tm==0) //single unsafe return memnew( T ); else if (tm==1) //single saef diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp index 42834ee4e4..8b277aa4b9 100644 --- a/servers/physics_2d/space_2d_sw.cpp +++ b/servers/physics_2d/space_2d_sw.cpp @@ -1329,9 +1329,9 @@ Space2DSW::Space2DSW() { contact_max_allowed_penetration= 0.3; constraint_bias = 0.2; - body_linear_velocity_sleep_treshold=GLOBAL_DEF("physics_2d/sleep_threashold_linear",2.0); - body_angular_velocity_sleep_treshold=GLOBAL_DEF("physics_2d/sleep_threshold_angular",(8.0 / 180.0 * Math_PI)); - body_time_to_sleep=GLOBAL_DEF("physics_2d/time_before_sleep",0.5); + body_linear_velocity_sleep_treshold=GLOBAL_DEF("physics/2d/sleep_threashold_linear",2.0); + body_angular_velocity_sleep_treshold=GLOBAL_DEF("physics/2d/sleep_threshold_angular",(8.0 / 180.0 * Math_PI)); + body_time_to_sleep=GLOBAL_DEF("physics/2d/time_before_sleep",0.5); broadphase = BroadPhase2DSW::create_func(); diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp index a3f21fad6e..87ccc5c6c3 100644 --- a/servers/register_server_types.cpp +++ b/servers/register_server_types.cpp @@ -59,18 +59,20 @@ ShaderTypes *shader_types=NULL; void register_server_types() { - Globals::get_singleton()->add_singleton( Globals::Singleton("VisualServer",VisualServer::get_singleton()) ); - Globals::get_singleton()->add_singleton( Globals::Singleton("VS",VisualServer::get_singleton()) ); - Globals::get_singleton()->add_singleton( Globals::Singleton("AudioServer",AudioServer::get_singleton()) ); - Globals::get_singleton()->add_singleton( Globals::Singleton("AS",AudioServer::get_singleton()) ); - Globals::get_singleton()->add_singleton( Globals::Singleton("PhysicsServer",PhysicsServer::get_singleton()) ); - Globals::get_singleton()->add_singleton( Globals::Singleton("PS",PhysicsServer::get_singleton()) ); - Globals::get_singleton()->add_singleton( Globals::Singleton("Physics2DServer",Physics2DServer::get_singleton()) ); - Globals::get_singleton()->add_singleton( Globals::Singleton("PS2D",Physics2DServer::get_singleton()) ); - Globals::get_singleton()->add_singleton( Globals::Singleton("SpatialSoundServer",SpatialSoundServer::get_singleton()) ); - Globals::get_singleton()->add_singleton( Globals::Singleton("SS",SpatialSoundServer::get_singleton()) ); - Globals::get_singleton()->add_singleton( Globals::Singleton("SpatialSound2DServer",SpatialSound2DServer::get_singleton()) ); - Globals::get_singleton()->add_singleton( Globals::Singleton("SS2D",SpatialSound2DServer::get_singleton()) ); + GLOBAL_DEF("memory/multithread/thread_rid_pool_prealloc",20); + + GlobalConfig::get_singleton()->add_singleton( GlobalConfig::Singleton("VisualServer",VisualServer::get_singleton()) ); + GlobalConfig::get_singleton()->add_singleton( GlobalConfig::Singleton("VS",VisualServer::get_singleton()) ); + GlobalConfig::get_singleton()->add_singleton( GlobalConfig::Singleton("AudioServer",AudioServer::get_singleton()) ); + GlobalConfig::get_singleton()->add_singleton( GlobalConfig::Singleton("AS",AudioServer::get_singleton()) ); + GlobalConfig::get_singleton()->add_singleton( GlobalConfig::Singleton("PhysicsServer",PhysicsServer::get_singleton()) ); + GlobalConfig::get_singleton()->add_singleton( GlobalConfig::Singleton("PS",PhysicsServer::get_singleton()) ); + GlobalConfig::get_singleton()->add_singleton( GlobalConfig::Singleton("Physics2DServer",Physics2DServer::get_singleton()) ); + GlobalConfig::get_singleton()->add_singleton( GlobalConfig::Singleton("PS2D",Physics2DServer::get_singleton()) ); + GlobalConfig::get_singleton()->add_singleton( GlobalConfig::Singleton("SpatialSoundServer",SpatialSoundServer::get_singleton()) ); + GlobalConfig::get_singleton()->add_singleton( GlobalConfig::Singleton("SS",SpatialSoundServer::get_singleton()) ); + GlobalConfig::get_singleton()->add_singleton( GlobalConfig::Singleton("SpatialSound2DServer",SpatialSound2DServer::get_singleton()) ); + GlobalConfig::get_singleton()->add_singleton( GlobalConfig::Singleton("SS2D",SpatialSound2DServer::get_singleton()) ); shader_types = memnew( ShaderTypes ); diff --git a/servers/visual/visual_server_viewport.cpp b/servers/visual/visual_server_viewport.cpp index 558a3e4c23..7ecf041d2a 100644 --- a/servers/visual/visual_server_viewport.cpp +++ b/servers/visual/visual_server_viewport.cpp @@ -243,7 +243,7 @@ void VisualServerViewport::draw_viewports() { //draw viewports - clear_color=GLOBAL_DEF("rendering/viewport/default_clear_color",Color(0.5,0.5,0.5)); + clear_color=GLOBAL_GET("rendering/viewport/default_clear_color"); active_viewports.sort_custom<ViewportSort>(); |