summaryrefslogtreecommitdiffstats
path: root/robots/init_field.c
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2002-01-31 17:35:52 +0000
committerchristos <christos@NetBSD.org>2002-01-31 17:35:52 +0000
commit026158ce21511a76693e38921c011f2f2fa66002 (patch)
tree0638bd14d8d715f211ff76076c7bec33f8dbd9ce /robots/init_field.c
parentf04999017eaf3d433b717aba1d49698eb50f2660 (diff)
downloadbsdgames-darwin-026158ce21511a76693e38921c011f2f2fa66002.tar.gz
bsdgames-darwin-026158ce21511a76693e38921c011f2f2fa66002.tar.zst
bsdgames-darwin-026158ce21511a76693e38921c011f2f2fa66002.zip
Be more verbose about teleports, and fix a minor problem in autobot mode.
Diffstat (limited to 'robots/init_field.c')
-rw-r--r--robots/init_field.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/robots/init_field.c b/robots/init_field.c
index 57200a44..822ab10b 100644
--- a/robots/init_field.c
+++ b/robots/init_field.c
@@ -1,4 +1,4 @@
-/* $NetBSD: init_field.c,v 1.6 1999/09/08 21:17:57 jsm Exp $ */
+/* $NetBSD: init_field.c,v 1.7 2002/01/31 17:35:52 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -38,12 +38,15 @@
#if 0
static char sccsid[] = "@(#)init_field.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: init_field.c,v 1.6 1999/09/08 21:17:57 jsm Exp $");
+__RCSID("$NetBSD: init_field.c,v 1.7 2002/01/31 17:35:52 christos 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,
@@ -112,6 +115,8 @@ init_field()
move(i, X_FIELDSIZE + 2);
addstr(desc[i]);
}
+ telx = X_FIELDSIZE + 2;
+ tely = i;
if (first)
refresh();
first = FALSE;
@@ -120,3 +125,11 @@ init_field()
Next_move = &Move_list[-1];
#endif
}
+
+void
+telmsg(on)
+ int on;
+{
+ move(tely, telx);
+ addstr(on ? "Teleport!" : " ");
+}