Update readme.md
[openttd-joker.git] / src / goal_type.h
blob6e7d978b9cb8d3eebbeafd6a28eacc6318b5b52f
1 /* $Id: goal_type.h 26012 2013-11-16 17:41:57Z zuu $ */
3 /*
4 * This file is part of OpenTTD.
5 * 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.
6 * 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.
7 * 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/>.
8 */
10 /** @file goal_type.h basic types related to goals */
12 #ifndef GOAL_TYPE_H
13 #define GOAL_TYPE_H
15 #include "core/enum_type.hpp"
17 static const uint32 GOAL_QUESTION_BUTTON_COUNT = 18; ///< Amount of buttons available.
18 static const byte GOAL_QUESTION_TYPE_COUNT = 4; ///< Amount of question types.
20 /** Types of goal destinations */
21 enum GoalType {
22 GT_NONE, ///< Destination is not linked
23 GT_TILE, ///< Destination is a tile
24 GT_INDUSTRY, ///< Destination is an industry
25 GT_TOWN, ///< Destination is a town
26 GT_COMPANY, ///< Destination is a company
27 GT_STORY_PAGE, ///< Destination is a story page
29 typedef SimpleTinyEnumT<GoalType, byte> GoalTypeByte; ///< The GoalType packed into a byte for savegame purposes.
31 typedef uint32 GoalTypeID; ///< Contains either tile, industry ID, town ID or company ID (or INVALID_GOALTYPE)
32 static const GoalTypeID INVALID_GOALTYPE = 0xFFFFFFFF; ///< Invalid/unknown index of GoalType
34 typedef uint16 GoalID; ///< ID of a goal
35 struct Goal;
37 extern GoalID _new_goal_id;
39 #endif /* GOAL_TYPE_H */