blob: 1d8d4b86292166c781d1a16ffcf9291bd10ff7e6 (
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
|
/* $Id$ */
#ifndef ROAD_H
#define ROAD_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 ComplementRoadBits(RoadBits r)
{
return ROAD_ALL ^ r;
}
static inline RoadBits DiagDirToRoadBits(DiagDirection d)
{
return 1 << (3 ^ d);
}
#endif
|