OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions | Data Fields
FileToSaveLoad Struct Reference

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

`#include <saveload.h>`

## Public Member Functions
void | SetMode (FiosType ft)
| Set the mode and file type of the file to save or load based on the type of file entry at the file system.
void | SetMode (SaveLoadOperation fop, AbstractFileType aft, DetailedFileType dft)
| Set the mode and file type of the file to save or load.
void | SetName (const char *name)
| Set the name of the file.
void | SetTitle (const char *title)
| Set the title of the file.

## Data Fields
SaveLoadOperation | file_op
| File operation to perform.
DetailedFileType | detail_ftype
| Concrete file type (PNG, BMP, old save, etc).
AbstractFileType | abstract_ftype
| Abstract type of file (scenario, heightmap, etc).
char | name [MAX_PATH]
| Name of the file.
char | title [255]
| Internal name of the game.

## Detailed Description

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

Definition at line 26 of file saveload.h.

## Member Function Documentation

void FileToSaveLoad::SetMode | ( | FiosType | ft | ) |

Set the mode and file type of the file to save or load based on the type of file entry at the file system.

Parameters

  ft | Type of file entry of the file system.

Definition at line 2918 of file saveload.cpp.

References GetAbstractFileType(), GetDetailedFileType(), and SLO_LOAD.

Referenced by SaveLoadWindow::OnClick(), and openttd_main().

void FileToSaveLoad::SetMode | ( | SaveLoadOperation | fop,
|  | AbstractFileType | aft,
|  | DetailedFileType | dft
| ) |  |

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

Parameters

  fop | File operation being performed.
  aft | Abstract file type.
  dft | Detailed file type.

Definition at line 2929 of file saveload.cpp.

References abstract_ftype, detail_ftype, DFT_INVALID, file_op, FT_INVALID, FT_NONE, and SLO_INVALID.

void FileToSaveLoad::SetName | ( | const char * | name | ) |

Set the name of the file.

Parameters

  name | Name of the file.

Definition at line 2947 of file saveload.cpp.

References lastof, and strecpy().

Referenced by SaveLoadWindow::OnClick(), and openttd_main().

void FileToSaveLoad::SetTitle | ( | const char * | title | ) |

Set the title of the file.

Parameters

  title | Title of the file.

Definition at line 2956 of file saveload.cpp.

References lastof, and strecpy().

Referenced by SaveLoadWindow::OnClick().

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

- src/saveload/saveload.h
- src/saveload/saveload.cpp