Home | History | Annotate | Line # | Download | only in trek
trek.h revision 1.13
      1  1.13  dholland /*	$NetBSD: trek.h,v 1.13 2009/05/24 20:39:43 dholland Exp $	*/
      2   1.3       cgd 
      3   1.1       cgd /*
      4   1.3       cgd  * Copyright (c) 1980, 1993
      5   1.3       cgd  *	The Regents of the University of California.  All rights reserved.
      6   1.1       cgd  *
      7   1.1       cgd  * Redistribution and use in source and binary forms, with or without
      8   1.1       cgd  * modification, are permitted provided that the following conditions
      9   1.1       cgd  * are met:
     10   1.1       cgd  * 1. Redistributions of source code must retain the above copyright
     11   1.1       cgd  *    notice, this list of conditions and the following disclaimer.
     12   1.1       cgd  * 2. Redistributions in binary form must reproduce the above copyright
     13   1.1       cgd  *    notice, this list of conditions and the following disclaimer in the
     14   1.1       cgd  *    documentation and/or other materials provided with the distribution.
     15   1.9       agc  * 3. Neither the name of the University nor the names of its contributors
     16   1.1       cgd  *    may be used to endorse or promote products derived from this software
     17   1.1       cgd  *    without specific prior written permission.
     18   1.1       cgd  *
     19   1.1       cgd  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     20   1.1       cgd  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     21   1.1       cgd  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     22   1.1       cgd  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     23   1.1       cgd  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     24   1.1       cgd  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     25   1.1       cgd  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     26   1.1       cgd  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     27   1.1       cgd  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     28   1.1       cgd  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     29   1.1       cgd  * SUCH DAMAGE.
     30   1.1       cgd  *
     31   1.3       cgd  *	@(#)trek.h	8.1 (Berkeley) 5/31/93
     32   1.1       cgd  */
     33   1.1       cgd 
     34   1.1       cgd /*
     35   1.1       cgd **  Global Declarations
     36   1.1       cgd **
     37   1.1       cgd **	Virtually all non-local variable declarations are made in this
     38   1.1       cgd **	file.  Exceptions are those things which are initialized, which
     39   1.1       cgd **	are defined in "externs.c", and things which are local to one
     40   1.1       cgd **	program file.
     41   1.1       cgd **
     42   1.1       cgd **	So far as I know, nothing in here must be preinitialized to
     43   1.1       cgd **	zero.
     44   1.1       cgd */
     45   1.1       cgd 
     46   1.1       cgd /* external function definitions */
     47   1.1       cgd 
     48   1.1       cgd /*********************  GALAXY  **************************/
     49   1.1       cgd 
     50   1.1       cgd /* galactic parameters */
     51  1.13  dholland #define NSECTS		10	/* dimensions of quadrant in sectors */
     52  1.13  dholland #define NQUADS		8	/* dimension of galazy in quadrants */
     53  1.13  dholland #define NINHAB		32	/* number of quadrants which are inhabited */
     54   1.1       cgd 
     55   1.1       cgd struct quad		/* definition for each quadrant */
     56   1.1       cgd {
     57   1.5  christos 	unsigned char	bases;	/* number of bases in this quadrant */
     58   1.1       cgd 	char	klings;		/* number of Klingons in this quadrant */
     59   1.1       cgd 	char	holes;		/* number of black holes in this quadrant */
     60   1.1       cgd 	int	scanned;	/* star chart entry (see below) */
     61   1.4   thorpej 	short	stars;		/* number of stars in this quadrant */
     62   1.1       cgd 	char	qsystemname;	/* starsystem name (see below) */
     63   1.1       cgd };
     64   1.1       cgd 
     65  1.13  dholland #define Q_DISTRESSED	0200
     66  1.13  dholland #define Q_SYSTEM	077
     67   1.1       cgd 
     68   1.1       cgd /*  systemname conventions:
     69   1.1       cgd  *	1 -> NINHAB	index into Systemname table for live system.
     70   1.1       cgd  *	+ Q_DISTRESSED	distressed starsystem -- systemname & Q_SYSTEM
     71   1.1       cgd  *			is the index into the Event table which will
     72   1.1       cgd  *			have the system name
     73   1.1       cgd  *	0		dead or nonexistent starsystem
     74   1.1       cgd  *
     75   1.1       cgd  *  starchart ("scanned") conventions:
     76   1.1       cgd  *	0 -> 999	taken as is
     77   1.1       cgd  *	-1		not yet scanned ("...")
     78   1.1       cgd  *	1000		supernova ("///")
     79   1.1       cgd  *	1001		starbase + ??? (".1.")
     80   1.1       cgd */
     81   1.1       cgd 
     82   1.1       cgd /* ascii names of systems */
     83   1.6   hubertf extern const char	*const Systemname[NINHAB];
     84   1.1       cgd 
     85   1.1       cgd /* quadrant definition */
     86   1.8       jsm extern struct quad	Quad[NQUADS][NQUADS];
     87   1.1       cgd 
     88   1.1       cgd /* defines for sector map  (below) */
     89  1.13  dholland #define EMPTY		'.'
     90  1.13  dholland #define STAR		'*'
     91  1.13  dholland #define BASE		'#'
     92  1.13  dholland #define ENTERPRISE	'E'
     93  1.13  dholland #define QUEENE		'Q'
     94  1.13  dholland #define KLINGON		'K'
     95  1.13  dholland #define INHABIT		'@'
     96  1.13  dholland #define HOLE		' '
     97   1.1       cgd 
     98   1.1       cgd /* current sector map */
     99   1.8       jsm extern char	Sect[NSECTS][NSECTS];
    100   1.1       cgd 
    101   1.1       cgd 
    102   1.5  christos 
    103   1.1       cgd /************************ DEVICES ******************************/
    104   1.1       cgd 
    105  1.13  dholland #define	NDEV		16	/* max number of devices */
    106   1.1       cgd 
    107   1.1       cgd /* device tokens */
    108  1.13  dholland #define WARP		0	/* warp engines */
    109  1.13  dholland #define SRSCAN		1	/* short range scanners */
    110  1.13  dholland #define LRSCAN		2	/* long range scanners */
    111  1.13  dholland #define PHASER		3	/* phaser control */
    112  1.13  dholland #define TORPED		4	/* photon torpedo control */
    113  1.13  dholland #define IMPULSE		5	/* impulse engines */
    114  1.13  dholland #define SHIELD		6	/* shield control */
    115  1.13  dholland #define COMPUTER	7	/* on board computer */
    116  1.13  dholland #define SSRADIO		8	/* subspace radio */
    117  1.13  dholland #define LIFESUP		9	/* life support systems */
    118  1.13  dholland #define SINS		10	/* Space Inertial Navigation System */
    119  1.13  dholland #define CLOAK		11	/* cloaking device */
    120  1.13  dholland #define XPORTER		12	/* transporter */
    121  1.13  dholland #define SHUTTLE		13	/* shuttlecraft */
    122   1.1       cgd 
    123   1.1       cgd /* device names */
    124   1.1       cgd struct device
    125   1.1       cgd {
    126   1.6   hubertf 	const char	*name;		/* device name */
    127   1.6   hubertf 	const char	*person;	/* the person who fixes it */
    128   1.1       cgd };
    129   1.1       cgd 
    130   1.8       jsm extern const struct device	Device[NDEV];
    131   1.1       cgd 
    132   1.1       cgd /***************************  EVENTS  ****************************/
    133   1.1       cgd 
    134  1.13  dholland #define	NEVENTS		12	/* number of different event types */
    135   1.1       cgd 
    136  1.13  dholland #define E_LRTB		1	/* long range tractor beam */
    137  1.13  dholland #define E_KATSB		2	/* Klingon attacks starbase */
    138  1.13  dholland #define E_KDESB		3	/* Klingon destroys starbase */
    139  1.13  dholland #define E_ISSUE		4	/* distress call is issued */
    140  1.13  dholland #define E_ENSLV		5	/* Klingons enslave a quadrant */
    141  1.13  dholland #define E_REPRO		6	/* a Klingon is reproduced */
    142  1.13  dholland #define E_FIXDV		7	/* fix a device */
    143  1.13  dholland #define E_ATTACK	8	/* Klingon attack during rest period */
    144  1.13  dholland #define E_SNAP		9	/* take a snapshot for time warp */
    145  1.13  dholland #define E_SNOVA		10	/* supernova occurs */
    146  1.13  dholland 
    147  1.13  dholland #define E_GHOST		0100	/* ghost of a distress call if ssradio out */
    148  1.13  dholland #define E_HIDDEN	0200	/* event unreportable because ssradio out */
    149  1.13  dholland #define E_EVENT		077	/* mask to get event code */
    150   1.1       cgd 
    151   1.1       cgd struct event
    152   1.1       cgd {
    153   1.5  christos 	unsigned char 	x, y;		/* coordinates */
    154   1.5  christos 	double		date;		/* trap stardate */
    155   1.5  christos 	char		evcode;		/* event type */
    156   1.5  christos 	unsigned char	systemname;	/* starsystem name */
    157   1.1       cgd };
    158   1.1       cgd /* systemname conventions:
    159   1.1       cgd  *	1 -> NINHAB	index into Systemname table for reported distress calls
    160   1.1       cgd  *
    161   1.1       cgd  * evcode conventions:
    162   1.1       cgd  *	1 -> NEVENTS-1	event type
    163   1.1       cgd  *	+ E_HIDDEN	unreported (SSradio out)
    164   1.1       cgd  *	+ E_GHOST	actually already expired
    165   1.1       cgd  *	0		unallocated
    166   1.1       cgd  */
    167   1.1       cgd 
    168  1.13  dholland #define MAXEVENTS	25	/* max number of concurrently pending events */
    169   1.1       cgd 
    170   1.8       jsm extern struct event	Event[MAXEVENTS];	/* dynamic event list; one entry per pending event */
    171   1.1       cgd 
    172   1.1       cgd /*****************************  KLINGONS  *******************************/
    173   1.1       cgd 
    174   1.1       cgd struct kling
    175   1.1       cgd {
    176   1.5  christos 	unsigned char	x, y;	/* coordinates */
    177   1.1       cgd 	int	power;		/* power left */
    178   1.1       cgd 	double	dist;		/* distance to Enterprise */
    179   1.1       cgd 	double	avgdist;	/* average over this move */
    180   1.1       cgd 	char	srndreq;	/* set if surrender has been requested */
    181   1.1       cgd };
    182   1.1       cgd 
    183  1.13  dholland #define MAXKLQUAD	9	/* maximum klingons per quadrant */
    184   1.1       cgd 
    185   1.1       cgd /********************** MISCELLANEOUS ***************************/
    186   1.1       cgd 
    187   1.1       cgd /* condition codes */
    188  1.13  dholland #define GREEN		0
    189  1.13  dholland #define DOCKED		1
    190  1.13  dholland #define YELLOW		2
    191  1.13  dholland #define RED		3
    192   1.1       cgd 
    193   1.1       cgd /* starbase coordinates */
    194  1.13  dholland #define MAXBASES	9	/* maximum number of starbases in galaxy */
    195   1.1       cgd 
    196   1.1       cgd /*  distress calls  */
    197  1.13  dholland #define MAXDISTR	5	/* maximum concurrent distress calls */
    198   1.1       cgd 
    199   1.1       cgd /* phaser banks */
    200  1.13  dholland #define NBANKS		6	/* number of phaser banks */
    201   1.1       cgd 
    202   1.1       cgd struct xy
    203   1.1       cgd {
    204   1.5  christos 	unsigned char	x, y;		/* coordinates */
    205   1.1       cgd };
    206   1.1       cgd 
    207   1.1       cgd 
    208   1.1       cgd /*
    209   1.1       cgd  *	note that much of the stuff in the following structs CAN NOT
    210   1.1       cgd  *	be moved around!!!!
    211   1.1       cgd  */
    212   1.1       cgd 
    213   1.1       cgd 
    214   1.1       cgd /* information regarding the state of the starship */
    215   1.8       jsm struct Ship_struct
    216   1.1       cgd {
    217   1.1       cgd 	double	warp;		/* warp factor */
    218   1.1       cgd 	double	warp2;		/* warp factor squared */
    219   1.1       cgd 	double	warp3;		/* warp factor cubed */
    220   1.1       cgd 	char	shldup;		/* shield up flag */
    221   1.1       cgd 	char	cloaked;	/* set if cloaking device on */
    222   1.1       cgd 	int	energy;		/* starship's energy */
    223   1.1       cgd 	int	shield;		/* energy in shields */
    224   1.1       cgd 	double	reserves;	/* life support reserves */
    225   1.1       cgd 	int	crew;		/* ship's complement */
    226   1.1       cgd 	int	brigfree;	/* space left in brig */
    227   1.1       cgd 	char	torped;		/* torpedoes */
    228   1.1       cgd 	char	cloakgood;	/* set if we have moved */
    229   1.1       cgd 	int	quadx;		/* quadrant x coord */
    230   1.1       cgd 	int	quady;		/* quadrant y coord */
    231   1.1       cgd 	int	sectx;		/* sector x coord */
    232   1.1       cgd 	int	secty;		/* sector y coord */
    233   1.5  christos 	unsigned char	cond;	/* condition code */
    234   1.1       cgd 	char	sinsbad;	/* Space Inertial Navigation System condition */
    235   1.6   hubertf 	const char *shipname;	/* name of current starship */
    236   1.1       cgd 	char	ship;		/* current starship */
    237   1.1       cgd 	int	distressed;	/* number of distress calls */
    238   1.8       jsm };
    239   1.8       jsm extern struct Ship_struct Ship;
    240   1.1       cgd 
    241   1.1       cgd /* sinsbad is set if SINS is working but not calibrated */
    242   1.1       cgd 
    243   1.1       cgd /* game related information, mostly scoring */
    244   1.8       jsm struct Game_struct
    245   1.1       cgd {
    246   1.1       cgd 	int	killk;		/* number of klingons killed */
    247   1.1       cgd 	int	deaths;		/* number of deaths onboard Enterprise */
    248   1.1       cgd 	char	negenbar;	/* number of hits on negative energy barrier */
    249   1.1       cgd 	char	killb;		/* number of starbases killed */
    250   1.1       cgd 	int	kills;		/* number of stars killed */
    251   1.1       cgd 	char	skill;		/* skill rating of player */
    252   1.1       cgd 	char	length;		/* length of game */
    253   1.1       cgd 	char	killed;		/* set if you were killed */
    254   1.1       cgd 	char	killinhab;	/* number of inhabited starsystems killed */
    255   1.1       cgd 	char	tourn;		/* set if a tournament game */
    256   1.1       cgd 	char	passwd[15];	/* game password */
    257   1.1       cgd 	char	snap;		/* set if snapshot taken */
    258   1.1       cgd 	char	helps;		/* number of help calls */
    259   1.1       cgd 	int	captives;	/* total number of captives taken */
    260   1.8       jsm };
    261   1.8       jsm extern struct Game_struct Game;
    262   1.1       cgd 
    263   1.1       cgd /* per move information */
    264   1.8       jsm struct Move_struct
    265   1.1       cgd {
    266   1.1       cgd 	char	free;		/* set if a move is free */
    267   1.1       cgd 	char	endgame;	/* end of game flag */
    268   1.1       cgd 	char	shldchg;	/* set if shields changed this move */
    269   1.1       cgd 	char	newquad;	/* set if just entered this quadrant */
    270   1.1       cgd 	char	resting;	/* set if this move is a rest */
    271   1.1       cgd 	double	time;		/* time used this move */
    272   1.8       jsm };
    273   1.8       jsm extern struct Move_struct Move;
    274   1.1       cgd 
    275   1.1       cgd /* parametric information */
    276   1.8       jsm struct Param_struct
    277   1.1       cgd {
    278   1.5  christos 	unsigned char	bases;	/* number of starbases */
    279   1.1       cgd 	char	klings;		/* number of klingons */
    280   1.1       cgd 	double	date;		/* stardate */
    281   1.1       cgd 	double	time;		/* time left */
    282   1.1       cgd 	double	resource;	/* Federation resources */
    283   1.1       cgd 	int	energy;		/* starship's energy */
    284   1.1       cgd 	int	shield;		/* energy in shields */
    285   1.1       cgd 	double	reserves;	/* life support reserves */
    286   1.1       cgd 	int	crew;		/* size of ship's complement */
    287   1.1       cgd 	int	brigfree;	/* max possible number of captives */
    288   1.1       cgd 	char	torped;		/* photon torpedos */
    289   1.1       cgd 	double	damfac[NDEV];	/* damage factor */
    290   1.1       cgd 	double	dockfac;	/* docked repair time factor */
    291   1.1       cgd 	double	regenfac;	/* regeneration factor */
    292   1.1       cgd 	int	stopengy;	/* energy to do emergency stop */
    293   1.1       cgd 	int	shupengy;	/* energy to put up shields */
    294   1.1       cgd 	int	klingpwr;	/* Klingon initial power */
    295   1.1       cgd 	int	warptime;	/* time chewer multiplier */
    296   1.1       cgd 	double	phasfac;	/* Klingon phaser power eater factor */
    297   1.1       cgd 	char	moveprob[6];	/* probability that a Klingon moves */
    298   1.1       cgd 	double	movefac[6];	/* Klingon move distance multiplier */
    299   1.1       cgd 	double	eventdly[NEVENTS];	/* event time multipliers */
    300   1.1       cgd 	double	navigcrud[2];	/* navigation crudup factor */
    301   1.1       cgd 	int	cloakenergy;	/* cloaking device energy per stardate */
    302   1.1       cgd 	double	damprob[NDEV];	/* damage probability */
    303   1.1       cgd 	double	hitfac;		/* Klingon attack factor */
    304   1.1       cgd 	int	klingcrew;	/* number of Klingons in a crew */
    305   1.1       cgd 	double	srndrprob;	/* surrender probability */
    306   1.1       cgd 	int	energylow;	/* low energy mark (cond YELLOW) */
    307   1.8       jsm };
    308   1.8       jsm extern struct Param_struct Param;
    309   1.1       cgd 
    310   1.1       cgd /* Sum of damage probabilities must add to 1000 */
    311   1.1       cgd 
    312   1.1       cgd /* other information kept in a snapshot */
    313   1.8       jsm struct Now_struct
    314   1.1       cgd {
    315   1.5  christos 	unsigned char	bases;	/* number of starbases */
    316   1.1       cgd 	char	klings;		/* number of klingons */
    317   1.1       cgd 	double	date;		/* stardate */
    318   1.1       cgd 	double	time;		/* time left */
    319   1.1       cgd 	double	resource;	/* Federation resources */
    320   1.1       cgd 	char	distressed;	/* number of currently distressed quadrants */
    321   1.1       cgd 	struct event	*eventptr[NEVENTS];	/* pointer to event structs */
    322   1.1       cgd 	struct xy	base[MAXBASES];		/* locations of starbases */
    323   1.8       jsm };
    324   1.8       jsm extern struct Now_struct Now;
    325   1.1       cgd 
    326   1.1       cgd /* Other stuff, not dumped in a snapshot */
    327   1.8       jsm struct Etc_struct
    328   1.1       cgd {
    329   1.1       cgd 	struct kling	klingon[MAXKLQUAD];	/* sorted Klingon list */
    330   1.4   thorpej 	short		nkling;			/* number of Klingons in this sector */
    331   1.1       cgd 						/* < 0 means automatic override mode */
    332   1.1       cgd 	char		fast;			/* set if speed > 300 baud */
    333   1.1       cgd 	struct xy	starbase;	/* starbase in current quadrant */
    334   1.1       cgd 	char		snapshot[sizeof Quad + sizeof Event + sizeof Now];	/* snapshot for time warp */
    335   1.1       cgd 	char		statreport;		/* set to get a status report on a srscan */
    336   1.8       jsm };
    337   1.8       jsm extern struct Etc_struct Etc;
    338   1.1       cgd 
    339   1.1       cgd /*
    340   1.1       cgd  *	eventptr is a pointer to the event[] entry of the last
    341   1.1       cgd  *	scheduled event of each type.  Zero if no such event scheduled.
    342   1.1       cgd  */
    343   1.1       cgd 
    344   1.1       cgd /* Klingon move indicies */
    345  1.13  dholland #define KM_OB		0	/* Old quadrant, Before attack */
    346  1.13  dholland #define KM_OA		1	/* Old quadrant, After attack */
    347  1.13  dholland #define KM_EB		2	/* Enter quadrant, Before attack */
    348  1.13  dholland #define KM_EA		3	/* Enter quadrant, After attack */
    349  1.13  dholland #define KM_LB		4	/* Leave quadrant, Before attack */
    350  1.13  dholland #define KM_LA		5	/* Leave quadrant, After attack */
    351   1.1       cgd 
    352   1.1       cgd /* you lose codes */
    353  1.13  dholland #define L_NOTIME	1	/* ran out of time */
    354  1.13  dholland #define L_NOENGY	2	/* ran out of energy */
    355  1.13  dholland #define L_DSTRYD	3	/* destroyed by a Klingon */
    356  1.13  dholland #define L_NEGENB	4	/* ran into the negative energy barrier */
    357  1.13  dholland #define L_SUICID	5	/* destroyed in a nova */
    358  1.13  dholland #define L_SNOVA		6	/* destroyed in a supernova */
    359  1.13  dholland #define L_NOLIFE	7	/* life support died (so did you) */
    360  1.13  dholland #define L_NOHELP	8	/* you could not be rematerialized */
    361  1.13  dholland #define L_TOOFAST	9	/* pretty stupid going at warp 10 */
    362  1.13  dholland #define L_STAR		10	/* ran into a star */
    363  1.13  dholland #define L_DSTRCT	11	/* self destructed */
    364  1.13  dholland #define L_CAPTURED	12	/* captured by Klingons */
    365  1.13  dholland #define L_NOCREW	13	/* you ran out of crew */
    366   1.1       cgd 
    367   1.1       cgd /******************  COMPILE OPTIONS  ***********************/
    368   1.1       cgd 
    369   1.1       cgd /* Trace info */
    370  1.13  dholland #define xTRACE		1
    371   1.8       jsm extern int	Trace;
    372   1.5  christos 
    373  1.13  dholland #define TOOLARGE	(DBL_MAX / 2)	/* < DOUBLE_MAX for everyone */
    374  1.12  christos 
    375   1.5  christos /* abandon.c */
    376  1.10       jsm void abandon(int);
    377   1.5  christos 
    378   1.5  christos /* attack.c */
    379  1.10       jsm void attack(int);
    380   1.5  christos 
    381   1.5  christos /* autover.c */
    382  1.10       jsm void autover(void);
    383   1.5  christos 
    384   1.5  christos /* capture.c */
    385  1.10       jsm void capture(int);
    386  1.10       jsm struct kling *selectklingon(void);
    387   1.5  christos 
    388   1.5  christos /* cgetc.c */
    389  1.10       jsm char cgetc(int);
    390   1.5  christos 
    391   1.5  christos /* check_out.c */
    392  1.10       jsm int check_out(int);
    393   1.5  christos 
    394   1.5  christos /* checkcond.c */
    395  1.10       jsm void checkcond(void);
    396   1.5  christos 
    397   1.5  christos /* compkl.c */
    398  1.10       jsm void compkldist(int);
    399   1.5  christos 
    400   1.5  christos /* computer.c */
    401  1.10       jsm void computer(int);
    402   1.5  christos 
    403   1.5  christos /* damage.c */
    404  1.10       jsm void damage(int, double);
    405   1.5  christos 
    406   1.5  christos /* damaged.c */
    407  1.10       jsm int damaged(int);
    408   1.5  christos 
    409   1.5  christos /* dcrept.c */
    410  1.10       jsm void dcrept(int);
    411   1.5  christos 
    412   1.5  christos /* destruct.c */
    413  1.10       jsm void destruct(int);
    414   1.5  christos 
    415   1.5  christos /* dock.c */
    416  1.10       jsm void dock(int);
    417  1.10       jsm void undock(int);
    418   1.5  christos 
    419   1.5  christos /* dumpgame.c */
    420  1.10       jsm void dumpgame(int);
    421  1.10       jsm int restartgame(void);
    422   1.5  christos 
    423   1.5  christos /* dumpme.c */
    424  1.10       jsm void dumpme(int);
    425   1.5  christos 
    426   1.5  christos /* dumpssradio.c */
    427  1.10       jsm int dumpssradio(void);
    428   1.5  christos 
    429   1.5  christos /* events.c */
    430  1.10       jsm int events(int);
    431   1.5  christos 
    432   1.5  christos /* externs.c */
    433   1.5  christos 
    434   1.5  christos /* getcodi.c */
    435  1.10       jsm int getcodi(int *, double *);
    436   1.5  christos 
    437   1.5  christos /* help.c */
    438  1.10       jsm void help(int);
    439   1.5  christos 
    440   1.5  christos /* impulse.c */
    441  1.10       jsm void impulse(int);
    442   1.5  christos 
    443   1.5  christos /* initquad.c */
    444  1.10       jsm void initquad(int);
    445  1.10       jsm void sector(int *, int *);
    446   1.5  christos 
    447   1.5  christos /* kill.c */
    448  1.10       jsm void killk(int, int );
    449  1.10       jsm void killb(int, int );
    450  1.10       jsm void kills(int, int , int);
    451  1.10       jsm void killd(int, int , int);
    452   1.5  christos 
    453   1.5  christos /* klmove.c */
    454  1.10       jsm void klmove(int);
    455   1.5  christos 
    456   1.5  christos /* lose.c */
    457  1.10       jsm void lose(int) __attribute__((__noreturn__));
    458   1.5  christos 
    459   1.5  christos /* lrscan.c */
    460  1.10       jsm void lrscan(int);
    461   1.5  christos 
    462   1.5  christos /* move.c */
    463  1.10       jsm double move(int, int, double, double);
    464   1.5  christos 
    465   1.5  christos /* nova.c */
    466  1.10       jsm void nova(int, int );
    467   1.5  christos 
    468   1.5  christos /* out.c */
    469  1.10       jsm void out(int);
    470   1.5  christos 
    471   1.5  christos /* phaser.c */
    472  1.10       jsm void phaser(int);
    473   1.5  christos 
    474   1.5  christos /* play.c */
    475  1.10       jsm void myreset(int) __attribute__((__noreturn__));
    476  1.10       jsm void play(void) __attribute__((__noreturn__));
    477   1.5  christos 
    478   1.5  christos /* ram.c */
    479  1.10       jsm void ram(int, int );
    480   1.5  christos 
    481   1.5  christos /* ranf.c */
    482  1.10       jsm int ranf(int);
    483  1.10       jsm double franf(void);
    484   1.5  christos 
    485   1.5  christos /* rest.c */
    486  1.10       jsm void rest(int);
    487   1.5  christos 
    488   1.5  christos /* schedule.c */
    489  1.10       jsm struct event *schedule(int, double, int, int , int);
    490  1.10       jsm void reschedule(struct event *, double);
    491  1.10       jsm void unschedule(struct event *);
    492  1.10       jsm struct event *xsched(int, int, int, int , int );
    493  1.10       jsm void xresched(struct event *, int, int);
    494   1.5  christos 
    495   1.5  christos /* score.c */
    496  1.10       jsm long score(void);
    497   1.5  christos 
    498   1.5  christos /* setup.c */
    499  1.10       jsm void setup(void);
    500   1.5  christos 
    501   1.5  christos /* setwarp.c */
    502  1.10       jsm void setwarp(int);
    503   1.5  christos 
    504   1.5  christos /* shield.c */
    505  1.10       jsm void shield(int);
    506   1.5  christos 
    507   1.5  christos /* snova.c */
    508  1.10       jsm void snova(int, int );
    509   1.5  christos 
    510   1.5  christos /* srscan.c */
    511  1.10       jsm void srscan(int);
    512   1.5  christos 
    513   1.5  christos /* systemname.c */
    514  1.10       jsm const char *systemname(const struct quad *);
    515   1.5  christos 
    516   1.5  christos /* torped.c */
    517  1.10       jsm void torped(int);
    518   1.5  christos 
    519   1.5  christos /* visual.c */
    520  1.10       jsm void visual(int);
    521   1.5  christos 
    522   1.5  christos /* warp.c */
    523  1.10       jsm void dowarp(int);
    524  1.10       jsm void warp(int, int, double);
    525   1.5  christos 
    526   1.5  christos /* win.c */
    527  1.10       jsm void win(void) __attribute__((__noreturn__));
    528