OpenTTD Source: SaveLoadCompat Struct Reference

OpenTTD Source 15.3

Data Fields
SaveLoadCompat Struct Reference

SaveLoad information for backwards compatibility. More...

`#include <saveload.h>`

## Data Fields
std::string | name
| Name of the field.
VarTypes | null_type
| The type associated with the NULL field; defaults to SLE_FILE_U8 to just count bytes.
uint16_t | null_length
| Length of the NULL field.
SaveLoadVersion | version_from
| Save/load the variable starting from this savegame version.
SaveLoadVersion | version_to
| Save/load the variable before this savegame version.

## Detailed Description

SaveLoad information for backwards compatibility.

At SLV_SETTINGS_NAME a new method of keeping track of fields in a savegame was added, where the order of fields is no longer important. For older savegames we still need to know the correct order. This struct is the glue to make that happen.

Definition at line 752 of file saveload.h.

## Field Documentation

## ◆ name

std::string SaveLoadCompat::name

Name of the field.

Definition at line 753 of file saveload.h.

## ◆ null_length

uint16_t SaveLoadCompat::null_length

Length of the NULL field.

Definition at line 755 of file saveload.h.

## ◆ null_type

VarTypes SaveLoadCompat::null_type

The type associated with the NULL field; defaults to SLE_FILE_U8 to just count bytes.

Definition at line 754 of file saveload.h.

## ◆ version_from

SaveLoadVersion SaveLoadCompat::version_from

Save/load the variable starting from this savegame version.

Definition at line 756 of file saveload.h.

## ◆ version_to

SaveLoadVersion SaveLoadCompat::version_to

Save/load the variable before this savegame version.

Definition at line 757 of file saveload.h.

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

- src/saveload/saveload.h