+/* $NetBSD: klmove.c,v 1.4 1997/10/12 21:24:57 christos Exp $ */
+
/*
- * Copyright (c) 1980 Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1980, 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
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
-/*static char sccsid[] = "from: @(#)klmove.c 5.4 (Berkeley) 6/1/90";*/
-static char rcsid[] = "$Id: klmove.c,v 1.2 1993/08/01 18:50:23 mycroft Exp $";
+#if 0
+static char sccsid[] = "@(#)klmove.c 8.1 (Berkeley) 5/31/93";
+#else
+__RCSID("$NetBSD: klmove.c,v 1.4 1997/10/12 21:24:57 christos Exp $");
+#endif
#endif /* not lint */
-# include "trek.h"
+#include <stdio.h>
+#include "trek.h"
/*
** Move Klingons Around
** course around stars.
*/
+void
klmove(fl)
int fl;
{
int n;
- register struct kling *k;
+ struct kling *k;
double dx, dy;
int nextx, nexty;
- register int lookx, looky;
+ int lookx, looky;
int motion;
int fudgex, fudgey;
int qx, qy;
if (Trace)
printf("klmove: fl = %d, Etc.nkling = %d\n", fl, Etc.nkling);
# endif
- for (n = 0; n < Etc.nkling; k && n++)
+ for (n = 0; n < Etc.nkling; n++)
{
k = &Etc.klingon[n];
i = 100;
Sect[k->x][k->y] = EMPTY;
Quad[qx][qy].klings += 1;
Etc.nkling -= 1;
- bmove(&Etc.klingon[Etc.nkling], k, sizeof *k);
+ *k = Etc.klingon[Etc.nkling];
Quad[Ship.quadx][Ship.quady].klings -= 1;
k = 0;
break;