ANSI
[unix-history] / usr / src / games / robots / robots.h
CommitLineData
54bb68ed
KM
1/*
2 * Copyright (c) 1980 Regents of the University of California.
4cd7a139 3 * All rights reserved.
54bb68ed 4 *
3b2381a2 5 * %sccs.include.redist.c%
4cd7a139 6 *
786b3585 7 * @(#)robots.h 5.6 (Berkeley) %G%
54bb68ed
KM
8 */
9
10# include <curses.h>
11# include <setjmp.h>
12
13/*
14 * miscellaneous constants
15 */
16
17# define Y_FIELDSIZE 23
18# define X_FIELDSIZE 60
19# define Y_SIZE 24
20# define X_SIZE 80
21# define MAXLEVELS 4
22# define MAXROBOTS (MAXLEVELS * 10)
23# define ROB_SCORE 10
24# define S_BONUS (60 * ROB_SCORE)
25# define Y_SCORE 21
26# define X_SCORE (X_FIELDSIZE + 9)
27# define Y_PROMPT (Y_FIELDSIZE - 1)
28# define X_PROMPT (X_FIELDSIZE + 2)
29# define MAXSCORES (Y_SIZE - 2)
30# define MAXNAME 16
31# define MS_NAME "Ten"
54bb68ed
KM
32
33/*
34 * characters on screen
35 */
36
37# define ROBOT '+'
38# define HEAP '*'
39# define PLAYER '@'
40
41/*
42 * pseudo functions
43 */
44
45# undef CTRL
46# define CTRL(X) ('X' - 'A' + 1)
47
48/*
49 * type definitions
50 */
51
52typedef struct {
53 int y, x;
54} COORD;
55
56/*
57 * global variables
58 */
59
60extern bool Dead, Full_clear, Jump, Newscore, Real_time, Running,
61 Teleport, Waiting, Was_bonus;
62
63#ifdef FANCY
64extern bool Pattern_roll, Stand_still;
65#endif
66
67extern char Cnt_move, Field[Y_FIELDSIZE][X_FIELDSIZE], *Next_move,
68 *Move_list, Run_ch;
69
70extern int Count, Level, Num_robots, Num_scores, Score,
71 Start_level, Wait_bonus;
72
73extern COORD Max, Min, My_pos, Robots[];
74
75extern jmp_buf End_move;
76
77/*
78 * functions types
79 */
80
786b3585
KB
81int cmp_sc();
82void move_robots();
54bb68ed
KM
83
84COORD *rnd_pos();