-/* $NetBSD: move_robs.c,v 1.8 2009/07/20 05:44:02 dholland Exp $ */
+/* $NetBSD: move_robs.c,v 1.10 2009/07/20 06:39:06 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
#if 0
static char sccsid[] = "@(#)move_robs.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: move_robs.c,v 1.8 2009/07/20 05:44:02 dholland Exp $");
+__RCSID("$NetBSD: move_robs.c,v 1.10 2009/07/20 06:39:06 dholland Exp $");
#endif
#endif /* not lint */
-# include "robots.h"
+#include <curses.h>
+#include <signal.h>
+#include <unistd.h>
+#include "robots.h"
/*
* move_robots:
void
move_robots(int was_sig)
{
- COORD *rp;
+ COORD *rp;
if (Real_time)
signal(SIGALRM, move_robots);
-# ifdef DEBUG
+#ifdef DEBUG
move(Min.y, Min.x);
addch(inch());
move(Max.y, Max.x);
addch(inch());
-# endif /* DEBUG */
+#endif /* DEBUG */
for (rp = Robots; rp < &Robots[MAXROBOTS]; rp++) {
if (rp->y < 0)
continue;
if (rp->y < 0)
continue;
else if (rp->y == My_pos.y && rp->x == My_pos.x)
- Dead = TRUE;
+ Dead = true;
else if (Field[rp->y][rp->x] > 1) {
mvaddch(rp->y, rp->x, HEAP);
Scrap[Num_scrap++] = *rp;
longjmp(End_move, 0);
}
-# ifdef DEBUG
+#ifdef DEBUG
standout();
move(Min.y, Min.x);
addch(inch());
move(Max.y, Max.x);
addch(inch());
standend();
-# endif /* DEBUG */
+#endif /* DEBUG */
if (Real_time)
alarm(3);
}