-/* $NetBSD: dr_2.c,v 1.5 1997/10/13 19:43:23 christos Exp $ */
+/* $NetBSD: dr_2.c,v 1.9 1999/02/10 00:45:45 hubertf Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)dr_2.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: dr_2.c,v 1.5 1997/10/13 19:43:23 christos Exp $");
+__RCSID("$NetBSD: dr_2.c,v 1.9 1999/02/10 00:45:45 hubertf Exp $");
#endif
#endif /* not lint */
continue;
if (die() < 5)
continue;
- Write(sink == 1 ? W_SINK : W_EXPLODE, sp, 0, 2, 0, 0, 0);
- Write(W_DIR, sp, 0, 0, 0, 0, 0);
+ Write(sink == 1 ? W_SINK : W_EXPLODE, sp, 2, 0, 0, 0);
+ Write(W_DIR, sp, 0, 0, 0, 0);
if (snagged(sp))
foreachship(sq)
cleansnag(sp, sq, 1);
if (sink != 1) {
- makesignal(sp, "exploding!", (struct ship *)0);
+ makemsg(sp, "exploding!");
foreachship(sq) {
if (sp != sq && sq->file->dir && range(sp, sq) < 4)
table(RIGGING, L_EXPLODE, sp->specs->guns/13, sq, sp, 6);
}
} else
- makesignal(sp, "sinking!", (struct ship *)0);
+ makemsg(sp, "sinking!");
}
}
if (sp->file->struck || sp->file->dir == 0)
continue;
if (sp->specs->crew1 + sp->specs->crew2 + sp->specs->crew3 > sp->file->pcrew * 6) {
- Write(W_SIGNAL, sp, 1,
- (long)"prize crew overthrown", 0, 0, 0);
- Write(W_POINTS, sp->file->captured, 0, sp->file->captured->file->points - 2 * sp->specs->pts, 0, 0, 0);
- Write(W_CAPTURED, sp, 0, -1, 0, 0, 0);
+ Writestr(W_SIGNAL, sp, "prize crew overthrown");
+ Write(W_POINTS, sp->file->captured, sp->file->captured->file->points - 2 * sp->specs->pts, 0, 0, 0);
+ Write(W_CAPTURED, sp, -1, 0, 0, 0);
}
}
}
row = fp->row;
col = fp->col;
drift = fp->drift;
- move(movement, ship, &fp->dir, &fp->row, &fp->col, &drift);
+ move_ship(movement, ship, &fp->dir, &fp->row, &fp->col, &drift);
if (!*movement)
(void) strcpy(movement, "d");
}
void
-move(p, ship, dir, row, col, drift)
+move_ship(p, ship, dir, row, col, drift)
char *p;
struct ship *ship;
unsigned char *dir;
void
try(command, temp, ma, ta, af, vma, dir, f, t, high, rakeme)
struct ship *f, *t;
-int ma, ta, af, *high, rakeme;
+int ma, ta, af, vma, dir, *high, rakeme;
char command[], temp[];
{
int new, n;