diff options
author | dholland <dholland@NetBSD.org> | 2010-08-06 09:14:40 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2010-08-06 09:14:40 +0000 |
commit | 240117cdf638c185d8469527e583276e546bf666 (patch) | |
tree | 5f45461542b4f87b9eb0c8e1a70e7c8f59449efd /sail/globals.c | |
parent | c20418e9c57794ae8f5522f5e5ea962112bde704 (diff) | |
download | bsdgames-darwin-240117cdf638c185d8469527e583276e546bf666.tar.gz bsdgames-darwin-240117cdf638c185d8469527e583276e546bf666.tar.zst bsdgames-darwin-240117cdf638c185d8469527e583276e546bf666.zip |
Rework the game startup so it uses curses nicely. There are now menus
and stuff for picking scenarios and ships and all that.
Diffstat (limited to 'sail/globals.c')
-rw-r--r-- | sail/globals.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/sail/globals.c b/sail/globals.c index 0f34bae1..331e6b64 100644 --- a/sail/globals.c +++ b/sail/globals.c @@ -1,4 +1,4 @@ -/* $NetBSD: globals.c,v 1.15 2009/08/12 09:05:08 dholland Exp $ */ +/* $NetBSD: globals.c,v 1.16 2010/08/06 09:14:40 dholland Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)globals.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: globals.c,v 1.15 2009/08/12 09:05:08 dholland Exp $"); +__RCSID("$NetBSD: globals.c,v 1.16 2010/08/06 09:14:40 dholland Exp $"); #endif #endif /* not lint */ @@ -44,7 +44,7 @@ __RCSID("$NetBSD: globals.c,v 1.15 2009/08/12 09:05:08 dholland Exp $"); static struct shipspecs specs[]; -struct scenario scene[] = { +struct scenario scene[NSCENE] = { /* * int winddir; * int windspeed; @@ -526,6 +526,16 @@ const char *const classname[] = { "Brig" }; +const char *const shortclassname[] = { + "Rowboat", + "Ship", + "Ship", + "Frigate", + "Corvette", + "Sloop", + "Brig" +}; + const char *const directionname[] = { "dead ahead", "off the starboard bow", @@ -555,9 +565,9 @@ const char dc[] = { 0, 0, -1, -1, -1, 0, 1, 1, 1 }; int mode; jmp_buf restart; -int randomize; /* -x, give first available ship */ -int longfmt; /* -l, print score in long format */ -int nobells; /* -b, don't ring bell before Signal */ +bool randomize; /* -x, give first available ship */ +bool longfmt; /* -l, print score in long format */ +bool nobells; /* -b, don't ring bell before Signal */ gid_t gid; gid_t egid; |