OpenTTD Source  20241108-master-g80f628063a
league_sl.cpp File Reference

Code handling saving and loading of league tables. More...

#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_VAR(LeagueTableElement, company, SLE_UINT8),
SLE_VAR(LeagueTableElement, link.type, SLE_UINT8),
SLE_VAR(LeagueTableElement, link.target, SLE_UINT32),
}
@ SLF_ALLOW_CONTROL
Allow control codes in the strings.
Definition: saveload.h:684
#define SLE_CONDVAR(base, variable, type, from, to)
Storage of a variable in some savegame versions.
Definition: saveload.h:861
#define SLE_SSTR(base, variable, type)
Storage of a std::string in every savegame version.
Definition: saveload.h:1019
@ 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
@ SL_MAX_VERSION
Highest possible saveload version.
Definition: saveload.h:395
@ SL_MIN_VERSION
First savegame version.
Definition: saveload.h:31
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition: saveload.h:975
Struct about league table elements.
Definition: league_base.h:31

Definition at line 18 of file league_sl.cpp.

◆ _league_tables_desc

const SaveLoad _league_tables_desc[]
static
Initial value:
= {
SLE_SSTR(LeagueTable, header, SLE_STR | SLF_ALLOW_CONTROL),
SLE_SSTR(LeagueTable, footer, SLE_STR | SLF_ALLOW_CONTROL),
}
Struct about custom league tables.
Definition: league_base.h:52

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.