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

OpenTTD Source 14.0-RC3

Data Structures | Functions | Variables
league_sl.cpp File Reference
`#include "../stdafx.h"`
`#include "saveload.h"`
`#include "../league_base.h"`
`#include "../safeguards.h"`

Go to the source code of this file.

## Data Structures
struct | LEAEChunkHandler
struct | LEATChunkHandler

## Functions
const ChunkHandlerTable | _league_chunk_handlers (league_chunk_handlers)

## Variables
static const SaveLoad | _league_table_elements_desc []
static const SaveLoad | _league_tables_desc []
static const LEAEChunkHandler | LEAE
static const LEATChunkHandler | LEAT
static const ChunkHandlerRef | league_chunk_handlers []

## Detailed Description

Code handling saving and loading of league tables

Definition in file league_sl.cpp.

## Variable Documentation

## ◆ _league_table_elements_desc

const SaveLoad _league_table_elements_desc[]
| static

Initial value:
= {
SLE_VAR(LeagueTableElement, table, SLE_UINT8),
SLE_CONDVAR(LeagueTableElement, rating, SLE_FILE_U64 | SLE_VAR_I64, SL_MIN_VERSION, SLV_LINKGRAPH_EDGES),
SLE_CONDVAR(LeagueTableElement, rating, SLE_INT64, SLV_LINKGRAPH_EDGES, SL_MAX_VERSION),
SLE_VAR(LeagueTableElement, company, SLE_UINT8),
SLE_SSTR(LeagueTableElement, text, SLE_STR | SLF_ALLOW_CONTROL),
SLE_SSTR(LeagueTableElement, score, SLE_STR | SLF_ALLOW_CONTROL),
SLE_VAR(LeagueTableElement, link.type, SLE_UINT8),
SLE_VAR(LeagueTableElement, link.target, SLE_UINT32),
}

Definition at line 18 of file league_sl.cpp.

## ◆ _league_tables_desc

const SaveLoad _league_tables_desc[]
| static

Initial value:
= {
SLE_SSTR(LeagueTable, title, SLE_STR | SLF_ALLOW_CONTROL),
SLE_SSTR(LeagueTable, header, SLE_STR | SLF_ALLOW_CONTROL),
SLE_SSTR(LeagueTable, footer, SLE_STR | SLF_ALLOW_CONTROL),
}

Definition at line 54 of file league_sl.cpp.

## ◆ league_chunk_handlers

const ChunkHandlerRef league_chunk_handlers[]
| static

Initial value:
= {
LEAE,
LEAT,
}

Definition at line 87 of file league_sl.cpp.

LeagueTableElement
Struct about league table elements.
Definition: league_base.h:31
SL_MIN_VERSION
@ SL_MIN_VERSION
First savegame version.
Definition: saveload.h:31
SLE_CONDVAR
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition: saveload.h:848
LeagueTable
Struct about custom league tables.
Definition: league_base.h:52
SLF_ALLOW_CONTROL
@ SLF_ALLOW_CONTROL
Allow control codes in the strings.
Definition: saveload.h:670
SL_MAX_VERSION
@ SL_MAX_VERSION
Highest possible saveload version.
Definition: saveload.h:382
SLE_VAR
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition: saveload.h:952
SLE_SSTR
#define SLE_SSTR(base, variable, type)
Storage of a std::string in every savegame version.
Definition: saveload.h:996
SLV_LINKGRAPH_EDGES
@ SLV_LINKGRAPH_EDGES
304 PR#10314 Explicitly store link graph edges destination, PR#10471 int64_t instead of uint64_t leag...
Definition: saveload.h:344