Commit | Line | Data |
---|---|---|
261fa12c CL |
1 | /* |
2 | * sccsid = "@(#)extern.h 1.1 83/03/17"; | |
3 | */ | |
4 | #include <stdio.h> | |
5 | #include <signal.h> | |
6 | #include <ctype.h> | |
7 | #include "machdep.h" | |
8 | ||
9 | #define NUMOFSCENES 32 | |
10 | ||
11 | #define die() (((rand() >> 6) % 6) + 1) | |
12 | #define fouled(a) Fouled(a, 342) | |
13 | #define grappled(a) Fouled(a, 382) | |
14 | #define grapple(a,b) Grapple(a,b,382) | |
15 | #define foul(a,b) Grapple(a,b,342) | |
16 | #define sqr(a) ((a) * (a)) | |
17 | #define abs(a) ((a) > 0 ? (a) : -(a)) | |
18 | #define min(a,b) ((a) < (b) ? (a) : (b)) | |
19 | ||
20 | #define GRAPE 1 | |
21 | #define CHAIN 2 | |
22 | #define ROUND 3 | |
23 | #define DOUBLE 4 | |
24 | ||
25 | #define HULL 0 | |
26 | #define RIGGING 1 | |
27 | ||
28 | #define SPECS 32 | |
29 | #define FILES 64 | |
30 | #define SCENARIO 128 | |
31 | ||
32 | struct logs { | |
33 | char fname[20]; | |
34 | int uid, fshipnum, fgamenum, netpoints; | |
35 | }; | |
36 | ||
37 | extern struct BP { | |
38 | int turnsent, toship, mensent; | |
39 | }; | |
40 | ||
41 | extern struct snag { | |
42 | int turnfoul, toship; | |
43 | }; | |
44 | ||
45 | typedef struct { | |
46 | int row, col, dir; | |
47 | } postype; | |
48 | extern postype pos[20]; | |
49 | ||
50 | extern struct File { | |
51 | char captain[20]; | |
52 | int points; | |
53 | int loadL, loadR, readyL, readyR; | |
54 | struct BP OBP[3], DBP[3]; | |
55 | int struck, captured, pcrew; | |
56 | char last[10]; | |
57 | int drift; | |
58 | struct snag fouls[10], grapples[10]; | |
59 | char signal[60]; | |
60 | int RH, RG, RR, FS, explode, sink; | |
61 | }; | |
62 | ||
63 | typedef struct { | |
64 | char *shipname; | |
65 | int shipnum, nationality; | |
66 | int shiprow, shipcol, shipdir; | |
67 | struct File *file; | |
68 | } ships; | |
69 | ||
70 | struct scenario { | |
71 | int winddir, windspeed, windchange; | |
72 | int turn, people, time, vessels; | |
73 | char *name; | |
74 | ships ship[10]; | |
75 | }; | |
76 | extern struct scenario scene[NUMOFSCENES]; | |
77 | ||
78 | struct shipspecs { | |
79 | int bs, fs, ta, guns, class, hull, qual, crew1, | |
80 | crew2, crew3, gunL, gunR, carL, carR, | |
81 | rig1, rig2, rig3, rig4, pts; | |
82 | }; | |
83 | extern struct shipspecs specs[]; | |
84 | ||
85 | extern struct windeffects { | |
86 | int A, B, C, D; | |
87 | } WET[7][6]; | |
88 | extern struct Tables { | |
89 | int H, G, C, R; | |
90 | } RigTable[11][6]; | |
91 | extern struct Tables HullTable[11][6]; | |
92 | ||
93 | extern int AMMO[9][4]; | |
94 | ||
95 | extern int HDT[9][10]; | |
96 | ||
97 | extern int HDTrake[9][10]; | |
98 | ||
99 | extern int QUAL[9][5]; | |
100 | ||
101 | extern int MT[9][3]; | |
102 | ||
103 | extern int loaded, fired, changed, repaired, buffercount, xlast, ylast; | |
104 | extern long lastsync; | |
105 | extern int winddir, windspeed, turn, viewrow, viewcol; | |
106 | extern int player, nation[5], scroll, game; | |
107 | extern int MIGHTYCAPTAIN; | |
108 | extern char Outbuf[BUFSIZE], movebuf[10], loadwith[20]; | |
109 | extern FILE *syncfile; | |
110 | ||
111 | char colours(); | |
112 | char gunsbear(); | |
113 | char *info(); | |
114 | char iinitial(); | |
115 | char *quality(); | |
116 | char sterncolor(); | |
117 | char strend(); | |
118 | char symbol(); | |
119 | double arctan(); |