X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/57a75ab7b9a0f4999cae7c0fa5acb46f230f38f2..ccc05ba3f3d43577640203ebe811128249f7f6e8:/sail/extern.h?ds=sidebyside diff --git a/sail/extern.h b/sail/extern.h index 4d247370..21ea2428 100644 --- a/sail/extern.h +++ b/sail/extern.h @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.16 2000/11/30 22:02:20 jwise Exp $ */ +/* $NetBSD: extern.h,v 1.24 2001/01/04 06:16:51 jwise Exp $ */ /* * Copyright (c) 1983, 1993 @@ -35,32 +35,24 @@ * @(#)externs.h 8.1 (Berkeley) 5/31/93 */ -#include -#include -#include -#include -#include -#include #include "machdep.h" /* program mode */ extern int mode; -extern jmp_buf restart; #define MODE_PLAYER 1 #define MODE_DRIVER 2 #define MODE_LOGGER 3 /* command line flags */ -extern char debug; /* -D */ -extern char randomize; /* -x, give first available ship */ -extern char longfmt; /* -l, print score in long format */ -extern char nobells; /* -b, don't ring bell before Signal */ +extern int randomize; /* -x, give first available ship */ +extern int longfmt; /* -l, print score in long format */ +extern int nobells; /* -b, don't ring bell before Signal */ /* other initial modes */ extern gid_t gid; extern gid_t egid; -#define dieroll() ((rand() >> 3) % 6 + 1) +#define dieroll() ((random()) % 6 + 1) #define sqr(a) ((a) * (a)) #define abs(a) ((a) > 0 ? (a) : -(a)) #define min(a,b) ((a) < (b) ? (a) : (b)) @@ -298,16 +290,15 @@ extern int turn; extern int game; extern int alive; extern int people; -extern char hasdriver; +extern int hasdriver; /* assorted.c */ -void table (int, int, int, struct ship *, struct ship *, int); +void table (struct ship *, struct ship *, int, int, int, int); void Cleansnag (struct ship *, struct ship *, int, int); /* dr_1.c */ void unfoul (void); void boardcomp (void); -int fightitout (struct ship *, struct ship *, int); void resolve (void); void compcombat (void); int next (void); @@ -316,20 +307,10 @@ int next (void); void thinkofgrapples (void); void checkup (void); void prizecheck (void); -int str_end (const char *); -void closeon (struct ship *, struct ship *, char[], int, int, int); -int score (char[], struct ship *, struct ship *, int); -void move_ship (const char *, struct ship *, unsigned char *, short *, short *, char *); -void try (char[], char [], int, int, int, int, int, struct ship *, - struct ship *, int *, int); -void rmend (char *); +void closeon (struct ship *, struct ship *, char *, int, int, int); /* dr_3.c */ void moveall (void); -int stillmoving (int); -int is_isolated (struct ship *); -int push (struct ship *, struct ship *); -void step (int, struct ship *, char *); void sendbp (struct ship *, struct ship *, int, int); int is_toughmelee (struct ship *, struct ship *, int, int); void reload (void); @@ -340,7 +321,7 @@ void ungrap (struct ship *, struct ship *); void grap (struct ship *, struct ship *); /* dr_5.c */ -void subtract (struct ship *, int, int [3], struct ship *, int); +void subtract (struct ship *, struct ship *, int, int [3], int); int mensent (struct ship *, struct ship *, int[3], struct ship **, int *, int); @@ -357,7 +338,6 @@ int lo_main (void); /* misc.c */ int range (struct ship *, struct ship *); struct ship *closestenemy (struct ship *, int, int); -int angle (int, int); int gunsbear (struct ship *, struct ship *); int portside (struct ship *, struct ship *, int); int colours (struct ship *); @@ -391,11 +371,9 @@ void eyeball (struct ship *); /* pl_5.c */ void acceptmove (void); void acceptboard (void); -void parties (int[3], struct ship *, int, int); /* pl_6.c */ void repair (void); -int turned (void); void loadplayer (void); /* pl_7.c */ @@ -406,9 +384,7 @@ void Signal (const char *, struct ship *, ...) __attribute__((__format__(__printf__,1,3))); void Msg (const char *, ...) __attribute__((__format__(__printf__,1,2))); -void Scroll (void); void prompt (const char *, struct ship *); -void endprompt (int); int sgetch (const char *, struct ship *, int); void sgetstr (const char *, char *, int); void draw_screen (void); @@ -422,11 +398,9 @@ void upview (void); void downview (void); void leftview (void); void rightview (void); -void adjustview (void); /* pl_main.c */ int pl_main (void); -void initialize (void); /* sync.c */ void fmtship (char *, size_t, const char *, struct ship *); @@ -440,4 +414,3 @@ void sync_close (int); void Write (int, struct ship *, long, long, long, long); void Writestr (int, struct ship *, const char *); int Sync (void); -int sync_update (int, struct ship *, const char *, long, long, long, long);