mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-23 06:44:38 +01:00
Show sc6/sv6/sc4/sv4 in "load landscape" file dialog
This commit is contained in:
19
src/editor.c
19
src/editor.c
@@ -258,17 +258,18 @@ bool editor_load_landscape(const utf8 *path)
|
||||
{
|
||||
window_close_construction_windows();
|
||||
|
||||
char *extension = strrchr(path, '.');
|
||||
if (extension != NULL) {
|
||||
if (_stricmp(extension, ".sv4") == 0) {
|
||||
return editor_load_landscape_from_sv4(path);
|
||||
} else if (_stricmp(extension, ".sc4") == 0) {
|
||||
uint32 extension = get_file_extension_type(path);
|
||||
switch (extension) {
|
||||
case FILE_EXTENSION_SC6:
|
||||
case FILE_EXTENSION_SV6:
|
||||
return editor_read_s6(path);
|
||||
case FILE_EXTENSION_SC4:
|
||||
return editor_load_landscape_from_sc4(path);
|
||||
}
|
||||
case FILE_EXTENSION_SV4:
|
||||
return editor_load_landscape_from_sv4(path);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Load SC6 / SV6
|
||||
return editor_read_s6(path);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user