|
|
1.1 ! root 1: /*- ! 2: * Copyright (c) 1990 The Regents of the University of California. ! 3: * All rights reserved. ! 4: * ! 5: * This code is derived from software contributed to Berkeley by ! 6: * Ed James. ! 7: * ! 8: * Redistribution and use in source and binary forms are permitted ! 9: * provided that: (1) source distributions retain this entire copyright ! 10: * notice and comment, and (2) distributions including binaries display ! 11: * the following acknowledgement: ``This product includes software ! 12: * developed by the University of California, Berkeley and its contributors'' ! 13: * in the documentation or other materials provided with the distribution ! 14: * and in all advertising materials mentioning features or use of this ! 15: * software. Neither the name of the University nor the names of its ! 16: * contributors may be used to endorse or promote products derived ! 17: * from this software without specific prior written permission. ! 18: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 19: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 20: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 21: * ! 22: * @(#)def.h 5.2 (Berkeley) 4/30/90 ! 23: */ ! 24: ! 25: /* ! 26: * Copyright (c) 1987 by Ed James, UC Berkeley. All rights reserved. ! 27: * ! 28: * Copy permission is hereby granted provided that this notice is ! 29: * retained on all partial or complete copies. ! 30: * ! 31: * For more info on this and all of my stuff, mail [email protected]. ! 32: */ ! 33: ! 34: #define AUTHOR_STR "ATC - by Ed James" ! 35: ! 36: #define PI 3.14159654 ! 37: ! 38: #define LOWFUEL 15 ! 39: ! 40: #define REALLOC 10 ! 41: ! 42: #define SGN(x) ((x < 0) ? -1 : ((x > 0) ? 1 : 0)) ! 43: #define ABS(x) ((x < 0) ? -(x) : (x)) ! 44: #define DIR_FROM_DXDY(dx,dy) ((int) (atan2((double)(dy), (double)(dx)) \ ! 45: * MAXDIR / (2 * PI) + 2.5 + MAXDIR) % MAXDIR) ! 46: ! 47: #define MAXDIR 8 ! 48: ! 49: #define D_LEFT 1 ! 50: #define D_RIGHT 2 ! 51: #define D_UP 3 ! 52: #define D_DOWN 4 ! 53: ! 54: #define T_NODEST 0 ! 55: #define T_BEACON 1 ! 56: #define T_EXIT 2 ! 57: #define T_AIRPORT 3 ! 58: ! 59: #define S_NONE 0 ! 60: #define S_GONE 1 ! 61: #define S_MARKED 2 ! 62: #define S_UNMARKED 3 ! 63: #define S_IGNORED 4 ! 64: ! 65: #define INPUT_LINES 3 ! 66: #define PLANE_COLS 20
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.