xref: /original-bsd/games/atc/struct.h (revision 48d2e7c6)
1 /*-
2  * Copyright (c) 1990, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * This code is derived from software contributed to Berkeley by
6  * Ed James.
7  *
8  * %sccs.include.redist.c%
9  *
10  *	@(#)struct.h	8.1 (Berkeley) 05/31/93
11  */
12 
13 /*
14  * Copyright (c) 1987 by Ed James, UC Berkeley.  All rights reserved.
15  *
16  * Copy permission is hereby granted provided that this notice is
17  * retained on all partial or complete copies.
18  *
19  * For more info on this and all of my stuff, mail edjames@berkeley.edu.
20  */
21 
22 typedef struct {
23 	int	x, y;
24 	int	dir;	/* used only sometimes */
25 } SCREEN_POS;
26 
27 typedef struct {
28 	SCREEN_POS	p1, p2;
29 } LINE;
30 
31 typedef SCREEN_POS	EXIT;
32 typedef SCREEN_POS	BEACON;
33 typedef SCREEN_POS	AIRPORT;
34 
35 typedef struct {
36 	int	width, height;
37 	int	update_secs;
38 	int	newplane_time;
39 	int	num_exits;
40 	int	num_lines;
41 	int	num_beacons;
42 	int	num_airports;
43 	EXIT	*exit;
44 	LINE	*line;
45 	BEACON	*beacon;
46 	AIRPORT	*airport;
47 } C_SCREEN;
48 
49 typedef struct plane {
50 	struct plane	*next, *prev;
51 	int		status;
52 	int		plane_no;
53 	int		plane_type;
54 	int		orig_no;
55 	int		orig_type;
56 	int		dest_no;
57 	int		dest_type;
58 	int		altitude;
59 	int		new_altitude;
60 	int		dir;
61 	int		new_dir;
62 	int		fuel;
63 	int		xpos;
64 	int		ypos;
65 	int		delayd;
66 	int		delayd_no;
67 } PLANE;
68 
69 typedef struct {
70 	PLANE	*head, *tail;
71 } LIST;
72 
73 typedef struct {
74 	char	name[10];
75 	char	host[256];
76 	char	game[256];
77 	int	planes;
78 	int	time;
79 	int	real_time;
80 } SCORE;
81 
82 typedef struct displacement {
83 	int	dx;
84 	int	dy;
85 } DISPLACEMENT;
86