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