summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/2d/audio_stream_player_2d.cpp6
-rw-r--r--scene/2d/audio_stream_player_2d.h2
-rw-r--r--scene/3d/audio_stream_player_3d.cpp6
-rw-r--r--scene/3d/audio_stream_player_3d.h2
-rw-r--r--scene/audio/audio_player.cpp6
-rw-r--r--scene/audio/audio_player.h2
-rw-r--r--scene/gui/video_player.cpp2
-rw-r--r--scene/resources/audio_stream_sample.cpp6
-rw-r--r--scene/resources/audio_stream_sample.h4
-rw-r--r--scene/resources/material.cpp8
-rw-r--r--scene/resources/video_stream.h4
11 files changed, 24 insertions, 24 deletions
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp
index c11f13d2bd..c40aeb764e 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -284,10 +284,10 @@ bool AudioStreamPlayer2D::is_playing() const {
return false;
}
-float AudioStreamPlayer2D::get_position() {
+float AudioStreamPlayer2D::get_playback_position() {
if (stream_playback.is_valid()) {
- return stream_playback->get_position();
+ return stream_playback->get_playback_position();
}
return 0;
@@ -395,7 +395,7 @@ void AudioStreamPlayer2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("stop"), &AudioStreamPlayer2D::stop);
ClassDB::bind_method(D_METHOD("is_playing"), &AudioStreamPlayer2D::is_playing);
- ClassDB::bind_method(D_METHOD("get_position"), &AudioStreamPlayer2D::get_position);
+ ClassDB::bind_method(D_METHOD("get_playback_position"), &AudioStreamPlayer2D::get_playback_position);
ClassDB::bind_method(D_METHOD("set_bus", "bus"), &AudioStreamPlayer2D::set_bus);
ClassDB::bind_method(D_METHOD("get_bus"), &AudioStreamPlayer2D::get_bus);
diff --git a/scene/2d/audio_stream_player_2d.h b/scene/2d/audio_stream_player_2d.h
index 112d05856b..85104fce21 100644
--- a/scene/2d/audio_stream_player_2d.h
+++ b/scene/2d/audio_stream_player_2d.h
@@ -72,7 +72,7 @@ public:
void seek(float p_seconds);
void stop();
bool is_playing() const;
- float get_position();
+ float get_playback_position();
void set_bus(const StringName &p_bus);
StringName get_bus() const;
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index c8c478ae18..7bc8c9e89e 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -611,10 +611,10 @@ bool AudioStreamPlayer3D::is_playing() const {
return false;
}
-float AudioStreamPlayer3D::get_position() {
+float AudioStreamPlayer3D::get_playback_position() {
if (stream_playback.is_valid()) {
- return stream_playback->get_position();
+ return stream_playback->get_playback_position();
}
return 0;
@@ -807,7 +807,7 @@ void AudioStreamPlayer3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("stop"), &AudioStreamPlayer3D::stop);
ClassDB::bind_method(D_METHOD("is_playing"), &AudioStreamPlayer3D::is_playing);
- ClassDB::bind_method(D_METHOD("get_position"), &AudioStreamPlayer3D::get_position);
+ ClassDB::bind_method(D_METHOD("get_playback_position"), &AudioStreamPlayer3D::get_playback_position);
ClassDB::bind_method(D_METHOD("set_bus", "bus"), &AudioStreamPlayer3D::set_bus);
ClassDB::bind_method(D_METHOD("get_bus"), &AudioStreamPlayer3D::get_bus);
diff --git a/scene/3d/audio_stream_player_3d.h b/scene/3d/audio_stream_player_3d.h
index a6ce123790..2c2d4610c8 100644
--- a/scene/3d/audio_stream_player_3d.h
+++ b/scene/3d/audio_stream_player_3d.h
@@ -127,7 +127,7 @@ public:
void seek(float p_seconds);
void stop();
bool is_playing() const;
- float get_position();
+ float get_playback_position();
void set_bus(const StringName &p_bus);
StringName get_bus() const;
diff --git a/scene/audio/audio_player.cpp b/scene/audio/audio_player.cpp
index 11e6c1b2e1..14dd39a491 100644
--- a/scene/audio/audio_player.cpp
+++ b/scene/audio/audio_player.cpp
@@ -193,10 +193,10 @@ bool AudioStreamPlayer::is_playing() const {
return false;
}
-float AudioStreamPlayer::get_position() {
+float AudioStreamPlayer::get_playback_position() {
if (stream_playback.is_valid()) {
- return stream_playback->get_position();
+ return stream_playback->get_playback_position();
}
return 0;
@@ -284,7 +284,7 @@ void AudioStreamPlayer::_bind_methods() {
ClassDB::bind_method(D_METHOD("stop"), &AudioStreamPlayer::stop);
ClassDB::bind_method(D_METHOD("is_playing"), &AudioStreamPlayer::is_playing);
- ClassDB::bind_method(D_METHOD("get_position"), &AudioStreamPlayer::get_position);
+ ClassDB::bind_method(D_METHOD("get_playback_position"), &AudioStreamPlayer::get_playback_position);
ClassDB::bind_method(D_METHOD("set_bus", "bus"), &AudioStreamPlayer::set_bus);
ClassDB::bind_method(D_METHOD("get_bus"), &AudioStreamPlayer::get_bus);
diff --git a/scene/audio/audio_player.h b/scene/audio/audio_player.h
index 19b61ea5d8..4bfc44730d 100644
--- a/scene/audio/audio_player.h
+++ b/scene/audio/audio_player.h
@@ -83,7 +83,7 @@ public:
void seek(float p_seconds);
void stop();
bool is_playing() const;
- float get_position();
+ float get_playback_position();
void set_bus(const StringName &p_bus);
StringName get_bus() const;
diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp
index e08d050ca7..816556af30 100644
--- a/scene/gui/video_player.cpp
+++ b/scene/gui/video_player.cpp
@@ -282,7 +282,7 @@ float VideoPlayer::get_stream_position() const {
if (playback.is_null())
return 0;
- return playback->get_position();
+ return playback->get_playback_position();
};
Ref<Texture> VideoPlayer::get_video_texture() {
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;