OpenTTD Source 20250312-master-gcdcc6b491d
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
101 /* Electrified Tram */
102 {
103 /* GUI sprites */
104 {
105 SPR_IMG_TRAMWAY_X_DIR,
106 SPR_IMG_TRAMWAY_Y_DIR,
107 SPR_IMG_AUTOTRAM,
108 SPR_IMG_ROAD_DEPOT,
109 SPR_IMG_ROAD_TUNNEL,
110 SPR_IMG_CONVERT_TRAM,
111 },
112
113 {
114 SPR_CURSOR_TRAMWAY_NESW,
115 SPR_CURSOR_TRAMWAY_NWSE,
116 SPR_CURSOR_AUTOTRAM,
117 SPR_CURSOR_ROAD_DEPOT,
118 SPR_CURSOR_ROAD_TUNNEL,
119 SPR_CURSOR_CONVERT_TRAM,
120 },
121
122 /* strings */
123 {
124 STR_ROAD_NAME_TRAM,
125 STR_ROAD_TOOLBAR_TRAM_CONSTRUCTION_CAPTION,
126 STR_ROAD_MENU_TRAM_CONSTRUCTION,
127 STR_BUY_VEHICLE_TRAM_VEHICLE_CAPTION,
128 STR_REPLACE_TRAM_VEHICLES,
129 STR_ENGINE_PREVIEW_TRAM_VEHICLE,
130
131 STR_ERROR_CAN_T_BUILD_TRAMWAY_HERE,
132 STR_ERROR_CAN_T_REMOVE_TRAMWAY_FROM,
133 STR_ERROR_CAN_T_BUILD_TRAM_DEPOT,
134 { STR_ERROR_CAN_T_BUILD_PASSENGER_TRAM_STATION, STR_ERROR_CAN_T_BUILD_CARGO_TRAM_STATION },
135 { STR_ERROR_CAN_T_REMOVE_PASSENGER_TRAM_STATION, STR_ERROR_CAN_T_REMOVE_CARGO_TRAM_STATION },
136 STR_ERROR_CAN_T_CONVERT_TRAMWAY,
137 { STR_STATION_BUILD_PASSENGER_TRAM_ORIENTATION, STR_STATION_BUILD_CARGO_TRAM_ORIENTATION },
138 { STR_STATION_BUILD_PASSENGER_TRAM_ORIENTATION_TOOLTIP, STR_STATION_BUILD_CARGO_TRAM_ORIENTATION_TOOLTIP },
139 },
140
141 /* Powered roadtypes */
143
144 /* flags */
146
147 /* cost multiplier */
148 16,
149
150 /* maintenance cost multiplier */
151 24,
152
153 /* max speed */
154 0,
155
156 /* road type label */
157 ROADTYPE_LABEL_TRAM,
158
159 /* alternate labels */
161
162 /* map colour */
163 0x01,
164
165 /* introduction date */
167
168 /* roadtypes required for this to be introduced */
170
171 /* introduction road types */
173
174 /* sort order */
175 0x17,
176
177 { nullptr },
178 { nullptr },
179 {},
180 },
181};
182
183#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.
@ Catenary
Bit number for adding catenary.
@ NoHouses
Bit number for setting this roadtype as not house friendly.
@ TownBuild
Bit number for allowing towns to build this roadtype.
std::vector< RoadTypeLabel > RoadTypeLabelList
List of road type labels.
Definition road.h:67
@ 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