OpenTTD Source 20250523-master-g321f7e8683
league_base.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6 */
7
10#ifndef LEAGUE_BASE_H
11#define LEAGUE_BASE_H
12
13#include "company_type.h"
14#include "goal_type.h"
15#include "league_type.h"
16#include "core/pool_type.hpp"
17#include "strings_type.h"
18
19bool IsValidLink(Link link);
20
22extern LeagueTableElementPool _league_table_element_pool;
23
25extern LeagueTablePool _league_table_pool;
26
27
52
53
71
72#endif /* LEAGUE_BASE_H */
Container for an encoded string, created by GetEncodedString.
Types related to companies.
basic types related to goals
bool IsValidLink(Link link)
Checks whether a link is valid, i.e.
basic types related to league tables
Definition of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle,...
Types related to strings.
Struct about league table elements.
Definition league_base.h:32
int64_t rating
Value that determines ordering of elements in the table (higher=better)
Definition league_base.h:34
~LeagueTableElement()
(Empty) destructor has to be defined else operator delete might be called with nullptr parameter
Definition league_base.h:50
EncodedString score
String representation of the score associated with the element.
Definition league_base.h:37
LeagueTableElement()
We need an (empty) constructor so struct isn't zeroed (as C++ standard states)
Definition league_base.h:43
Link link
What opens when element is clicked.
Definition league_base.h:38
EncodedString text
Text of the element.
Definition league_base.h:36
LeagueTableID table
Id of the table which this element belongs to.
Definition league_base.h:33
CompanyID company
Company Id to show the color blob for or CompanyID::Invalid()
Definition league_base.h:35
Struct about custom league tables.
Definition league_base.h:55
LeagueTable()
We need an (empty) constructor so struct isn't zeroed (as C++ standard states)
Definition league_base.h:63
EncodedString header
Text to show above the table.
Definition league_base.h:57
~LeagueTable()
(Empty) destructor has to be defined else operator delete might be called with nullptr parameter
Definition league_base.h:69
EncodedString title
Title of the table.
Definition league_base.h:56
EncodedString footer
Text to show below the table.
Definition league_base.h:58
Base class for all PoolItems.
Base class for all pools.