OpenTTD Source: src/goal_type.h Source File

OpenTTD Source 15.0-RC2

goal_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
10#ifndef GOAL_TYPE_H
11#define GOAL_TYPE_H
12
13#include "core/pool_type.hpp"
14
15 static const uint32_t GOAL_QUESTION_BUTTON_COUNT = 18;
16
17enum GoalQuestionType : uint8_t {
18 GQT_QUESTION = 0,
19 GQT_INFORMATION = 1,
20 GQT_WARNING = 2,
21 GQT_ERROR = 3,
22 GQT_END = 4,
23};
24
26 enum GoalType : uint8_t {
27 GT_NONE,
28 GT_TILE,
29 GT_INDUSTRY,
30 GT_TOWN,
31 GT_COMPANY,
32 GT_STORY_PAGE,
33};
34
35 typedef uint32_t GoalTypeID;
36
38 using GoalID = PoolID<uint16_t, struct GoalIDTag, 64000, 0xFFFF>;
39
40struct Goal;
41
42#endif /* GOAL_TYPE_H */
GoalType
GoalType
Types of goal destinations.
Definition goal_type.h:26
GT_INDUSTRY
@ GT_INDUSTRY
Destination is an industry.
Definition goal_type.h:29
GT_STORY_PAGE
@ GT_STORY_PAGE
Destination is a story page.
Definition goal_type.h:32
GT_COMPANY
@ GT_COMPANY
Destination is a company.
Definition goal_type.h:31
GT_NONE
@ GT_NONE
Destination is not linked.
Definition goal_type.h:27
GT_TILE
@ GT_TILE
Destination is a tile.
Definition goal_type.h:28
GT_TOWN
@ GT_TOWN
Destination is a town.
Definition goal_type.h:30
GoalTypeID
uint32_t GoalTypeID
Contains either tile, industry ID, town ID, company ID, or story page ID.
Definition goal_type.h:35
GOAL_QUESTION_BUTTON_COUNT
static const uint32_t GOAL_QUESTION_BUTTON_COUNT
Amount of buttons available.
Definition goal_type.h:15
pool_type.hpp
Definition of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle,...
Goal
Struct about goals, current and completed.
Definition goal_base.h:22
PoolID
Templated helper to make a PoolID a single POD value.
Definition pool_type.hpp:43