Skip to content

Commit 9d5b0ae

Browse files
committed
Threaded loading, first-time setup
Implement threaded loading (not sure if I'm doing it right!) and a "first-time setup", per Krzyhau.
1 parent 2b2d503 commit 9d5b0ae

18 files changed

+463
-110
lines changed
File renamed without changes.
File renamed without changes.

Defaults/starback.png

17.9 KB
Loading

Defaults/starback.png.import

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://dwbicf3xmqxgd"
6+
path="res://.godot/imported/starback.png-0d205fecdecb25c9af1336fd906dcba3.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://Defaults/starback.png"
14+
dest_files=["res://.godot/imported/starback.png-0d205fecdecb25c9af1336fd906dcba3.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1

Scenes/Cursor.tscn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ _data = {
5555
}
5656

5757
[node name="Cursor" type="Node3D"]
58-
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.56, 0.56, 0.56)
5958
script = ExtResource("1_gsw3j")
6059

6160
[node name="Area3D" type="Area3D" parent="."]

Scenes/MainScene.tscn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
[node name="UI" parent="." instance=ExtResource("2_7lqbu")]
1111

1212
[node name="Cursor" parent="." instance=ExtResource("1_qhvts")]
13+
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1)
1314

1415
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
1516
environment = ExtResource("3_tf75n")

Scenes/NoDirs.tscn

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
[gd_scene load_steps=4 format=3 uid="uid://ceqvj0x5ig6nk"]
2+
3+
[ext_resource type="Texture2D" uid="uid://dwbicf3xmqxgd" path="res://Defaults/starback.png" id="1_57dfe"]
4+
[ext_resource type="Script" path="res://Scripts/UI/NoDirs.gd" id="1_p3fr0"]
5+
6+
[sub_resource type="SystemFont" id="SystemFont_t632v"]
7+
8+
[node name="NoDirs" type="Control"]
9+
layout_mode = 3
10+
anchors_preset = 15
11+
anchor_right = 1.0
12+
anchor_bottom = 1.0
13+
grow_horizontal = 2
14+
grow_vertical = 2
15+
script = ExtResource("1_p3fr0")
16+
17+
[node name="Main" type="CenterContainer" parent="."]
18+
layout_mode = 2
19+
offset_right = 1280.0
20+
offset_bottom = 720.0
21+
size_flags_vertical = 3
22+
23+
[node name="VBox" type="VBoxContainer" parent="Main"]
24+
layout_mode = 2
25+
26+
[node name="RichTextLabel" type="RichTextLabel" parent="Main/VBox"]
27+
clip_contents = false
28+
layout_mode = 2
29+
size_flags_vertical = 6
30+
bbcode_enabled = true
31+
text = "[center][b]You do not have any unpacked directories set![/b]
32+
Please sent them below.
33+
These options can be changed later via the \"File > Options\" menu.[/center]"
34+
fit_content = true
35+
scroll_active = false
36+
37+
[node name="AOs" type="CenterContainer" parent="Main/VBox"]
38+
layout_mode = 2
39+
size_flags_vertical = 3
40+
41+
[node name="HBoxContainer" type="HBoxContainer" parent="Main/VBox/AOs"]
42+
layout_mode = 2
43+
44+
[node name="AODir" type="Button" parent="Main/VBox/AOs/HBoxContainer"]
45+
custom_minimum_size = Vector2(300, 0)
46+
layout_mode = 2
47+
theme_override_fonts/font = SubResource("SystemFont_t632v")
48+
text = "Set art objects directory..."
49+
50+
[node name="FileDialog" type="FileDialog" parent="Main/VBox/AOs/HBoxContainer/AODir"]
51+
title = "Open a Directory"
52+
initial_position = 2
53+
size = Vector2i(312, 154)
54+
ok_button_text = "Select Current Folder"
55+
file_mode = 2
56+
access = 2
57+
use_native_dialog = true
58+
59+
[node name="ListDir" type="LineEdit" parent="Main/VBox/AOs/HBoxContainer"]
60+
custom_minimum_size = Vector2(500, 0)
61+
layout_mode = 2
62+
size_flags_horizontal = 3
63+
editable = false
64+
65+
[node name="LVLs" type="CenterContainer" parent="Main/VBox"]
66+
layout_mode = 2
67+
size_flags_vertical = 3
68+
69+
[node name="HBoxContainer" type="HBoxContainer" parent="Main/VBox/LVLs"]
70+
layout_mode = 2
71+
72+
[node name="LVLDir" type="Button" parent="Main/VBox/LVLs/HBoxContainer"]
73+
custom_minimum_size = Vector2(300, 0)
74+
layout_mode = 2
75+
theme_override_fonts/font = SubResource("SystemFont_t632v")
76+
text = "Set levels directory..."
77+
78+
[node name="FileDialog" type="FileDialog" parent="Main/VBox/LVLs/HBoxContainer/LVLDir"]
79+
title = "Open a Directory"
80+
initial_position = 2
81+
size = Vector2i(312, 154)
82+
ok_button_text = "Select Current Folder"
83+
file_mode = 2
84+
access = 2
85+
use_native_dialog = true
86+
87+
[node name="ListDir" type="LineEdit" parent="Main/VBox/LVLs/HBoxContainer"]
88+
custom_minimum_size = Vector2(500, 0)
89+
layout_mode = 2
90+
size_flags_horizontal = 3
91+
editable = false
92+
93+
[node name="TSs" type="CenterContainer" parent="Main/VBox"]
94+
layout_mode = 2
95+
size_flags_vertical = 3
96+
97+
[node name="HBoxContainer" type="HBoxContainer" parent="Main/VBox/TSs"]
98+
layout_mode = 2
99+
100+
[node name="TSDir" type="Button" parent="Main/VBox/TSs/HBoxContainer"]
101+
custom_minimum_size = Vector2(300, 0)
102+
layout_mode = 2
103+
theme_override_fonts/font = SubResource("SystemFont_t632v")
104+
text = "Set trile sets directory..."
105+
106+
[node name="FileDialog" type="FileDialog" parent="Main/VBox/TSs/HBoxContainer/TSDir"]
107+
title = "Open a Directory"
108+
initial_position = 2
109+
size = Vector2i(312, 154)
110+
ok_button_text = "Select Current Folder"
111+
file_mode = 2
112+
access = 2
113+
use_native_dialog = true
114+
115+
[node name="ListDir" type="LineEdit" parent="Main/VBox/TSs/HBoxContainer"]
116+
custom_minimum_size = Vector2(500, 0)
117+
layout_mode = 2
118+
size_flags_horizontal = 3
119+
editable = false
120+
121+
[node name="NPCs" type="CenterContainer" parent="Main/VBox"]
122+
layout_mode = 2
123+
size_flags_vertical = 3
124+
125+
[node name="HBoxContainer" type="HBoxContainer" parent="Main/VBox/NPCs"]
126+
layout_mode = 2
127+
128+
[node name="NPCDir" type="Button" parent="Main/VBox/NPCs/HBoxContainer"]
129+
custom_minimum_size = Vector2(300, 0)
130+
layout_mode = 2
131+
theme_override_fonts/font = SubResource("SystemFont_t632v")
132+
text = "Set character animations directory..."
133+
134+
[node name="FileDialog" type="FileDialog" parent="Main/VBox/NPCs/HBoxContainer/NPCDir"]
135+
title = "Open a Directory"
136+
initial_position = 2
137+
size = Vector2i(312, 154)
138+
ok_button_text = "Select Current Folder"
139+
file_mode = 2
140+
access = 2
141+
use_native_dialog = true
142+
143+
[node name="ListDir" type="LineEdit" parent="Main/VBox/NPCs/HBoxContainer"]
144+
custom_minimum_size = Vector2(500, 0)
145+
layout_mode = 2
146+
size_flags_horizontal = 3
147+
editable = false
148+
149+
[node name="LoadHARDHAT" type="Button" parent="Main/VBox"]
150+
custom_minimum_size = Vector2(250, 0)
151+
layout_mode = 2
152+
size_flags_horizontal = 4
153+
disabled = true
154+
text = "Load Beret!"
155+
156+
[node name="Starback" type="Sprite2D" parent="."]
157+
z_index = -1
158+
position = Vector2(640, 360)
159+
texture = ExtResource("1_57dfe")
160+
161+
[connection signal="pressed" from="Main/VBox/LoadHARDHAT" to="." method="_on_load_hardhat_pressed"]

Scenes/UI.tscn

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
[gd_scene load_steps=25 format=3 uid="uid://cdwpy8hm6qseq"]
1+
[gd_scene load_steps=24 format=3 uid="uid://cdwpy8hm6qseq"]
22

33
[ext_resource type="Script" path="res://Scripts/UI/UI.gd" id="1_yufu8"]
4-
[ext_resource type="Theme" uid="uid://5wxvr808qkyw" path="res://default.tres" id="2_i42am"]
4+
[ext_resource type="Theme" uid="uid://5wxvr808qkyw" path="res://Defaults/default.tres" id="2_pfeim"]
55
[ext_resource type="Script" path="res://Scripts/UI/Titlebar/menuFile.gd" id="3_mnd5b"]
66
[ext_resource type="Script" path="res://Scripts/UI/Titlebar/menuHelp.gd" id="4_5u3hn"]
7-
[ext_resource type="Script" path="res://Scripts/UI/Titlebar/menuView.gd" id="4_i7j77"]
87
[ext_resource type="Texture2D" uid="uid://cw063pifm8hls" path="res://beret_logo.png" id="5_tfvu3"]
98
[ext_resource type="PackedScene" uid="uid://baepcmjcgsbk0" path="res://Objects/Compass.glb" id="6_exilt"]
109
[ext_resource type="Script" path="res://Scripts/UI/Sidebar/EditorInfo.gd" id="7_jfdyk"]
@@ -73,7 +72,7 @@ script = ExtResource("1_yufu8")
7372

7473
[node name="Titlebar" type="HBoxContainer" parent="."]
7574
layout_mode = 2
76-
theme = ExtResource("2_i42am")
75+
theme = ExtResource("2_pfeim")
7776

7877
[node name="File" type="MenuButton" parent="Titlebar"]
7978
layout_mode = 2
@@ -141,12 +140,6 @@ popup/item_3/text = "Debug terminal"
141140
popup/item_3/id = 2
142141
popup/item_4/text = "Raw FEZLVL.JSON"
143142
popup/item_4/id = 3
144-
script = ExtResource("4_i7j77")
145-
146-
[node name="Palette" type="Window" parent="Titlebar/View"]
147-
title = "Palette"
148-
initial_position = 2
149-
visible = false
150143

151144
[node name="Help" type="MenuButton" parent="Titlebar"]
152145
layout_mode = 2
@@ -190,7 +183,7 @@ layout_mode = 2
190183
size_flags_horizontal = 3
191184
size_flags_vertical = 3
192185
text = "Beret - A level editor and viewer for FEZ.
193-
edintomato and contributors, 2024
186+
edintomato2 and contributors, 2024
194187
This project is licensed under GPLv3!
195188
"
196189
horizontal_alignment = 1
@@ -232,7 +225,7 @@ horizontal_alignment = 1
232225
[node name="EditorLog" type="RichTextLabel" parent="Sidebar/SidebarVertical"]
233226
layout_mode = 2
234227
size_flags_vertical = 3
235-
theme = ExtResource("2_i42am")
228+
theme = ExtResource("2_pfeim")
236229
text = "Welcome to Beret!
237230
"
238231
scroll_following = true
@@ -278,7 +271,7 @@ layout_mode = 2
278271
layout_mode = 2
279272
size_flags_horizontal = 3
280273
mouse_force_pass_scroll_events = false
281-
theme = ExtResource("2_i42am")
274+
theme = ExtResource("2_pfeim")
282275
allow_search = false
283276
max_columns = 0
284277
same_column_width = true

Scripts/Exporter/Exporter.gd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ func _saveFEZLVL(path, filename):
3333
"Trile":
3434
var pos = [obj.position.x, obj.position.y, obj.position.z]
3535
var emp = [round(pos[0]), round(pos[1]), round(pos[2])]
36-
var phi = 0
36+
var phi = abs(obj.rotation_degrees.y / 90)
3737
var actset = null
38+
3839

3940
var trileDict = { "Emplacement": emp,
4041
"Position": pos,
@@ -96,4 +97,4 @@ func _findLargest(triles, idx: int):
9697
if trile["Position"][idx] > comparer:
9798
comparer = trile["Position"][idx]
9899
pass
99-
return comparer
100+
return comparer + 1 # Just in case we need some extra space!

0 commit comments

Comments
 (0)