|
OpenTTD Source
14.0-beta3
|
#include "gfx_type.h"#include "company_base.h"#include "newgrf_config.h"#include "gamelog.h"#include "network/core/tcp_content_type.h"#include "timer/timer_game_calendar.h"Go to the source code of this file.
Data Structures | |
| struct | LoadCheckData |
| Container for loading in mode SL_LOAD_CHECK. More... | |
| struct | FiosItem |
| Deals with finding savegames. More... | |
| class | FileList |
| List of file information. More... | |
| struct | FiosNumberedSaveName |
| A savegame name automatically numbered. More... | |
Typedefs | |
| using | CompanyPropertiesMap = std::map< uint, std::unique_ptr< CompanyProperties > > |
Enumerations | |
| enum | SaveLoadInvalidateWindowData { SLIWD_RESCAN_FILES, SLIWD_SELECTION_CHANGES, SLIWD_FILTER_CHANGES } |
| Special values for save-load window for the data parameter of InvalidateWindowData. More... | |
| enum | SortingBits { SORT_ASCENDING = 0, SORT_DESCENDING = 1, SORT_BY_DATE = 0, SORT_BY_NAME = 2 } |
Functions | |
| void | ShowSaveLoadDialog (AbstractFileType abstract_filetype, SaveLoadOperation fop) |
| Launch save/load dialog in the given mode. More... | |
| void | FiosGetSavegameList (SaveLoadOperation fop, bool show_dirs, FileList &file_list) |
| Get a list of savegames. More... | |
| void | FiosGetScenarioList (SaveLoadOperation fop, bool show_dirs, FileList &file_list) |
| Get a list of scenarios. More... | |
| void | FiosGetHeightmapList (SaveLoadOperation fop, bool show_dirs, FileList &file_list) |
| Get a list of heightmaps. More... | |
| bool | FiosBrowseTo (const FiosItem *item) |
| Browse to a new path based on the passed item, starting at #_fios_path. More... | |
| std::string | FiosGetCurrentPath () |
| Get the current path/working directory. | |
| std::optional< uint64_t > | FiosGetDiskFreeSpace (const std::string &path) |
| bool | FiosDelete (const char *name) |
| Delete a file. More... | |
| std::string | FiosMakeHeightmapName (const char *name) |
| Construct a filename for a height map. More... | |
| std::string | FiosMakeSavegameName (const char *name) |
| Make a save game or scenario filename from a name. More... | |
| std::tuple< FiosType, std::string > | FiosGetSavegameListCallback (SaveLoadOperation fop, const std::string &file, const std::string_view ext) |
| Callback for FiosGetFileList. More... | |
| std::tuple< FiosType, std::string > | FiosGetScenarioListCallback (SaveLoadOperation fop, const std::string &file, const std::string_view ext) |
| Callback for FiosGetFileList. More... | |
| std::tuple< FiosType, std::string > | FiosGetHeightmapListCallback (SaveLoadOperation fop, const std::string &file, const std::string_view ext) |
| void | ScanScenarios () |
| Force a (re)scan of the scenarios. | |
| const char * | FindScenario (const ContentInfo *ci, bool md5sum) |
| Find a given scenario based on its unique ID. More... | |
Variables | |
| LoadCheckData | _load_check_data |
| Data loaded from save during SL_LOAD_CHECK. | |
| SortingBits | _savegame_sort_order |
Declarations for savegames operations
Definition in file fios.h.
Special values for save-load window for the data parameter of InvalidateWindowData.
| const char* FindScenario | ( | const ContentInfo * | ci, |
| bool | md5sum | ||
| ) |
Find a given scenario based on its unique ID.
| ci | The content info to compare it to. |
| md5sum | Whether to look at the md5sum or the id. |
nullptr. Definition at line 688 of file fios.cpp.
References _scanner, ContentInfo::md5sum, ScenarioScanner::Scan(), and ContentInfo::unique_id.
Referenced by HasScenario().
| bool FiosBrowseTo | ( | const FiosItem * | item | ) |
| bool FiosDelete | ( | const char * | name | ) |
Delete a file.
| name | Filename to delete. |
Definition at line 247 of file fios.cpp.
References FiosMakeSavegameName().
Referenced by SaveLoadWindow::OnTimeout().
| void FiosGetHeightmapList | ( | SaveLoadOperation | fop, |
| bool | show_dirs, | ||
| FileList & | file_list | ||
| ) |
Get a list of heightmaps.
| fop | Purpose of collecting the list. |
| show_dirs | Whether to show directories. |
| file_list | Destination of the found files. |
Definition at line 580 of file fios.cpp.
Referenced by FileList::BuildFileList().
| void FiosGetSavegameList | ( | SaveLoadOperation | fop, |
| bool | show_dirs, | ||
| FileList & | file_list | ||
| ) |
Get a list of savegames.
| fop | Purpose of collecting the list. |
| show_dirs | Whether to show directories. |
| file_list | Destination of the found files. |
Definition at line 473 of file fios.cpp.
Referenced by FileList::BuildFileList().
| std::tuple<FiosType, std::string> FiosGetSavegameListCallback | ( | SaveLoadOperation | fop, |
| const std::string & | file, | ||
| const std::string_view | ext | ||
| ) |
Callback for FiosGetFileList.
It tells if a file is a savegame or not.
| fop | Purpose of collecting the list. |
| file | Name of the file to check. |
| ext | A pointer to the extension identifier inside file |
Definition at line 444 of file fios.cpp.
References StrEqualsIgnoreCase().
| void FiosGetScenarioList | ( | SaveLoadOperation | fop, |
| bool | show_dirs, | ||
| FileList & | file_list | ||
| ) |
Get a list of scenarios.
| fop | Purpose of collecting the list. |
| show_dirs | Whether to show directories. |
| file_list | Destination of the found files. |
Definition at line 520 of file fios.cpp.
Referenced by FileList::BuildFileList().
| std::tuple<FiosType, std::string> FiosGetScenarioListCallback | ( | SaveLoadOperation | fop, |
| const std::string & | file, | ||
| const std::string_view | ext | ||
| ) |
Callback for FiosGetFileList.
It tells if a file is a scenario or not.
| fop | Purpose of collecting the list. |
| file | Name of the file to check. |
| ext | A pointer to the extension identifier inside file |
Definition at line 493 of file fios.cpp.
References StrEqualsIgnoreCase().
| std::string FiosMakeHeightmapName | ( | const char * | name | ) |
Construct a filename for a height map.
| name | Filename. |
Definition at line 234 of file fios.cpp.
References FiosMakeFilename(), and GetCurrentScreenshotExtension().
Referenced by SaveLoadWindow::OnTimeout().
| std::string FiosMakeSavegameName | ( | const char * | name | ) |
Make a save game or scenario filename from a name.
| name | Name of the file. |
Definition at line 222 of file fios.cpp.
Referenced by FiosDelete(), and SaveLoadWindow::OnTimeout().
| void ShowSaveLoadDialog | ( | AbstractFileType | abstract_filetype, |
| SaveLoadOperation | fop | ||
| ) |
Launch save/load dialog in the given mode.
| abstract_filetype | Kind of file to handle. |
| fop | File operation to perform (load or save). |
Definition at line 914 of file fios_gui.cpp.
References _load_dialog_desc, _load_heightmap_dialog_desc, _save_dialog_desc, CloseWindowById(), FT_HEIGHTMAP, SLO_SAVE, and WC_SAVELOAD.