diff options
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/audio_stream_sample.cpp | 6 | ||||
-rw-r--r-- | scene/resources/audio_stream_sample.h | 4 | ||||
-rw-r--r-- | scene/resources/material.cpp | 8 | ||||
-rw-r--r-- | scene/resources/video_stream.h | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp index e47cb971ae..1fd84a860e 100644 --- a/scene/resources/audio_stream_sample.cpp +++ b/scene/resources/audio_stream_sample.cpp @@ -41,7 +41,7 @@ void AudioStreamPlaybackSample::start(float p_from_pos) { ima_adpcm[i].window_ofs = 0; } - seek_pos(p_from_pos); + seek(p_from_pos); sign = 1; active = true; } @@ -61,11 +61,11 @@ int AudioStreamPlaybackSample::get_loop_count() const { return 0; } -float AudioStreamPlaybackSample::get_position() const { +float AudioStreamPlaybackSample::get_playback_position() const { return float(offset >> MIX_FRAC_BITS) / base->mix_rate; } -void AudioStreamPlaybackSample::seek_pos(float p_time) { +void AudioStreamPlaybackSample::seek(float p_time) { if (base->format == AudioStreamSample::FORMAT_IMA_ADPCM) return; //no seeking in ima-adpcm diff --git a/scene/resources/audio_stream_sample.h b/scene/resources/audio_stream_sample.h index 46fa78ddcf..fbb8010a9c 100644 --- a/scene/resources/audio_stream_sample.h +++ b/scene/resources/audio_stream_sample.h @@ -71,8 +71,8 @@ public: virtual int get_loop_count() const; //times it looped - virtual float get_position() const; - virtual void seek_pos(float p_time); + virtual float get_playback_position() const; + virtual void seek(float p_time); virtual void mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames); diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index ae858e862c..c6b434af44 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -737,7 +737,7 @@ void SpatialMaterial::_update_shader() { code += "\tALBEDO *= 1.0 - ref_amount;\n"; code += "\tALPHA = 1.0;\n"; - } else if (features[FEATURE_TRANSPARENT] || features[FLAG_USE_ALPHA_SCISSOR] || distance_fade_enabled || proximity_fade_enabled) { + } else if (features[FEATURE_TRANSPARENT] || flags[FLAG_USE_ALPHA_SCISSOR] || distance_fade_enabled || proximity_fade_enabled) { code += "\tALPHA = albedo.a * albedo_tex.a;\n"; } @@ -857,10 +857,10 @@ void SpatialMaterial::_update_shader() { code += "\tvec3 detail_norm = mix(NORMALMAP,detail_norm_tex.rgb,detail_tex.a);\n"; code += "\tNORMALMAP = mix(NORMALMAP,detail_norm,detail_mask_tex.r);\n"; code += "\tALBEDO.rgb = mix(ALBEDO.rgb,detail,detail_mask_tex.r);\n"; + } - if (flags[FLAG_USE_ALPHA_SCISSOR]) { - code += "\tALPHA_SCISSOR=alpha_scissor_threshold;\n"; - } + if (flags[FLAG_USE_ALPHA_SCISSOR]) { + code += "\tALPHA_SCISSOR=alpha_scissor_threshold;\n"; } code += "}\n"; diff --git a/scene/resources/video_stream.h b/scene/resources/video_stream.h index 30264691ee..0f07233185 100644 --- a/scene/resources/video_stream.h +++ b/scene/resources/video_stream.h @@ -55,8 +55,8 @@ public: virtual float get_length() const = 0; - virtual float get_position() const = 0; - virtual void seek_pos(float p_time) = 0; + virtual float get_playback_position() const = 0; + virtual void seek(float p_time) = 0; virtual void set_audio_track(int p_idx) = 0; |