MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / FiosGetHeightmapList

Function FiosGetHeightmapList

src/fios.cpp:528–539  ·  view source on GitHub ↗

* Get a list of heightmaps. * @param fop Purpose of collecting the list. * @param show_dirs Whether to show directories. * @param file_list Destination of the found files. */

Source from the content-addressed store, hash-verified

526 * @param file_list Destination of the found files.
527 */
528void FiosGetHeightmapList(SaveLoadOperation fop, bool show_dirs, FileList &file_list)
529{
530 static std::optional<std::string> fios_hmap_path;
531
532 if (!fios_hmap_path) fios_hmap_path = FioFindDirectory(HEIGHTMAP_DIR);
533
534 _fios_path = &(*fios_hmap_path);
535
536 std::string base_path = FioFindDirectory(HEIGHTMAP_DIR);
537 Subdirectory subdir = base_path == *_fios_path ? HEIGHTMAP_DIR : NO_DIRECTORY;
538 FiosGetFileList(fop, show_dirs, &FiosGetHeightmapListCallback, subdir, file_list);
539}
540
541/**
542 * Callback for FiosGetTownDataList.

Callers 1

BuildFileListMethod · 0.85

Calls 2

FioFindDirectoryFunction · 0.85
FiosGetFileListFunction · 0.85

Tested by

no test coverage detected