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