road.h
author Darkvater
Tue, 24 Oct 2006 22:19:12 +0000
changeset 4943 d3b8e26a7071
parent 4666 172a0cdf28a6
permissions -rw-r--r--
(svn r6931) -Codechange: Change textmessage format a bit. Only the sender's name and target are
in the sender's colour, the actual message is in white. Should improve readability.
/* $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 (RoadBits)(ROAD_ALL ^ r);
}

static inline RoadBits DiagDirToRoadBits(DiagDirection d)
{
	return (RoadBits)(1U << (3 ^ d));
}

#endif /* ROAD_H */