summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/animation.cpp2
-rw-r--r--scene/resources/dynamic_font.cpp11
-rw-r--r--scene/resources/environment.cpp2
-rw-r--r--scene/resources/material.h4
-rw-r--r--scene/resources/shape.cpp2
-rw-r--r--scene/resources/style_box.cpp6
6 files changed, 19 insertions, 8 deletions
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index 80ad2ad739..5c01cadcd5 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -1901,7 +1901,7 @@ void Animation::value_track_set_update_mode(int p_track, UpdateMode p_mode) {
ERR_FAIL_INDEX(p_track, tracks.size());
Track *t = tracks[p_track];
ERR_FAIL_COND(t->type != TYPE_VALUE);
- ERR_FAIL_INDEX(p_mode, 4);
+ ERR_FAIL_INDEX((int)p_mode, 4);
ValueTrack *vt = static_cast<ValueTrack *>(t);
vt->update_mode = p_mode;
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp
index 0785d3bfc6..6790c35c4b 100644
--- a/scene/resources/dynamic_font.cpp
+++ b/scene/resources/dynamic_font.cpp
@@ -1083,8 +1083,19 @@ void DynamicFont::update_oversampling() {
E->self()->outline_data_at_size->update_oversampling();
}
+ for (int i = 0; i < E->self()->fallback_data_at_size.size(); i++) {
+ if (E->self()->fallback_data_at_size[i].is_valid()) {
+ E->self()->fallback_data_at_size.write[i]->update_oversampling();
+
+ if (E->self()->has_outline() && E->self()->fallback_outline_data_at_size[i].is_valid()) {
+ E->self()->fallback_outline_data_at_size.write[i]->update_oversampling();
+ }
+ }
+ }
+
changed.push_back(Ref<DynamicFont>(E->self()));
}
+
E = E->next();
}
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index f4d5b8376b..7b43c33692 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -961,7 +961,7 @@ void Environment::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_tonemap_auto_exposure_grey"), &Environment::get_tonemap_auto_exposure_grey);
ADD_GROUP("Tonemap", "tonemap_");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "tonemap_mode", PROPERTY_HINT_ENUM, "Linear,Reindhart,Filmic,Aces"), "set_tonemapper", "get_tonemapper");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "tonemap_mode", PROPERTY_HINT_ENUM, "Linear,Reinhard,Filmic,Aces"), "set_tonemapper", "get_tonemapper");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "tonemap_exposure", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_exposure", "get_tonemap_exposure");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "tonemap_white", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_white", "get_tonemap_white");
ADD_GROUP("Auto Exposure", "auto_exposure_");
diff --git a/scene/resources/material.h b/scene/resources/material.h
index 0154874ae4..cf4d19b5a7 100644
--- a/scene/resources/material.h
+++ b/scene/resources/material.h
@@ -286,7 +286,7 @@ private:
mk.key = 0;
for (int i = 0; i < FEATURE_MAX; i++) {
if (features[i]) {
- mk.feature_mask |= (1 << i);
+ mk.feature_mask |= ((uint64_t)1 << i);
}
}
mk.detail_uv = detail_uv;
@@ -295,7 +295,7 @@ private:
mk.cull_mode = cull_mode;
for (int i = 0; i < FLAG_MAX; i++) {
if (flags[i]) {
- mk.flags |= (1 << i);
+ mk.flags |= ((uint64_t)1 << i);
}
}
mk.detail_blend_mode = detail_blend_mode;
diff --git a/scene/resources/shape.cpp b/scene/resources/shape.cpp
index 8ccca81acd..869f4a3a9b 100644
--- a/scene/resources/shape.cpp
+++ b/scene/resources/shape.cpp
@@ -101,7 +101,7 @@ void Shape::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_margin", "margin"), &Shape::set_margin);
ClassDB::bind_method(D_METHOD("get_margin"), &Shape::get_margin);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "margin", PROPERTY_HINT_RANGE, "0.04,10,0.01"), "set_margin", "get_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "margin", PROPERTY_HINT_RANGE, "0.04,10,0.001"), "set_margin", "get_margin");
}
Shape::Shape() :
diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp
index fb81375b0a..69d85eeef3 100644
--- a/scene/resources/style_box.cpp
+++ b/scene/resources/style_box.cpp
@@ -136,7 +136,7 @@ Ref<Texture> StyleBoxTexture::get_normal_map() const {
void StyleBoxTexture::set_margin_size(Margin p_margin, float p_size) {
- ERR_FAIL_INDEX(p_margin, 4);
+ ERR_FAIL_INDEX((int)p_margin, 4);
margin[p_margin] = p_size;
emit_changed();
@@ -200,7 +200,7 @@ Size2 StyleBoxTexture::get_center_size() const {
void StyleBoxTexture::set_expand_margin_size(Margin p_expand_margin, float p_size) {
- ERR_FAIL_INDEX(p_expand_margin, 4);
+ ERR_FAIL_INDEX((int)p_expand_margin, 4);
expand_margin[p_expand_margin] = p_size;
emit_changed();
}
@@ -223,7 +223,7 @@ void StyleBoxTexture::set_expand_margin_size_all(float p_expand_margin_size) {
float StyleBoxTexture::get_expand_margin_size(Margin p_expand_margin) const {
- ERR_FAIL_INDEX_V(p_expand_margin, 4, 0);
+ ERR_FAIL_INDEX_V((int)p_expand_margin, 4, 0);
return expand_margin[p_expand_margin];
}