|
|
BSD 4.3tahoe
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* @(#)snake.h 5.4 (Berkeley) 6/18/88
*/
# include <stdio.h>
# include <assert.h>
# include <sys/types.h>
# include <sgtty.h>
# include <signal.h>
# include <math.h>
#define ESC '\033'
struct tbuffer {
long t[4];
} tbuffer;
char *CL, *UP, *DO, *ND, *BS,
*HO, *CM,
*TA, *LL,
*KL, *KR, *KU, *KD,
*TI, *TE, *KS, *KE;
int LINES, COLUMNS; /* physical screen size. */
int lcnt, ccnt; /* user's idea of screen size */
char xBC, PC;
int AM, BW;
char tbuf[1024], tcapbuf[128];
char *tgetstr(), *tgoto();
int Klength; /* length of KX strings */
int chunk; /* amount of money given at a time */
#ifdef debug
#define cashvalue (loot-penalty)/25
#else
#define cashvalue chunk*(loot-penalty)/25
#endif
struct point {
int col, line;
};
struct point cursor;
struct sgttyb orig, new;
#ifdef TIOCLGET
struct ltchars olttyc, nlttyc;
#endif
struct point *point();
#define same(s1, s2) ((s1)->line == (s2)->line && (s1)->col == (s2)->col)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.