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"

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

const ChunkHandler _labelmaps_chunk_handlers[]
Initial value:
 {
  { 'RAIL', Save_RAIL, Load_RAIL, NULL, NULL, CH_ARRAY | CH_LAST},
}

Generated on Thu Jan 20 22:57:51 2011 for OpenTTD by  doxygen 1.6.1