xref: /csrg-svn/games/atc/struct.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  *	@(#)struct.h	8.1 (Berkeley) 05/31/93
1141166Sbostic  */
1241166Sbostic 
1341163Sbostic /*
1441163Sbostic  * Copyright (c) 1987 by Ed James, UC Berkeley.  All rights reserved.
1541163Sbostic  *
1641163Sbostic  * Copy permission is hereby granted provided that this notice is
1741163Sbostic  * retained on all partial or complete copies.
1841163Sbostic  *
1941163Sbostic  * For more info on this and all of my stuff, mail edjames@berkeley.edu.
2041163Sbostic  */
2141163Sbostic 
2241163Sbostic typedef struct {
2341163Sbostic 	int	x, y;
2441163Sbostic 	int	dir;	/* used only sometimes */
2541163Sbostic } SCREEN_POS;
2641163Sbostic 
2741163Sbostic typedef struct {
2841163Sbostic 	SCREEN_POS	p1, p2;
2941163Sbostic } LINE;
3041163Sbostic 
3141163Sbostic typedef SCREEN_POS	EXIT;
3241163Sbostic typedef SCREEN_POS	BEACON;
3341163Sbostic typedef SCREEN_POS	AIRPORT;
3441163Sbostic 
3541163Sbostic typedef struct {
3641163Sbostic 	int	width, height;
3741163Sbostic 	int	update_secs;
3841163Sbostic 	int	newplane_time;
3941163Sbostic 	int	num_exits;
4041163Sbostic 	int	num_lines;
4141163Sbostic 	int	num_beacons;
4241163Sbostic 	int	num_airports;
4341163Sbostic 	EXIT	*exit;
4441163Sbostic 	LINE	*line;
4541163Sbostic 	BEACON	*beacon;
4641163Sbostic 	AIRPORT	*airport;
4741163Sbostic } C_SCREEN;
4841163Sbostic 
4941163Sbostic typedef struct plane {
5041163Sbostic 	struct plane	*next, *prev;
5141163Sbostic 	int		status;
5241163Sbostic 	int		plane_no;
5341163Sbostic 	int		plane_type;
5441163Sbostic 	int		orig_no;
5541163Sbostic 	int		orig_type;
5641163Sbostic 	int		dest_no;
5741163Sbostic 	int		dest_type;
5841163Sbostic 	int		altitude;
5941163Sbostic 	int		new_altitude;
6041163Sbostic 	int		dir;
6141163Sbostic 	int		new_dir;
6241163Sbostic 	int		fuel;
6341163Sbostic 	int		xpos;
6441163Sbostic 	int		ypos;
6541163Sbostic 	int		delayd;
6641163Sbostic 	int		delayd_no;
6741163Sbostic } PLANE;
6841163Sbostic 
6941163Sbostic typedef struct {
7041163Sbostic 	PLANE	*head, *tail;
7141163Sbostic } LIST;
7241163Sbostic 
7341163Sbostic typedef struct {
7441163Sbostic 	char	name[10];
7541163Sbostic 	char	host[256];
7641163Sbostic 	char	game[256];
7741163Sbostic 	int	planes;
7841163Sbostic 	int	time;
7941163Sbostic 	int	real_time;
8041163Sbostic } SCORE;
8141163Sbostic 
8241163Sbostic typedef struct displacement {
8341163Sbostic 	int	dx;
8441163Sbostic 	int	dy;
8541163Sbostic } DISPLACEMENT;
86