update to godot 4.5

This commit is contained in:
Fabien Freling 2025-12-03 14:50:17 +01:00
parent 8e8823fb0c
commit 732a7329bc
28 changed files with 210 additions and 24 deletions

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/escher_convex_concave.jpg-aad7b984721eed80e7b
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/escher_lizards.jpg-6d8ffd09737747dd30c293cf42
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/hokusai.jpg-e34bef5c2c01e91fd3f7fbd65bf1bb63.
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -0,0 +1,36 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://db83efud5yxsr"
path="res://.godot/imported/Montserrat-ExtraBold.otf-8b4f6e223c2354188bd56d5be1852439.fontdata"
[deps]
source_file="res://assets/fonts/Montserrat-ExtraBold.otf"
dest_files=["res://.godot/imported/Montserrat-ExtraBold.otf-8b4f6e223c2354188bd56d5be1852439.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=1
subpixel_positioning=1
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

View file

@ -0,0 +1,36 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://dca4i4g8hysm5"
path="res://.godot/imported/OpenSans-ExtraBold.ttf-9d520f0ed8398261e18b9fe72a3be25c.fontdata"
[deps]
source_file="res://assets/fonts/OpenSans-ExtraBold.ttf"
dest_files=["res://.godot/imported/OpenSans-ExtraBold.ttf-9d520f0ed8398261e18b9fe72a3be25c.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=1
subpixel_positioning=1
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,36 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://wyv0hst7dcve"
path="res://.godot/imported/OpenSans-SemiBold.ttf-15d8406842a575c8f65fb9c8990d4b7c.fontdata"
[deps]
source_file="res://assets/fonts/OpenSans-SemiBold.ttf"
dest_files=["res://.godot/imported/OpenSans-SemiBold.ttf-15d8406842a575c8f65fb9c8990d4b7c.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
modulate_color_glyphs=false
hinting=1
subpixel_positioning=1
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/icon_folder.png-b3a2a9bdd4c609fb3eeaba30c71ce
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/icon_parent_folder.png-28fe9c21193d111a87cc30
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/logo.svg-f0fea7f4c0900e3cf3563bd5e43c48d1.cte
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/logo_512.png-52e0380d6068282002ce7e4da540a4c8
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/logo_android_192.png-d1092f8bdc9b8ae234b5684d
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/logo_android_bg_432.png-bed8240198b34da49346f
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/logo_android_fg_432.png-41c23e93a296f808ef139
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.cte
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -12,7 +12,7 @@ config_version=5
config/name="Taqin"
run/main_scene="res://src/Main.tscn"
config/features=PackedStringArray("4.3")
config/features=PackedStringArray("4.5")
config/icon="res://assets/logo/logo_512.png"
[autoload]
@ -46,4 +46,5 @@ pointing/emulate_touch_from_mouse=true
[rendering]
renderer/rendering_method="mobile"
environment/defaults/default_environment="res://default_env.tres"

1
src/DepthButton.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://cdn73git076hr

1
src/FileList.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://by50vos4xnap8

1
src/ImagePicker.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://gn1dmf64p11j

View file

@ -13,7 +13,7 @@ func _ready():
print("Starting state: ", taquin.current_state_name())
func _notification(what):
if what == MainLoop.NOTIFICATION_WM_QUIT_REQUEST:
if what == NOTIFICATION_WM_CLOSE_REQUEST:
save_game()
get_tree().quit() # default behavior
@ -31,12 +31,11 @@ func layout_reflow():
else:
# landscape
container.columns = 2
update()
#update()
# https://docs.godotengine.org/en/3.2/tutorials/io/saving_games.html
# https://docs.godotengine.org/en/stable/tutorials/io/saving_games.html
func save_game():
var save_game = File.new()
save_game.open("user://savegame.save", File.WRITE)
var save_game = FileAccess.open("user://savegame.save", FileAccess.WRITE)
var save_nodes = get_tree().get_nodes_in_group("Persist")
for node in save_nodes:
# Check the node has a save function
@ -55,17 +54,16 @@ func save_game():
save_game.close()
func load_game():
var save_game = File.new()
if not save_game.file_exists("user://savegame.save"):
return false # Error! We don't have a save to load.
if not FileAccess.file_exists("user://savegame.save"):
return # Error! We don't have a save to load.
# Load the file line by line and process that dictionary to restore
# the object it represents.
save_game.open("user://savegame.save", File.READ)
while save_game.get_position() < save_game.get_length():
var save_file = FileAccess.open("user://savegame.save", FileAccess.READ)
while save_file.get_position() < save_file.get_length():
# Get the saved dictionary from the next line in the save file
var test_json_conv = JSON.new()
test_json_conv.parse(save_game.get_line())
test_json_conv.parse(save_file.get_line())
var node_data = test_json_conv.get_data()
# Call the node's save function
@ -76,7 +74,7 @@ func load_game():
else:
print("Cannot load node ", node_data["path"])
save_game.close()
save_file.close()
return true
func start_fresh():
@ -86,11 +84,11 @@ func start_fresh():
# Signals
#
func _on_Taquin_state_changed(previous, new):
print("Taquin state: ", Taquin.State.keys()[previous], " -> ", Taquin.State.keys()[new])
print("Taquin state: ", taquin.State.keys()[previous], " -> ", taquin.State.keys()[new])
match new:
Taquin.State.WINNING:
taquin.State.WINNING:
print("Solved!")
Taquin.State.GAME_OVER:
taquin.State.GAME_OVER:
pass
func _on_New_game_pressed():

1
src/Main.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://rn30misiiww4

View file

@ -1,21 +1,20 @@
[gd_scene load_steps=6 format=3 uid="uid://cj4uqgtnylppu"]
[ext_resource type="Script" path="res://src/Main.gd" id="1"]
[ext_resource type="Script" uid="uid://rn30misiiww4" path="res://src/Main.gd" id="1"]
[ext_resource type="PackedScene" path="res://src/Taquin.tscn" id="2"]
[ext_resource type="PackedScene" path="res://src/NewGamePanel.tscn" id="3"]
[ext_resource type="PackedScene" path="res://src/DepthButton.tscn" id="4"]
[ext_resource type="Theme" path="res://assets/taqin_theme.tres" id="5"]
[ext_resource type="Theme" uid="uid://b7gu1bjpj8ixp" path="res://assets/taqin_theme.tres" id="5"]
[node name="Main" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("5")
script = ExtResource("1")
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Background" type="Panel" parent="."]
layout_mode = 0

1
src/NewGamePanel.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://dbsvkfo8rwlk3

1
src/Piece.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://cqq4ynmtdbb8q

1
src/Styles.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://cjynnh7od7kav

View file

@ -218,7 +218,7 @@ func sliding_piece_for_direction(direction) -> Piece:
if (destination.x < 0 || destination.x >= columns
|| destination.y < 0 || destination.y >= rows):
print("\/!\\ Impossible move")
print("/!\\ Impossible move")
return null
var piece = pieces[destination.x][destination.y]

1
src/Taquin.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://xctq46c6kgwo

1
src/Utils.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://c0m3ub6h2dq8c