-/* $NetBSD: init_field.c,v 1.5 1997/10/12 14:09:57 lukem Exp $ */
+/* $NetBSD: init_field.c,v 1.8 2003/08/07 09:37:36 agc 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[] = "@(#)init_field.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: init_field.c,v 1.5 1997/10/12 14:09:57 lukem Exp $");
+__RCSID("$NetBSD: init_field.c,v 1.8 2003/08/07 09:37:36 agc Exp $");
#endif
#endif /* not lint */
# include "robots.h"
+static int telx = 0;
+static int tely = 0;
+
/*
* init_field:
* Lay down the initial pattern whih is constant across all levels,
{
int i;
static bool first = TRUE;
- static char *desc[] = {
+ static const char *const desc[] = {
"Directions:",
"",
"y k u",
move(i, X_FIELDSIZE + 2);
addstr(desc[i]);
}
+ telx = X_FIELDSIZE + 2;
+ tely = i;
if (first)
refresh();
first = FALSE;
Next_move = &Move_list[-1];
#endif
}
+
+void
+telmsg(on)
+ int on;
+{
+ move(tely, telx);
+ addstr(on ? "Teleport!" : " ");
+}