Skip to content

Commit 667ad7f

Browse files
committed
Separate ES-DE from EmulationStation due to new changes
1 parent 6b4d7e5 commit 667ad7f

File tree

6 files changed

+85
-2
lines changed

6 files changed

+85
-2
lines changed

assets/frontends/es-de.png

7.64 KB
Loading

assets/frontends/es-de.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://brcysvslcwqvj"
6+
path="res://.godot/imported/es-de.png-f40dfe159042114e6fbccbf90db56b01.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://assets/frontends/es-de.png"
14+
dest_files=["res://.godot/imported/es-de.png-f40dfe159042114e6fbccbf90db56b01.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

assets/frontends/es.png

-11.4 KB
Loading

scenes/popups/first_time/ImportSettingsSection.gd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ signal advance_section
1212

1313
@onready var importers := [
1414
EmulationStationImporter.new(),
15+
ESDEImporter.new(),
1516
RetroArchImporter.new()
1617
]
1718

source/importers/ESDEImporter.gd

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
extends EmulationStationImporter
2+
3+
class_name ESDEImporter
4+
5+
func _init():
6+
config_path = FileUtils.get_home_dir() + "/ES-DE"
7+
media_path = config_path + "/downloaded_media"
8+
gamelists_path = config_path + "/gamelists"
9+
config_file_path = config_path + "/settings/es_settings.xml"
10+
11+
# Returns this importer name
12+
func get_importer_name() -> String:
13+
return "ES-DE"
14+
15+
# Return this importer icon
16+
func get_icon() -> Texture2D:
17+
return preload("res://assets/frontends/es-de.png")
18+
19+
# Returns the compatibility level regarding existing game metadata.
20+
# This one in particular must offer SUPPORTED or PARTIAL support.
21+
# This is run after `is_available()`, so this method doesn't need to be
22+
# static, and can change level depending on the existing configuration/version.
23+
func get_metadata_compatibility_level() -> int:
24+
return CompatibilityLevel.SUPPORTED
25+
26+
# Returns the compatibility level regarding existing game media
27+
func get_media_compatibility_level() -> int:
28+
return CompatibilityLevel.SUPPORTED
29+
30+
# Returns the compatibility level regarding existing themes
31+
func get_theme_compatibility_level() -> int:
32+
return CompatibilityLevel.UNSUPPORTED
33+
34+
# Returns a description/note to give more information about the
35+
# game metadata compatibility level
36+
func get_metadata_compatibility_level_description() -> String:
37+
return "Age ratings will have to be scraped from RetroHub."
38+
39+
# Returns a description/note to give more information about the
40+
# game media compatibility level
41+
func get_media_compatibility_level_description() -> String:
42+
return "Game box and physical support textures, used in 3D models, will have to be scraped from RetroHub."
43+
44+
# Returns a description/note to give more information about the
45+
# theme compatibility level
46+
func get_theme_compatibility_level_description() -> String:
47+
return "ES-DE themes are not supported."

source/importers/EmulationStationImporter.gd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const MAXIMUM_SUPPORTED_CONFIG_LEVEL = 7
1010
var config_path := FileUtils.get_home_dir() + "/.emulationstation"
1111
var media_path := config_path + "/downloaded_media"
1212
var gamelists_path := config_path + "/gamelists"
13+
var config_file_path := config_path + "/es_settings.xml"
1314
var folder_size : int = -1
1415

1516
var game_datas := {}
@@ -28,7 +29,7 @@ const RH_MEDIA_NAMES := [
2829

2930
# Returns this importer name
3031
func get_importer_name() -> String:
31-
return "EmulationStation / EmulationStation-DE"
32+
return "EmulationStation (and derivatives)"
3233

3334
# Return this importer icon
3435
func get_icon() -> Texture2D:
@@ -194,7 +195,7 @@ func begin_import(copy: bool):
194195
func import_config():
195196
reset_minor(1)
196197
progress_minor("Reading game directory...")
197-
var config := XML2JSON.parse(config_path + "/es_settings.xml")
198+
var config := XML2JSON.parse(config_file_path)
198199
if config.has("string"):
199200
for child in config["string"]:
200201
if child.has("#attributes") and child["#attributes"]["name"] == "ROMDirectory":

0 commit comments

Comments
 (0)