Home | History | Annotate | Line # | Download | only in hack
def.rm.h revision 1.2
      1  1.2  mycroft /*
      2  1.2  mycroft  * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985.
      3  1.2  mycroft  *
      4  1.2  mycroft  *	$Id: def.rm.h,v 1.2 1993/08/02 17:16:53 mycroft Exp $
      5  1.2  mycroft  */
      6  1.1      cgd 
      7  1.1      cgd /* Level location types */
      8  1.1      cgd #define	HWALL 1
      9  1.1      cgd #define	VWALL 2
     10  1.1      cgd #define	SDOOR 3
     11  1.1      cgd #define	SCORR 4
     12  1.1      cgd #define	LDOOR 5
     13  1.1      cgd #define	POOL	6	/* not yet fully implemented */
     14  1.1      cgd 			/* this should in fact be a bit like lit */
     15  1.1      cgd #define	DOOR 7
     16  1.1      cgd #define	CORR 8
     17  1.1      cgd #define	ROOM 9
     18  1.1      cgd #define	STAIRS 10
     19  1.1      cgd 
     20  1.1      cgd /*
     21  1.1      cgd  * Avoid using the level types in inequalities:
     22  1.1      cgd  *  these types are subject to change.
     23  1.1      cgd  * Instead, use one of the macros below.
     24  1.1      cgd  */
     25  1.1      cgd #define	IS_WALL(typ)	((typ) <= VWALL)
     26  1.1      cgd #define IS_ROCK(typ)	((typ) < POOL)		/* absolutely nonaccessible */
     27  1.1      cgd #define	ACCESSIBLE(typ)	((typ) >= DOOR)			/* good position */
     28  1.1      cgd #define	IS_ROOM(typ)		((typ) >= ROOM)		/* ROOM or STAIRS */
     29  1.1      cgd #define	ZAP_POS(typ)		((typ) > DOOR)
     30  1.1      cgd 
     31  1.1      cgd /*
     32  1.1      cgd  * A few of the associated symbols are not hardwired.
     33  1.1      cgd  */
     34  1.1      cgd #ifdef QUEST
     35  1.1      cgd #define	CORR_SYM	':'
     36  1.1      cgd #else
     37  1.1      cgd #define	CORR_SYM	'#'
     38  1.1      cgd #endif QUEST
     39  1.1      cgd #define	POOL_SYM	'}'
     40  1.1      cgd 
     41  1.1      cgd #define	ERRCHAR	'{'
     42  1.1      cgd 
     43  1.1      cgd /*
     44  1.1      cgd  * The structure describing a coordinate position.
     45  1.1      cgd  * Before adding fields, remember that this will significantly affect
     46  1.1      cgd  * the size of temporary files and save files.
     47  1.1      cgd  */
     48  1.1      cgd struct rm {
     49  1.1      cgd 	char scrsym;
     50  1.1      cgd 	unsigned typ:5;
     51  1.1      cgd 	unsigned new:1;
     52  1.1      cgd 	unsigned seen:1;
     53  1.1      cgd 	unsigned lit:1;
     54  1.1      cgd };
     55  1.1      cgd extern struct rm levl[COLNO][ROWNO];
     56