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