OpenTTD Source: src/saveload/labelmaps_sl.cpp File Reference

OpenTTD Source 1.11.0-RC1

Data Structures | Functions | Variables
labelmaps_sl.cpp File Reference
`#include "../stdafx.h"`
`#include "../station_map.h"`
`#include "../tunnelbridge_map.h"`
`#include "saveload.h"`
`#include "saveload_internal.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. More...
void | AfterLoadLabelMaps ()
void | ResetLabelMaps ()
static void | Save_RAIL ()
static void | Load_RAIL ()

## Variables
static std::vector< RailTypeLabel > | _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

## ◆ NeedRailTypeConversion()

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 26 of file labelmaps_sl.cpp.

## Variable Documentation

## ◆ _label_object_desc

const SaveLoad _label_object_desc[]
| static

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

Definition at line 96 of file labelmaps_sl.cpp.

## ◆ _labelmaps_chunk_handlers

const ChunkHandler _labelmaps_chunk_handlers[]

Initial value:
= {
{ 'RAIL', Save_RAIL, Load_RAIL, nullptr, nullptr, CH_ARRAY | CH_LAST},
}
CH_LAST
@ CH_LAST
Last chunk in this array.
Definition: saveload.h:410
LabelObject
Container for a label for SaveLoad system.
Definition: labelmaps_sl.cpp:92
SLE_END
#define SLE_END()
End marker of a struct/class save or load.
Definition: saveload.h:686
SLE_VAR
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition: saveload.h:621