BSD 4_3_Reno release
[unix-history] / usr / src / games / robots / extern.c
CommitLineData
a0de618d
KM
1/*
2 * Copyright (c) 1980 Regents of the University of California.
4cd7a139
KB
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms are permitted
1c15e888
C
6 * provided that: (1) source distributions retain this entire copyright
7 * notice and comment, and (2) distributions including binaries display
8 * the following acknowledgement: ``This product includes software
9 * developed by the University of California, Berkeley and its contributors''
10 * in the documentation or other materials provided with the distribution
11 * and in all advertising materials mentioning features or use of this
12 * software. Neither the name of the University nor the names of its
13 * contributors may be used to endorse or promote products derived
b7647a4b
KB
14 * from this software without specific prior written permission.
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
1c15e888 17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
a0de618d
KM
18 */
19
20#ifndef lint
1c15e888 21static char sccsid[] = "@(#)extern.c 5.4 (Berkeley) 6/1/90";
4cd7a139 22#endif /* not lint */
a0de618d
KM
23
24# include "robots.h"
25
26bool Dead; /* Player is now dead */
27bool Full_clear = TRUE; /* Lots of junk for init_field to clear */
28bool Jump = FALSE; /* Jump while running, counting, or waiting */
29bool Newscore; /* There was a new score added */
30#ifdef FANCY
31bool Pattern_roll = FALSE; /* Auto play for YHBJNLUK pattern */
32#endif
33bool Real_time = FALSE; /* Play in real time? */
34bool Running = FALSE; /* Currently in the middle of a run */
35#ifdef FANCY
36bool Stand_still = FALSE; /* Auto play for standing still pattern */
37#endif
38bool Teleport = FALSE; /* Teleport automatically when player must */
39bool Waiting; /* Player is waiting for end */
40bool Was_bonus = FALSE; /* Was a bonus last level */
41
42char Cnt_move; /* Command which has preceded the count */
43char Field[Y_FIELDSIZE][X_FIELDSIZE]; /* the playing field itslef */
44char *Next_move; /* Next move to be used in the pattern */
45char *Move_list = "YHBJNLUK";/* List of moves in the pattern */
46char Run_ch; /* Character for the direction we are running */
47
48int Count = 0; /* Command count */
49int Level; /* Current level */
50int Num_robots; /* Number of robots left */
51int Num_scores; /* Number of scores posted */
52int Score; /* Current score */
53int Start_level = 1; /* Level on which to start */
54int Wait_bonus; /* bonus for waiting */
55
56COORD Max; /* Max area robots take up */
57COORD Min; /* Min area robots take up */
58COORD My_pos; /* Player's current position */
59COORD Robots[MAXROBOTS]; /* Robots' current positions */
60
61jmp_buf End_move; /* Jump to on Real_time */