xref: /csrg-svn/games/atc/def.h (revision 60740)
141166Sbostic /*-
2*60740Sbostic  * Copyright (c) 1990, 1993
3*60740Sbostic  *	The Regents of the University of California.  All rights reserved.
441166Sbostic  *
541166Sbostic  * This code is derived from software contributed to Berkeley by
641166Sbostic  * Ed James.
741166Sbostic  *
841166Sbostic  * %sccs.include.redist.c%
941166Sbostic  *
10*60740Sbostic  *	@(#)def.h	8.1 (Berkeley) 05/31/93
1141166Sbostic  */
1241166Sbostic 
1341157Sbostic /*
1441157Sbostic  * Copyright (c) 1987 by Ed James, UC Berkeley.  All rights reserved.
1541157Sbostic  *
1641157Sbostic  * Copy permission is hereby granted provided that this notice is
1741157Sbostic  * retained on all partial or complete copies.
1841157Sbostic  *
1941157Sbostic  * For more info on this and all of my stuff, mail edjames@berkeley.edu.
2041157Sbostic  */
2141157Sbostic 
2241157Sbostic #define AUTHOR_STR		"ATC - by Ed James"
2341157Sbostic 
2441157Sbostic #define PI			3.14159654
2541157Sbostic 
2641157Sbostic #define LOWFUEL			15
2741157Sbostic 
2841157Sbostic #define REALLOC			10
2941157Sbostic 
3041157Sbostic #define SGN(x)			((x < 0) ? -1 : ((x > 0) ? 1 : 0))
3141157Sbostic #define ABS(x)			((x < 0) ? -(x) : (x))
3241157Sbostic #define DIR_FROM_DXDY(dx,dy)	((int) (atan2((double)(dy), (double)(dx)) \
3341157Sbostic 				* MAXDIR / (2 * PI) + 2.5 + MAXDIR) % MAXDIR)
3441157Sbostic 
3541157Sbostic #define MAXDIR		8
3641157Sbostic 
3741157Sbostic #define D_LEFT		1
3841157Sbostic #define D_RIGHT		2
3941157Sbostic #define D_UP		3
4041157Sbostic #define D_DOWN		4
4141157Sbostic 
4241157Sbostic #define T_NODEST	0
4341157Sbostic #define T_BEACON	1
4441157Sbostic #define T_EXIT		2
4541157Sbostic #define T_AIRPORT	3
4641157Sbostic 
4741157Sbostic #define S_NONE		0
4841157Sbostic #define S_GONE		1
4941157Sbostic #define S_MARKED	2
5041157Sbostic #define S_UNMARKED	3
5141157Sbostic #define S_IGNORED	4
5241157Sbostic 
5341157Sbostic #define INPUT_LINES	3
5441157Sbostic #define PLANE_COLS	20
55