|
OpenTTD Source
14.0-beta1
|
Go to the documentation of this file.
28 using CompanyPropertiesMap = std::map<uint, std::unique_ptr<CompanyProperties>>;
38 uint32_t map_size_x, map_size_y;
70 return this->checkable && this->error ==
INVALID_STRING_ID && this->grfconfig !=
nullptr;
88 class FileList :
public std::vector<FiosItem> {
103 extern SortingBits _savegame_sort_order;
114 std::optional<uint64_t> FiosGetDiskFreeSpace(
const std::string &path);
121 std::tuple<FiosType, std::string> FiosGetHeightmapListCallback(
SaveLoadOperation fop,
const std::string &file,
const std::string_view ext);
bool checkable
True if the savegame could be checked by SL_LOAD_CHECK. (Old savegames are not checkable....
std::string error_msg
Data to pass to SetDParamStr when displaying error.
@ SLIWD_RESCAN_FILES
Rescan all files (when changed directory, ...)
std::string FiosGetCurrentPath()
Get the current path/working directory.
FiosNumberedSaveName(const std::string &prefix)
Constructs FiosNumberedSaveName.
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
SaveLoadOperation
Operation performed on the file.
void FiosGetScenarioList(SaveLoadOperation fop, bool show_dirs, FileList &file_list)
Get a list of scenarios.
bool FiosBrowseTo(const FiosItem *item)
Browse to a new path based on the passed item, starting at #_fios_path.
LoadCheckData _load_check_data
Data loaded from save during SL_LOAD_CHECK.
GRFConfig * grfconfig
NewGrf configuration from save.
Templated helper to make a type-safe 'typedef' representing a single POD value.
bool HasErrors()
Check whether loading the game resulted in errors.
List of file information.
std::tuple< FiosType, std::string > FiosGetScenarioListCallback(SaveLoadOperation fop, const std::string &file, const std::string_view ext)
Callback for FiosGetFileList.
const FiosItem * FindItem(const std::string_view file)
Find file information of a file by its name from the file list.
AbstractFileType
The different abstract types of files that the system knows about.
Information about GRF, used in the game and (part of it) in savegames.
@ SLIWD_FILTER_CHANGES
The filename filter has changed (via the editbox)
Container for all important information about a piece of content.
std::string FiosMakeHeightmapName(const char *name)
Construct a filename for a height map.
Deals with finding savegames.
std::string FiosMakeSavegameName(const char *name)
Make a save game or scenario filename from a name.
All settings together for the game.
@ SLIWD_SELECTION_CHANGES
File selection has changed (user click, ...)
std::tuple< FiosType, std::string > FiosGetSavegameListCallback(SaveLoadOperation fop, const std::string &file, const std::string_view ext)
Callback for FiosGetFileList.
bool FiosDelete(const char *name)
Delete a file.
void ShowSaveLoadDialog(AbstractFileType abstract_filetype, SaveLoadOperation fop)
Launch save/load dialog in the given mode.
StringID error
Error message from loading. INVALID_STRING_ID if no error.
Container for loading in mode SL_LOAD_CHECK.
void FiosGetHeightmapList(SaveLoadOperation fop, bool show_dirs, FileList &file_list)
Get a list of heightmaps.
CompanyPropertiesMap companies
Company information.
A savegame name automatically numbered.
void Clear()
Reset read data.
const char * FindScenario(const ContentInfo *ci, bool md5sum)
Find a given scenario based on its unique ID.
GRFListCompatibility grf_compatibility
Summary state of NewGrfs, whether missing files or only compatible found.
FiosType
Elements of a file system that are recognized.
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
Gamelog gamelog
Gamelog actions.
bool HasNewGrfs()
Check whether the game uses any NewGrfs.
std::string Extension()
Generate an extension for a savegame name.
void FiosGetSavegameList(SaveLoadOperation fop, bool show_dirs, FileList &file_list)
Get a list of savegames.
SaveLoadInvalidateWindowData
Special values for save-load window for the data parameter of InvalidateWindowData.
std::string Filename()
Generate a savegame name and number according to _settings_client.gui.max_num_autosaves.
@ GLC_NOT_FOUND
At least one GRF couldn't be found (higher priority than GLC_COMPATIBLE)
GRFListCompatibility
Status of post-gameload GRF compatibility check.
void BuildFileList(AbstractFileType abstract_filetype, SaveLoadOperation fop, bool show_dirs)
Construct a file list with the given kind of files, for the stated purpose.
void ScanScenarios()
Force a (re)scan of the scenarios.
static const StringID INVALID_STRING_ID
Constant representing an invalid string (16bit in case it is used in savegames)
bool operator<(const FiosItem &other) const
Compare two FiosItem's.