mirror of
https://github.com/vattam/BSDGames.git
synced 2025-12-21 03:14:50 +00:00
copy in from cvs; cvs2svn fucked up big time
git-svn-id: file:///srv/svn/joey/trunk/src/packages/bsdgames@9775 a4a2c43b-8ac3-0310-8836-e0e880c912e2
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: init_field.c,v 1.5 1997/10/12 14:09:57 lukem 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.5 1997/10/12 14:09:57 lukem 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,
|
||||
@@ -54,7 +57,7 @@ init_field()
|
||||
{
|
||||
int i;
|
||||
static bool first = TRUE;
|
||||
static char *desc[] = {
|
||||
static const char *const desc[] = {
|
||||
"Directions:",
|
||||
"",
|
||||
"y k u",
|
||||
@@ -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!" : " ");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user