games: Massive style(9) cleanup commit. Reduces differences to NetBSD.
[dragonfly.git] / games / atc / struct.h
blobcc43cd316604d01a4a4d2d0b881263803c60ad26
1 /*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
5 * This code is derived from software contributed to Berkeley by
6 * Ed James.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. Neither the name of the University nor the names of its contributors
17 * may be used to endorse or promote products derived from this software
18 * without specific prior written permission.
20 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
32 * @(#)struct.h 8.1 (Berkeley) 5/31/93
36 * Copyright (c) 1987 by Ed James, UC Berkeley. All rights reserved.
38 * Copy permission is hereby granted provided that this notice is
39 * retained on all partial or complete copies.
41 * For more info on this and all of my stuff, mail edjames@berkeley.edu.
44 typedef struct {
45 int x, y;
46 int dir; /* used only sometimes */
47 } SCREEN_POS;
49 typedef struct {
50 SCREEN_POS p1, p2;
51 } LINE;
53 typedef SCREEN_POS EXIT;
54 typedef SCREEN_POS BEACON;
55 typedef SCREEN_POS AIRPORT;
57 typedef struct {
58 int width, height;
59 int update_secs;
60 int newplane_time;
61 int num_exits;
62 int num_lines;
63 int num_beacons;
64 int num_airports;
65 EXIT *exit;
66 LINE *line;
67 BEACON *beacon;
68 AIRPORT *airport;
69 } C_SCREEN;
71 typedef struct plane {
72 struct plane *next, *prev;
73 int status;
74 int plane_no;
75 int plane_type;
76 int orig_no;
77 int orig_type;
78 int dest_no;
79 int dest_type;
80 int altitude;
81 int new_altitude;
82 int dir;
83 int new_dir;
84 int fuel;
85 int xpos;
86 int ypos;
87 int delayd;
88 int delayd_no;
89 } PLANE;
91 typedef struct {
92 PLANE *head, *tail;
93 } LIST;
95 typedef struct {
96 char name[10];
97 char host[256];
98 char game[256];
99 int planes;
100 int time;
101 int real_time;
102 } SCORE;
104 #define SCORE_SCANF_FMT "%9s %255s %255s %d %d %d"
106 typedef struct displacement {
107 int dx;
108 int dy;
109 } DISPLACEMENT;