OpenTTD Source 20260621-master-g720d10536d
league_type.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 <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
9
10#ifndef LEAGUE_TYPE_H
11#define LEAGUE_TYPE_H
12
13#include "core/pool_type.hpp"
14
16enum class LinkType : uint8_t {
17 None = 0,
18 Tile = 1,
20 Town = 3,
21 Company = 4,
23};
24
25typedef uint32_t LinkTargetID;
26
27struct Link {
29 LinkTargetID target = 0;
30
31 Link() {}
32 Link(LinkType type, LinkTargetID target) : type{type}, target{target} {}
33};
34
36struct LeagueTable;
37
40
41#endif /* LEAGUE_TYPE_H */
Wrapper class to abstract away the way the tiles are stored.
Definition map_func.h:25
LinkType
Types of the possible link targets.
Definition league_type.h:16
@ None
No link.
Definition league_type.h:17
uint32_t LinkTargetID
Contains either tile, industry ID, town ID, story page ID or company ID.
Definition league_type.h:25
PoolID< uint16_t, struct LeagueTableElementIDTag, 64000, 0xFFFF > LeagueTableElementID
ID of a league table.
Definition league_type.h:38
PoolID< uint8_t, struct LeagueTableIDTag, 255, 0xFF > LeagueTableID
ID of a league table.
Definition league_type.h:35
Definition of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle,...
Defines the internal data of a functional industry.
Definition industry.h:64
Struct about league table elements.
Definition league_base.h:32
Struct about custom league tables.
Definition league_base.h:52
Templated helper to make a PoolID a single POD value.
Definition pool_type.hpp:50
Struct about stories, current and completed.
Definition story_base.h:162
Town data structure.
Definition town.h:64