OpenTTD Source 20250905-master-g122023be8d
FileToSaveLoad Struct Reference

Deals with the type of the savegame, independent of extension. More...

#include <saveload.h>

Public Member Functions

void SetMode (const FiosType &ft, SaveLoadOperation fop=SLO_LOAD)
 Set the mode and file type of the file to save or load.
 
void Set (const FiosItem &item)
 Set the title of the file.
 

Data Fields

SaveLoadOperation file_op
 File operation to perform.
 
FiosType ftype
 File type.
 
std::string name
 Name of the file.
 
EncodedString title
 Internal name of the game.
 

Detailed Description

Deals with the type of the savegame, independent of extension.

Definition at line 423 of file saveload.h.

Member Function Documentation

◆ Set()

void FileToSaveLoad::Set ( const FiosItem item)

Set the title of the file.

Parameters
titleTitle of the file.

Definition at line 3428 of file saveload.cpp.

References name, SetMode(), and title.

Referenced by SaveLoadWindow::OnClick().

◆ SetMode()

void FileToSaveLoad::SetMode ( const FiosType ft,
SaveLoadOperation  fop = SLO_LOAD 
)

Set the mode and file type of the file to save or load.

Parameters
ftFile type.
fopFile operation being performed.

Definition at line 3412 of file saveload.cpp.

References FiosType::abstract, file_op, FT_INVALID, FT_NONE, ftype, and SLO_INVALID.

Referenced by openttd_main(), ClientNetworkGameSocketHandler::Receive_SERVER_MAP_DONE(), and Set().

Field Documentation

◆ file_op

SaveLoadOperation FileToSaveLoad::file_op

File operation to perform.

Definition at line 424 of file saveload.h.

Referenced by SetMode().

◆ ftype

FiosType FileToSaveLoad::ftype

◆ name

std::string FileToSaveLoad::name

Name of the file.

Definition at line 426 of file saveload.h.

Referenced by GenerateLandscape(), LoadTownData(), SaveLoadWindow::OnTimeout(), openttd_main(), and Set().

◆ title

EncodedString FileToSaveLoad::title

Internal name of the game.

Definition at line 427 of file saveload.h.

Referenced by Set().


The documentation for this struct was generated from the following files: