blob: e72cbb37ee585e4da0c7b482222c8b1b5f931463 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
/* $Id$ */
#ifndef ROAD_H
#define ROAD_H
#include "macros.h"
typedef enum RoadBits {
ROAD_NW = 1,
ROAD_SW = 2,
ROAD_SE = 4,
ROAD_NE = 8,
ROAD_X = ROAD_SW | ROAD_NE,
ROAD_Y = ROAD_NW | ROAD_SE,
ROAD_ALL = ROAD_X | ROAD_Y
} RoadBits;
static inline RoadBits GetRoadBits(TileIndex tile)
{
return GB(_m[tile].m5, 0, 4);
}
static inline RoadBits GetCrossingRoadBits(TileIndex tile)
{
return _m[tile].m5 & 8 ? ROAD_Y : ROAD_X;
}
typedef enum RoadType {
ROAD_NORMAL,
ROAD_CROSSING,
ROAD_DEPOT
} RoadType;
static inline RoadType GetRoadType(TileIndex tile)
{
return GB(_m[tile].m5, 4, 4);
}
#endif
|