mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-23 15:44:43 +00:00
35 lines
512 B
C
35 lines
512 B
C
|
/* $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);
|
||
|
}
|
||
|
|
||
|
typedef enum RoadType {
|
||
|
ROAD_NORMAL,
|
||
|
ROAD_CROSSING,
|
||
|
ROAD_DEPOT
|
||
|
} RoadType;
|
||
|
|
||
|
static inline RoadType GetRoadType(TileIndex tile)
|
||
|
{
|
||
|
return GB(_m[tile].m5, 4, 4);
|
||
|
}
|
||
|
|
||
|
#endif
|