Files @ r3866:89c9bb7440d9
Branch filter:

Location: cpp/openttd-patchpack/source/road.h

belugas
(svn r4902) Newgrf : Introduction of the newgrf_cargo files.
Clearing engine and newgrf_engine from cargo related structures.
Apart from moving stuff cargo related, there is nothing really newcargo for now.
/* $Id$ */

#ifndef ROAD_H
#define ROAD_H

typedef enum RoadBits {
	ROAD_NW  = 1U,
	ROAD_SW  = 2U,
	ROAD_SE  = 4U,
	ROAD_NE  = 8U,
	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 1U << (3 ^ d);
}

#endif