2011-08-30 00:30:36 +04:00
|
|
|
/* $NetBSD: extern.h,v 1.38 2011/08/29 20:30:37 joerg Exp $ */
|
1997-01-07 15:42:14 +03:00
|
|
|
|
1996-12-28 22:09:10 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 1983, 1993
|
|
|
|
* The Regents of the University of California. All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
2003-08-07 13:36:50 +04:00
|
|
|
* 3. Neither the name of the University nor the names of its contributors
|
1996-12-28 22:09:10 +03:00
|
|
|
* may be used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*
|
|
|
|
* @(#)externs.h 8.1 (Berkeley) 5/31/93
|
|
|
|
*/
|
|
|
|
|
2004-01-27 23:27:29 +03:00
|
|
|
#include <sys/types.h>
|
2009-03-14 23:04:43 +03:00
|
|
|
#include <stdbool.h>
|
2004-01-27 23:27:29 +03:00
|
|
|
|
1996-12-28 22:09:10 +03:00
|
|
|
#include "machdep.h"
|
|
|
|
|
|
|
|
/* program mode */
|
1999-12-28 21:05:24 +03:00
|
|
|
extern int mode;
|
1996-12-28 22:09:10 +03:00
|
|
|
#define MODE_PLAYER 1
|
|
|
|
#define MODE_DRIVER 2
|
|
|
|
#define MODE_LOGGER 3
|
|
|
|
|
|
|
|
/* command line flags */
|
2010-08-06 13:14:40 +04:00
|
|
|
extern bool randomize; /* -x, give first available ship */
|
|
|
|
extern bool longfmt; /* -l, print score in long format */
|
|
|
|
extern bool nobells; /* -b, don't ring bell before Signal */
|
1996-12-28 22:09:10 +03:00
|
|
|
|
2010-08-06 13:14:40 +04:00
|
|
|
/* other initial data */
|
2000-02-10 01:27:55 +03:00
|
|
|
extern gid_t gid;
|
|
|
|
extern gid_t egid;
|
2010-08-06 13:14:40 +04:00
|
|
|
#define MAXNAMESIZE 20
|
|
|
|
extern char myname[MAXNAMESIZE];
|
1996-12-28 22:09:10 +03:00
|
|
|
|
2000-12-01 01:06:04 +03:00
|
|
|
#define dieroll() ((random()) % 6 + 1)
|
1996-12-28 22:09:10 +03:00
|
|
|
#define sqr(a) ((a) * (a))
|
|
|
|
#define min(a,b) ((a) < (b) ? (a) : (b))
|
|
|
|
|
|
|
|
#define grappled(a) ((a)->file->ngrap)
|
|
|
|
#define fouled(a) ((a)->file->nfoul)
|
|
|
|
#define snagged(a) (grappled(a) + fouled(a))
|
|
|
|
|
|
|
|
#define grappled2(a, b) ((a)->file->grap[(b)->file->index].sn_count)
|
|
|
|
#define fouled2(a, b) ((a)->file->foul[(b)->file->index].sn_count)
|
|
|
|
#define snagged2(a, b) (grappled2(a, b) + fouled2(a, b))
|
|
|
|
|
2009-03-14 22:35:13 +03:00
|
|
|
#define Xgrappled2(a, b) ((a)->file->grap[(b)->file->index].sn_turn < turn-1 \
|
|
|
|
? grappled2(a, b) : 0)
|
|
|
|
#define Xfouled2(a, b) ((a)->file->foul[(b)->file->index].sn_turn < turn-1 \
|
|
|
|
? fouled2(a, b) : 0)
|
1996-12-28 22:09:10 +03:00
|
|
|
#define Xsnagged2(a, b) (Xgrappled2(a, b) + Xfouled2(a, b))
|
|
|
|
|
|
|
|
#define cleangrapple(a, b, c) Cleansnag(a, b, c, 1)
|
|
|
|
#define cleanfoul(a, b, c) Cleansnag(a, b, c, 2)
|
|
|
|
#define cleansnag(a, b, c) Cleansnag(a, b, c, 3)
|
|
|
|
|
2009-03-14 22:35:13 +03:00
|
|
|
#define sterncolour(sp) ((sp)->file->stern+'0'-((sp)->file->captured ? 10 : 0))
|
1996-12-28 22:09:10 +03:00
|
|
|
#define sternrow(sp) ((sp)->file->row + dr[(sp)->file->dir])
|
|
|
|
#define sterncol(sp) ((sp)->file->col + dc[(sp)->file->dir])
|
|
|
|
|
|
|
|
#define capship(sp) ((sp)->file->captured?(sp)->file->captured:(sp))
|
|
|
|
|
|
|
|
#define readyname(r) ((r) & R_LOADING ? '*' : ((r) & R_INITIAL ? '!' : ' '))
|
|
|
|
|
|
|
|
/* loadL and loadR, should match loadname[] */
|
|
|
|
#define L_EMPTY 0 /* should be 0, don't change */
|
|
|
|
#define L_GRAPE 1
|
|
|
|
#define L_CHAIN 2
|
|
|
|
#define L_ROUND 3
|
|
|
|
#define L_DOUBLE 4
|
|
|
|
#define L_EXPLODE 5
|
|
|
|
|
|
|
|
/*
|
|
|
|
* readyL and readyR, these are bits, except R_EMPTY
|
|
|
|
*/
|
|
|
|
#define R_EMPTY 0 /* not loaded and not loading */
|
|
|
|
#define R_LOADING 1 /* loading */
|
|
|
|
#define R_DOUBLE 2 /* loading double */
|
|
|
|
#define R_LOADED 4 /* loaded */
|
|
|
|
#define R_INITIAL 8 /* loaded initial */
|
|
|
|
|
|
|
|
#define HULL 0
|
|
|
|
#define RIGGING 1
|
|
|
|
|
|
|
|
#define NLOG 10
|
|
|
|
struct logs {
|
2010-08-06 13:14:40 +04:00
|
|
|
char l_name[MAXNAMESIZE];
|
1996-12-28 22:09:10 +03:00
|
|
|
int l_uid;
|
|
|
|
int l_shipnum;
|
|
|
|
int l_gamenum;
|
|
|
|
int l_netpoints;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct BP {
|
|
|
|
struct ship *toship;
|
2006-03-18 04:43:52 +03:00
|
|
|
short turnsent;
|
1996-12-28 22:09:10 +03:00
|
|
|
short mensent;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct snag {
|
|
|
|
short sn_count;
|
|
|
|
short sn_turn;
|
|
|
|
};
|
|
|
|
|
2010-08-06 13:14:40 +04:00
|
|
|
#define NSCENE /*nscene*/ 32
|
1996-12-28 22:09:10 +03:00
|
|
|
#define NSHIP 10
|
|
|
|
#define NBP 3
|
|
|
|
|
|
|
|
#define NNATION 8
|
|
|
|
#define N_A 0
|
|
|
|
#define N_B 1
|
|
|
|
#define N_S 2
|
|
|
|
#define N_F 3
|
|
|
|
#define N_J 4
|
|
|
|
#define N_D 5
|
|
|
|
#define N_K 6
|
|
|
|
#define N_O 7
|
|
|
|
|
|
|
|
struct File {
|
|
|
|
int index;
|
2010-08-06 13:14:40 +04:00
|
|
|
char captain[MAXNAMESIZE]; /* 0 */
|
1996-12-28 22:09:10 +03:00
|
|
|
short points; /* 20 */
|
1997-10-13 23:42:53 +04:00
|
|
|
unsigned char loadL; /* 22 */
|
|
|
|
unsigned char loadR; /* 24 */
|
|
|
|
unsigned char readyL; /* 26 */
|
|
|
|
unsigned char readyR; /* 28 */
|
1996-12-28 22:09:10 +03:00
|
|
|
struct BP OBP[NBP]; /* 30 */
|
|
|
|
struct BP DBP[NBP]; /* 48 */
|
|
|
|
char struck; /* 66 */
|
|
|
|
struct ship *captured; /* 68 */
|
|
|
|
short pcrew; /* 70 */
|
|
|
|
char movebuf[10]; /* 72 */
|
|
|
|
char drift; /* 82 */
|
|
|
|
short nfoul;
|
|
|
|
short ngrap;
|
|
|
|
struct snag foul[NSHIP]; /* 84 */
|
|
|
|
struct snag grap[NSHIP]; /* 124 */
|
|
|
|
char RH; /* 224 */
|
|
|
|
char RG; /* 226 */
|
|
|
|
char RR; /* 228 */
|
|
|
|
char FS; /* 230 */
|
|
|
|
char explode; /* 232 */
|
|
|
|
char sink; /* 234 */
|
1997-10-13 23:42:53 +04:00
|
|
|
unsigned char dir;
|
1996-12-28 22:09:10 +03:00
|
|
|
short col;
|
|
|
|
short row;
|
|
|
|
char loadwith;
|
|
|
|
char stern;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ship {
|
Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-09 01:17:44 +04:00
|
|
|
const char *shipname; /* 0 */
|
1996-12-28 22:09:10 +03:00
|
|
|
struct shipspecs *specs; /* 2 */
|
1997-10-13 23:42:53 +04:00
|
|
|
unsigned char nationality; /* 4 */
|
1996-12-28 22:09:10 +03:00
|
|
|
short shiprow; /* 6 */
|
|
|
|
short shipcol; /* 8 */
|
|
|
|
char shipdir; /* 10 */
|
|
|
|
struct File *file; /* 12 */
|
|
|
|
};
|
|
|
|
|
|
|
|
struct scenario {
|
|
|
|
char winddir; /* 0 */
|
|
|
|
char windspeed; /* 2 */
|
|
|
|
char windchange; /* 4 */
|
1997-10-13 23:42:53 +04:00
|
|
|
unsigned char vessels; /* 12 */
|
Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-09 01:17:44 +04:00
|
|
|
const char *name; /* 14 */
|
1996-12-28 22:09:10 +03:00
|
|
|
struct ship ship[NSHIP]; /* 16 */
|
|
|
|
};
|
2010-08-06 13:14:40 +04:00
|
|
|
extern struct scenario scene[NSCENE];
|
1999-12-28 21:05:24 +03:00
|
|
|
extern int nscene;
|
1996-12-28 22:09:10 +03:00
|
|
|
|
|
|
|
struct shipspecs {
|
|
|
|
char bs;
|
|
|
|
char fs;
|
|
|
|
char ta;
|
|
|
|
short guns;
|
1997-10-13 23:42:53 +04:00
|
|
|
unsigned char class;
|
1996-12-28 22:09:10 +03:00
|
|
|
char hull;
|
1997-10-13 23:42:53 +04:00
|
|
|
unsigned char qual;
|
1996-12-28 22:09:10 +03:00
|
|
|
char crew1;
|
|
|
|
char crew2;
|
|
|
|
char crew3;
|
|
|
|
char gunL;
|
|
|
|
char gunR;
|
|
|
|
char carL;
|
|
|
|
char carR;
|
1997-04-19 11:35:33 +04:00
|
|
|
int rig1;
|
|
|
|
int rig2;
|
|
|
|
int rig3;
|
|
|
|
int rig4;
|
1996-12-28 22:09:10 +03:00
|
|
|
short pts;
|
|
|
|
};
|
|
|
|
|
1999-12-28 21:05:24 +03:00
|
|
|
extern struct scenario *cc; /* the current scenario */
|
|
|
|
extern struct ship *ls; /* &cc->ship[cc->vessels] */
|
1996-12-28 22:09:10 +03:00
|
|
|
|
|
|
|
#define SHIP(s) (&cc->ship[s])
|
|
|
|
#define foreachship(sp) for ((sp) = cc->ship; (sp) < ls; (sp)++)
|
|
|
|
|
|
|
|
struct windeffects {
|
|
|
|
char A, B, C, D;
|
|
|
|
};
|
1999-12-28 21:05:24 +03:00
|
|
|
extern const struct windeffects WET[7][6];
|
1996-12-28 22:09:10 +03:00
|
|
|
|
|
|
|
struct Tables {
|
|
|
|
char H, G, C, R;
|
|
|
|
};
|
1999-12-28 21:05:24 +03:00
|
|
|
extern const struct Tables RigTable[11][6];
|
|
|
|
extern const struct Tables HullTable[11][6];
|
1996-12-28 22:09:10 +03:00
|
|
|
|
1999-12-28 21:05:24 +03:00
|
|
|
extern const char AMMO[9][4];
|
|
|
|
extern const char HDT[9][10];
|
|
|
|
extern const char HDTrake[9][10];
|
|
|
|
extern const char QUAL[9][5];
|
|
|
|
extern const char MT[9][3];
|
1996-12-28 22:09:10 +03:00
|
|
|
|
Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-09 01:17:44 +04:00
|
|
|
extern const char *const countryname[];
|
2010-08-06 13:14:40 +04:00
|
|
|
extern const char *const shortclassname[];
|
Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-09 01:17:44 +04:00
|
|
|
extern const char *const classname[];
|
|
|
|
extern const char *const directionname[];
|
|
|
|
extern const char *const qualname[];
|
|
|
|
extern const char loadname[];
|
1996-12-28 22:09:10 +03:00
|
|
|
|
Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-09 01:17:44 +04:00
|
|
|
extern const char rangeofshot[];
|
1996-12-28 22:09:10 +03:00
|
|
|
|
Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-09 01:17:44 +04:00
|
|
|
extern const char dr[], dc[];
|
1996-12-28 22:09:10 +03:00
|
|
|
|
1999-12-28 21:05:24 +03:00
|
|
|
extern int winddir;
|
|
|
|
extern int windspeed;
|
|
|
|
extern int turn;
|
|
|
|
extern int game;
|
|
|
|
extern int alive;
|
|
|
|
extern int people;
|
2001-01-04 08:34:56 +03:00
|
|
|
extern int hasdriver;
|
1996-12-28 22:09:10 +03:00
|
|
|
|
2010-08-06 13:14:40 +04:00
|
|
|
|
1997-10-13 23:42:53 +04:00
|
|
|
/* assorted.c */
|
2009-03-14 22:35:13 +03:00
|
|
|
void table(struct ship *, struct ship *, int, int, int, int);
|
|
|
|
void Cleansnag(struct ship *, struct ship *, int, int);
|
1997-10-13 23:42:53 +04:00
|
|
|
|
|
|
|
/* dr_1.c */
|
2009-03-14 22:35:13 +03:00
|
|
|
void unfoul(void);
|
|
|
|
void boardcomp(void);
|
|
|
|
void resolve(void);
|
|
|
|
void compcombat(void);
|
|
|
|
int next(void);
|
1997-10-13 23:42:53 +04:00
|
|
|
|
|
|
|
/* dr_2.c */
|
2009-03-14 22:35:13 +03:00
|
|
|
void thinkofgrapples(void);
|
|
|
|
void checkup(void);
|
|
|
|
void prizecheck(void);
|
2009-03-14 23:04:43 +03:00
|
|
|
void closeon(struct ship *, struct ship *, char *, size_t, int, int, bool);
|
1997-10-13 23:42:53 +04:00
|
|
|
|
|
|
|
/* dr_3.c */
|
2009-03-14 22:35:13 +03:00
|
|
|
void moveall(void);
|
|
|
|
void sendbp(struct ship *, struct ship *, int, int);
|
|
|
|
int is_toughmelee(struct ship *, struct ship *, int, int);
|
|
|
|
void reload(void);
|
|
|
|
void checksails(void);
|
1997-10-13 23:42:53 +04:00
|
|
|
|
|
|
|
/* dr_4.c */
|
2009-03-14 22:35:13 +03:00
|
|
|
void ungrap(struct ship *, struct ship *);
|
|
|
|
void grap(struct ship *, struct ship *);
|
1997-10-13 23:42:53 +04:00
|
|
|
|
|
|
|
/* dr_5.c */
|
2009-03-14 22:35:13 +03:00
|
|
|
void subtract(struct ship *, struct ship *, int, int [3], int);
|
|
|
|
int mensent(struct ship *, struct ship *, int[3], struct ship **, int *, int);
|
1997-10-13 23:42:53 +04:00
|
|
|
|
|
|
|
/* dr_main.c */
|
2009-03-14 22:35:13 +03:00
|
|
|
int dr_main(void);
|
2010-08-06 13:14:40 +04:00
|
|
|
void startdriver(void);
|
1997-10-13 23:42:53 +04:00
|
|
|
|
|
|
|
/* game.c */
|
2009-03-14 23:04:43 +03:00
|
|
|
int maxturns(struct ship *, bool *);
|
2009-03-14 22:35:13 +03:00
|
|
|
int maxmove(struct ship *, int, int);
|
1997-10-13 23:42:53 +04:00
|
|
|
|
|
|
|
/* lo_main.c */
|
2010-08-06 13:14:40 +04:00
|
|
|
void lo_curses(void);
|
2009-03-14 22:35:13 +03:00
|
|
|
int lo_main(void);
|
1997-10-13 23:42:53 +04:00
|
|
|
|
|
|
|
/* misc.c */
|
2009-03-14 22:35:13 +03:00
|
|
|
int range(struct ship *, struct ship *);
|
|
|
|
struct ship *closestenemy(struct ship *, int, int);
|
|
|
|
int gunsbear(struct ship *, struct ship *);
|
|
|
|
int portside(struct ship *, struct ship *, int);
|
|
|
|
int colours(struct ship *);
|
|
|
|
void logger(struct ship *);
|
1997-10-13 23:42:53 +04:00
|
|
|
|
|
|
|
/* parties.c */
|
2009-03-14 22:35:13 +03:00
|
|
|
int meleeing(struct ship *, struct ship *);
|
|
|
|
int boarding(struct ship *, int);
|
|
|
|
void unboard(struct ship *, struct ship *, int);
|
1997-10-13 23:42:53 +04:00
|
|
|
|
|
|
|
/* pl_1.c */
|
2011-08-26 10:18:16 +04:00
|
|
|
void leave(int) __dead;
|
|
|
|
void choke(int) __dead;
|
2009-03-14 22:35:13 +03:00
|
|
|
void child(int);
|
1997-10-13 23:42:53 +04:00
|
|
|
|
|
|
|
/* pl_2.c */
|
2009-03-15 06:33:56 +03:00
|
|
|
void newturn(int);
|
2011-08-26 10:18:16 +04:00
|
|
|
void play(void) __dead;
|
1997-10-13 23:42:53 +04:00
|
|
|
|
|
|
|
/* pl_3.c */
|
2009-03-14 22:35:13 +03:00
|
|
|
void acceptcombat(void);
|
|
|
|
void grapungrap(void);
|
|
|
|
void unfoulplayer(void);
|
1997-10-13 23:42:53 +04:00
|
|
|
|
|
|
|
/* pl_4.c */
|
2009-03-14 22:35:13 +03:00
|
|
|
void changesail(void);
|
|
|
|
void acceptsignal(void);
|
|
|
|
void lookout(void);
|
|
|
|
const char *saywhat(struct ship *, int);
|
|
|
|
void eyeball(struct ship *);
|
1997-10-13 23:42:53 +04:00
|
|
|
|
|
|
|
/* pl_5.c */
|
2009-03-14 22:35:13 +03:00
|
|
|
void acceptmove(void);
|
|
|
|
void acceptboard(void);
|
1997-10-13 23:42:53 +04:00
|
|
|
|
|
|
|
/* pl_6.c */
|
2009-03-14 22:35:13 +03:00
|
|
|
void repair(void);
|
|
|
|
void loadplayer(void);
|
1997-10-13 23:42:53 +04:00
|
|
|
|
|
|
|
/* pl_7.c */
|
2009-03-14 22:35:13 +03:00
|
|
|
void initscreen(void);
|
|
|
|
void cleanupscreen(void);
|
2011-08-26 10:18:16 +04:00
|
|
|
void Signal(const char *, struct ship *, ...) __printflike(1,3);
|
|
|
|
void Msg(const char *, ...) __printflike(1,2);
|
2009-03-14 22:35:13 +03:00
|
|
|
int sgetch(const char *, struct ship *, int);
|
|
|
|
void sgetstr(const char *, char *, int);
|
|
|
|
void centerview(void);
|
|
|
|
void upview(void);
|
|
|
|
void downview(void);
|
|
|
|
void leftview(void);
|
|
|
|
void rightview(void);
|
2010-08-06 13:14:40 +04:00
|
|
|
void startup(void);
|
1997-10-13 23:42:53 +04:00
|
|
|
|
|
|
|
/* pl_main.c */
|
2010-08-06 13:14:40 +04:00
|
|
|
void pl_main_init(void);
|
|
|
|
void pl_main_uninit(void);
|
2011-08-30 00:30:36 +04:00
|
|
|
__dead void pl_main(void);
|
1997-10-13 23:42:53 +04:00
|
|
|
|
|
|
|
/* sync.c */
|
2009-03-14 22:35:13 +03:00
|
|
|
void fmtship(char *, size_t, const char *, struct ship *);
|
|
|
|
void makesignal(struct ship *, const char *, struct ship *, ...)
|
2011-08-26 10:18:16 +04:00
|
|
|
__printflike(2,4);
|
|
|
|
void makemsg(struct ship *, const char *, ...) __printflike(2, 3);
|
2009-03-14 22:35:13 +03:00
|
|
|
int sync_exists(int);
|
|
|
|
int sync_open(void);
|
|
|
|
void sync_close(int);
|
|
|
|
int Sync(void);
|
2009-03-15 01:52:52 +03:00
|
|
|
|
|
|
|
void send_captain(struct ship *ship, const char *astr);
|
|
|
|
void send_captured(struct ship *ship, long a);
|
|
|
|
void send_class(struct ship *ship, long a);
|
|
|
|
void send_crew(struct ship *ship, long a, long b, long c);
|
|
|
|
void send_dbp(struct ship *ship, long a, long b, long c, long d);
|
|
|
|
void send_drift(struct ship *ship, long a);
|
|
|
|
void send_explode(struct ship *ship, long a);
|
|
|
|
void send_foul(struct ship *ship, long a);
|
|
|
|
void send_gunl(struct ship *ship, long a, long b);
|
|
|
|
void send_gunr(struct ship *ship, long a, long b);
|
|
|
|
void send_hull(struct ship *ship, long a);
|
|
|
|
void send_move(struct ship *ship, const char *astr);
|
|
|
|
void send_obp(struct ship *ship, long a, long b, long c, long d);
|
|
|
|
void send_pcrew(struct ship *ship, long a);
|
|
|
|
void send_unfoul(struct ship *ship, long a, long b);
|
|
|
|
void send_points(struct ship *ship, long a);
|
|
|
|
void send_qual(struct ship *ship, long a);
|
|
|
|
void send_ungrap(struct ship *ship, long a, long b);
|
|
|
|
void send_rigg(struct ship *ship, long a, long b, long c, long d);
|
|
|
|
void send_col(struct ship *ship, long a);
|
|
|
|
void send_dir(struct ship *ship, long a);
|
|
|
|
void send_row(struct ship *ship, long a);
|
|
|
|
void send_signal(struct ship *ship, const char *astr);
|
|
|
|
void send_sink(struct ship *ship, long a);
|
|
|
|
void send_struck(struct ship *ship, long a);
|
|
|
|
void send_ta(struct ship *ship, long a);
|
|
|
|
void send_alive(void);
|
|
|
|
void send_turn(long a);
|
|
|
|
void send_wind(long a, long b);
|
|
|
|
void send_fs(struct ship *ship, long a);
|
|
|
|
void send_grap(struct ship *ship, long a);
|
|
|
|
void send_rig1(struct ship *ship, long a);
|
|
|
|
void send_rig2(struct ship *ship, long a);
|
|
|
|
void send_rig3(struct ship *ship, long a);
|
|
|
|
void send_rig4(struct ship *ship, long a);
|
|
|
|
void send_begin(struct ship *ship);
|
|
|
|
void send_end(struct ship *ship);
|
|
|
|
void send_ddead(void);
|