xref: /original-bsd/games/robots/robots.h (revision ce46c3ff)
1 /*
2  * Copyright (c) 1980, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)robots.h	8.1 (Berkeley) 05/31/93
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"
32 
33 /*
34  * characters on screen
35  */
36 
37 # define	ROBOT	'+'
38 # define	HEAP	'*'
39 # define	PLAYER	'@'
40 
41 /*
42  * type definitions
43  */
44 
45 typedef struct {
46 	int	y, x;
47 } COORD;
48 
49 /*
50  * global variables
51  */
52 
53 extern bool	Dead, Full_clear, Jump, Newscore, Real_time, Running,
54 		Teleport, Waiting, Was_bonus;
55 
56 #ifdef	FANCY
57 extern bool	Pattern_roll, Stand_still;
58 #endif
59 
60 extern char	Cnt_move, Field[Y_FIELDSIZE][X_FIELDSIZE], *Next_move,
61 		*Move_list, Run_ch;
62 
63 extern int	Count, Level, Num_robots, Num_scores, Score,
64 		Start_level, Wait_bonus;
65 
66 extern COORD	Max, Min, My_pos, Robots[];
67 
68 extern jmp_buf	End_move;
69 
70 /*
71  * functions types
72  */
73 
74 int	cmp_sc();
75 void	move_robots();
76 
77 COORD	*rnd_pos();
78 
79 
80 
81 
82