28using 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;
103extern SortingBits _savegame_sort_order;
115std::optional<uint64_t> FiosGetDiskFreeSpace(
const std::string &path);
122std::tuple<FiosType, std::string> FiosGetHeightmapListCallback(
SaveLoadOperation fop,
const std::string &file,
const std::string_view ext);
List of file information.
const FiosItem * FindItem(const std::string_view file)
Find file information of a file by its name from the file list.
void BuildFileList(AbstractFileType abstract_filetype, SaveLoadOperation fop, bool show_dirs)
Construct a file list with the given kind of files, for the stated purpose.
Definition of stuff that is very close to a company, like the company struct itself.
#define DECLARE_ENUM_AS_BIT_SET(enum_type)
Operators to allow to work with enum as with type safe bit set in C++.
AbstractFileType
The different abstract types of files that the system knows about.
FiosType
Elements of a file system that are recognized.
SaveLoadOperation
Operation performed on the file.
void ShowSaveLoadDialog(AbstractFileType abstract_filetype, SaveLoadOperation fop)
Launch save/load dialog in the given mode.
const char * FindScenario(const ContentInfo *ci, bool md5sum)
Find a given scenario based on its unique ID.
SaveLoadInvalidateWindowData
Special values for save-load window for the data parameter of InvalidateWindowData.
@ SLIWD_FILTER_CHANGES
The filename filter has changed (via the editbox)
@ SLIWD_SELECTION_CHANGES
File selection has changed (user click, ...)
@ SLIWD_RESCAN_FILES
Rescan all files (when changed directory, ...)
std::string FiosGetCurrentPath()
Get the current path/working directory.
std::string FiosMakeSavegameName(const char *name)
Make a save game or scenario filename from a name.
void FiosGetSavegameList(SaveLoadOperation fop, bool show_dirs, FileList &file_list)
Get a list of savegames.
void FiosGetHeightmapList(SaveLoadOperation fop, bool show_dirs, FileList &file_list)
Get a list of heightmaps.
void ScanScenarios()
Force a (re)scan of the scenarios.
void FiosGetScenarioList(SaveLoadOperation fop, bool show_dirs, FileList &file_list)
Get a list of scenarios.
std::tuple< FiosType, std::string > FiosGetSavegameListCallback(SaveLoadOperation fop, const std::string &file, const std::string_view ext)
Callback for FiosGetFileList.
std::tuple< FiosType, std::string > FiosGetScenarioListCallback(SaveLoadOperation fop, const std::string &file, const std::string_view ext)
Callback for FiosGetFileList.
LoadCheckData _load_check_data
Data loaded from save during SL_LOAD_CHECK.
std::string FiosMakeHeightmapName(const char *name)
Construct a filename for a height map.
bool FiosDelete(const char *name)
Delete a file.
bool FiosBrowseTo(const FiosItem *item)
Browse to a new path based on the passed item, starting at _fios_path.
void FiosGetTownDataList(SaveLoadOperation fop, bool show_dirs, FileList &file_list)
Get a list of town data files.
Functions to be called to log fundamental changes to the game.
Types related to the graphics and/or input devices.
Functions to find and configure NewGRFs.
GRFListCompatibility
Status of post-gameload GRF compatibility check.
@ GLC_NOT_FOUND
At least one GRF couldn't be found (higher priority than GLC_COMPATIBLE)
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
static const StringID INVALID_STRING_ID
Constant representing an invalid string (16bit in case it is used in savegames)
Container for all important information about a piece of content.
Deals with finding savegames.
bool operator<(const FiosItem &other) const
Compare two FiosItem's.
A savegame name automatically numbered.
std::string Filename()
Generate a savegame name and number according to _settings_client.gui.max_num_autosaves.
std::string Extension()
Generate an extension for a savegame name.
Information about GRF, used in the game and (part of it) in savegames.
All settings together for the game.
Container for loading in mode SL_LOAD_CHECK.
bool checkable
True if the savegame could be checked by SL_LOAD_CHECK. (Old savegames are not checkable....
bool HasNewGrfs()
Check whether the game uses any NewGrfs.
std::string error_msg
Data to pass to SetDParamStr when displaying error.
CompanyPropertiesMap companies
Company information.
StringID error
Error message from loading. INVALID_STRING_ID if no error.
GRFConfig * grfconfig
NewGrf configuration from save.
Gamelog gamelog
Gamelog actions.
bool HasErrors()
Check whether loading the game resulted in errors.
void Clear()
Reset read data.
GRFListCompatibility grf_compatibility
Summary state of NewGrfs, whether missing files or only compatible found.
Templated helper to make a type-safe 'typedef' representing a single POD value.
Basic types related to the content on the content server.
Definition of the game-calendar-timer.