OpenTTD Source 20260109-master-g241b5fcdfe
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 <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
10#ifndef ROADTYPES_H
11#define ROADTYPES_H
12
13#include "table/strings.h"
14
19 /* Road */
20 {
21 /* GUI sprites */
22 {
23 SPR_IMG_ROAD_X_DIR,
24 SPR_IMG_ROAD_Y_DIR,
25 SPR_IMG_AUTOROAD,
26 SPR_IMG_ROAD_DEPOT,
27 SPR_IMG_ROAD_TUNNEL,
28 SPR_IMG_CONVERT_ROAD,
29 },
30
31 {
32 SPR_CURSOR_ROAD_NESW,
33 SPR_CURSOR_ROAD_NWSE,
34 SPR_CURSOR_AUTOROAD,
35 SPR_CURSOR_ROAD_DEPOT,
36 SPR_CURSOR_ROAD_TUNNEL,
37 SPR_CURSOR_CONVERT_ROAD,
38 },
39
40 /* strings */
41 {
42 STR_ROAD_NAME_ROAD,
43 STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION,
44 STR_ROAD_MENU_ROAD_CONSTRUCTION,
45 STR_BUY_VEHICLE_ROAD_VEHICLE_CAPTION,
46 STR_REPLACE_ROAD_VEHICLES,
47 STR_ENGINE_PREVIEW_ROAD_VEHICLE,
48
49 STR_ERROR_CAN_T_BUILD_ROAD_HERE,
50 STR_ERROR_CAN_T_REMOVE_ROAD_FROM,
51 STR_ERROR_CAN_T_BUILD_ROAD_DEPOT,
52 { STR_ERROR_CAN_T_BUILD_BUS_STATION, STR_ERROR_CAN_T_BUILD_TRUCK_STATION },
53 { STR_ERROR_CAN_T_REMOVE_BUS_STATION, STR_ERROR_CAN_T_REMOVE_TRUCK_STATION },
54 STR_ERROR_CAN_T_CONVERT_ROAD,
55 { STR_STATION_BUILD_BUS_ORIENTATION, STR_STATION_BUILD_TRUCK_ORIENTATION },
56 { STR_STATION_BUILD_BUS_ORIENTATION_TOOLTIP, STR_STATION_BUILD_TRUCK_ORIENTATION_TOOLTIP },
57 },
58
59 /* Powered roadtypes */
61
62 /* flags */
64
65 /* cost multiplier */
66 8,
67
68 /* maintenance cost multiplier */
69 16,
70
71 /* max speed */
72 0,
73
74 /* road type label */
75 ROADTYPE_LABEL_ROAD,
76
77 /* alternate labels */
78 {},
79
80 /* map colour */
82
83 /* introduction date */
85
86 /* roadtypes required for this to be introduced */
87 {},
88
89 /* introduction road types */
91
92 /* sort order */
93 0x07,
94
95 { nullptr },
96 { nullptr },
97 {},
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 */
159 {},
160
161 /* map colour */
162 PC_BLACK,
163
164 /* introduction date */
166
167 /* roadtypes required for this to be introduced */
168 {},
169
170 /* introduction road types */
172
173 /* sort order */
174 0x17,
175
176 { nullptr },
177 { nullptr },
178 {},
179 },
180};
181
182#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.
static constexpr PixelColour PC_BLACK
Black palette colour.
@ 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.
@ ROADTYPE_TRAM
Trams.
Definition road_type.h:26
@ ROADTYPE_ROAD
Basic road type.
Definition road_type.h:25
static const RoadTypeInfo _original_roadtypes[]
Global Roadtype definition.
Definition roadtypes.h:18