OpenTTD
road_map.h
Go to the documentation of this file.
1 /* $Id$ */
2 
3 /*
4  * This file is part of OpenTTD.
5  * 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.
6  * 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.
7  * 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/>.
8  */
9 
12 #ifndef ROAD_MAP_H
13 #define ROAD_MAP_H
14 
15 #include "track_func.h"
16 #include "depot_type.h"
17 #include "rail_type.h"
18 #include "road_func.h"
19 #include "tile_map.h"
20 
21 
27 };
28 
34 static inline bool MayHaveRoad(TileIndex t)
35 {
36  switch (GetTileType(t)) {
37  case MP_ROAD:
38  case MP_STATION:
39  case MP_TUNNELBRIDGE:
40  return true;
41 
42  default:
43  return false;
44  }
45 }
46 
54 {
55  assert(IsTileType(t, MP_ROAD));
56  return (RoadTileType)GB(_m[t].m5, 6, 2);
57 }
58 
65 static inline bool IsNormalRoad(TileIndex t)
66 {
67  return GetRoadTileType(t) == ROAD_TILE_NORMAL;
68 }
69 
75 static inline bool IsNormalRoadTile(TileIndex t)
76 {
77  return IsTileType(t, MP_ROAD) && IsNormalRoad(t);
78 }
79 
86 static inline bool IsLevelCrossing(TileIndex t)
87 {
89 }
90 
96 static inline bool IsLevelCrossingTile(TileIndex t)
97 {
98  return IsTileType(t, MP_ROAD) && IsLevelCrossing(t);
99 }
100 
107 static inline bool IsRoadDepot(TileIndex t)
108 {
109  return GetRoadTileType(t) == ROAD_TILE_DEPOT;
110 }
111 
117 static inline bool IsRoadDepotTile(TileIndex t)
118 {
119  return IsTileType(t, MP_ROAD) && IsRoadDepot(t);
120 }
121 
129 static inline RoadBits GetRoadBits(TileIndex t, RoadTramType rtt)
130 {
131  assert(IsNormalRoad(t));
132  if (rtt == RTT_TRAM) return (RoadBits)GB(_m[t].m3, 0, 4);
133  return (RoadBits)GB(_m[t].m5, 0, 4);
134 }
135 
142 static inline RoadBits GetAllRoadBits(TileIndex tile)
143 {
144  return GetRoadBits(tile, RTT_ROAD) | GetRoadBits(tile, RTT_TRAM);
145 }
146 
154 static inline void SetRoadBits(TileIndex t, RoadBits r, RoadTramType rtt)
155 {
156  assert(IsNormalRoad(t)); // XXX incomplete
157  if (rtt == RTT_TRAM) {
158  SB(_m[t].m3, 0, 4, r);
159  } else {
160  SB(_m[t].m5, 0, 4, r);
161  }
162 }
163 
164 static inline RoadType GetRoadTypeRoad(TileIndex t)
165 {
166  assert(MayHaveRoad(t));
167  return (RoadType)GB(_m[t].m4, 0, 6);
168 }
169 
170 static inline RoadType GetRoadTypeTram(TileIndex t)
171 {
172  assert(MayHaveRoad(t));
173  return (RoadType)GB(_me[t].m8, 6, 6);
174 }
175 
176 static inline RoadType GetRoadType(TileIndex t, RoadTramType rtt)
177 {
178  return (rtt == RTT_TRAM) ? GetRoadTypeTram(t) : GetRoadTypeRoad(t);
179 }
180 
187 {
188  RoadTypes result = ROADTYPES_NONE;
189  if (MayHaveRoad(t)) {
190  if (GetRoadTypeRoad(t) != INVALID_ROADTYPE) SetBit(result, GetRoadTypeRoad(t));
191  if (GetRoadTypeTram(t) != INVALID_ROADTYPE) SetBit(result, GetRoadTypeTram(t));
192  }
193  return result;
194 }
195 
196 static inline bool HasRoadTypeRoad(TileIndex t)
197 {
198  return GetRoadTypeRoad(t) != INVALID_ROADTYPE;
199 }
200 
201 static inline bool HasRoadTypeTram(TileIndex t)
202 {
203  return GetRoadTypeTram(t) != INVALID_ROADTYPE;
204 }
205 
212 static inline bool HasTileRoadType(TileIndex t, RoadTramType rtt)
213 {
214  return GetRoadType(t, rtt) != INVALID_ROADTYPE;
215 }
216 
223 static inline bool HasTileAnyRoadType(TileIndex t, RoadTypes rts)
224 {
225  if (!MayHaveRoad(t)) return false;
226  return (GetPresentRoadTypes(t) & rts);
227 }
228 
235 static inline Owner GetRoadOwner(TileIndex t, RoadTramType rtt)
236 {
237  assert(MayHaveRoad(t));
238  if (rtt == RTT_ROAD) return (Owner)GB(IsNormalRoadTile(t) ? _m[t].m1 : _me[t].m7, 0, 5);
239 
240  /* Trams don't need OWNER_TOWN, and remapping OWNER_NONE
241  * to OWNER_TOWN makes it use one bit less */
242  Owner o = (Owner)GB(_m[t].m3, 4, 4);
243  return o == OWNER_TOWN ? OWNER_NONE : o;
244 }
245 
252 static inline void SetRoadOwner(TileIndex t, RoadTramType rtt, Owner o)
253 {
254  if (rtt == RTT_ROAD) {
255  SB(IsNormalRoadTile(t) ? _m[t].m1 : _me[t].m7, 0, 5, o);
256  } else {
257  SB(_m[t].m3, 4, 4, o == OWNER_NONE ? OWNER_TOWN : o);
258  }
259 }
260 
269 static inline bool IsRoadOwner(TileIndex t, RoadTramType rtt, Owner o)
270 {
271  assert(HasTileRoadType(t, rtt));
272  return (GetRoadOwner(t, rtt) == o);
273 }
274 
281 static inline bool HasTownOwnedRoad(TileIndex t)
282 {
283  return HasTileRoadType(t, RTT_ROAD) && IsRoadOwner(t, RTT_ROAD, OWNER_TOWN);
284 }
285 
293 };
297 
304 {
305  assert(IsNormalRoad(t));
306  return (DisallowedRoadDirections)GB(_m[t].m5, 4, 2);
307 }
308 
315 {
316  assert(IsNormalRoad(t));
317  assert(drd < DRD_END);
318  SB(_m[t].m5, 4, 2, drd);
319 }
320 
328 {
329  assert(IsLevelCrossing(t));
330  return (Axis)GB(_m[t].m5, 0, 1);
331 }
332 
340 {
341  assert(IsLevelCrossing(t));
342  return OtherAxis((Axis)GetCrossingRoadAxis(t));
343 }
344 
351 {
352  return GetCrossingRoadAxis(tile) == AXIS_X ? ROAD_X : ROAD_Y;
353 }
354 
361 {
362  return AxisToTrack(GetCrossingRailAxis(tile));
363 }
364 
371 {
372  return AxisToTrackBits(GetCrossingRailAxis(tile));
373 }
374 
375 
382 static inline bool HasCrossingReservation(TileIndex t)
383 {
384  assert(IsLevelCrossingTile(t));
385  return HasBit(_m[t].m5, 4);
386 }
387 
395 static inline void SetCrossingReservation(TileIndex t, bool b)
396 {
397  assert(IsLevelCrossingTile(t));
398  SB(_m[t].m5, 4, 1, b ? 1 : 0);
399 }
400 
408 {
410 }
411 
418 static inline bool IsCrossingBarred(TileIndex t)
419 {
420  assert(IsLevelCrossing(t));
421  return HasBit(_m[t].m5, 5);
422 }
423 
430 static inline void SetCrossingBarred(TileIndex t, bool barred)
431 {
432  assert(IsLevelCrossing(t));
433  SB(_m[t].m5, 5, 1, barred ? 1 : 0);
434 }
435 
440 static inline void UnbarCrossing(TileIndex t)
441 {
442  SetCrossingBarred(t, false);
443 }
444 
449 static inline void BarCrossing(TileIndex t)
450 {
451  SetCrossingBarred(t, true);
452 }
453 
455 #define IsOnDesert IsOnSnow
456 
461 static inline bool IsOnSnow(TileIndex t)
462 {
463  return HasBit(_me[t].m7, 5);
464 }
465 
467 #define ToggleDesert ToggleSnow
468 
472 static inline void ToggleSnow(TileIndex t)
473 {
474  ToggleBit(_me[t].m7, 5);
475 }
476 
477 
479 enum Roadside {
484  // 4 is unused for historical reasons
488 };
489 
495 static inline Roadside GetRoadside(TileIndex tile)
496 {
497  return (Roadside)GB(_me[tile].m6, 3, 3);
498 }
499 
505 static inline void SetRoadside(TileIndex tile, Roadside s)
506 {
507  SB(_me[tile].m6, 3, 3, s);
508 }
509 
515 static inline bool HasRoadWorks(TileIndex t)
516 {
518 }
519 
525 static inline bool IncreaseRoadWorksCounter(TileIndex t)
526 {
527  AB(_me[t].m7, 0, 4, 1);
528 
529  return GB(_me[t].m7, 0, 4) == 15;
530 }
531 
537 static inline void StartRoadWorks(TileIndex t)
538 {
539  assert(!HasRoadWorks(t));
540  /* Remove any trees or lamps in case or roadwork */
541  switch (GetRoadside(t)) {
542  case ROADSIDE_BARREN:
544  default: SetRoadside(t, ROADSIDE_PAVED_ROAD_WORKS); break;
545  }
546 }
547 
553 static inline void TerminateRoadWorks(TileIndex t)
554 {
555  assert(HasRoadWorks(t));
557  /* Stop the counter */
558  SB(_me[t].m7, 0, 4, 0);
559 }
560 
561 
568 {
569  assert(IsRoadDepot(t));
570  return (DiagDirection)GB(_m[t].m5, 0, 2);
571 }
572 
573 
574 RoadBits GetAnyRoadBits(TileIndex tile, RoadTramType rtt, bool straight_tunnel_bridge_entrance = false);
575 
581 static inline void SetRoadTypeRoad(TileIndex t, RoadType rt)
582 {
583  assert(MayHaveRoad(t));
584  assert(rt == INVALID_ROADTYPE || RoadTypeIsRoad(rt));
585  SB(_m[t].m4, 0, 6, rt);
586 }
587 
593 static inline void SetRoadTypeTram(TileIndex t, RoadType rt)
594 {
595  assert(MayHaveRoad(t));
596  assert(rt == INVALID_ROADTYPE || RoadTypeIsTram(rt));
597  SB(_me[t].m8, 6, 6, rt);
598 }
599 
606 static inline void SetRoadType(TileIndex t, RoadTramType rtt, RoadType rt)
607 {
608  if (rtt == RTT_TRAM) {
609  SetRoadTypeTram(t, rt);
610  } else {
611  SetRoadTypeRoad(t, rt);
612  }
613 }
614 
621 static inline void SetRoadTypes(TileIndex t, RoadType road_rt, RoadType tram_rt)
622 {
623  SetRoadTypeRoad(t, road_rt);
624  SetRoadTypeTram(t, tram_rt);
625 }
626 
637 static inline void MakeRoadNormal(TileIndex t, RoadBits bits, RoadType road_rt, RoadType tram_rt, TownID town, Owner road, Owner tram)
638 {
639  SetTileType(t, MP_ROAD);
640  SetTileOwner(t, road);
641  _m[t].m2 = town;
642  _m[t].m3 = (tram_rt != INVALID_ROADTYPE ? bits : 0);
643  _m[t].m5 = (road_rt != INVALID_ROADTYPE ? bits : 0) | ROAD_TILE_NORMAL << 6;
644  SB(_me[t].m6, 2, 4, 0);
645  _me[t].m7 = 0;
646  SetRoadTypes(t, road_rt, tram_rt);
647  SetRoadOwner(t, RTT_TRAM, tram);
648 }
649 
662 static inline void MakeRoadCrossing(TileIndex t, Owner road, Owner tram, Owner rail, Axis roaddir, RailType rat, RoadType road_rt, RoadType tram_rt, uint town)
663 {
664  SetTileType(t, MP_ROAD);
665  SetTileOwner(t, rail);
666  _m[t].m2 = town;
667  _m[t].m3 = 0;
668  _m[t].m4 = INVALID_ROADTYPE;
669  _m[t].m5 = ROAD_TILE_CROSSING << 6 | roaddir;
670  SB(_me[t].m6, 2, 4, 0);
671  _me[t].m7 = road;
672  _me[t].m8 = INVALID_ROADTYPE << 6 | rat;
673  SetRoadTypes(t, road_rt, tram_rt);
674  SetRoadOwner(t, RTT_TRAM, tram);
675 }
676 
685 static inline void MakeRoadDepot(TileIndex t, Owner owner, DepotID did, DiagDirection dir, RoadType rt)
686 {
687  SetTileType(t, MP_ROAD);
688  SetTileOwner(t, owner);
689  _m[t].m2 = did;
690  _m[t].m3 = 0;
691  _m[t].m4 = INVALID_ROADTYPE;
692  _m[t].m5 = ROAD_TILE_DEPOT << 6 | dir;
693  SB(_me[t].m6, 2, 4, 0);
694  _me[t].m7 = owner;
695  _me[t].m8 = INVALID_ROADTYPE << 6;
696  SetRoadType(t, GetRoadTramType(rt), rt);
697  SetRoadOwner(t, RTT_TRAM, owner);
698 }
699 
700 #endif /* ROAD_MAP_H */
static TileType GetTileType(TileIndex tile)
Get the tiletype of a given tile.
Definition: tile_map.h:98
Helper template class that makes basic properties of given enumeration type visible from outsize...
Definition: enum_type.hpp:64
Owner
Enum for all companies/owners.
Definition: company_type.h:20
static bool HasTileAnyRoadType(TileIndex t, RoadTypes rts)
Check if a tile has one of the specified road types.
Definition: road_map.h:223
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
uint16 DepotID
Type for the unique identifier of depots.
Definition: depot_type.h:15
static void MakeRoadCrossing(TileIndex t, Owner road, Owner tram, Owner rail, Axis roaddir, RailType rat, RoadType road_rt, RoadType tram_rt, uint town)
Make a level crossing.
Definition: road_map.h:662
static void SetTileOwner(TileIndex tile, Owner owner)
Sets the owner of a tile.
Definition: tile_map.h:200
Level crossing.
Definition: road_map.h:25
static void StartRoadWorks(TileIndex t)
Start road works on a tile.
Definition: road_map.h:537
Functions related to roads.
static RoadBits GetAllRoadBits(TileIndex tile)
Get all set RoadBits on the given tile.
Definition: road_map.h:142
RoadTypes
The different roadtypes we support, but then a bitmask of them.
Definition: road_type.h:41
static T AB(T &x, const uint8 s, const uint8 n, const U i)
Add i to n bits of x starting at bit s.
static T ToggleBit(T &x, const uint8 y)
Toggles a bit in a variable.
static bool HasCrossingReservation(TileIndex t)
Get the reservation state of the rail crossing.
Definition: road_map.h:382
byte m7
Primarily used for newgrf support.
Definition: map_type.h:37
static bool HasTileRoadType(TileIndex t, RoadTramType rtt)
Check if a tile has a road or a tram road type.
Definition: road_map.h:212
uint16 m2
Primarily used for indices to towns, industries and stations.
Definition: map_type.h:22
static T SetBit(T &x, const uint8 y)
Set a bit in a variable.
static TrackBits GetCrossingRailBits(TileIndex tile)
Get the rail track bits of a level crossing.
Definition: road_map.h:370
A tile with road (or tram tracks)
Definition: tile_type.h:45
static TrackBits AxisToTrackBits(Axis a)
Maps an Axis to the corresponding TrackBits value.
Definition: track_func.h:98
Full road along the x-axis (south-west + north-east)
Definition: road_type.h:61
A town owns the tile, or a town is expanding.
Definition: company_type.h:26
Tile * _m
Tiles of the map.
Definition: map.cpp:32
static void MakeRoadDepot(TileIndex t, Owner owner, DepotID did, DiagDirection dir, RoadType rt)
Make a road depot.
Definition: road_map.h:685
flag for invalid roadtype
Definition: road_type.h:32
static Roadside GetRoadside(TileIndex tile)
Get the decorations of a road.
Definition: road_map.h:495
RoadBits GetAnyRoadBits(TileIndex tile, RoadTramType rtt, bool straight_tunnel_bridge_entrance=false)
Returns the RoadBits on an arbitrary tile Special behaviour:
Definition: road_map.cpp:35
static bool IsRoadOwner(TileIndex t, RoadTramType rtt, Owner o)
Check if a specific road type is owned by an owner.
Definition: road_map.h:269
static void TerminateRoadWorks(TileIndex t)
Terminate road works on a tile.
Definition: road_map.h:553
static DiagDirection GetRoadDepotDirection(TileIndex t)
Get the direction of the exit of a road depot.
Definition: road_map.h:567
static Track AxisToTrack(Axis a)
Convert an Axis to the corresponding Track AXIS_X -> TRACK_X AXIS_Y -> TRACK_Y Uses the fact that the...
Definition: track_func.h:76
static bool IsLevelCrossing(TileIndex t)
Return whether a tile is a level crossing.
Definition: road_map.h:86
static void SetDisallowedRoadDirections(TileIndex t, DisallowedRoadDirections drd)
Sets the disallowed directions.
Definition: road_map.h:314
RoadType
The different roadtypes we support.
Definition: road_type.h:27
static RoadTypes GetPresentRoadTypes(TileIndex t)
Get the present road types of a tile.
Definition: road_map.h:186
static void SetRoadTypes(TileIndex t, RoadType road_rt, RoadType tram_rt)
Set the present road types of a tile.
Definition: road_map.h:621
Road with paved sidewalks.
Definition: road_map.h:482
Road on grass.
Definition: road_map.h:481
static T SB(T &x, const uint8 s, const uint8 n, const U d)
Set n bits in x starting at bit s to d.
Roadside
The possible road side decorations.
Definition: road_map.h:479
static bool HasRoadWorks(TileIndex t)
Check if a tile has road works.
Definition: road_map.h:515
static void SetCrossingBarred(TileIndex t, bool barred)
Set the bar state of a level crossing.
Definition: road_map.h:430
Normal road.
Definition: road_map.h:24
static bool IsOnSnow(TileIndex t)
Check if a road tile has snow/desert.
Definition: road_map.h:461
static void SetCrossingReservation(TileIndex t, bool b)
Set the reservation state of the rail crossing.
Definition: road_map.h:395
Header files for depots (not hangars)
None of the directions are disallowed.
Definition: road_map.h:288
The tile has no ownership.
Definition: company_type.h:27
All northbound traffic is disallowed.
Definition: road_map.h:290
static bool IsTileType(TileIndex tile, TileType type)
Checks if a tile is a given tiletype.
Definition: tile_map.h:152
static TrackBits GetCrossingReservationTrackBits(TileIndex t)
Get the reserved track bits for a rail crossing.
Definition: road_map.h:407
static RoadBits GetRoadBits(TileIndex t, RoadTramType rtt)
Get the present road bits for a specific road type.
Definition: road_map.h:129
Road with trees on paved sidewalks.
Definition: road_map.h:485
RoadTileType
The different types of road tiles.
Definition: road_map.h:23
Sentinel.
Definition: road_map.h:292
static bool HasTownOwnedRoad(TileIndex t)
Checks if given tile has town owned road.
Definition: road_map.h:281
Road on barren land.
Definition: road_map.h:480
Informative template class exposing basic enumeration properties used by several other templates belo...
Definition: enum_type.hpp:50
TileExtended * _me
Extended Tiles of the map.
Definition: map.cpp:33
byte m5
General purpose.
Definition: map_type.h:26
RoadBits
Enumeration for the road parts on a tile.
Definition: road_type.h:55
static bool IsRoadDepotTile(TileIndex t)
Return whether a tile is a road depot tile.
Definition: road_map.h:117
static Axis GetCrossingRailAxis(TileIndex t)
Get the rail axis of a level crossing.
Definition: road_map.h:339
static Axis GetCrossingRoadAxis(TileIndex t)
Get the road axis of a level crossing.
Definition: road_map.h:327
Road with street lights on paved sidewalks.
Definition: road_map.h:483
TrackBits
Bitfield corresponding to Track.
Definition: track_type.h:40
static void ToggleSnow(TileIndex t)
Toggle the snow/desert state of a road tile.
Definition: road_map.h:472
static bool MayHaveRoad(TileIndex t)
Test whether a tile can have road/tram types.
Definition: road_map.h:34
static void SetRoadTypeRoad(TileIndex t, RoadType rt)
Set the road road type of a tile.
Definition: road_map.h:581
All directions are disallowed.
Definition: road_map.h:291
static void BarCrossing(TileIndex t)
Bar a level crossing.
Definition: road_map.h:449
static void SetRoadOwner(TileIndex t, RoadTramType rtt, Owner o)
Set the owner of a specific road type.
Definition: road_map.h:252
static void SetRoadside(TileIndex tile, Roadside s)
Set the decorations of a road.
Definition: road_map.h:505
static RoadBits GetCrossingRoadBits(TileIndex tile)
Get the road bits of a level crossing.
Definition: road_map.h:350
The X axis.
static void SetRoadBits(TileIndex t, RoadBits r, RoadTramType rtt)
Set the present road bits for a specific road type.
Definition: road_map.h:154
No track.
Definition: track_type.h:41
static Owner GetRoadOwner(TileIndex t, RoadTramType rtt)
Get the owner of a specific road type.
Definition: road_map.h:235
static bool IsNormalRoadTile(TileIndex t)
Return whether a tile is a normal road tile.
Definition: road_map.h:75
RailType
Enumeration for all possible railtypes.
Definition: rail_type.h:29
static RoadTileType GetRoadTileType(TileIndex t)
Get the type of the road tile.
Definition: road_map.h:53
Tunnel entry/exit and bridge heads.
Definition: tile_type.h:52
Road with sidewalks and road works.
Definition: road_map.h:487
uint32 TileIndex
The index/ID of a Tile.
Definition: tile_type.h:80
static bool IsLevelCrossingTile(TileIndex t)
Return whether a tile is a level crossing tile.
Definition: road_map.h:96
Track
These are used to specify a single track.
Definition: track_type.h:21
static bool IncreaseRoadWorksCounter(TileIndex t)
Increase the progress counter of road works.
Definition: road_map.h:525
static uint GB(const T x, const uint8 s, const uint8 n)
Fetch n bits from x, started at bit s.
static void SetTileType(TileIndex tile, TileType type)
Set the type of a tile.
Definition: tile_map.h:133
A tile of a station.
Definition: tile_type.h:48
static void SetRoadTypeTram(TileIndex t, RoadType rt)
Set the tram road type of a tile.
Definition: road_map.h:593
static void UnbarCrossing(TileIndex t)
Unbar a level crossing.
Definition: road_map.h:440
uint16 m8
General purpose.
Definition: map_type.h:38
Road on grass with road works.
Definition: road_map.h:486
static Axis OtherAxis(Axis a)
Select the other axis as provided.
DisallowedRoadDirections
Which directions are disallowed ?
Definition: road_map.h:287
Owner owner
The owner of the content shown in this window. Company colour is acquired from this variable...
Definition: window_gui.h:326
static DisallowedRoadDirections GetDisallowedRoadDirections(TileIndex t)
Gets the disallowed directions.
Definition: road_map.h:303
static bool IsNormalRoad(TileIndex t)
Return whether a tile is a normal road.
Definition: road_map.h:65
static void SetRoadType(TileIndex t, RoadTramType rtt, RoadType rt)
Set the road type of a tile.
Definition: road_map.h:606
All southbound traffic is disallowed.
Definition: road_map.h:289
static bool HasBit(const T x, const uint8 y)
Checks if a bit in a value is set.
DiagDirection
Enumeration for diagonal directions.
static bool IsCrossingBarred(TileIndex t)
Check if the level crossing is barred.
Definition: road_map.h:418
Full road along the y-axis (north-west + south-east)
Definition: road_type.h:62
static Track GetCrossingRailTrack(TileIndex tile)
Get the rail track of a level crossing.
Definition: road_map.h:360
Map writing/reading functions for tiles.
Different conversion functions from one kind of track to another.
static void MakeRoadNormal(TileIndex t, RoadBits bits, RoadType road_rt, RoadType tram_rt, TownID town, Owner road, Owner tram)
Make a normal road tile.
Definition: road_map.h:637
byte m3
General purpose.
Definition: map_type.h:24
Depot (one entrance)
Definition: road_map.h:26
Axis
Allow incrementing of DiagDirDiff variables.
static bool IsRoadDepot(TileIndex t)
Return whether a tile is a road depot.
Definition: road_map.h:107
No roadtypes.
Definition: road_type.h:42
The different types of rail.
byte m4
General purpose.
Definition: map_type.h:25