-/* $NetBSD: abandon.c,v 1.7 2007/12/15 19:44:44 perry Exp $ */
+/* $NetBSD: abandon.c,v 1.9 2009/05/24 21:44:56 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
#if 0
static char sccsid[] = "@(#)abandon.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: abandon.c,v 1.7 2007/12/15 19:44:44 perry Exp $");
+__RCSID("$NetBSD: abandon.c,v 1.9 2009/05/24 21:44:56 dholland Exp $");
#endif
#endif /* not lint */
/*ARGSUSED*/
void
-abandon(v)
- int v __unused;
+abandon(int v __unused)
{
struct quad *q;
int i;
printf("You may not abandon ye Faire Queene\n");
return;
}
- if (Ship.cond != DOCKED)
- {
+ if (Ship.cond != DOCKED) {
if (damaged(SHUTTLE)) {
out(SHUTTLE);
return;
printf("Officers escape in shuttlecraft\n");
/* decide on fate of crew */
q = &Quad[Ship.quadx][Ship.quady];
- if (q->qsystemname == 0 || damaged(XPORTER))
- {
+ if (q->qsystemname == 0 || damaged(XPORTER)) {
printf("Entire crew of %d left to die in outer space\n",
Ship.crew);
Game.deaths += Ship.crew;
- }
- else
- {
+ } else {
printf("Crew beams down to planet %s\n", systemname(q));
}
}
Ship.warp3 = 125.0;
Ship.cond = GREEN;
/* clear out damages on old ship */
- for (i = 0; i < MAXEVENTS; i++)
- {
+ for (i = 0; i < MAXEVENTS; i++) {
e = &Event[i];
if (e->evcode != E_FIXDV)
continue;
i = Param.damprob[SHUTTLE] + Param.damprob[CLOAK];
Param.damprob[SHUTTLE] = Param.damprob[CLOAK] = 0;
while (i > 0)
- for (j = 0; j < NDEV; j++)
- {
- if (Param.damprob[j] != 0)
- {
+ for (j = 0; j < NDEV; j++) {
+ if (Param.damprob[j] != 0) {
Param.damprob[j] += 1;
i--;
if (i <= 0)
Ship.quadx = Now.base[i].x;
Ship.quady = Now.base[i].y;
/* setup that quadrant */
- while (1)
- {
+ while (1) {
initquad(1);
Sect[Ship.sectx][Ship.secty] = EMPTY;
- for (i = 0; i < 5; i++)
- {
+ for (i = 0; i < 5; i++) {
Ship.sectx = Etc.starbase.x + ranf(3) - 1;
if (Ship.sectx < 0 || Ship.sectx >= NSECTS)
continue;
Ship.secty = Etc.starbase.y + ranf(3) - 1;
if (Ship.secty < 0 || Ship.secty >= NSECTS)
continue;
- if (Sect[Ship.sectx][Ship.secty] == EMPTY)
- {
+ if (Sect[Ship.sectx][Ship.secty] == EMPTY) {
Sect[Ship.sectx][Ship.secty] = QUEENE;
dock(0);
compkldist(0);