-/* $NetBSD: make_level.c,v 1.4 1997/10/12 14:09:58 lukem Exp $ */
+/* $NetBSD: make_level.c,v 1.9 2009/07/20 06:00:56 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
#if 0
static char sccsid[] = "@(#)make_level.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: make_level.c,v 1.4 1997/10/12 14:09:58 lukem Exp $");
+__RCSID("$NetBSD: make_level.c,v 1.9 2009/07/20 06:00:56 dholland Exp $");
#endif
#endif /* not lint */
-# include "robots.h"
+#include "robots.h"
/*
* make_level:
* Make the current level
*/
void
-make_level()
+make_level(void)
{
- int i;
- COORD *cp;
- int x;
+ int i;
+ COORD *cp;
+ int x;
reset_count();
for (i = 1; i < Y_FIELDSIZE; i++)
cp->y = -1;
My_pos.y = -1;
- bzero(Field, sizeof Field);
+ memset(Field, 0, sizeof Field);
Min.y = Y_FIELDSIZE;
Min.x = X_FIELDSIZE;
Max.y = 0;
if ((i = Level * 10) > MAXROBOTS)
i = MAXROBOTS;
Num_robots = i;
+ memset(Scrap, 0, sizeof(Scrap[0]) * MAXROBOTS);
+ Num_scrap = 0;
while (i-- > 0) {
cp = rnd_pos();
Robots[i] = *cp;