|
|
1.1 root 1: /*
2: * Copyright (c) 1980 Regents of the University of California.
3: * All rights reserved.
4: *
5: * Redistribution and use in source and binary forms are permitted
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
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
17: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18: *
19: * @(#)robots.h 5.5 (Berkeley) 6/1/90
20: */
21:
22: # include <curses.h>
23: # include <setjmp.h>
24:
25: /*
26: * miscellaneous constants
27: */
28:
29: # define Y_FIELDSIZE 23
30: # define X_FIELDSIZE 60
31: # define Y_SIZE 24
32: # define X_SIZE 80
33: # define MAXLEVELS 4
34: # define MAXROBOTS (MAXLEVELS * 10)
35: # define ROB_SCORE 10
36: # define S_BONUS (60 * ROB_SCORE)
37: # define Y_SCORE 21
38: # define X_SCORE (X_FIELDSIZE + 9)
39: # define Y_PROMPT (Y_FIELDSIZE - 1)
40: # define X_PROMPT (X_FIELDSIZE + 2)
41: # define MAXSCORES (Y_SIZE - 2)
42: # define MAXNAME 16
43: # define MS_NAME "Ten"
44:
45: /*
46: * characters on screen
47: */
48:
49: # define ROBOT '+'
50: # define HEAP '*'
51: # define PLAYER '@'
52:
53: /*
54: * pseudo functions
55: */
56:
57: # undef CTRL
58: # define CTRL(X) ('X' - 'A' + 1)
59:
60: /*
61: * type definitions
62: */
63:
64: typedef struct {
65: int y, x;
66: } COORD;
67:
68: /*
69: * global variables
70: */
71:
72: extern bool Dead, Full_clear, Jump, Newscore, Real_time, Running,
73: Teleport, Waiting, Was_bonus;
74:
75: #ifdef FANCY
76: extern bool Pattern_roll, Stand_still;
77: #endif
78:
79: extern char Cnt_move, Field[Y_FIELDSIZE][X_FIELDSIZE], *Next_move,
80: *Move_list, Run_ch;
81:
82: extern int Count, Level, Num_robots, Num_scores, Score,
83: Start_level, Wait_bonus;
84:
85: extern COORD Max, Min, My_pos, Robots[];
86:
87: extern jmp_buf End_move;
88:
89: /*
90: * functions types
91: */
92:
93: int quit(), cmp_sc(), move_robots();
94:
95: COORD *rnd_pos();
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.