diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/SCsub | 2 | ||||
-rw-r--r-- | scene/3d/SCsub | 4 | ||||
-rw-r--r-- | scene/3d/audio_stream_player_3d.cpp | 3 | ||||
-rw-r--r-- | scene/SCsub | 26 | ||||
-rw-r--r-- | scene/animation/SCsub | 2 | ||||
-rw-r--r-- | scene/audio/SCsub | 2 | ||||
-rw-r--r-- | scene/debugger/SCsub | 2 | ||||
-rw-r--r-- | scene/gui/SCsub | 2 | ||||
-rw-r--r-- | scene/main/SCsub | 2 | ||||
-rw-r--r-- | scene/resources/SCsub | 2 | ||||
-rw-r--r-- | scene/resources/default_theme/SCsub | 2 | ||||
-rwxr-xr-x | scene/resources/default_theme/make_header.py | 18 | ||||
-rw-r--r-- | scene/resources/environment.cpp | 36 | ||||
-rw-r--r-- | scene/resources/environment.h | 4 |
14 files changed, 44 insertions, 63 deletions
diff --git a/scene/2d/SCsub b/scene/2d/SCsub index b01e2fd54d..fc61250247 100644 --- a/scene/2d/SCsub +++ b/scene/2d/SCsub @@ -1,5 +1,5 @@ #!/usr/bin/env python -Import('env') +Import("env") env.add_source_files(env.scene_sources, "*.cpp") diff --git a/scene/3d/SCsub b/scene/3d/SCsub index 45b96bd9c4..ce69e8aa19 100644 --- a/scene/3d/SCsub +++ b/scene/3d/SCsub @@ -1,8 +1,8 @@ #!/usr/bin/env python -Import('env') +Import("env") -if env['disable_3d']: +if env["disable_3d"]: env.add_source_files(env.scene_sources, "node_3d.cpp") env.add_source_files(env.scene_sources, "skeleton_3d.cpp") else: diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp index bddf748be7..9f5170fa98 100644 --- a/scene/3d/audio_stream_player_3d.cpp +++ b/scene/3d/audio_stream_player_3d.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "audio_stream_player_3d.h" + #include "core/engine.h" #include "scene/3d/area_3d.h" #include "scene/3d/camera_3d.h" @@ -96,7 +97,7 @@ static const Vector3 speaker_directions[7] = { }; void AudioStreamPlayer3D::_calc_output_vol(const Vector3 &source_dir, real_t tightness, AudioStreamPlayer3D::Output &output) { - unsigned int speaker_count; // only main speakers (no LFE) + unsigned int speaker_count = 0; // only main speakers (no LFE) switch (AudioServer::get_singleton()->get_speaker_mode()) { case AudioServer::SPEAKER_MODE_STEREO: speaker_count = 2; diff --git a/scene/SCsub b/scene/SCsub index 1c5b87b87a..f9fc00f3f2 100644 --- a/scene/SCsub +++ b/scene/SCsub @@ -1,16 +1,16 @@ #!/usr/bin/env python -Import('env') +Import("env") env.scene_sources = [] # Thirdparty code thirdparty_dir = "#thirdparty/misc/" thirdparty_sources = [ - # C++ sources - "easing_equations.cpp", - # C sources - "mikktspace.c", + # C++ sources + "easing_equations.cpp", + # C sources + "mikktspace.c", ] thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] @@ -23,14 +23,14 @@ env.add_source_files(env.scene_sources, "*.cpp") # Chain load SCsubs -SConscript('main/SCsub') -SConscript('gui/SCsub') -SConscript('3d/SCsub') -SConscript('2d/SCsub') -SConscript('animation/SCsub') -SConscript('audio/SCsub') -SConscript('resources/SCsub') -SConscript('debugger/SCsub') +SConscript("main/SCsub") +SConscript("gui/SCsub") +SConscript("3d/SCsub") +SConscript("2d/SCsub") +SConscript("animation/SCsub") +SConscript("audio/SCsub") +SConscript("resources/SCsub") +SConscript("debugger/SCsub") # Build it all as a library diff --git a/scene/animation/SCsub b/scene/animation/SCsub index b01e2fd54d..fc61250247 100644 --- a/scene/animation/SCsub +++ b/scene/animation/SCsub @@ -1,5 +1,5 @@ #!/usr/bin/env python -Import('env') +Import("env") env.add_source_files(env.scene_sources, "*.cpp") diff --git a/scene/audio/SCsub b/scene/audio/SCsub index b01e2fd54d..fc61250247 100644 --- a/scene/audio/SCsub +++ b/scene/audio/SCsub @@ -1,5 +1,5 @@ #!/usr/bin/env python -Import('env') +Import("env") env.add_source_files(env.scene_sources, "*.cpp") diff --git a/scene/debugger/SCsub b/scene/debugger/SCsub index b01e2fd54d..fc61250247 100644 --- a/scene/debugger/SCsub +++ b/scene/debugger/SCsub @@ -1,5 +1,5 @@ #!/usr/bin/env python -Import('env') +Import("env") env.add_source_files(env.scene_sources, "*.cpp") diff --git a/scene/gui/SCsub b/scene/gui/SCsub index b01e2fd54d..fc61250247 100644 --- a/scene/gui/SCsub +++ b/scene/gui/SCsub @@ -1,5 +1,5 @@ #!/usr/bin/env python -Import('env') +Import("env") env.add_source_files(env.scene_sources, "*.cpp") diff --git a/scene/main/SCsub b/scene/main/SCsub index b01e2fd54d..fc61250247 100644 --- a/scene/main/SCsub +++ b/scene/main/SCsub @@ -1,5 +1,5 @@ #!/usr/bin/env python -Import('env') +Import("env") env.add_source_files(env.scene_sources, "*.cpp") diff --git a/scene/resources/SCsub b/scene/resources/SCsub index 5e5b6f8fd5..3a86b22835 100644 --- a/scene/resources/SCsub +++ b/scene/resources/SCsub @@ -1,6 +1,6 @@ #!/usr/bin/env python -Import('env') +Import("env") env.add_source_files(env.scene_sources, "*.cpp") diff --git a/scene/resources/default_theme/SCsub b/scene/resources/default_theme/SCsub index b01e2fd54d..fc61250247 100644 --- a/scene/resources/default_theme/SCsub +++ b/scene/resources/default_theme/SCsub @@ -1,5 +1,5 @@ #!/usr/bin/env python -Import('env') +Import("env") env.add_source_files(env.scene_sources, "*.cpp") diff --git a/scene/resources/default_theme/make_header.py b/scene/resources/default_theme/make_header.py index cf0ccf1c3a..efad3b2815 100755 --- a/scene/resources/default_theme/make_header.py +++ b/scene/resources/default_theme/make_header.py @@ -13,7 +13,7 @@ os.chdir(os.path.dirname(os.path.realpath(__file__))) f = open("theme_data.h", "wb") -f.write(b"// THIS FILE HAS BEEN AUTOGENERATED, DON\'T EDIT!!\n") +f.write(b"// THIS FILE HAS BEEN AUTOGENERATED, DON'T EDIT!!\n") # Generate png image block f.write(b"\n// png image block\n") @@ -31,17 +31,17 @@ for x in pixmaps: pngf = open(x, "rb") b = pngf.read(1) - while(len(b) == 1): + while len(b) == 1: f.write(hex(ord(b)).encode(enc)) b = pngf.read(1) - if (len(b) == 1): + if len(b) == 1: f.write(b", ") f.write(b"\n};\n") pngf.close() # Generate shaders block -f.write(b"\n// shaders block\n"); +f.write(b"\n// shaders block\n") shaders = glob.glob("*.gsl") shaders.sort() @@ -56,15 +56,15 @@ for x in shaders: sf = open(x, "rb") b = sf.readline() - while(b != ""): - if (b.endswith("\r\n")): + while b != "": + if b.endswith("\r\n"): b = b[:-2] - if (b.endswith("\n")): + if b.endswith("\n"): b = b[:-1] - s = ' \"' + b + s = ' "' + b f.write(s.encode(enc)) b = sf.readline() - if (b != ""): + if b != "": f.write(b'"\n') f.write(b'";\n') diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp index 89937238c1..6fa52e6f05 100644 --- a/scene/resources/environment.cpp +++ b/scene/resources/environment.cpp @@ -546,7 +546,7 @@ float Environment::get_ssao_edge_sharpness() const { void Environment::set_glow_enabled(bool p_enabled) { glow_enabled = p_enabled; - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); + RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap); _change_notify(); } @@ -564,7 +564,7 @@ void Environment::set_glow_level(int p_level, bool p_enabled) { else glow_levels &= ~(1 << p_level); - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); + RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap); } bool Environment::is_glow_level_enabled(int p_level) const { @@ -577,7 +577,7 @@ void Environment::set_glow_intensity(float p_intensity) { glow_intensity = p_intensity; - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); + RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap); } float Environment::get_glow_intensity() const { @@ -587,7 +587,7 @@ float Environment::get_glow_intensity() const { void Environment::set_glow_strength(float p_strength) { glow_strength = p_strength; - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); + RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap); } float Environment::get_glow_strength() const { @@ -597,7 +597,7 @@ float Environment::get_glow_strength() const { void Environment::set_glow_mix(float p_mix) { glow_mix = p_mix; - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); + RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap); } float Environment::get_glow_mix() const { @@ -608,7 +608,7 @@ void Environment::set_glow_bloom(float p_threshold) { glow_bloom = p_threshold; - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); + RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap); } float Environment::get_glow_bloom() const { @@ -619,7 +619,7 @@ void Environment::set_glow_blend_mode(GlowBlendMode p_mode) { glow_blend_mode = p_mode; - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); + RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap); _change_notify(); } Environment::GlowBlendMode Environment::get_glow_blend_mode() const { @@ -631,7 +631,7 @@ void Environment::set_glow_hdr_bleed_threshold(float p_threshold) { glow_hdr_bleed_threshold = p_threshold; - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); + RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap); } float Environment::get_glow_hdr_bleed_threshold() const { @@ -642,7 +642,7 @@ void Environment::set_glow_hdr_luminance_cap(float p_amount) { glow_hdr_luminance_cap = p_amount; - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); + RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap); } float Environment::get_glow_hdr_luminance_cap() const { @@ -653,24 +653,13 @@ void Environment::set_glow_hdr_bleed_scale(float p_scale) { glow_hdr_bleed_scale = p_scale; - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); + RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap); } float Environment::get_glow_hdr_bleed_scale() const { return glow_hdr_bleed_scale; } -void Environment::set_glow_bicubic_upscale(bool p_enable) { - - glow_bicubic_upscale = p_enable; - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); -} - -bool Environment::is_glow_bicubic_upscale_enabled() const { - - return glow_bicubic_upscale; -} - void Environment::set_fog_enabled(bool p_enabled) { fog_enabled = p_enabled; @@ -1067,9 +1056,6 @@ void Environment::_bind_methods() { ClassDB::bind_method(D_METHOD("set_glow_hdr_bleed_scale", "scale"), &Environment::set_glow_hdr_bleed_scale); ClassDB::bind_method(D_METHOD("get_glow_hdr_bleed_scale"), &Environment::get_glow_hdr_bleed_scale); - ClassDB::bind_method(D_METHOD("set_glow_bicubic_upscale", "enabled"), &Environment::set_glow_bicubic_upscale); - ClassDB::bind_method(D_METHOD("is_glow_bicubic_upscale_enabled"), &Environment::is_glow_bicubic_upscale_enabled); - ADD_GROUP("Glow", "glow_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "glow_enabled"), "set_glow_enabled", "is_glow_enabled"); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "glow_levels/1"), "set_glow_level", "is_glow_level_enabled", 0); @@ -1088,7 +1074,6 @@ void Environment::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_hdr_threshold", PROPERTY_HINT_RANGE, "0.0,4.0,0.01"), "set_glow_hdr_bleed_threshold", "get_glow_hdr_bleed_threshold"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_hdr_luminance_cap", PROPERTY_HINT_RANGE, "0.0,256.0,0.01"), "set_glow_hdr_luminance_cap", "get_glow_hdr_luminance_cap"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_hdr_scale", PROPERTY_HINT_RANGE, "0.0,4.0,0.01"), "set_glow_hdr_bleed_scale", "get_glow_hdr_bleed_scale"); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "glow_bicubic_upscale"), "set_glow_bicubic_upscale", "is_glow_bicubic_upscale_enabled"); ClassDB::bind_method(D_METHOD("set_adjustment_enable", "enabled"), &Environment::set_adjustment_enable); ClassDB::bind_method(D_METHOD("is_adjustment_enabled"), &Environment::is_adjustment_enabled); @@ -1209,7 +1194,6 @@ Environment::Environment() : glow_hdr_bleed_threshold = 1.0; glow_hdr_luminance_cap = 12.0; glow_hdr_bleed_scale = 2.0; - glow_bicubic_upscale = false; fog_enabled = false; fog_color = Color(0.5, 0.5, 0.5); diff --git a/scene/resources/environment.h b/scene/resources/environment.h index 657c7190e5..83f9a3f509 100644 --- a/scene/resources/environment.h +++ b/scene/resources/environment.h @@ -146,7 +146,6 @@ private: float glow_hdr_bleed_threshold; float glow_hdr_bleed_scale; float glow_hdr_luminance_cap; - bool glow_bicubic_upscale; bool fog_enabled; Color fog_color; @@ -318,9 +317,6 @@ public: void set_glow_hdr_bleed_scale(float p_scale); float get_glow_hdr_bleed_scale() const; - void set_glow_bicubic_upscale(bool p_enable); - bool is_glow_bicubic_upscale_enabled() const; - void set_fog_enabled(bool p_enabled); bool is_fog_enabled() const; |