Skip to content

Commit

Permalink
Codechange: Remove GoalTypeByte
Browse files Browse the repository at this point in the history
  • Loading branch information
LordAro authored and PeterN committed Apr 29, 2019
1 parent 327ff89 commit a5681d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/goal_base.h
Expand Up @@ -22,7 +22,7 @@ extern GoalPool _goal_pool;
/** Struct about goals, current and completed */
struct Goal : GoalPool::PoolItem<&_goal_pool> {
CompanyID company; ///< Goal is for a specific company; INVALID_COMPANY if it is global
GoalTypeByte type; ///< Type of the goal
GoalType type; ///< Type of the goal
GoalTypeID dst; ///< Index of type
char *text; ///< Text of the goal.
char *progress; ///< Progress text of the goal.
Expand Down
3 changes: 1 addition & 2 deletions src/goal_type.h
Expand Up @@ -18,15 +18,14 @@ static const uint32 GOAL_QUESTION_BUTTON_COUNT = 18; ///< Amount of buttons avai
static const byte GOAL_QUESTION_TYPE_COUNT = 4; ///< Amount of question types.

/** Types of goal destinations */
enum GoalType {
enum GoalType : byte {
GT_NONE, ///< Destination is not linked
GT_TILE, ///< Destination is a tile
GT_INDUSTRY, ///< Destination is an industry
GT_TOWN, ///< Destination is a town
GT_COMPANY, ///< Destination is a company
GT_STORY_PAGE, ///< Destination is a story page
};
typedef SimpleTinyEnumT<GoalType, byte> GoalTypeByte; ///< The GoalType packed into a byte for savegame purposes.

typedef uint32 GoalTypeID; ///< Contains either tile, industry ID, town ID or company ID (or INVALID_GOALTYPE)
static const GoalTypeID INVALID_GOALTYPE = 0xFFFFFFFF; ///< Invalid/unknown index of GoalType
Expand Down

0 comments on commit a5681d3

Please sign in to comment.