OpenTTD Source  20241108-master-g80f628063a
roadtypes.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 <http://www.gnu.org/licenses/>.
6  */
7 
13 #ifndef ROADTYPES_H
14 #define ROADTYPES_H
15 
20  /* Road */
21  {
22  /* GUI sprites */
23  {
24  SPR_IMG_ROAD_X_DIR,
25  SPR_IMG_ROAD_Y_DIR,
26  SPR_IMG_AUTOROAD,
27  SPR_IMG_ROAD_DEPOT,
28  SPR_IMG_ROAD_TUNNEL,
29  SPR_IMG_CONVERT_ROAD,
30  },
31 
32  {
33  SPR_CURSOR_ROAD_NESW,
34  SPR_CURSOR_ROAD_NWSE,
35  SPR_CURSOR_AUTOROAD,
36  SPR_CURSOR_ROAD_DEPOT,
37  SPR_CURSOR_ROAD_TUNNEL,
38  SPR_CURSOR_CONVERT_ROAD,
39  },
40 
41  /* strings */
42  {
43  STR_ROAD_NAME_ROAD,
44  STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION,
45  STR_ROAD_MENU_ROAD_CONSTRUCTION,
46  STR_BUY_VEHICLE_ROAD_VEHICLE_CAPTION,
47  STR_REPLACE_ROAD_VEHICLES,
48  STR_ENGINE_PREVIEW_ROAD_VEHICLE,
49 
50  STR_ERROR_CAN_T_BUILD_ROAD_HERE,
51  STR_ERROR_CAN_T_REMOVE_ROAD_FROM,
52  STR_ERROR_CAN_T_BUILD_ROAD_DEPOT,
53  { STR_ERROR_CAN_T_BUILD_BUS_STATION, STR_ERROR_CAN_T_BUILD_TRUCK_STATION },
54  { STR_ERROR_CAN_T_REMOVE_BUS_STATION, STR_ERROR_CAN_T_REMOVE_TRUCK_STATION },
55  STR_ERROR_CAN_T_CONVERT_ROAD,
56  { STR_STATION_BUILD_BUS_ORIENTATION, STR_STATION_BUILD_TRUCK_ORIENTATION },
57  { STR_STATION_BUILD_BUS_ORIENTATION_TOOLTIP, STR_STATION_BUILD_TRUCK_ORIENTATION_TOOLTIP },
58  },
59 
60  /* Powered roadtypes */
62 
63  /* flags */
65 
66  /* cost multiplier */
67  8,
68 
69  /* maintenance cost multiplier */
70  16,
71 
72  /* max speed */
73  0,
74 
75  /* road type label */
76  ROADTYPE_LABEL_ROAD,
77 
78  /* alternate labels */
80 
81  /* map colour */
82  0x01,
83 
84  /* introduction date */
86 
87  /* roadtypes required for this to be introduced */
89 
90  /* introduction road types */
92 
93  /* sort order */
94  0x07,
95 
96  { nullptr },
97  { nullptr },
98  },
99 
100  /* Electrified Tram */
101  {
102  /* GUI sprites */
103  {
104  SPR_IMG_TRAMWAY_X_DIR,
105  SPR_IMG_TRAMWAY_Y_DIR,
106  SPR_IMG_AUTOTRAM,
107  SPR_IMG_ROAD_DEPOT,
108  SPR_IMG_ROAD_TUNNEL,
109  SPR_IMG_CONVERT_TRAM,
110  },
111 
112  {
113  SPR_CURSOR_TRAMWAY_NESW,
114  SPR_CURSOR_TRAMWAY_NWSE,
115  SPR_CURSOR_AUTOTRAM,
116  SPR_CURSOR_ROAD_DEPOT,
117  SPR_CURSOR_ROAD_TUNNEL,
118  SPR_CURSOR_CONVERT_TRAM,
119  },
120 
121  /* strings */
122  {
123  STR_ROAD_NAME_TRAM,
124  STR_ROAD_TOOLBAR_TRAM_CONSTRUCTION_CAPTION,
125  STR_ROAD_MENU_TRAM_CONSTRUCTION,
126  STR_BUY_VEHICLE_TRAM_VEHICLE_CAPTION,
127  STR_REPLACE_TRAM_VEHICLES,
128  STR_ENGINE_PREVIEW_TRAM_VEHICLE,
129 
130  STR_ERROR_CAN_T_BUILD_TRAMWAY_HERE,
131  STR_ERROR_CAN_T_REMOVE_TRAMWAY_FROM,
132  STR_ERROR_CAN_T_BUILD_TRAM_DEPOT,
133  { STR_ERROR_CAN_T_BUILD_PASSENGER_TRAM_STATION, STR_ERROR_CAN_T_BUILD_CARGO_TRAM_STATION },
134  { STR_ERROR_CAN_T_REMOVE_PASSENGER_TRAM_STATION, STR_ERROR_CAN_T_REMOVE_CARGO_TRAM_STATION },
135  STR_ERROR_CAN_T_CONVERT_TRAMWAY,
136  { STR_STATION_BUILD_PASSENGER_TRAM_ORIENTATION, STR_STATION_BUILD_CARGO_TRAM_ORIENTATION },
137  { STR_STATION_BUILD_PASSENGER_TRAM_ORIENTATION_TOOLTIP, STR_STATION_BUILD_CARGO_TRAM_ORIENTATION_TOOLTIP },
138  },
139 
140  /* Powered roadtypes */
142 
143  /* flags */
145 
146  /* cost multiplier */
147  16,
148 
149  /* maintenance cost multiplier */
150  24,
151 
152  /* max speed */
153  0,
154 
155  /* road type label */
156  ROADTYPE_LABEL_TRAM,
157 
158  /* alternate labels */
160 
161  /* map colour */
162  0x01,
163 
164  /* introduction date */
166 
167  /* roadtypes required for this to be introduced */
169 
170  /* introduction road types */
172 
173  /* sort order */
174  0x17,
175 
176  { nullptr },
177  { nullptr },
178  },
179 };
180 
181 #endif /* ROADTYPES_H */
static constexpr TimerGame< struct Calendar >::Date MIN_DATE
The date on January 1, year 0.
static constexpr TimerGame< struct Calendar >::Date INVALID_DATE
Representation of an invalid date.
@ ROTFB_NO_HOUSES
Value for for setting this roadtype as not house friendly.
Definition: road.h:50
@ ROTFB_CATENARY
Value for drawing a catenary.
Definition: road.h:48
@ ROTFB_TOWN_BUILD
Value for allowing towns to build this roadtype.
Definition: road.h:52
std::vector< RoadTypeLabel > RoadTypeLabelList
List of road type labels.
Definition: road.h:76
@ ROADTYPES_TRAM
Trams.
Definition: road_type.h:41
@ ROADTYPES_ROAD
Road.
Definition: road_type.h:40
@ ROADTYPES_NONE
No roadtypes.
Definition: road_type.h:39
static const RoadTypeInfo _original_roadtypes[]
Global Roadtype definition.
Definition: roadtypes.h:19