OpenTTD: src/saveload/labelmaps_sl.cpp File Reference

OpenTTD

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

- File List
- Globals

Data Structures | Functions | Variables
labelmaps_sl.cpp File Reference

Code handling saving and loading of rail type label mappings. More...

`#include "../stdafx.h"`
`#include "../station_map.h"`
`#include "../tunnelbridge_map.h"`
`#include "saveload.h"`
`#include "../safeguards.h"`

Go to the source code of this file.

## Data Structures
struct | LabelObject
| Container for a label for SaveLoad system. More...

## Functions
static bool | NeedRailTypeConversion ()
| Test if any saved rail type labels are different to the currently loaded rail types, which therefore requires conversion.
void | AfterLoadLabelMaps ()
static void | Save_RAIL ()
static void | Load_RAIL ()

## Variables
static SmallVector < RailTypeLabel, RAILTYPE_END > | _railtype_list
static const SaveLoad | _label_object_desc []
const ChunkHandler | _labelmaps_chunk_handlers []

## Detailed Description

Code handling saving and loading of rail type label mappings.

Definition in file labelmaps_sl.cpp.

## Function Documentation

static bool NeedRailTypeConversion | ( |  | ) |
| static

Test if any saved rail type labels are different to the currently loaded rail types, which therefore requires conversion.

Returns
  true if (and only if) conversion due to rail type changes is needed.

Definition at line 27 of file labelmaps_sl.cpp.

References GetRailTypeInfo(), RailtypeInfo::label, SmallVector< T, S >::Length(), and RAILTYPE_END.

## Variable Documentation

const SaveLoad _label_object_desc[]
| static

Initial value:
{
SLE_VAR(LabelObject, label, SLE_UINT32),
SLE_END(),
}

Definition at line 92 of file labelmaps_sl.cpp.

const ChunkHandler _labelmaps_chunk_handlers[]

Initial value:
{
{ 'RAIL', Save_RAIL, Load_RAIL, NULL, NULL, CH_ARRAY | CH_LAST},
}