28using CompanyPropertiesMap = std::map<uint, std::unique_ptr<CompanyProperties>>;
38 uint32_t map_size_x = 0;
39 uint32_t map_size_y = 0;
40 TimerGameCalendar::Date current_date{};
69 return this->checkable && this->error ==
INVALID_STRING_ID && !this->grfconfig.empty();
93enum SortingBits : uint8_t {
102extern SortingBits _savegame_sort_order;
114std::optional<uint64_t> FiosGetDiskFreeSpace(
const std::string &path);
120std::tuple<FiosType, std::string> FiosGetHeightmapListCallback(
SaveLoadOperation fop, std::string_view file, std::string_view ext);
Container for an encoded string, created by GetEncodedString.
List of file information.
void BuildFileList(AbstractFileType abstract_filetype, SaveLoadOperation fop, bool show_dirs)
Construct a file list with the given kind of files, for the stated purpose.
const FiosItem * FindItem(std::string_view file)
Find file information of a file by its name from the file list.
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++.
SaveLoadOperation
Operation performed on the file.
AbstractFileType
The different abstract types of files that the system knows about.
std::tuple< FiosType, std::string > FiosGetScenarioListCallback(SaveLoadOperation fop, std::string_view file, std::string_view ext)
Callback for FiosGetFileList.
void ShowSaveLoadDialog(AbstractFileType abstract_filetype, SaveLoadOperation fop)
Launch save/load dialog in the given mode.
std::optional< std::string_view > FindScenario(const ContentInfo &ci, bool md5sum)
Find a given scenario based on its unique ID.
std::string FiosMakeSavegameName(std::string_view name)
Make a save game or scenario filename from a name.
std::tuple< FiosType, std::string > FiosGetSavegameListCallback(SaveLoadOperation fop, std::string_view file, std::string_view ext)
Callback for FiosGetFileList.
std::string FiosGetCurrentPath()
Get the current path/working directory.
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, ...).
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.
std::string FiosMakeHeightmapName(std::string_view name)
Construct a filename for a height map.
void FiosGetScenarioList(SaveLoadOperation fop, bool show_dirs, FileList &file_list)
Get a list of scenarios.
LoadCheckData _load_check_data
Data loaded from save during SL_LOAD_CHECK.
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.
LandscapeType
Landscape types.
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.
std::string Filename()
Generate a savegame name and number according to _settings_client.gui.max_num_autosaves.
FiosNumberedSaveName(const std::string &prefix)
Constructs FiosNumberedSaveName.
std::string Extension()
Generate an extension for a savegame name.
Elements of a file system that are recognized.
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 string parameters when displaying error.
TimerGameCalendar::Year starting_year
Starting date.
CompanyPropertiesMap companies
Company information.
StringID error
Error message from loading. INVALID_STRING_ID if no error.
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.
LandscapeType landscape
Landscape type.
GRFConfigList grfconfig
NewGrf configuration from save.
Basic types related to the content on the content server.
Definition of the game-calendar-timer.