Berkeley copyright
[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
b7647a4b
KB
6 * provided that the above copyright notice and this paragraph are
7 * duplicated in all such forms and that any documentation,
8 * advertising materials, and other materials related to such
9 * distribution and use acknowledge that the software was developed
10 * by the University of California, Berkeley. The name of the
11 * University may not be used to endorse or promote products derived
12 * from this software without specific prior written permission.
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
a0de618d
KM
16 */
17
18#ifndef lint
b7647a4b 19static char sccsid[] = "@(#)extern.c 5.3 (Berkeley) %G%";
4cd7a139 20#endif /* not lint */
a0de618d
KM
21
22# include "robots.h"
23
24bool Dead; /* Player is now dead */
25bool Full_clear = TRUE; /* Lots of junk for init_field to clear */
26bool Jump = FALSE; /* Jump while running, counting, or waiting */
27bool Newscore; /* There was a new score added */
28#ifdef FANCY
29bool Pattern_roll = FALSE; /* Auto play for YHBJNLUK pattern */
30#endif
31bool Real_time = FALSE; /* Play in real time? */
32bool Running = FALSE; /* Currently in the middle of a run */
33#ifdef FANCY
34bool Stand_still = FALSE; /* Auto play for standing still pattern */
35#endif
36bool Teleport = FALSE; /* Teleport automatically when player must */
37bool Waiting; /* Player is waiting for end */
38bool Was_bonus = FALSE; /* Was a bonus last level */
39
40char Cnt_move; /* Command which has preceded the count */
41char Field[Y_FIELDSIZE][X_FIELDSIZE]; /* the playing field itslef */
42char *Next_move; /* Next move to be used in the pattern */
43char *Move_list = "YHBJNLUK";/* List of moves in the pattern */
44char Run_ch; /* Character for the direction we are running */
45
46int Count = 0; /* Command count */
47int Level; /* Current level */
48int Num_robots; /* Number of robots left */
49int Num_scores; /* Number of scores posted */
50int Score; /* Current score */
51int Start_level = 1; /* Level on which to start */
52int Wait_bonus; /* bonus for waiting */
53
54COORD Max; /* Max area robots take up */
55COORD Min; /* Min area robots take up */
56COORD My_pos; /* Player's current position */
57COORD Robots[MAXROBOTS]; /* Robots' current positions */
58
59jmp_buf End_move; /* Jump to on Real_time */