Assembler doesn't like ta to be a regiester in moveall()
[unix-history] / usr / src / games / sail / extern.h
CommitLineData
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
32struct logs {
33 char fname[20];
34 int uid, fshipnum, fgamenum, netpoints;
35};
36
37extern struct BP {
38 int turnsent, toship, mensent;
39};
40
41extern struct snag {
42 int turnfoul, toship;
43};
44
45typedef struct {
46 int row, col, dir;
47} postype;
48extern postype pos[20];
49
50extern 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
63typedef struct {
64 char *shipname;
65 int shipnum, nationality;
66 int shiprow, shipcol, shipdir;
67 struct File *file;
68} ships;
69
70struct scenario {
71 int winddir, windspeed, windchange;
72 int turn, people, time, vessels;
73 char *name;
74 ships ship[10];
75};
76extern struct scenario scene[NUMOFSCENES];
77
78struct 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};
83extern struct shipspecs specs[];
84
85extern struct windeffects {
86 int A, B, C, D;
87} WET[7][6];
88extern struct Tables {
89 int H, G, C, R;
90} RigTable[11][6];
91extern struct Tables HullTable[11][6];
92
93extern int AMMO[9][4];
94
95extern int HDT[9][10];
96
97extern int HDTrake[9][10];
98
99extern int QUAL[9][5];
100
101extern int MT[9][3];
102
103extern int loaded, fired, changed, repaired, buffercount, xlast, ylast;
104extern long lastsync;
105extern int winddir, windspeed, turn, viewrow, viewcol;
106extern int player, nation[5], scroll, game;
107extern int MIGHTYCAPTAIN;
108extern char Outbuf[BUFSIZE], movebuf[10], loadwith[20];
109extern FILE *syncfile;
110
111char colours();
112char gunsbear();
113char *info();
114char iinitial();
115char *quality();
116char sterncolor();
117char strend();
118char symbol();
119double arctan();