diff --git a/assets/fonts/MKX_Base.tres b/assets/fonts/MKX_Base.tres index 329ec66..8bf0892 100644 --- a/assets/fonts/MKX_Base.tres +++ b/assets/fonts/MKX_Base.tres @@ -1,7 +1,6 @@ -[gd_resource type="FontFile" load_steps=2 format=2] +[gd_resource type="FontVariation" load_steps=2 format=3] -[ext_resource path="res://assets/fonts/MKX Title.ttf" type="FontFile" id=1] +[ext_resource type="FontFile" path="res://assets/fonts/MKX Title.ttf" id="1"] [resource] -size = 30 -font_data = ExtResource( 1 ) +base_font = ExtResource("1") diff --git a/assets/fonts/kirsty/kirsty_base.tres b/assets/fonts/kirsty/kirsty_base.tres index f5adfa3..80f28c4 100644 --- a/assets/fonts/kirsty/kirsty_base.tres +++ b/assets/fonts/kirsty/kirsty_base.tres @@ -1,8 +1,6 @@ -[gd_resource type="FontFile" load_steps=2 format=2] +[gd_resource type="FontVariation" load_steps=2 format=3] -[ext_resource path="res://assets/fonts/kirsty/kirsty rg.otf" type="FontFile" id=1] +[ext_resource type="FontFile" path="res://assets/fonts/kirsty/kirsty rg.otf" id="1"] [resource] -use_mipmaps = true -use_filter = true -font_data = ExtResource( 1 ) +base_font = ExtResource("1") diff --git a/assets/fonts/kirsty/kirsty_medium.tres b/assets/fonts/kirsty/kirsty_medium.tres index 9014abb..80f28c4 100644 --- a/assets/fonts/kirsty/kirsty_medium.tres +++ b/assets/fonts/kirsty/kirsty_medium.tres @@ -1,9 +1,6 @@ -[gd_resource type="FontFile" load_steps=2 format=2] +[gd_resource type="FontVariation" load_steps=2 format=3] -[ext_resource path="res://assets/fonts/kirsty/kirsty rg.otf" type="FontFile" id=1] +[ext_resource type="FontFile" path="res://assets/fonts/kirsty/kirsty rg.otf" id="1"] [resource] -size = 24 -use_mipmaps = true -use_filter = true -font_data = ExtResource( 1 ) +base_font = ExtResource("1") diff --git a/assets/fonts/kirsty/kirsty_title.tres b/assets/fonts/kirsty/kirsty_title.tres index d48942a..d71056c 100644 --- a/assets/fonts/kirsty/kirsty_title.tres +++ b/assets/fonts/kirsty/kirsty_title.tres @@ -1,9 +1,6 @@ -[gd_resource type="FontFile" load_steps=2 format=2] +[gd_resource type="FontVariation" load_steps=2 format=3] -[ext_resource path="res://assets/fonts/kirsty/kirsty bd.otf" type="FontFile" id=1] +[ext_resource type="FontFile" path="res://assets/fonts/kirsty/kirsty bd.otf" id="1"] [resource] -size = 46 -use_mipmaps = true -use_filter = true -font_data = ExtResource( 1 ) +base_font = ExtResource("1") diff --git a/assets/fonts/text_outline.material b/assets/fonts/text_outline.material index 3e4d09a..1591985 100644 Binary files a/assets/fonts/text_outline.material and b/assets/fonts/text_outline.material differ diff --git a/default_env.tres b/default_env.tres index 1a5570b..682cdfd 100644 --- a/default_env.tres +++ b/default_env.tres @@ -1,7 +1,7 @@ -[gd_resource type="Environment" load_steps=2 format=2] +[gd_resource type="Environment" format=3 uid="uid://d4hsnlx822e4k"] -[sub_resource type="Sky" id=1] +[sub_resource type="Sky" id="1"] [resource] background_mode = 2 -background_sky = SubResource( 1 ) +sky = SubResource("1") diff --git a/project.godot b/project.godot index e899c09..5a4fb6d 100644 --- a/project.godot +++ b/project.godot @@ -63,9 +63,9 @@ ui_end={ ] } -[locale] +[internationalization] -translations=PackedStringArray("res://locales/fr.po", "res://locales/en.po") +locale/translations=PackedStringArray("res://locales/fr.po", "res://locales/en.po") [rendering] diff --git a/scenes/Main.tscn b/scenes/Main.tscn index c774cfb..4116c59 100644 --- a/scenes/Main.tscn +++ b/scenes/Main.tscn @@ -1,83 +1,110 @@ -[gd_scene load_steps=4 format=2] +[gd_scene format=3 uid="uid://demg4xk7vofmg"] -[ext_resource path="res://scenes/Main.gd" type="Script" id=1] -[ext_resource path="res://scenes/UI/background/Background.tscn" type="PackedScene" id=5] -[ext_resource path="res://scenes/UI/summary/Summary.tscn" type="PackedScene" id=8] +[ext_resource type="Script" uid="uid://by2coyg8u0u67" path="res://scenes/Main.gd" id="1"] +[ext_resource type="PackedScene" path="res://scenes/UI/background/Background.tscn" id="5"] +[ext_resource type="PackedScene" path="res://scenes/UI/summary/Summary.tscn" id="8"] -[node name="Main" type="Control"] +[node name="Main" type="Control" unique_id=1146227135] +layout_mode = 3 +anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 -script = ExtResource( 1 ) -__meta__ = { -"_edit_lock_": true, -"_edit_use_anchors_": false -} +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1") -[node name="BackgroundPicture" parent="." instance=ExtResource( 5 )] +[node name="BackgroundPicture" parent="." unique_id=1341502133 instance=ExtResource("5")] +layout_mode = 1 +anchors_preset = 15 +grow_horizontal = 2 +grow_vertical = 2 -[node name="MarginContainer" type="MarginContainer" parent="."] +[node name="MarginContainer" type="MarginContainer" parent="." unique_id=1339792323] +layout_mode = 0 anchor_right = 1.0 anchor_bottom = 1.0 -__meta__ = { -"_edit_use_anchors_": false -} -[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"] -offset_right = 1280.0 -offset_bottom = 720.0 +[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer" unique_id=986370711] +layout_mode = 2 -[node name="UI_summary" parent="MarginContainer/HBoxContainer" instance=ExtResource( 8 )] -anchor_bottom = 0.0 -offset_right = 446.0 -offset_bottom = 720.0 +[node name="UI_summary" parent="MarginContainer/HBoxContainer" unique_id=1690362681 instance=ExtResource("8")] +layout_mode = 2 size_flags_horizontal = 0 size_flags_vertical = 3 [node name="PanelWood" parent="MarginContainer/HBoxContainer/UI_summary" index="0"] -offset_bottom = 720.0 +layout_mode = 2 + +[node name="VBoxContainer" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood" index="0"] +layout_mode = 0 +anchor_right = 0.0 +anchor_bottom = 0.0 [node name="CenterContainer" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="0"] -offset_bottom = 128.0 +layout_mode = 2 [node name="TextureRect" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/CenterContainer" index="0"] -offset_top = 0.0 -offset_bottom = 128.0 +layout_mode = 2 [node name="ButtonPuzzle" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="1"] -offset_top = 158.0 -offset_bottom = 235.0 +layout_mode = 2 + +[node name="Label" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/ButtonPuzzle" index="0"] +layout_mode = 0 +anchor_right = 0.0 +anchor_bottom = 0.0 +offset_right = 1.0 +offset_bottom = 23.0 +grow_horizontal = 1 +grow_vertical = 1 [node name="ButtonSetting" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="2"] -offset_top = 265.0 -offset_bottom = 342.0 +layout_mode = 2 + +[node name="Label" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/ButtonSetting" index="0"] +layout_mode = 0 +anchor_right = 0.0 +anchor_bottom = 0.0 [node name="ButtonCredits" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="3"] -offset_top = 372.0 -offset_bottom = 449.0 +layout_mode = 2 + +[node name="Label" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/ButtonCredits" index="0"] +layout_mode = 0 +anchor_right = 0.0 +anchor_bottom = 0.0 [node name="MarginContainer" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="4"] -offset_top = 479.0 -offset_bottom = 533.0 +layout_mode = 2 [node name="ButtonQuit" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="5"] -offset_top = 563.0 -offset_bottom = 640.0 +layout_mode = 2 + +[node name="Label" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/ButtonQuit" index="0"] +layout_mode = 0 +anchor_right = 0.0 +anchor_bottom = 0.0 [node name="ContainerVersion" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="6"] -offset_top = 670.0 -offset_bottom = 690.0 +layout_mode = 2 + +[node name="MarginLeft" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/ContainerVersion" index="0"] +layout_mode = 2 + +[node name="LabelVersion" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/ContainerVersion" index="1"] +layout_mode = 2 + +[node name="MarginRight" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/ContainerVersion" index="2"] +layout_mode = 2 [node name="MarginContainerBottom" parent="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer" index="7"] -offset_top = 720.0 -offset_bottom = 720.0 +layout_mode = 2 [node name="TextureRect" parent="MarginContainer/HBoxContainer/UI_summary" index="1"] -offset_bottom = 720.0 +layout_mode = 2 -[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/HBoxContainer"] -offset_left = 450.0 -offset_right = 1280.0 -offset_bottom = 720.0 +[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/HBoxContainer" unique_id=1017122368] +layout_mode = 2 size_flags_horizontal = 7 size_flags_vertical = 3 diff --git a/scenes/UI/background/Background.tscn b/scenes/UI/background/Background.tscn index a3f5890..3741f9f 100644 --- a/scenes/UI/background/Background.tscn +++ b/scenes/UI/background/Background.tscn @@ -1,62 +1,10 @@ -[gd_scene load_steps=7 format=2] +[gd_scene load_steps=2 format=3] -[ext_resource path="res://assets/ui/themes/bck.jpg" type="Texture2D" id=1] +[ext_resource type="Texture2D" path="res://assets/ui/themes/bck.jpg" id="1"] -[sub_resource type="VisualShaderNodeInput" id=1] -input_name = "screen_uv" - -[sub_resource type="VisualShaderNodeTexture" id=2] -texture = ExtResource( 1 ) -texture_type = 1 - -[sub_resource type="VisualShaderNodeInput" id=3] -input_name = "screen_texture" - -[sub_resource type="VisualShader" id=4] -code = "shader_type canvas_item; -uniform sampler2D tex_frg_4 : source_color; - - - -void vertex() { -// Output:0 - -} - -void fragment() { -// Texture:4 - vec4 tex_frg_4_read = texture(tex_frg_4, UV.xy); - vec3 n_out4p0 = tex_frg_4_read.rgb; - float n_out4p1 = tex_frg_4_read.a; - -// Output:0 - COLOR.rgb = n_out4p0; - -} - -void light() { -// Output:0 - -} -" -graph_offset = Vector2( -1049.92, -300 ) -mode = 1 -flags/light_only = false -nodes/fragment/3/node = SubResource( 1 ) -nodes/fragment/3/position = Vector2( -840, 460 ) -nodes/fragment/4/node = SubResource( 2 ) -nodes/fragment/4/position = Vector2( -80, 60 ) -nodes/fragment/5/node = SubResource( 3 ) -nodes/fragment/5/position = Vector2( -1000, 20 ) -nodes/fragment/connections = PackedInt32Array( 4, 0, 0, 0 ) - -[sub_resource type="ShaderMaterial" id=5] -shader = SubResource( 4 ) - -[node name="BackgroundPicture" type="Panel"] -material = SubResource( 5 ) +[node name="BackgroundPicture" type="TextureRect"] anchor_right = 1.0 anchor_bottom = 1.0 -__meta__ = { -"_edit_use_anchors_": false -} +texture = ExtResource("1") +expand_mode = 1 +stretch_mode = 6 diff --git a/scenes/UI/choose_scenes/ChooseScene.tscn b/scenes/UI/choose_scenes/ChooseScene.tscn index b42d4ff..d36869d 100644 --- a/scenes/UI/choose_scenes/ChooseScene.tscn +++ b/scenes/UI/choose_scenes/ChooseScene.tscn @@ -1,14 +1,18 @@ -[gd_scene load_steps=2 format=2] +[gd_scene load_steps=3 format=3] -[ext_resource path="res://scenes/UI/choose_scenes/ChooseScene.gd" type="Script" id=1] +[ext_resource type="Script" path="res://scenes/UI/choose_scenes/ChooseScene.gd" id="1"] + +[sub_resource type="StyleBoxEmpty" id="EmptyPanel"] [node name="ChooseScene" type="ScrollContainer"] anchor_right = 1.0 anchor_bottom = 1.0 size_flags_horizontal = 3 size_flags_vertical = 3 -scroll_horizontal_enabled = false -script = ExtResource( 1 ) +horizontal_scroll_mode = 0 +vertical_scroll_mode = 0 +theme_override_styles/panel = SubResource("EmptyPanel") +script = ExtResource("1") __meta__ = { "_edit_use_anchors_": false } diff --git a/scenes/UI/choose_scenes/parts/Template.tscn b/scenes/UI/choose_scenes/parts/Template.tscn index 5cb6c35..c36cb49 100644 --- a/scenes/UI/choose_scenes/parts/Template.tscn +++ b/scenes/UI/choose_scenes/parts/Template.tscn @@ -43,6 +43,7 @@ __meta__ = { } [node name="BackgroundTile" type="TextureRect" parent="."] +visible = false anchor_left = 0.5 anchor_right = 0.5 offset_left = -114.0 @@ -100,7 +101,7 @@ offset_right = 204.0 offset_bottom = 203.0 size_flags_horizontal = 3 size_flags_vertical = 3 -expand = true +expand_mode = 1 __meta__ = { "_edit_use_anchors_": false } @@ -112,7 +113,7 @@ offset_right = 204.0 offset_bottom = 203.0 size_flags_horizontal = 3 size_flags_vertical = 3 -expand = true +expand_mode = 1 __meta__ = { "_edit_use_anchors_": false } @@ -164,8 +165,8 @@ size_flags_horizontal = 3 size_flags_vertical = 7 theme_override_fonts/font = ExtResource( 1 ) text = "X / 10" -align = 1 -valign = 1 +horizontal_alignment = 1 +vertical_alignment = 1 __meta__ = { "_edit_use_anchors_": false } diff --git a/scenes/UI/ending/Ending.tscn b/scenes/UI/ending/Ending.tscn index 2b26879..3306ac9 100644 --- a/scenes/UI/ending/Ending.tscn +++ b/scenes/UI/ending/Ending.tscn @@ -48,7 +48,7 @@ text = "aHog !!! bravo vous avez gagné." -align = 1 -valign = 1 +horizontal_alignment = 1 +vertical_alignment = 1 [connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"] diff --git a/scenes/UI/loading/Loading.tscn b/scenes/UI/loading/Loading.tscn index 1639e63..f10bb74 100644 --- a/scenes/UI/loading/Loading.tscn +++ b/scenes/UI/loading/Loading.tscn @@ -45,6 +45,10 @@ __meta__ = { } [node name="BackgroundPicture" parent="." instance=ExtResource( 3 )] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 [node name="LoadingTopBorder" parent="." instance=ExtResource( 2 )] offset_top = 0.362091 diff --git a/scenes/UI/loading/parts/LabelLoading.tscn b/scenes/UI/loading/parts/LabelLoading.tscn index fd9d10b..1c04d57 100644 --- a/scenes/UI/loading/parts/LabelLoading.tscn +++ b/scenes/UI/loading/parts/LabelLoading.tscn @@ -25,8 +25,9 @@ __meta__ = { offset_right = 193.0 offset_bottom = 56.0 theme_override_fonts/font = ExtResource( 1 ) +theme_override_font_sizes/font_size = 46 theme_override_colors/font_color = Color( 0.74902, 0.701961, 0.65098, 1 ) text = "loading" -align = 1 -valign = 2 +horizontal_alignment = 1 +vertical_alignment = 2 uppercase = true diff --git a/scenes/UI/loading/parts/TopPart.tscn b/scenes/UI/loading/parts/TopPart.tscn index 2fae9f1..bbb8554 100644 --- a/scenes/UI/loading/parts/TopPart.tscn +++ b/scenes/UI/loading/parts/TopPart.tscn @@ -37,7 +37,7 @@ offset_bottom = 480.0 size_flags_horizontal = 3 size_flags_vertical = 3 texture = ExtResource( 3 ) -expand = true +expand_mode = 1 __meta__ = { "_edit_use_anchors_": false } diff --git a/scenes/UI/settings/Settings.tscn b/scenes/UI/settings/Settings.tscn index 5cc4c4e..8a63773 100644 --- a/scenes/UI/settings/Settings.tscn +++ b/scenes/UI/settings/Settings.tscn @@ -35,7 +35,7 @@ __meta__ = { offset_right = 50.0 offset_bottom = 14.0 text = "langue :" -align = 1 +horizontal_alignment = 1 [node name="data" type="ItemList" parent="VBoxContainer/langue/VBoxContainer"] offset_top = 18.0 @@ -73,7 +73,7 @@ text = "gyroscope :" offset_left = 77.0 offset_right = 153.0 offset_bottom = 40.0 -align = 1 +horizontal_alignment = 1 [node name="ambient_sound" type="CenterContainer" parent="VBoxContainer"] offset_top = 75.0 diff --git a/scenes/UI/summary/Summary.tscn b/scenes/UI/summary/Summary.tscn index 8a6be55..eae27ca 100644 --- a/scenes/UI/summary/Summary.tscn +++ b/scenes/UI/summary/Summary.tscn @@ -228,7 +228,6 @@ __meta__ = { } [node name="Label" type="Label" parent="PanelWood/VBoxContainer/ButtonPuzzle"] -material = ExtResource( 6 ) anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 @@ -236,9 +235,10 @@ grow_vertical = 2 size_flags_horizontal = 7 size_flags_vertical = 3 theme_override_fonts/font = ExtResource( 4 ) +theme_override_font_sizes/font_size = 46 text = "Puzzles" -align = 1 -valign = 1 +horizontal_alignment = 1 +vertical_alignment = 1 __meta__ = { "_edit_use_anchors_": false, "_editor_description_": "" @@ -259,16 +259,16 @@ __meta__ = { } [node name="Label" type="Label" parent="PanelWood/VBoxContainer/ButtonSetting"] -material = ExtResource( 6 ) anchor_right = 1.0 anchor_bottom = 1.0 size_flags_horizontal = 7 size_flags_vertical = 3 theme_override_fonts/font = ExtResource( 4 ) +theme_override_font_sizes/font_size = 46 theme_override_colors/font_color = Color( 0, 0, 0, 1 ) text = "Paramètres" -align = 1 -valign = 1 +horizontal_alignment = 1 +vertical_alignment = 1 __meta__ = { "_edit_use_anchors_": false, "_editor_description_": "" @@ -289,16 +289,16 @@ __meta__ = { } [node name="Label" type="Label" parent="PanelWood/VBoxContainer/ButtonCredits"] -material = ExtResource( 6 ) anchor_right = 1.0 anchor_bottom = 1.0 size_flags_horizontal = 7 size_flags_vertical = 3 theme_override_fonts/font = ExtResource( 4 ) +theme_override_font_sizes/font_size = 46 theme_override_colors/font_color = Color( 0, 0, 0, 1 ) text = "Crédits" -align = 1 -valign = 1 +horizontal_alignment = 1 +vertical_alignment = 1 __meta__ = { "_edit_use_anchors_": false, "_editor_description_": "" @@ -324,16 +324,16 @@ __meta__ = { } [node name="Label" type="Label" parent="PanelWood/VBoxContainer/ButtonQuit"] -material = ExtResource( 6 ) anchor_right = 1.0 anchor_bottom = 1.0 size_flags_horizontal = 7 size_flags_vertical = 3 theme_override_fonts/font = ExtResource( 4 ) +theme_override_font_sizes/font_size = 46 theme_override_colors/font_color = Color( 0, 0, 0, 1 ) text = "Quit" -align = 1 -valign = 1 +horizontal_alignment = 1 +vertical_alignment = 1 __meta__ = { "_edit_use_anchors_": false, "_editor_description_": "" @@ -357,7 +357,7 @@ size_flags_vertical = 0 theme_override_fonts/font = ExtResource( 3 ) theme_override_colors/font_color = Color( 0.741176, 0.478431, 0.372549, 1 ) text = "v 0.0.0" -align = 2 +horizontal_alignment = 2 [node name="MarginRight" type="MarginContainer" parent="PanelWood/VBoxContainer/ContainerVersion"] offset_left = 338.0 diff --git a/scenes/levels/home/Home.tscn b/scenes/levels/home/Home.tscn index 5ad75b6..e345a24 100644 --- a/scenes/levels/home/Home.tscn +++ b/scenes/levels/home/Home.tscn @@ -7,25 +7,22 @@ panorama = ExtResource( 2 ) [sub_resource type="Environment" id=2] -background_mode = 3 -background_sky = SubResource( 1 ) +background_mode = 2 +sky = SubResource( 1 ) background_color = Color( 0.188235, 0.133333, 0.133333, 1 ) -background_energy = 0.6 +background_energy_multiplier = 0.6 ambient_light_color = Color( 0.694118, 0.168627, 0.67451, 1 ) -ambient_light_energy = 1.55 +ambient_light_energy = 0.4 ambient_light_sky_contribution = 0.5 fog_enabled = true -fog_color = Color( 0.562167, 0.29, 1, 0.941176 ) +fog_mode = 1 +fog_light_color = Color( 0.562167, 0.29, 1, 0.941176 ) fog_depth_begin = 0.0 fog_depth_end = 60.0 fog_depth_curve = 1.10957 -fog_height_enabled = true -fog_height_min = 2.0 -fog_height_max = -20.0 -fog_height_curve = 0.965936 +fog_height = 2.0 tonemap_mode = 2 ssr_enabled = true -dof_blur_far_distance = 4.0 glow_enabled = true [node name="Home" instance=ExtResource( 1 )] diff --git a/scenes/levels/parts/ListObjects.tscn b/scenes/levels/parts/ListObjects.tscn index 57a71a3..7e1deee 100644 --- a/scenes/levels/parts/ListObjects.tscn +++ b/scenes/levels/parts/ListObjects.tscn @@ -81,8 +81,8 @@ anchor_bottom = 1.0 theme = ExtResource( 2 ) theme_override_fonts/font = ExtResource( 3 ) text = "Last" -align = 1 -valign = 1 +horizontal_alignment = 1 +vertical_alignment = 1 __meta__ = { "_edit_use_anchors_": false } diff --git a/scenes/levels/parts/ObjectListFirst.tscn b/scenes/levels/parts/ObjectListFirst.tscn index c122968..3f03b5c 100644 --- a/scenes/levels/parts/ObjectListFirst.tscn +++ b/scenes/levels/parts/ObjectListFirst.tscn @@ -21,8 +21,8 @@ anchor_bottom = 1.0 offset_right = -3.05176e-05 theme_override_fonts/font = ExtResource( 2 ) text = "First Entry" -align = 1 -valign = 1 +horizontal_alignment = 1 +vertical_alignment = 1 __meta__ = { "_edit_use_anchors_": false } diff --git a/scenes/levels/parts/ObjectListLast.tscn b/scenes/levels/parts/ObjectListLast.tscn index 8706d0e..4b96048 100644 --- a/scenes/levels/parts/ObjectListLast.tscn +++ b/scenes/levels/parts/ObjectListLast.tscn @@ -22,8 +22,8 @@ anchor_bottom = 1.0 theme = ExtResource( 1 ) theme_override_fonts/font = ExtResource( 2 ) text = "Last" -align = 1 -valign = 1 +horizontal_alignment = 1 +vertical_alignment = 1 __meta__ = { "_edit_use_anchors_": false } diff --git a/scenes/levels/parts/ObjectListStandard.tscn b/scenes/levels/parts/ObjectListStandard.tscn index a85d1d4..e08249e 100644 --- a/scenes/levels/parts/ObjectListStandard.tscn +++ b/scenes/levels/parts/ObjectListStandard.tscn @@ -20,8 +20,8 @@ anchor_right = 1.0 anchor_bottom = 1.0 theme_override_fonts/font = ExtResource( 1 ) text = "Middle" -align = 1 -valign = 1 +horizontal_alignment = 1 +vertical_alignment = 1 __meta__ = { "_edit_use_anchors_": false } diff --git a/scenes/levels/warcraft/WarCraft.tscn b/scenes/levels/warcraft/WarCraft.tscn index 97b6bc7..150d5e4 100644 --- a/scenes/levels/warcraft/WarCraft.tscn +++ b/scenes/levels/warcraft/WarCraft.tscn @@ -46,25 +46,22 @@ panorama = ExtResource( 11 ) [sub_resource type="Environment" id=2] -background_mode = 3 -background_sky = SubResource( 1 ) +background_mode = 2 +sky = SubResource( 1 ) background_color = Color( 0.188235, 0.133333, 0.133333, 1 ) -background_energy = 0.6 +background_energy_multiplier = 0.6 ambient_light_color = Color( 0.694118, 0.168627, 0.67451, 1 ) -ambient_light_energy = 1.55 +ambient_light_energy = 0.4 ambient_light_sky_contribution = 0.5 fog_enabled = true -fog_color = Color( 0.562167, 0.29, 1, 0.941176 ) +fog_mode = 1 +fog_light_color = Color( 0.562167, 0.29, 1, 0.941176 ) fog_depth_begin = 0.0 fog_depth_end = 60.0 fog_depth_curve = 1.10957 -fog_height_enabled = true -fog_height_min = 2.0 -fog_height_max = -20.0 -fog_height_curve = 0.965936 +fog_height = 2.0 tonemap_mode = 2 ssr_enabled = true -dof_blur_far_distance = 4.0 glow_enabled = true [sub_resource type="CapsuleShape3D" id=3] @@ -137,21 +134,18 @@ surfaces/0 = { panorama = ExtResource( 11 ) [sub_resource type="Environment" id=19] -background_mode = 3 -background_sky = SubResource( 18 ) +background_mode = 2 +sky = SubResource( 18 ) ambient_light_sky_contribution = 0.5 fog_enabled = true -fog_color = Color( 0.337255, 0.235294, 0.956863, 0.941176 ) +fog_mode = 1 +fog_light_color = Color( 0.337255, 0.235294, 0.956863, 0.941176 ) fog_depth_begin = 0.0 fog_depth_end = 60.0 fog_depth_curve = 1.10957 -fog_height_enabled = true -fog_height_min = 2.0 -fog_height_max = -20.0 -fog_height_curve = 0.965936 +fog_height = 2.0 tonemap_mode = 2 ssr_enabled = true -dof_blur_far_distance = 2.0 glow_enabled = true [node name="Warcraft" instance=ExtResource( 1 )] @@ -636,4 +630,3 @@ transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -3.06928, 2.35676, -0.183365 extents = Vector3( 6.50885, 3.63237, 10 ) bounces = 5 environment_mode = 1 -light_data = ExtResource( 41 ) diff --git a/scenes/levels/warcraft/env_warcraft.tres b/scenes/levels/warcraft/env_warcraft.tres index 9d82e1e..dcbfb5d 100644 --- a/scenes/levels/warcraft/env_warcraft.tres +++ b/scenes/levels/warcraft/env_warcraft.tres @@ -6,23 +6,20 @@ panorama = ExtResource( 1 ) [resource] -background_mode = 3 -background_sky = SubResource( 2 ) +background_mode = 2 +sky = SubResource( 2 ) background_color = Color( 0.188235, 0.133333, 0.133333, 1 ) -background_energy = 0.6 +background_energy_multiplier = 0.6 ambient_light_color = Color( 0.694118, 0.168627, 0.67451, 1 ) -ambient_light_energy = 1.55 +ambient_light_energy = 0.4 ambient_light_sky_contribution = 0.5 fog_enabled = true -fog_color = Color( 0.562167, 0.29, 1, 0.941176 ) +fog_mode = 1 +fog_light_color = Color( 0.562167, 0.29, 1, 0.941176 ) fog_depth_begin = 0.0 fog_depth_end = 60.0 fog_depth_curve = 1.10957 -fog_height_enabled = true -fog_height_min = 2.0 -fog_height_max = -20.0 -fog_height_curve = 0.965936 +fog_height = 2.0 tonemap_mode = 2 ss_reflections_enabled = true -dof_blur_far_distance = 2.0 glow_enabled = true diff --git a/scripts/Setting.gd b/scripts/Setting.gd index 45ca074..144c896 100644 --- a/scripts/Setting.gd +++ b/scripts/Setting.gd @@ -11,13 +11,13 @@ func apply_language(local): TranslationServer.set_locale(local) func translate_int_to_locale(id): - var lang = "en_GB" + var lang = "en" if id == 0: - lang = "en_GB" + lang = "en" if id == 1: - lang = "fr_FR" + lang = "fr" return lang diff --git a/scripts/migrate_shaders.gd b/scripts/migrate_shaders.gd index c678478..1da3ca6 100644 --- a/scripts/migrate_shaders.gd +++ b/scripts/migrate_shaders.gd @@ -1,8 +1,9 @@ @tool extends SceneTree -# One-shot migration tool: walk every .material file, fix Godot 3 shader code -# to Godot 4 syntax, save back. +# One-shot migration tool: walk every resource that can carry a ShaderMaterial +# (.material, .tres, .mesh, .scn, .gltf, .glb, .tscn) and fix Godot 3 -> 4 +# shader code in-place, saving where possible. # # Run with: godot --headless --script scripts/migrate_shaders.gd @@ -17,31 +18,51 @@ const REPLACEMENTS := [ ["NORMALMAP", "NORMAL_MAP"], ] +const EXTENSIONS := [".material", ".tres", ".mesh"] + func _init() -> void: var fixed := 0 var checked := 0 - for path in _find_materials("res://assets"): + for path in _find_resources("res://assets"): checked += 1 - var mat = ResourceLoader.load(path, "", ResourceLoader.CACHE_MODE_IGNORE) - if mat == null: + var res = ResourceLoader.load(path, "", ResourceLoader.CACHE_MODE_IGNORE) + if res == null: continue - if mat is ShaderMaterial and mat.shader != null: - var old_code: String = mat.shader.code - var new_code := old_code - for pair in REPLACEMENTS: - new_code = new_code.replace(pair[0], pair[1]) - if new_code != old_code: - mat.shader.code = new_code - var err = ResourceSaver.save(mat, path) - if err == OK: - fixed += 1 - print("FIXED ", path) - else: - push_error("Failed to save " + path + " (err=" + str(err) + ")") + var dirty := false + # Direct ShaderMaterial + if res is ShaderMaterial: + dirty = _fix_shader_material(res) or dirty + # ArrayMesh (surface materials embedded) + if res is ArrayMesh: + for surf in range(res.get_surface_count()): + var mat = res.surface_get_material(surf) + if mat is ShaderMaterial: + if _fix_shader_material(mat): + res.surface_set_material(surf, mat) + dirty = true + if dirty: + var err = ResourceSaver.save(res, path) + if err == OK: + fixed += 1 + print("FIXED ", path) + else: + push_error("Failed to save " + path + " (err=" + str(err) + ")") print("Done. checked=", checked, " fixed=", fixed) quit() -func _find_materials(dir_path: String) -> Array: +func _fix_shader_material(mat: ShaderMaterial) -> bool: + if mat.shader == null: + return false + var old_code: String = mat.shader.code + var new_code := old_code + for pair in REPLACEMENTS: + new_code = new_code.replace(pair[0], pair[1]) + if new_code == old_code: + return false + mat.shader.code = new_code + return true + +func _find_resources(dir_path: String) -> Array: var result := [] var dir = DirAccess.open(dir_path) if dir == null: @@ -54,8 +75,11 @@ func _find_materials(dir_path: String) -> Array: continue var sub = dir_path + "/" + name if dir.current_is_dir(): - result.append_array(_find_materials(sub)) - elif name.ends_with(".material") or name.ends_with(".tres"): - result.append(sub) + result.append_array(_find_resources(sub)) + else: + for ext in EXTENSIONS: + if name.ends_with(ext): + result.append(sub) + break name = dir.get_next() return result