OpenTTD Source 20241224-master-gf74b0cf984
goal_type.h File Reference

basic types related to goals More...

#include "core/enum_type.hpp"

Go to the source code of this file.

Typedefs

typedef uint32_t GoalTypeID
 Contains either tile, industry ID, town ID, company ID, or story page ID.
 
typedef uint16_t GoalID
 ID of a goal.
 

Enumerations

enum  GoalQuestionType : uint8_t {
  GQT_QUESTION = 0 , GQT_INFORMATION = 1 , GQT_WARNING = 2 , GQT_ERROR = 3 ,
  GQT_END = 4
}
 
enum  GoalType : uint8_t {
  GT_NONE , GT_TILE , GT_INDUSTRY , GT_TOWN ,
  GT_COMPANY , GT_STORY_PAGE
}
 Types of goal destinations. More...
 

Variables

static const uint32_t GOAL_QUESTION_BUTTON_COUNT = 18
 Amount of buttons available.
 
static const GoalID INVALID_GOAL = 0xFFFF
 Constant representing a non-existing goal.
 

Detailed Description

basic types related to goals

Definition in file goal_type.h.

Typedef Documentation

◆ GoalID

typedef uint16_t GoalID

ID of a goal.

Definition at line 37 of file goal_type.h.

◆ GoalTypeID

typedef uint32_t GoalTypeID

Contains either tile, industry ID, town ID, company ID, or story page ID.

Definition at line 35 of file goal_type.h.

Enumeration Type Documentation

◆ GoalQuestionType

enum GoalQuestionType : uint8_t

Definition at line 17 of file goal_type.h.

◆ GoalType

enum GoalType : uint8_t

Types of goal destinations.

Enumerator
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.

Definition at line 26 of file goal_type.h.

Variable Documentation

◆ GOAL_QUESTION_BUTTON_COUNT

const uint32_t GOAL_QUESTION_BUTTON_COUNT = 18
static

Amount of buttons available.

Definition at line 15 of file goal_type.h.

Referenced by CmdGoalQuestion(), and CmdGoalQuestionAnswer().

◆ INVALID_GOAL

const GoalID INVALID_GOAL = 0xFFFF
static

Constant representing a non-existing goal.

Definition at line 39 of file goal_type.h.

Referenced by CmdCreateGoal().