OpenTTD Source  20240919-master-gdf0233f4c2
labelmaps_sl.cpp File Reference
#include "../stdafx.h"
#include "saveload.h"
#include "compat/labelmaps_sl_compat.h"
#include "saveload_internal.h"
#include "../station_map.h"
#include "../tunnelbridge_map.h"
#include "../safeguards.h"

Go to the source code of this file.

Data Structures

struct  LabelObject
 Container for a label for SaveLoad system. More...
 
struct  RAILChunkHandler
 

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 ()
 
const ChunkHandlerTable _labelmaps_chunk_handlers (labelmaps_chunk_handlers)
 

Variables

static std::vector< RailTypeLabel > _railtype_list
 
static const SaveLoad _label_object_desc []
 
static const RAILChunkHandler RAIL
 
static const ChunkHandlerRef 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 28 of file labelmaps_sl.cpp.

Variable Documentation

◆ _label_object_desc

const SaveLoad _label_object_desc[]
static
Initial value:
= {
SLE_VAR(LabelObject, label, SLE_UINT32),
}

Definition at line 98 of file labelmaps_sl.cpp.

◆ labelmaps_chunk_handlers

const ChunkHandlerRef labelmaps_chunk_handlers[]
static
Initial value:
= {
RAIL,
}

Definition at line 135 of file labelmaps_sl.cpp.

LabelObject
Container for a label for SaveLoad system.
Definition: labelmaps_sl.cpp:94
SLE_VAR
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition: saveload.h:971