forked from mirror/OpenTTD
Add: allow loading heightmaps from command-line (#11870)
If you want to load a file from tar, you have to give the file inside the tar in order for it to work: <tar-file>/<dir-in-tar>/<file>.png
This commit is contained in:
@@ -447,9 +447,6 @@ std::tuple<FiosType, std::string> FiosGetSavegameListCallback(SaveLoadOperation
|
||||
* .SV1 Transport Tycoon Deluxe (Patch) saved game
|
||||
* .SV2 Transport Tycoon Deluxe (Patch) saved 2-player game */
|
||||
|
||||
/* Don't crash if we supply no extension */
|
||||
if (ext.empty()) return { FIOS_TYPE_INVALID, {} };
|
||||
|
||||
if (StrEqualsIgnoreCase(ext, ".sav")) {
|
||||
return { FIOS_TYPE_FILE, GetFileTitle(file, SAVE_DIR) };
|
||||
}
|
||||
@@ -490,7 +487,7 @@ void FiosGetSavegameList(SaveLoadOperation fop, FileList &file_list)
|
||||
* @see FiosGetFileList
|
||||
* @see FiosGetScenarioList
|
||||
*/
|
||||
static std::tuple<FiosType, std::string> FiosGetScenarioListCallback(SaveLoadOperation fop, const std::string &file, const std::string_view ext)
|
||||
std::tuple<FiosType, std::string> FiosGetScenarioListCallback(SaveLoadOperation fop, const std::string &file, const std::string_view ext)
|
||||
{
|
||||
/* Show scenario files
|
||||
* .SCN OpenTTD style scenario file
|
||||
@@ -530,7 +527,7 @@ void FiosGetScenarioList(SaveLoadOperation fop, FileList &file_list)
|
||||
FiosGetFileList(fop, &FiosGetScenarioListCallback, subdir, file_list);
|
||||
}
|
||||
|
||||
static std::tuple<FiosType, std::string> FiosGetHeightmapListCallback(SaveLoadOperation, const std::string &file, const std::string_view ext)
|
||||
std::tuple<FiosType, std::string> FiosGetHeightmapListCallback(SaveLoadOperation, const std::string &file, const std::string_view ext)
|
||||
{
|
||||
/* Show heightmap files
|
||||
* .PNG PNG Based heightmap files
|
||||
|
Reference in New Issue
Block a user